How do find out what bit a file is? I have a tiff and convert it to class double to work with the values in the command line. When I do that though the histogram (256 bins) looks like it is binary when that isn't the case for the original file. Why is that? How do I correct that? Another odd thing is the image that I get isnt binary, you can actually see different shades of gray.
A:
I assume that you converted the image to double using IM2DOUBLE. This rescales the image so that its values are distributed between 0 and 1 (for example, the pixel values of an 8-bit image would be divided by 255).
If you were to plot the histogram with hist(img(:),(0:255)/255)
, where img
is the converted image, you'd see the 256 bins as you'd expect them.
Jonas
2010-07-23 14:36:58