Error -1074396080: Invalid Image Type When Using Imaq Count Objects 2 Vi with Color Image

Updated Oct 23, 2018

Reported In

Software

  • LabVIEW

Driver

  • NI-IMAQ

Issue Details

I have a color image with distinct features which I need to be able to count. When I use IMAQ Count Objects 2, I receive an error indicating the image type is invalid. How can I use this VI to count objects in my image?

Error -1074396080 occurred at an unidentified location
Possible reason(s):
IMAQ Vision: Invalid image type

 

Solution

IMAQ Count Objects 2 can only count objects in grayscale or binary images, based on pixel intensity. To use a color image with this VI, the image must be thresholded to a binary or grayscale representation.

For optimal performance, the image should be thresholded to highlight the features to be counted. For example, if red objects need to be counted, threshold the color image based on the Red color plane using the IMAQ ExtractSingleColorPlane VI. To get a direct representation of the image in grayscale, extract the Luminance color plane.
 

WAS THIS ARTICLE HELPFUL?

Not Helpful