LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

OCR not working in text rotated

Hi to all.

 

I am developing an application which I use OCR.

What i do in the application is:

 

1- I use IMAQ match pattern 4 VI to find the text in the image inspection.

2- I get ROI where the text is in from the output boubding box of IMAQ match pattern 4.

3- Then I do OCR using IMAQ OCR read text 4.

 

Everything works fine if the image is not rotated but when the image is rotated IMAQ match pattern 4 works fine (it can find the text rotated in the image) but OCR does not work, it can not find any characters.

By the way I set "text detection" property OCR to true for rotated characters.

 

Another information is that if I put the ROI manually on the display then OCR works fine... so I think I am doing something wrong getting the ROI and passing it to OCR...

 

Anybody can help me?

 

This is the part of my code:

pictureCode.png

And this is what happens when the image inspection is not rotated:

OCRNotRotated.png

Ant this when the image is rotated which pattern matchin can find the text but OCR does not work:

OCRRotated.png

0 Kudos
Message 1 of 3
(2,648 Views)

Any ideas?

 

Thanks a lot

0 Kudos
Message 2 of 3
(2,565 Views)

While this doesn't directly answer your question, could you simply rotate the image prior to setting the ROI to ensure the text is horizontal?  

0 Kudos
Message 3 of 3
(2,556 Views)