Get text from ocr

How to to read directory and get all image file, after that scan each image file using OCR and extract username and pan card no from image?

Hi @praveenptl71,
Use Directory.GetFiles(path), this will return a string array containing path to images inside that directory.
Use for each item in that array variable,
Pass item to the ocr activity and fetch the text from the image
Use some string manipulation to get the username and pan card no.
Continue until all files are processed.

2 Likes

I have added this and it show following result:

[{X=0,Y=0,Width=0,Height=0}, fåHTsr
INCOME TAX DEPARTMENT
D MANIKANDAN
DURAISAMY
16/07/1986
permanent Account Number
BNZPM2501F
Signature GOVT. OF INDIA]

how can i get name from this?

Better to use the output text instead of result in Microsoft OCR activity.

Then you’ll get an output like this
INCOME TAX DEPARTMENT
D MANIKANDAN
DURAISAMY
16/07/1986
permanent Account Number
BNZPM2501F
Signature GOVT. OF INDIA]

Then split the string using newline,
Refer this post

2 Likes

Thanks @shankm it’s working.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.