LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Geometric matching, image processing

179984785_1366417970398087_2713825654965470455_n (1).png

Hi all, may i know how to reduce or eliminate the issue of order switching between 2 objects ? 
is there any method to solve this by adding some conditions ? The item sorting will be sorted in 1 direction only which is left to right. 

My current project is about vision aided sorting robot. The order switching may be an issue for sorting purpose 

Download All
0 Kudos
Message 1 of 11
(2,747 Views)

May i know what's your solution for this issue ? Thanks in advanced 

0 Kudos
Message 2 of 11
(2,689 Views)

A sort will sort the array.

 

Remove Duplicates From 1D Array removes duplicates. From a 1D array...

 

Note that your data is multiple doubles. Comparing doubles for equality will only work if they are exactly (binary) the same. Even if the indicator says 120.25, this could be 120.250 or 120.254 or anything in between. The sort will work, removing duplicates won't (as they are not duplicate). 

0 Kudos
Message 3 of 11
(2,677 Views)

I would store the coordinates in a shift register on the 1st frame. On all other frames compare by coordinates and reorder your array of properties. Update the shift register with the sorted coordinates of the current frame to allow for some movement.

 

snip.png

0 Kudos
Message 4 of 11
(2,673 Views)

May i know how to connect the coding to my VI ? 

I have issue with that. 

0 Kudos
Message 5 of 11
(2,668 Views)

Can you upload your VI for LabVIEW 2015?

0 Kudos
Message 6 of 11
(2,660 Views)

There you go ! 

0 Kudos
Message 7 of 11
(2,653 Views)

I don't have the same Vision version so the VI is broken but this should get you started.

Reordering fails if the number of matches changes between frames or the change in position between frames is larger than the distance between matches.

 

You might also want to consider using subVIs to keep your code clean and readable.

 

Capture.PNG

Message 8 of 11
(2,643 Views)

Just tested the updated coding.  
It seems like the issue still existed.

Is it i did something wrongly ??

0 Kudos
Message 9 of 11
(2,636 Views)

Hi Jaycobian,

 

In your latest video at one point the number of matches found goes from 2 to 1. As said in this case reordering will not work, although I forgot to merge errors.

 

Vision pattern matching can be unreliable sometimes. In the attachment you will find an event case that ignores updating the front panel when the number of requested matches is not met. It should continue with the next frame.

 

Note that reordering will also fail if the number of matches is not met on the first frame.

 

RamonG_0-1620409473224.png

 

Message 10 of 11
(2,630 Views)