Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Pick out object on image (or video)

Solved!
Go to solution

Hello Friends!

prompt me please!

I want to "teach" my VI to pick out object on image (or video). My VI must to read information (text) from some documents with OCR function. But I must to create ROI myself and my VI works very bad because documents may move and ROI become wrong. So I want to my VI'll find text itself and set ROI on this text. Is it able?

Any help and example will thanked!

0 Kudos
Message 1 of 14
(5,104 Views)
I know function - Pattern Matching and Geometric Matching. But I don't know how to use this function for text, because text is different on documents. 
0 Kudos
Message 2 of 14
(5,103 Views)
You can use "imaq select rectangle" vi to select the roi. Can you post a few images?
0 Kudos
Message 3 of 14
(5,101 Views)
It is a Drivers licence. And I want to my VI find the text and set ROI on it. Imaq select rectangle - is it the function and can I find it in Vision Assistant?
0 Kudos
Message 4 of 14
(5,097 Views)
You can use a clamp also and determine the position of the card. After this you apply the relative roi to read the text using ocr
Message 5 of 14
(5,091 Views)

Thanks! I have made clamp already, but it is no comfortable for me. I have solved to do my VI more perfection.

How I can to set ROI myself when snap with camera has done already? What is the function or functions do it possible?

0 Kudos
Message 6 of 14
(5,089 Views)
As suggested earlier did you try "IMAQ select rectangle".vi?
0 Kudos
Message 7 of 14
(5,087 Views)

I am trying now. Thanks for idea!

0 Kudos
Message 8 of 14
(5,085 Views)
Solution
Accepted by topic author ST-Peterburg

Something like that:

First detect two edges of the driving license, then compute intersection between two edges, then set coordinate system, and after that reposition ROI in OCR step depend from coordinate system:

 

Screen1.png

 

Now OCR work also for rotated image:

 

Screen2.png

 

Take a note, that Straight Edge (Rake) will works for 8 bit images. Because RGB is not supported you will need to convert your color image to grayscale.

 

Script in attachment.

 

Andrey.

 

Message 9 of 14
(5,080 Views)
Thank You, Andrey! I'll try to do as You recommended

.

0 Kudos
Message 10 of 14
(5,055 Views)