Quantcast
Channel: Machine Vision topics
Viewing all articles
Browse latest Browse all 1268

Pre-processing of Reference and Test image for image subtraction

$
0
0

Dear Members,

 

I am working on a PCB verification system school project using LabVIEW and Vision Assistant. My plan is to subtract the test image taken by a camera from the reference image which is a bitmap format of the CAD gerber file. I cut out the reference image manually and for the subtraction method, the test image should be the same resolution with perfect alignment to the reference image, so the appropriate pixels will be subtracted from each other. However, I would like to automate this process and I am stucked with the pre-processing part of the test image.

So far I manually masked the test image trying to find the closest pixels of the edge of the PCB and with the "Geometry" function I resampled it for the same size like the test image. However, at the end when I execute the subtraction operator we can see that the two images are misaligned so false defects are detected. My ideas which I tried but couldn't figure out how to program it:

- Instead of me trying to find the edge and mask it, I should find the edge with image processing and then mask it around the found edge. Since the green PCB is on a white background I could find the edge with grayscaling and thresholdind but after that I don't know how to use that as a ROI for masking. It is just my idea and not sure if it's doable. I would appreciate any other solution for finding the PCB board and mask it as precisely as possible.

- Since the the pictures are misaligned I tried "Geometric Matching" and "Set coordinate system" methods so I find a reference point on both images and set a coordinate system to those points. However, I couldn't figure out how to fit the two coordinate systems on the same pixel and give them the same orientation. 

I took a screen record, screenshots and also attached the Vision Assistant script about the process with the above mentioned problems so you may have a better understanding. Thank you in advance for your time and help.

 

Kind regards,

vitya


Viewing all articles
Browse latest Browse all 1268

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>