取消
显示结果 
搜索替代 
您的意思是: 

image byte order

已解决!
转到解答

Hi, All,

 

I am acquiring images from Lumenera USB 2.0 camera (16-bit format). When I use the IMAQ "image to array" transformation I am getting all negative pixel values. I think the problem is related to the wrong byte order (big vs small Endian). Any idea how to fix this?

 

Thanks!

0 项奖励
1 条消息(共 12 条)
4,177 次查看

Hi,

 

The negative pixels values are OK (thanks to NI for signed I16 type).

Read this KB article, probably its your case: 16-bit images in NI Vision

 

Andrey.

0 项奖励
2 条消息(共 12 条)
4,172 次查看

Thanks for the reply, Andrey,

 

I am getting an I16 image, so there is no need to do U16 to I16 conversion as in the example you showed. BTW, in this example (bottom one) type cast is wired to an exclusive or - this won't work, right due to the mismatch?

0 项奖励
3 条消息(共 12 条)
4,157 次查看
解答
已被主题作者 femtovahan 接受

Andrey,

 

I went throuhg this again, you were right, this seems to be the problem. However, in thus processed image, the image histogram looks "digitized" like a collection of delta functions, instead of being a continuous function. Any ideas why would this happen?

 

Thanks !

0 项奖励
4 条消息(共 12 条)
4,147 次查看

Hi,

 

It might be image (for example, your camera deliver intensities with gaps) or might be required number or classes (taps) too big.

Feel differences:

 

 

Also you can post your image here and we will try to calculate histogram together.

 

regards,

Andrey.

Message Edited by Andrey Dmitriev on 02-10-2009 08:44 AM
0 项奖励
5 条消息(共 12 条)
4,127 次查看

I use histogram in 2 ways (histogram 1 and 2 on the pic). Numer of classes is 256 by default for 8-bit images. Images out of my camera are 16 bit. Now, it's a 16-bit camera with only 12 useful bits, so the number of classes should be 4096. I need to see the hist values all the way to 4096 to observe whether the camera is saturated or not - putting a smaller value for number of classses won't allow that. Do you agree? When I put large numbers for number of classes such as 4096, i do get the pattern with the gaps like in your right pic. 

0 项奖励
6 条消息(共 12 条)
4,089 次查看

femtovahan wrote:

I use histogram in 2 ways (histogram 1 and 2 on the pic). Numer of classes is 256 by default for 8-bit images. Images out of my camera are 16 bit. Now, it's a 16-bit camera with only 12 useful bits, so the number of classes should be 4096. I need to see the hist values all the way to 4096 to observe whether the camera is saturated or not - putting a smaller value for number of classses won't allow that. Do you agree? When I put large numbers for number of classes such as 4096, i do get the pattern with the gaps like in your right pic. 


Are you sure you have an uniformly random noise image? Any real world image will not have a constant histogram over the whole range.

 

Rolf Kalbermatter

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 项奖励
7 条消息(共 12 条)
4,079 次查看

rolfk wrote:

femtovahan wrote:

I use histogram in 2 ways (histogram 1 and 2 on the pic). Numer of classes is 256 by default for 8-bit images. Images out of my camera are 16 bit. Now, it's a 16-bit camera with only 12 useful bits, so the number of classes should be 4096. I need to see the hist values all the way to 4096 to observe whether the camera is saturated or not - putting a smaller value for number of classses won't allow that. Do you agree? When I put large numbers for number of classes such as 4096, i do get the pattern with the gaps like in your right pic. 


Are you sure you have an uniformly random noise image? Any real world image will not have a constant histogram over the whole range.

 

Rolf Kalbermatter


Rolf, do you mean the white noise? Why wouldn't the image have white noise? The histogram I am getting is not constant over the whole range, it rather has gaps, in other words, the histogram looks like a collection of delta functions.
0 项奖励
8 条消息(共 12 条)
4,066 次查看

femtovahan wrote:
Rolf, do you mean the white noise? Why wouldn't the image have white noise? The histogram I am getting is not constant over the whole range, it rather has gaps, in other words, the histogram looks like a collection of delta functions.

Well why would it be white noise if it comes from your camera???

 

Rolf Kalbermatter

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 项奖励
9 条消息(共 12 条)
4,050 次查看
OK, let me explain the problem I am having in a different way. In the absense of any signal (laser beam imaged onto the camera) I shall be simply acquiring the background (call it noise) from the camera. The histogram of this background should be peaked at zero. Instead, I am getting a "gapped" signal like a collection of delta functions.
0 项奖励
10 条消息(共 12 条)
4,045 次查看