05-29-2022 09:14 PM
Using the NI Vision Builder AI.
How do I create a program for this inspection as a fail.
The blue solution spillage can be anywhere on the card****
Below is the image of an accepted card. The blue solution should be only inside of the black ring.
Solved! Go to Solution.
05-29-2022 10:04 PM
I do not have vision builder AI, and use the Vision Development Module. Vision Builder AI does not have all the bells and whistles but you should be able to identify the precise location of the three circular targets, and mask those areas from being inspected. From there you can count the number of pixels that match the blue color, and if that number is bigger than your set point, the card can be rejected.
Pixels of a specific color can be grouped into blobs, if location information is necessary.
Good luck!
Robert
05-30-2022 01:22 AM
Kind of good idea, only problem right now is since the captured image is not consistent. The color can be light and dark blue so it is hard to set the color for the pixel image.
Also think the vision builder is more limited than I think when it comes to color inspection compared to inspection in monochrome since I couldn't find the blobs features that you mention
05-30-2022 07:44 AM
You need to look at colours differently. You are thinking in RGB, try using Hue, Saturation and Intensity. Your Hue should be consistent(which colour it is), saturation should be fairly stable(how deep the colour is) and Intensity should vary(how light/dark the colour is)
Working in a different colour space should allow you to see the blobs of blue.
05-30-2022 08:50 PM
AgiMikeB is correct. HSL space is much better for finding colors that might vary in "intensity". the card you are using is essentially black and white, so color isolation should be pretty robust.
06-06-2022 07:58 PM
Works great on the blue color
I do have another question, the solution can turn into pink when exposed to humidity. But the problem for this it is hard to set it to detect the light pink color due to the white color of the card background. Do you know any method to only able detect the pink color whether it be the software or the hardware such as lighting and camera.
Currently using ring light and a 20MP colored camera
Second picture is the best setting I could get.
I am planning to use a dark background behind the card so coudd tackle that but somehow it detect some parts on the card if you zoom to the picture
06-07-2022 08:03 AM
Use the image buffer to store your colour image.
If you use the Intensity plane to find the dark black circles, then use the binary morphology to fill holes.
Erode the image to make the now white circles slightly smaller and then mask your colour image with our eroded one.
You should now only have the circles of interest.
Detect your pink or blue in there.
Sorry I don't have VBAI to try this out for you
Mike