Error -1074396080 camera trouble

I have a setup for green particle finding and pink particle finding. Both have the same imput, coming directly from GetImage. However, during the ColorThreshhold, the pink particle identifier returns error -1074396080 with no explaination. I have tried changing out values and rewriting the VI but nothing has worked. Still, the green VI is working with no problems and the only differences are the HSL values.

What can be wrong?

– I’ve noticed that the second one to execute always has an error while the first one does not.

Error number -1074396080 means “IMAQ Vision: (Hex 0xBFF60450) Invalid image type.” (You should be able to right click and select “Explain error” where it occurs, or in LabVIEW select Help->Explain Error… to get error explanations)

If you look at the “Detailed Help” for ColorThreshold, you’ll see this text:

Image Src is the reference to the image to threshold. The source image is converted to 8 bit and contains the result of the threshold if Image Dst is not connected.

Here’s what I suspect is happening: Your input image is a U32 image, and you’re not supplying a destination image to the first ColorThreshold call, so it is changing the image to a U8 during the operation. When you call ColorThreshold a second time, you are passing in a U8 image, which is an invalid input, causing the error.

You will need to use a second IMAQ Create, with type “Grayscale (U8)” to supply to the “Image Dst” input of the first ColorThreshold, otherwise it will overwrite your source image (U32) with the threshholded image (U8).