Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

image compare

I've two images, Reference and Printed.

Reference is a digitally created image, grayscale, and is the reference image.

Printed is a printed image and is acquired scanning the Reference image printed on paper (for example).

I need to compare the R and P in order to discover printing errors:

- characters missed or changed
- ink misprintings
- missed lines
- mispositioned patterns

Images are large more than 2Mpixel and I need to discover errors as little as 5x5 pixel.

Which strategy do you suggest to use?

Phil
0 Kudos
Message 1 of 6
(4,513 Views)

Hi,

first of all you should be sure the Printed image has the same resolution of the Reference to make a real comparrison. Once you have set this information you can easly apply the Logic function for instance AND or XOR, otherwise you can make just a little of morphology, and then check the single pixel value on both images.

Try

0 Kudos
Message 2 of 6
(4,503 Views)

The R and P images have the same theoretical resolution.

Obviously errors in the mechanic of the scanner makes them slightly different in size. I forced the two sizes equal by a stretching P image to the size of R image.

Scanner also apply an alias (defocus) due to optical resolution. Lines that are binary patterns appears like a shaded ones.

In addition you must consider that printed material is never equal to its digital reference (printers, laser plotters, CTPs and press machines have they our own dot gain, ink absobtion, slight difference in the font pattern............. etc)

Subtracting, ANDing, XORing operators are not so easily applicable and they're useful only for coarse comparing.

Phil

0 Kudos
Message 3 of 6
(4,499 Views)

I hope your scanner resolution is a minimum of double the printing resolution.  Triple would be even better.  Otherwise, it will be very difficult to compare on a pixel by pixel basis.  I suspect this may be a problem since you say a binary pattern shows up as shades of gray.

I would consider aligning a pixel grid to the scanner image, where each square in the grid contains a pixel.  If you can locate your edge pixels, the interior ones all fall in place.  For each square in the grid, determine if the pixel was printed (black) or not (white).  Perhaps look at the very center of each grid square, or average the contents of the square.  This should convert your scanner image to a binary image that could easily be compared to your master pattern to locate errors.

Can you post a section of a scanned image that shows some details so we can see what difficulties you will run into?
 
Bruce
Bruce Ammons
Ammons Engineering
Message 4 of 6
(4,485 Views)

Hi All,

I am new to this labview programming.I heard your discussions on image comparision.I am not able to make out practically.

My problem is to compare two images.I have to capture an image from a device and compare it with the static image i have it on hardisk and validate if its the same as the one i have.

Can you please make out a block diagram so that i can understand better.

Thanking you in advance.

 

0 Kudos
Message 5 of 6
(4,060 Views)
Dear Sam,

Take a look at the Compare Example VI that comes with the Vision Development Module. You can find it from the LabVIEW Example Finder. I think this example will help, and you can read more about image comparison in the NI-IMAQ Vision Concepts Manual in Ch. 6: Operators. The Vision Concepts Manual normally installs at

programs»National Instruments»Vision»Documentation»NI Vision

Best Regards,

~Nate
0 Kudos
Message 6 of 6
(4,017 Views)