11-10-2014 05:25 AM
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
11-10-2014 10:21 AM
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
11-10-2014 01:43 PM
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.
11-10-2014 10:43 PM
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