Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I get the Position-Cluster-Information from Calibrates Matches Vision Assistant Output

Solved!
Go to solution

Hello,

 

I have a problem to getting the Position-Information (x,y) out from the Vision Assistant Calibrated Matches Output. How I can extract the position cluster or the both real-varibles (x,y-postion) out from the Calibrated Matches Output?

 

Position1.JPG 

 

I need these information for further calculations and to show the position on a Graph-Indicator. Everything I tried faild.

 

I am a LabView Newbee and I would be happy for every answer.

 

Thanks a lot!

0 Kudos
Message 1 of 9
(4,602 Views)

Calibrated Matches is an array of clusters containing as many elements as there are matches.  To access the position information, you need to wire the Calibrated Matches to an Index Array function after which you can use the Unbundle by Name function.  Your other option is to wire Calibrated Matches to a for loop and use the Unbundle by Name function inside of it.

 

Let me know if you have any questions about doing this.

Alex Person
NI-RIO Product Support Engineer
National Instruments
0 Kudos
Message 2 of 9
(4,596 Views)

Hi

 

As Alex still defined, you have to use the "Index Array" function (Blcok Diagram -> Functionspalette -> Programming -> Array -> Index Array).

The connect a number for the Index on the function, means when you wire a 0 you will get the first element in the array.

After that you can access all the cluster informations with the "Unbundle By Name" function (Programming -> Cluster -> Unbundle By Name).

 

So now you can use your position information for this first element. That also works for every other element in the array.

 

Now I hope we could help you, for further informations please have a look at the LabVIEW help or see the examples for arrays/clusters in the

example finder in LabVIEW.

 

Regards,

 

Beat

AE, NI Germany

Message 3 of 9
(4,572 Views)

Hello,

 

this solution works fine! Thanks a lot! You are great!

 

But now I have a other problem: 😞

 

How I convert the position cluster with the x,y information to a point coordinated cluster, so I can create a ROI?

 

cluster1.jpg

 

Can you give me a solution again?

 

Thanks

 

 

0 Kudos
Message 4 of 9
(4,553 Views)
You're picture isn't high enough quality to tell what data type Position 2 is.  If it's an array of points, you need to pass your Position cluster into the Build Array function before passing to Position 2.  If it's a cluster of points, then you need to use the Bundle function.
Alex Person
NI-RIO Product Support Engineer
National Instruments
0 Kudos
Message 5 of 9
(4,547 Views)

Hello A Person,

 

Position 2 is a "IMAQ Point" Cluster.

I tryed some functions and finally it works with Cluster, Class, & Variant >> bundle by name. The only thing that bothers my now is that I have to greate a input control (Type: IMAQ Point) for the input cluster connection of the bundle by name function. 😞 

cluster2.jpg

Is there a possibility to indicate the clustertype only, without creating the "boxes" at the Front Panel of my LabView Application?

 

Thanks

0 Kudos
Message 6 of 9
(4,543 Views)
Solution
Accepted by topic author ChrSchu
Just change the control to a constant and it will work the same.
Alex Person
NI-RIO Product Support Engineer
National Instruments
0 Kudos
Message 7 of 9
(4,537 Views)

ah ok! That's it!

 

I thank you!

 

 

All my questions are solved 😉

0 Kudos
Message 8 of 9
(4,535 Views)

thanks it so halpful, pleaze, can you explain to me why a loop for, can solves the problem

thanks a lot 

0 Kudos
Message 9 of 9
(3,296 Views)