MATLAB: Imhist for an spm image

converthistogramimage processing

Hello,
I'm working on spm images and their intensity are between 0 and 1913!! I would first of all create an histogram for this image.. so could I modify the imhist code and have you an idea how to creat this histogram ?
second, I would convert their values to [0 255] but it doesn't work
I = imread('spmimg.img'); X=(I.*255)./1913;
thank you

Best Answer

uint8(double(I) .* (255/1913))