Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading the bus number

Solved!
Go to solution

Hello,

 

I am new to machine vision and I wish you can help me. I would like to read the bus number from a regular bus picture (fig.1). I have used OCR training to train characters (bus numbers) but I have noticed that every picture has certain threshold to read the bus number correctly and when I load another picture, it doesnt read the number correctly unless I change threshold sittings. Can I have more than one (.abc) file and use all of them in my program? Is there another solution rather than using a lot of (.abc) files?

 

Secondly, do you have any suggestion to allocate ROI (region of interest) around the bus number automatically without using the mouse? I mean by

automatically that when I open the image in my program (.vi), it will search for the number in the image and then allocates ROI around that number.

 

Rami

0 Kudos
Message 1 of 5
(3,680 Views)

Hi Rami,

 

For your first question, what mode is your threshold currently set to? Have you tried using "fixed range?" I suppose you could use multiple character sets within one program, but you would have to repeat your processing steps two or more times, which might be time consuming.

 

To adjust the ROI automatically, you might consider if there are any features that are distinct and consistent between your images. For example, if the bus number were shifted a certain distance one way or the other from a large rear-view mirror, you could potentially use pattern matching to recognize that mirror, create a coordinate system there, and place your ROI accordingly. Hope this helps!

 

Best regards,

Matt J - NI Tools Network
0 Kudos
Message 2 of 5
(3,667 Views)

Hi Matt J,

 

Thanks for your help. Actually I use fixed range threshold but as I said before, when I adjust threshold for a specific image (e.g. Fig 14_5), it detects the bus number and reads it correctly but when I load another image with the same bus number (e.g. Fig 14_4), it doesn't detect the numbers. Therefore, do I need to do a character set (.abc) for every image?

 

For the second part, I tried to use pattern matching for the bus number but I encountered same problem as above. It recognizes the same image, which I did the learning pattern on it but when I load another one, it doesn't recognize the pattern.

 

I think this is because the bus position and direction in an image differs from any other one; thus, the bus number differs in size, brightness and sloping.

 

I hope I make it clear and  you can help me in this problem.

 

Rami

Download All
0 Kudos
Message 3 of 5
(3,664 Views)
Solution
Accepted by topic author rammo

Rami,

 

Unless you can achieve some uniformity in your images (i.e. the picture is taken from the same distance and angle each time), you are going to run into this issue. The character set approach is simply not robust enough to handle the discrepancies in these different images. Its typical use is for images taken a fixed distance and orientation from the target. So, if all your images will vary in these respects, then a unique character set would have to be created for each instance.

 

Best regards,

Matt J - NI Tools Network
0 Kudos
Message 4 of 5
(3,655 Views)

Matt,

 

You are right, it seems very comlicated project. Anyways, thank you very much for your help.

 

Regards

Rami

0 Kudos
Message 5 of 5
(3,653 Views)