Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How to mask from file in Vision Assistant

Dear Pro,

Im doing fine with LV 8.2, i just want to know how to use 'mask from file'? pls pass me any vi if you have one.

i see i dont need to set coordinate as i cant remove unwanted background just using watershed segmentation

pls help me, regards with Salaam
Abang Corp - HADARI Trg
0 Kudos
Message 1 of 5
(4,826 Views)

Hello AbangCorp,

In order to 'mask from file' in the NI Vision Assistant, you first place down an Image Mask step (Processing Functions>>Image>>Image Mask).  Then, you choose Create from Image File and browse to the stored image file that you would like to use as your image mask.  Finally, you choose which pixels to map (either those that are black in the image file or those that are not black in the image file).  After creating the rest of your script in the NI Vision Assistant, you simply choose Tools>>Create LabVIEW VI to generate your LabVIEW code.

For more information, please refer to the NI Vision Assistant Help (available via Help>>Online Help).  You can find more information inside the help in the following Help section: NI Vision Assistant Help>>Analyzing and Processing Images>>Image Mask>>Image Mask description and parameters.

An image mask is an image containing values of 1 and 0.  When you overlay the image mask on your source image, the mask can hide or reveal sections of your source image.  Pixels in the source image that correspond to zero-valued pixels in the image mask will be hidden and won't be subject to further image processing.  Pixels in the source image that correspond to pixels in the image mask with a value of one will be revealed and will be subject to further image processing.

Please find the attached ImageMask.scr script file and the attached MaskFromFile80.vi LabVIEW VI to view an example of how to use the Image Mask step.

Best Regards,
Travis M.

Download All
0 Kudos
Message 2 of 5
(4,808 Views)
Err, can you show or attach IVA mask from image file.vi, it seems i cant find it in my computer
0 Kudos
Message 3 of 5
(4,791 Views)
Hello AbangCorp,

For future reference, the IVA series VIs are VIs created by the NI Vision Assistant.  You can find the IVA series VIs in the .llb files in the Vision Assistant folder (for example: C:\Program Files\National Instruments\Vision Assistant 8.0\CG\IVA Templates LV80-Vision80.llb).  For your convenience, here is the IVA Mask from Image File.vi.

Best Regards,
Travis M.
0 Kudos
Message 4 of 5
(4,780 Views)
 
0 Kudos
Message 5 of 5
(4,337 Views)