Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

image mask not from file

Hi,

I am using Vision Assistant v8.0.0 and have created a script to locate a feature on the image that can be used as a mask on the image. I use "File:Save Image" to save the mask to a file before running the rest of the script to retrieve the original image, use the mask from the File, and obtain histogram information of the masked area. 

Is there a way to not use the file to retreive the mask?  I'd try tapping off the last IMAQ Morphology vi's Image Dist Out in the generated LV code as the mask, but this mask is all black and not what I see in the Vision Assistant window or what was manually saved to a file at the same spot of the script.

Any help or examples would be greatly appreciated.

Thanks

0 Kudos
Message 1 of 5
(3,414 Views)

There is no buffer defined in the morphological function. Connect a imaq create to "Img dst" of the erode function

0 Kudos
Message 2 of 5
(3,398 Views)

Thank you for your suggestion.  I couldn't figure out how to connect the IMAQ Create when there is no input to the IMAQ Create.vi for the Image Dst Out from the erode function.  But after much searching, I've found the IMAQ Mask.vi that does what I needed.

0 Kudos
Message 3 of 5
(3,386 Views)

I will suggest you try masking from vision assistant first. Generate the labvIEW code from vision assistant and connect the buffer names alone. It will create IVA mask vi which is actually a NI subVI. You can always optimize it later.

0 Kudos
Message 4 of 5
(3,375 Views)

Excellent suggestions.  I will do that.  Thanks.

0 Kudos
Message 5 of 5
(3,360 Views)