MATLAB Answers

Weird histogram/images when recording with 16bit camera

4 views (last 30 days)
Felix
Felix on 10 Jan 2013
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 Comment

David Tarkowski
David Tarkowski on 10 Jan 2013
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.?

Sign in to comment.

Answers (1)

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

  0 Comments

Sign in to comment.

Sign in to answer this question.


Translated by