Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Extract individual mask

Hi All,

I have an image which has multiple particles in it. (See attached testimage.png) . I want to extract the mask of each particle individually. I used IMAQ Extract 2.vi for this.(See attched test0.vi). However due to overlap of rectangular coordinates of two particles, I cannot extract individual mask. Please take a look at the VI. I have explained the problem in much details as comments in it.

Any suggestions to achieve the result I am looking for? 

Thank You.

Regards

Aveo

Download All
0 Kudos
Message 1 of 4
(4,840 Views)

Use IMAQ Label to give each particle a unique intensity value.  After you extract each particle, use IMAQ Compare to get rid of any other particles in the extracted image.  I think you would have to do one comparison to eliminate any values less than the particle value, then another comparison for the values greater than the particle.

 

Bruce

Bruce Ammons
Ammons Engineering
Message 2 of 4
(4,824 Views)

Bruce has an excellent answer. This old post may also be useful to you:

 

http://forums.ni.com/t5/Machine-Vision/How-to-get-boundary-contour-points/m-p/578177

 

Following this method, after you use MaskToROI, you can manipulate the ROI then use ROIToMask to generate bitmap images for the particles you wish to keep.

Message 3 of 4
(4,815 Views)

Hi Bruce,

Thank you for the suggestion. I am attaching a vi that uses your approach with a modification. I am using IMAQ label to ROI followed by ROI to mask to get individual mask. 

Also there is a comparison between the results of IMAQ extract and IMAQ label. 

Regards

Aveo

Download All
0 Kudos
Message 4 of 4
(4,797 Views)