Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQ UserLookup 2 Error - Invalid Image type with U16 Image

Solved!
Go to solution

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

0 Kudos
Message 1 of 4
(2,596 Views)
Solution
Accepted by topic author PolymerTim

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.

Certified LabVIEW Developer
There are only two ways to tell somebody thanks: Kudos and Marked Solutions

GCentral
Message 2 of 4
(2,568 Views)

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!

0 Kudos
Message 3 of 4
(2,549 Views)

VI you attached was really helpful. Thanks ; )

Certified LabVIEW Developer
There are only two ways to tell somebody thanks: Kudos and Marked Solutions

GCentral
0 Kudos
Message 4 of 4
(2,528 Views)