LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQ Count Objects - Extract Object

Solved!
Go to solution

Hello,

I am trying to extract an object generated by IMAQ Count Objects 2 to create a mask. Is there any way to do that? 

Thanks in advance!

0 Kudos
Message 1 of 6
(327 Views)

Hi Iguth,

 

What kind of mask do you want to create?

Helping would be easier if you could provide your VI or Vision Assistant script file, a typical source image on which to apply the processing, and maybe a drawing showing what should the result mask look like...

 

Also, the function "IMAQ Count Objects 2" only gives centers and rectangle bounding boxes of binary objects, not the actual contours of the objects.

 

Regards,

Raphaël.

0 Kudos
Message 2 of 6
(301 Views)

Hello Raphaël,

 

thanks for your reply. Is there a function, that gives me the actual contour?

I have attached a very well drawn (please find sarcasm in this sentence) example of what I am trying to process.

I just want to extract the big white object. The difficulty is that there are small white objects inside the black spirals (as I have indicated in some areas).

0 Kudos
Message 3 of 6
(288 Views)
Solution
Accepted by topic author lguth

I'm not sure I understand what you want to do.

 

1. If you have a binary image (e.g. obtained by thresholding a grayscale image), it is already a mask in itself and can be used as a mask for other operations.

 

2. If you want to modify the binary shape(s) first (e.g. fill the holes, eliminate small objects, smooth borders out, ...) then use VIs from the palette Vision and Motion > Image Processing > Morphology.

 

3. Also, to find contours on a grayscale image, you can use VIs from the palette Vision and Motion > Machine Vision > Contour Analysis.

 

I really can't help you more unless you give more details / attach a VI / give a real source image...

 

Regards,

Raphaël.

0 Kudos
Message 4 of 6
(281 Views)

Hello Raphaël,

 

EDIT: Due to confidentiality reasons I removed the images.

 

I have attached a sample image and a sample VI. You can see that I am using the advanced morphology option "Remove small objects" in the Vision Assistant. In the Vision Assistant I get exactly what I want. However, when I return the image to LabVIEW, everything is black.
I have not found the "remove small objects" option directly in LabVIEW without using Vision Assistant. Do you have any idea what I am doing wrong or how I can improve this?

 

I also attached a screenshot of the result I am trying to achieve (Morphed_image)

 

Thank you for your previous suggestions, they helped me get to this point!

 

Regards,

Lena

0 Kudos
Message 5 of 6
(260 Views)

I found my error. I had the wrong palette on my image display. It works now!

0 Kudos
Message 6 of 6
(255 Views)