Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

OCR for handset LCD

Just want a OCR for handset LCD,  but the handset is not fixed, so the location for OCR is not same every time. so I need move and rotate the image for OCR. I used the pattern matching to get the LCD location in first. The problem is ..

 

Can the coordinate system transform a ROI?

How to get the area of LCD?

If it need copy to other viewer then implement the OCR? the match results need be move and rotate the image.

Or I can use the mask?

 

Someboy can give me the flow, I use the vb, but I just need a idea. thanks!

0 Kudos
Message 1 of 12
(6,310 Views)

Please check my procedures.

1. Open the image.

2. Implement the pattern match, get the angle.

3. Rotate the angle in the image.

4. Implement the pattern match again, get the coordinate.

5. Set the ROI, implement the OCR.

 

Another idea as below,

1. Open the image.

2. Implement the pattern match.

3. Copy the match area into other viewer.---but i don't know how to do.

4. Set the ROI, implement the OCR.

 

 Waiting for your help. thx!

0 Kudos
Message 2 of 12
(6,303 Views)

Hi jack_yu,

 

Can you post a few images?  If the back ground in reallygood( in terms of contrast difference). You can use a edge detection too. Post a few images If you can

0 Kudos
Message 3 of 12
(6,296 Views)

Pls check attached the image, it is not good. however, the edge detect will return a coordinate system also.

I rather to get the pattern match, then extract the sub-image to other viewer, since I need do other process also.

Now I have reviewed other discuss in the forums, OCR can be finished, but I really want to extract the match area for more process. the Vision support a method --extract2 for copy a Rectangle, but my match results is a RotatedRectangle. how to extract the ratated rectangle to new viewer and the angle set to zero. like 2nd image, The blue area will be ratated and deleted the yellow part.

 

thks, muks.. 

 

lcd.PNGlcd2.PNG

0 Kudos
Message 4 of 12
(6,294 Views)
Please try this
Message 5 of 12
(6,282 Views)
I used this template
0 Kudos
Message 6 of 12
(6,281 Views)

thx! muks,

but i can not open the vi due to I don't have lv, i only try run the ni vision and used it with vb. could you inform me which problem you solved.

1. OCR

2. Extract the rotated regions.

 

Best regards,

 

Jackyu

0 Kudos
Message 7 of 12
(6,277 Views)

Hi  jack_yu,

 

I just did pattern matching with rotated images of your original image. I chose "talk" as the template and used an "array to cluster" . Then i used an un-bundle to get the angle alone. Now i subtracted this from 360 and gave it to imaq rotate. Now everytime you will get the image rotated in the same way. You can extract it by using the value of top,left and bottom right from the bounding box. Which again you will get from the unbundle function and then use an imaq extract.

0 Kudos
Message 8 of 12
(6,273 Views)

thx! let me repeat your steps...

 

1. Do the pattern("talk") match. get the angleX, TopXY.

2. Rotate angleX to whole image.

3. ??? As you know, the coordinate system will be changed now, the TopXY will be still available??

4. Used the Extract2 to get the sub-image.

 

I will try it by your idea, however, there is no mothed to extract a non-rectangle directly??? we need write a own sub-vi like yours to implement?.

 

thx a lot muks!

0 Kudos
Message 9 of 12
(6,258 Views)
So I suppose you are trying this in vb. Let me check and get back If I can find a vb code for imaq extract.
0 Kudos
Message 10 of 12
(6,255 Views)