Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting not valid image error on sgl image histogram

I have a sgl floating point image.  I use the ROI to select a portion of the image.  I use the ROI portion to mask the image so I can get the histogram.  However, when I try to run the vi, the mask function throws the not a valid image type.???

 

Here is the code.

 

0 Kudos
Message 1 of 3
(3,392 Views)

Hi Hummer1,

The reason you are getting this error is that the IMAQ ROIToMask function only takes inputs of U8.  So you will not be able to use an SGL image with this.  You can see what image types a function can use by opening the detailed help for that function and looking at top of the help just above the wiring diagram.  The image types that a function can use will be listed here.  I have attached an image of this to give you an idea of where it is at. 

Adam H
National Instruments
Applications Engineer
Message 2 of 3
(3,370 Views)
Perfect...thanks.
0 Kudos
Message 3 of 3
(3,364 Views)