02-12-2014 11:32 AM
Image Processing VIs 'IMAQ Particle Analysis.vi' and 'IMAQ MaskToROI.vi' returns the features of detected binary objects in a sorted order. My question is how objects are sorted before results are returned.
Look at the following example. I am totally confused why both VIs returned the second object in the first row first?
I was trying to get the centers of each object (and their contours), and assuming they were sorted by their positions on Y axis first and then positions on X. It was, most of the time, until what you see here on the first row. What happened here? Why the second object was sorted as the first object? HOW binary objects are sorted any way?
Solved! Go to Solution.
02-12-2014 01:55 PM
I got it. It must be sorted by the top and left corner of the object rectangle.
02-13-2014 10:14 AM
I am pretty sure they are sorted by the order the pixels are encountered as the algorithm scans from left to right, going down one row at a time.
Bruce