I want to eliminate the pixels that sometime “flicker” on the edges of the blob of the target detected by the camera. I understand that I need to work with the SizeOrderMorphologyv1.vi to insert my own code within the calculations of blob and all of its pixels.
Can anyone guide me on how specificly does the vi work?
I am not aware of any VIs named SizeOrderMorphologyv1.vi. Could you tell us where this is located?
I am also not sure how you’re going to eliminate the flicker of pixels. If the flicker comes from naturally occurring variations in the image (i.e. signal noise), it seems you’ll be mostly relegated to post processing multiple images to average out the noise, or flicker.
We might have found a way to get the info we want without the problems of the flickerin (not using info of Top, Bottom, Right and Left of the target Rectangle). But it would be interesting to hear what other sugestions are there for these flickerings.
The size ordered morphology VI is just a wrapper around the particle analysis report that will return any number of measurements about the particle. Before doing so, it sorts them by area.
If for example, you wanted the center of mass instead of the center of the bounding rectangle, you might just go to the diagram, grow the array constant, and select those from the list of measurements. If you want more info on what those measurements are, open the Vision Concepts manual. I think it is in the Programs/National Instruments/Vision/…
You don’t necessarily need to sort the particles with your own code. The NI vision package includes particle filters that can filter out outlying particles and stray pixels. You can experiment with them in Vision Asssistant under binary, then “Particle Filter” or “Adv. Morphology.” We’re currently using the “remove small particles” feature of the latter.