12-02-2012 06:01 AM
I have image like this:
I need to create blobs for every group that has more than 5 pixels, then i want to extract pixels that are in each blob.
I have done that in diffrent applications but don't know haw to use that in labview
Solved! Go to Solution.
12-03-2012 11:41 AM
Hi Pawhan!
If I understand correctly, you would like to select all objects on the image that are bigger than 5 pixels (which is effectively the same as removing objects that are 5 pixels or smaller), Then return all the remaining object pixel values (x,y), sorted by object. The most simple way to do this is with Vision Assistant.
First you apply a Color Threshold to make a binary image from the RGB. Then you can apply a particle filter to remove objects that are too small (for example by filtering by bounding rectangle width and height). Finally, use Advanced Morphology > Label Particles to set all your remaining objects to a separate color. This basically allows you to just iterate through the image looking for certain colors, and return an array of the x and y for every pixel found, and you get all the pixels of an object.
Hope this was of some help, please get back to me if this is not what you're interested in.
Kind regards:
Andrew Valko
National Instruments AE
12-03-2012 02:01 PM
Yeap, thats exactly what i was looking for.
The next thing that i want to do is to calculate length and thickness of each object.
My first idea is to extract beginning point and find last point in object
then length will be shortest path from beginning to end, I have no idea haw to measure thickness
Do You have any other idea how to do that??
12-04-2012 04:13 AM - edited 12-04-2012 04:14 AM
Dear Pawhan!
You can once again use Vision Assistant to take these measurements.
For the object length, you can use Particle Analysis, you reading Max Feret Diameter to determine object size. As for thickness, since some of your particles are of strange shape, you wont't get accurate readings by minimum bounding geometry, so I suggest using Circle Detection. This finds circles in the objects like so:
This step gives you the center coordinates and radius for the circles found. Since your objects are already labeled by color, you can check in which object your circle is, and find the largest (or average) circle size for that particular object. That circle's diameter is your thickness.
Kind regards:
Andrew Valko
National Instruments AE
12-04-2012 05:05 AM
Big thanks
Last request
Colud You show me what I do wrong in configuring this Circle Detection because it isn't doing what I expect.
Big thanks once more
12-04-2012 05:21 AM
Glad I could help. The problem is this case is, that you're using Machine Vision > Shape Detection instead of Binary > Circle Detection. The difference is, instead of trying to find circle particles inside the objects, it detects only circular objects, that is, it determines the shape of all objects, and then decides whether it's a circle or not. In our case this won't return any results since we don't have circle shaped objects.
I had quite good results with circle detection of 2-3 pixel radius, based on the jpeg you've put up.
Best regards:
Andrew Valko
NI AE