Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Example: retrieving field recognition results to send to an external application/database
- // KeyValuePair in "using System.Collections.Generic;"
- foreach (KeyValuePair<string, StringField> kpr in recog_result.GetStringFields())
- {
- // Thus you can send the recognized field values to other app/db/etc
- Console.WriteLine("Sending field \"{0}\" with value \"{1}\"", kpr.Key, kpr.Value.GetUtf8Value());
- }
- // Example: storing retrieved image fields to directory "C:\Users\username\Desktop\test_images"
- foreach (KeyValuePair<string, ImageField> kpr in recog_result.GetImageFields())
- {
- // kpr.Value.GetValue() returns an Image object
- kpr.Value.GetValue().Save("C:\\Users\\Username\\Desktop\\test_images\\" + kpr.Key + ".png");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement