03-05-2014 05:54 AM
Hi,
I use NI Smart Camera and NI Vision Builder 2012 for measuring HUE values of the LEDs. I can manually adjust the ROI of each LED. Sometimes mechanics move a bit and my ROIs are then tilted/off from LED and measurement results are staring to fail. I am wondering how to set vision builder/camera to automatically fine tune ROIs when needed? I attach a sample picture of LEDs. There is also situation where I manually fine tune LED D79's ROI.
BR,
Jick
03-05-2014 08:09 AM
Dear Jick
This can be done in many ways. for example
1. Fnd the LED's using pattern matching and give the ROI to your HUE measurement.
2. Find the LED's Centroid using blob detection and compute the ROI based on the centoid results and measure HUE..
03-05-2014 08:42 AM
Hi,
How about using Detect Objects? How do I pass found object's coordinates to Measure Colors step's ROI?
Jick
03-05-2014 08:49 AM
Stick with Silver Shaper's suggestions. Center of gravity measurements on blobs are the most reliable for locating the true center. All other matching functions are dependent on matching a template image, which makes them somewhat less reliable.
03-06-2014 02:57 AM
Hi,
I don't know how this is done: "Center of gravity measurements on blobs ". Some inspection step or something else?
BR,
Jick
03-06-2014 09:13 AM
First, convert the image to greyscale. Perform threshold for bright spots. Use particle analysis to extract X/Y centroid values for each blob. Adjust your regions using the X/Y values.
03-07-2014 02:57 AM
I have problems to do step "Use particle analysis to extract X/Y centroid values for each blob." Should I use Detect Objects or Classify Objects? Do I need to take new color picture when the ROI area is specified to measure hue value? I attach my .vbai and sample picture here.
Jick
03-07-2014 08:54 AM - edited 03-07-2014 08:55 AM
You can use the Detect Objects step to find all your color LEDs (no need to convert to mono image and threshold before hand). Then use the state diagram to loop for each LED:
1. Use an array operator step to get the Center of mass and width/height for a specific LED from the results of the Detect Object step.
2. Create a dynamic ROI based on these values
3. Use this ROI to measure your color (and do any pass/fail decision making)
4. Increment your counter, so the next iteration of the state will get the info for the next LED. from the Array Operator step.
Leave this loop when no more LEDs to process.
I attached a sample of how to do this.
Hope this helps,
Brad
03-10-2014 06:30 AM
Thanks for the example. There is still one open question: how do I detect if one LED is OFF? For example if one LED is missing Detect Objects 1 step finds one object less but how can I know which LED is missing/off? How about creating Detect Object step for each LED separately and if there is no LED on measure colors step just fails? I attach my suggestion here.
BR,
Jick
03-10-2014 07:03 AM - edited 03-10-2014 07:16 AM
Hello,
if your spacing between LED's is constant and you "calibrate" this distance (approximate calibration to know the distance between the adjecent LED's), you could use a simple intensity profile to identify the missing peak:
Best regards,
K