Weird histogram/images when recording with 16bit camera

3 次查看(过去 30 天)
Look at the picture below, the image should be a uniform dark gray (and it shows as such under labview). But somehow it looks as if matlab is cutting off the darkest part on the left of the histogram and its folded over to the very right, producing this very bright pixels around the corners which are just artefacts... At first I thought its just a display problem converting from 16 to 8bit but it looks like the actual raw data (the histogram axis shows the 16bit data from getsnapshot) recorded in matlab is just rubbish....
The camera is a firewire 16bit using dcam drivers. Matlab is 2012a 32bit.
  1 个评论
David Tarkowski
David Tarkowski 2013-1-10
I need more information to provide any insight into this problem.
  1. What camera?
  2. Which adaptor?
  3. Which format?
  4. What is the configuration of your videoinput object?
  5. How are you getting the data, i.e. is it coming from preview, getsnapshot, getdata, etc.?

请先登录,再进行评论。

回答(1 个)

Walter Roberson
Walter Roberson 2013-1-10
typecast(InputData, 'int16')
to take it to signed integers instead of unsigned.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by