LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Peak detection of a surface - laser spot tracking

Hi,

please, can explain , what is the difference between (Image Centroid) and (Center of Mass)?

 

thanks

aljuboori

0 Kudos
Message 11 of 32
(2,983 Views)

hi,

please, can explain .. what are the differences between (Image Centroid) and (Center of Mass)?

 

waiting your kind replay

 

Al-Juboori

0 Kudos
Message 12 of 32
(2,977 Views)

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.

 

 

 

Message Edited by Root Canal on 09-11-2008 10:27 AM

global variables make robots angry


Message 13 of 32
(2,961 Views)
Hi Root Canal,thanks for your answer...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 

 

Al-Juboori

0 Kudos
Message 14 of 32
(2,942 Views)
Hi Root Canal,Thanks for your answer...

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-Juboori
0 Kudos
Message 15 of 32
(2,932 Views)

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:

 

 

Message Edited by Root Canal on 09-12-2008 03:18 PM
Message Edited by Root Canal on 09-12-2008 03:20 PM
Message Edited by Root Canal on 09-12-2008 03:21 PM

global variables make robots angry


Download All
Message 16 of 32
(2,902 Views)

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-Juboori
0 Kudos
Message 17 of 32
(2,878 Views)

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.

Message Edited by Root Canal on 09-15-2008 12:45 PM

global variables make robots angry


0 Kudos
Message 18 of 32
(2,835 Views)
Hi,thanks for your kind replay..please, I have qusition? I use Vision builder 3.5, and I need to select ROI from user when the inspection run (flexible by mouse or by number entered by user), the option REPOSITION REGION of INTEREST do not active..please, can explain, how can activate this option and how can make flexible ROI selection? Al-Juboori
0 Kudos
Message 19 of 32
(2,794 Views)

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.

Vince M
Applications Engineer
0 Kudos
Message 20 of 32
(2,725 Views)