11-21-2018 03:50 PM
I'm having trouble getting the IMAQ UserLookup 2 vi to work with U16 images. I've attached an example vi. It currently uses U8 images and works fine, but I will sometimes have more than 256 objects. If I change all the U8 images to U16, I get an invalid image type error from the UserLookup 2 vi. Documentation for the vi says that it handles U8, U16, and I16, so I'm not sure what the problem is.
As background, I'm trying to write a simple particle filter that removes particles by number from a labelled image. The reason I'm not using the built-in Particle Filter 3 is that I am filtering based on grayscale measurements from the image before thresholding using data from Image Quantify 2. The only way I could think to accomplish that was to create and apply a new lookup table based on evaluation of the quantify reports. If anyone can think of an easier way to do this, I'm all ears.
Thanks, Tim
Solved! Go to Solution.
11-22-2018 01:54 AM - edited 11-22-2018 01:58 AM
Hi,
"Reduced Mask" buffer is created as "Grayscale (U8)" but, I think it is not valid.
Changing the parameter to "Grayscale (U16)" and delete wire on "Image Mask" removed the error.
I don't know what is the expected result so, please check yourself.
11-23-2018 07:34 PM
OK, I hadn't thought of deleting the mask input. I wonder if maybe the mask can only be U8 even though the source and destination images can be U16. I wonder if that is something that can be clarified in the documentation.
Now I'd love to convert this to an ROI as well, but looks like the MaskToROI vi only takes U8. I guess there's no easy way to handle more than 256 objects.
Thanks so much, Emboar!
11-25-2018 06:33 PM