Showing results for 
Search instead for 
Did you mean: 

Change the scan order of IMAQ Count Objects in LabVIEW

By default, IMAQ Count Objects 2 scans the image from top to bottom. I need it to scan from left to right so that the object indices are displayed in a sorted order from left to right. How can I do that without migrating from Vision Builder as I dont have its license?

0 Kudos
Message 1 of 6

Hello neelesh314,


It's maybe a stupid question but why don't you reverse your Array of indices?



Sabri JATLAOUI - Certified LabVIEW Architect - Certified LabVIEW Developer
0 Kudos
Message 2 of 6



Thanks for your reply!


IMAQ Count doesn't return the indices of particles. It just displays them on the image as an overlay. Since the scanning is from top to bottom, the indices are neither sorted from left to right, nor from right to left. They are just random. The picture below shows how the indices are displayed. The only way I can think of sorting them is to have IMAQ Count scan from left to right but I dont know how to do that.

0 Kudos
Message 3 of 6

So it was a stupid question 🙂

Sabri JATLAOUI - Certified LabVIEW Architect - Certified LabVIEW Developer
0 Kudos
Message 4 of 6

Have you tried playing with the 'Rotation' selection of the 'Search Rect' input into the IMAQ Count Objects VI? I wonder if adjusting it by 90 or 270 degrees may shift the direction this VI searches the ROI.


Would it be possible to simply rotate your image before calling the Count Objects VI?


Opening up the code of the Count Objects VI, it looks like it uses Particle Analysis (in step 😎 to index these objects.

0 Kudos
Message 5 of 6
Rotation removes the overlay regardless of when it's performed. Count does indeed perform particle analysis which uses library functions and hence can't be modified. I am no longer using count objects and instead manually returning and printing the indices.
0 Kudos
Message 6 of 6