09-11-2008 05:12 AM
Hi,
please, can explain , what is the difference between (Image Centroid) and (Center of Mass)?
thanks
aljuboori
09-11-2008 06:03 AM
hi,
please, can explain .. what are the differences between (Image Centroid) and (Center of Mass)?
waiting your kind replay
Al-Juboori
09-11-2008 10:27 AM - edited 09-11-2008 10:27 AM
The "Center of Mass" that you get from "Imaq Particle Analysis" is an average position of all non zero pixels within a particle (a particle being defined as a blob of connected non-zero pixels). The "Centroid" you get from "IMAQ Centroid" is the intensity weighted position of all of the non-masked values within an image. In other words, the "center of mass" from Particle Analysis is really just the center of a region of non-zero pixels, but the "centroid" from IMAQ centroid is the locus of distributed energy. In the example below the red crosshair is the "particle analysis center of mass" and the blue crosshair is the "Centroid". you can see that the blue crosshair lands closer to the more intense part of the image and the red crosshair lands in the center of the dark oval.
09-11-2008 12:18 PM
Al-Juboori
09-11-2008 03:24 PM
OK, but I use vision builder .... and I need to use centroid to find the laser spot center... please, can explain... How can we call the centroid function from VI to Vision Builder.. because ... when I call Vision Assistant from Vision Builder .. the centroid do not available
waiting your kind replay
Al-Juboori09-12-2008 03:18 PM - edited 09-12-2008 03:21 PM
I'm using NI Vision Assistant 8.6. I find the centroid function under Processing Functions:Grayscale.
Please find a picture of the menu where I found it below:
If you still can't find it, you may be able to simply calculate it yourself from these equations:
09-13-2008 01:50 PM
Hi Root Canal,
Thanks for your answer...
but I use Vision Builder V. 3.0 , not Vision Assistant .... and I need to use centroid (inside Vision builder!) to find the laser spot center... please, can explain... How can we call the centroid function from Vision Assistant to Vision Builder.. because ... when I call Vision Assistant from Vision Builder .. the centroid do not available!?
waiting your kind replay
Al-Juboori09-15-2008 12:44 PM - edited 09-15-2008 12:45 PM
Under "use additional tools" there is an option called "Run Labview VI" that lets you load a vi. The vi has to be saved to be compatible with Labview 8.0 to work with vision builder 3.0.
To save a VI to be compatible with a previous version of Labview. use the "Save for previous version" option under the file menu in labview.
09-19-2008 06:05 AM
09-22-2008 02:20 PM
Al-Juboori,
If the Reposition Region of Interest was available it would not allow the user to reposition the ROI with a mouse. Allowing the user to select a region of interest with a mouse defeats the purpose of automated inspection. One option that you have is to detect a pattern or an object and create a new ROI where you select the ROI Type for your application and the coordinates based on an object, edge or point detected in the image.