Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

the minimum img resolution for OCR.

Please i need help in my graduation project (PCB machine vision inspection & we used OCR for ICs part number inspection and search in 1 or more PCB). My questions are: 1.What is the minimum resolution of the image that we use in OCR? 2.Is Olympus (IR-300) digital camera (whose spec in the attach) is suitable for labview & suitable for OCR for the above purpose?
Eman
0 Kudos
Message 1 of 4
(6,271 Views)
In general, I would recommend a minimum of 4 x 4 pixels to image the smallest feature of the characters that you intend to OCR, for example, the dot over a lower case I, the period at the end of a sentence or the gap between characters.  If the dot measures 1X1 mm, then you would want 4 pixels to cover the dot.  For example, if your text covered a 100 mm x 100 mm region and if your smallest feature was 1mm, then I would recommend a minimum of 400 x 400 pixels.
 
However, if there is a difficult font, poor lighting or little contrast between the characters and the background, it would be safer to assume that a minimum of 8 x 8 pixels will be necessary.
 
The Olympus IR-300 can be used for OCR, but it may be difficult to interface the camera directly to the NI Software.  You will probably be limited to saving images from the camera to a folder on the PC and opening the saved images with the NI software.  In addition, since the IR-300 is a color camera, I would recommend reducing the 5 MP pixel count by 30% when calculating the number of available pixels to adjust for the camera's mosaic color filter fuzzing up the edge information.
 
If the camera has TWAIN support or if the camera has a Directshow filter, you may be able to interface the camera directly to the NI software.
 
 
Robert Eastlund
Graftek Imaging, Inc.
Phone: (512) 416-1099 x101
Email: eastlund@graftek.com
0 Kudos
Message 2 of 4
(6,256 Views)
Thank you for your post Robert!

hjkj,

I just want to add a few things to what Robert has posted - the OCR algorithm can work with a small number of pixels as Robert has mentioned, but it is recommended to keep your characters between 25 and 40 pixels:

"Character size is the total number of pixels in a character. Generally,
character size should be between 25 and 40 pixels. If characters are too
small, training becomes difficult because of the limited data. The additional
data included with large characters is not helpful in the OCR process, and
the large characters can cause the reading process to become very slow."

This information can be found on page 18-11 from the NI Vision Concept Manual (Start > All Programs > National Instruments > Vision > Documentation > NI-Vision). Chapter 18 contains very detailed information about  how OCR works and is intended to be used.

Also, since you are looking at a consumer grade camera, if the camera can be seen by DirectShow you can try using NI IMAQ for USB Cameras.
--Michelle

National Instruments
Message 3 of 4
(6,226 Views)
Thank you all for your  reply and help. Smiley Very Happy
Eman
0 Kudos
Message 4 of 4
(6,209 Views)