Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Center of mass X and Y in ComplexReport cluster?

I want to find the XY coordinates of a blob's center of gravity.
Page 6 of AN107.pdf discusses the LabVIEW VI IMAQ ComplexParticle, and I have that VI as a sub-VI of the Circle Distance Example VI. AN107 Table 1 rows 8 and 9 show "Center of mass (X)" and "Center of mass (Y)" respectively. However, those labels don't appear in the ComplexReport cluster on the Circle Distance Example VI front panel. Where are those parameters? How can I get them?
0 Kudos
Message 1 of 4
(3,569 Views)
You need to use two vis. The first one, ComplexParticle, will generate the data IMAQ needs to figure out the center of mass. The second one, ComplexMeasure, will extract the data you want. One of its inputs is an array that contains a list of data values. Its output will be a 2D array containing the values you requested.

Bruce
Bruce Ammons
Ammons Engineering
Message 2 of 4
(3,569 Views)
Thanks, Bruce. Is IMAQ ComplexMeasure.vi fully documented anywhere?
To put a little finer point on your answer, I see "Parameters," a constant array of enums, connected. Not connected is another enum input "Parameter." As outputs, I see a Coefficient, a Coefficient 1D array, and a Coefficient 2D array. Where can I find the Center of Mass (X), and how can I make it show up there?
0 Kudos
Message 3 of 4
(3,569 Views)
I would assume it is covered in IMAQ help, but details like this have been missed before.

Since you want two parameters (or more), you need the array input for parameters. Stretch it so it has two entries showing. Select "Center of Mass X" for the first one, and "Center of Mass Y" for the second one.

Since you will have multiple regions, you will get a 2D array output. If you loop through this array, value 0 is the X and value 1 is the Y (inside the loop).

Bruce
Bruce Ammons
Ammons Engineering
0 Kudos
Message 4 of 4
(3,569 Views)