Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Can IMAQ cause a pixel value to be out of range?

We are trying to track down the cause of image data recorded as .raw that has out-of-range values (8-bit images with values of 256 or above, and 12-bit images with values over 4095). Is it possible for IMAQ Grab to return values that are out of range or would this have to be an error in the data being sent from the camera?
0 Kudos
Message 1 of 5
(3,597 Views)

which image type do you use with IMAQ Grab. If it is U8 gray scale you cannot see values that are larger than 255.

 

Exceeding the expected range can only be seen if you use I16 or U16 gray scale images. But it is not likely that the IMAQ Vision VIs cause such overflow. Everyone using IMAQ Grab would see this.

 

Which camera do you use? Who made the driver for the camera?

 

How do you recognize out of range pixels?

 

Some thoughts which may be a little bit too far away:

I could imagine that the camera transmits in 8bit per pixels but the driver expects 16bit value and now puts two camera pixels into one IMAQ vision pixel. But you will easily recognize this because the received image would have half the expected size. A similar thing could happen with 12bits. In order to increase transmittance capacity two 12 bit pixels could be transmitted as three bytes. Once again the driver expects 2 bytes per pixel and now mixes everything up. The image must look really weird.

0 Kudos
Message 2 of 5
(3,592 Views)
Would it be possible to have a camera input U16, and have IMAQ mess up the pixel values because it's trying to read it as I16? If so, is there a workaround for this?
0 Kudos
Message 3 of 5
(3,549 Views)

Nasgul wrote:
Would it be possible to have a camera input U16, and have IMAQ mess up the pixel values because it's trying to read it as I16? If so, is there a workaround for this?

 

Only if you will exceed 15 bits. Up to 32767 grays there are no any differences between I16 and U16.

 

Refer to following KB: 16-bit Images in NI Vision

 

Andrey.

 

0 Kudos
Message 4 of 5
(3,542 Views)
Nasgul, could you please post an image showing your problem.
0 Kudos
Message 5 of 5
(3,526 Views)