From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

vision and motion

I am trying to plot the x and y location of these circles that i have obtained from the IMAQ find circles module.How is it possible to extract the data from the module and plot them? can anybody give me a suggestion?I have attched the print screen and block diagram together.

0 Kudos
Message 1 of 5
(4,176 Views)

Hi sidh023_mun,

You can extract X and Y position for each circle from the "Circles Data" output of IMAQ find circles. Circles Data is an array of clusters, with each individual cluster corresponding to a different detected. You can use the Index Array function to pull an individual cluster out of the arry. To pull the individual elements out of a cluster, you can use the "Unbundle By Name" function. You could then plot the xy coordinates of the circles on an XY graph. I've linked a couple of LabVIEW help pages below for the funcitons I mentioned.

IMAQ Find Circles VI
http://zone.ni.com/reference/en-XX/help/370281P-01/imaqvision/imaq_find_circles/

 

Index Array Function

http://zone.ni.com/reference/en-XX/help/371361M-01/glang/index_array/

Unbundle By Name Function
http://zone.ni.com/reference/en-XX/help/371361M-01/glang/unbundle_by_name/

XY Graphs
http://zone.ni.com/reference/en-XX/help/371361M-01/lvconcepts/types_of_graphs_and_charts/#XY_Graphs

Regards,

Ryan K.
Product Manager, ATCA and BEEcube
National Instruments
0 Kudos
Message 2 of 5
(4,140 Views)

Hi Ryan,

 

What connector of  IMAQ find circles would link to the Index Array Function and pull an individual cluster out of it ?I was guessing the procedure has to be of such kind cause it makes sense.Then again i am very new to LabVIEW.Thanks again for the previous reply.If you can direct me to an example that might help further.

 

Regards,

 

Sidh023_mun.

 

 

0 Kudos
Message 3 of 5
(4,118 Views)

Hi Ryan,

 

Another question.i kind of figured out what you said.So now i can see a very fast moving point on the xy plot but i need to see a pathline of the moving point.Is it possible?I have attched the front panel and the block diagram here.,

 

Thanks

sidh023_mun

0 Kudos
Message 4 of 5
(4,110 Views)

You can try something like this if you want to add a new point to the graph each iteration:

 

Continuously Build XY Graph.png

 

 

XY Graphs are mean to plot an entire data set at once, so if you want to configure them to update with a new point every iteration, you have to build an array that gets updated with your new data point each iteration and then write that updated array to your graph. In this case, the inputs going in to the X and Y inputs of the bundle by name function would be the X coordinate and Y coordinates comming out of the unbundle by name you're using on the circle data.

 

Regards,

Ryan K.
Product Manager, ATCA and BEEcube
National Instruments
0 Kudos
Message 5 of 5
(4,068 Views)