Jump to content

Using OCR with Coordinate System


Recommended Posts

I have an application where I need to read the text on a sticker. The sticker is not always in the exact same place. But the text I need to read is always within the same area of the sticker.

Using Pattern Matching, I am able to find the location of the sticker. But I have so far been unsuccessful in using that information to translate the location of my OCR ROI.

I know that I need to change the global rectangle values on the OCR Read Text.vi based on what the Pattern Matching VI returns. I'm just not sure how to do that.

I've managed to get a little further since I first started working on this the other day. I'm now using the Position data from the Matches output of the IVA Match Pattern Output.vi, manually adding or subtracting the offset from where it was in my "original" position and applying the new values to the ROI Descriptor input of the IMAQ OCR Read Text.vi. But this is pretty ugly and I still don't have it working yet.

Has anyone found a good way of doing this?

Link to comment

I still don't have the best solution here I know. But for interest's sake I'll go ahead and post what I came up with before I had to move on.

I'm still convinced that there is a way to use the Coordinate System VIs to locate the OCR Read Text. But I couldn't figure it out in the amount of time I had. The way I'm doing it now; By recording the "original" offset from a pattern's center point and adding or subtracting from those points as the center of the pattern moves. This does work. But I'm afraid I could run into problems later on.

Download File:post-247-1151500222.zip

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.