Intensity histogram from a matrix or a dbin file

1 次查看(过去 30 天)
Hi, I have to plot the intensity histogram (intensity vs intensity count) of the sum of a set of tif files (in greyscale), or from the resulting dbin (I can't use the tiff as this format rescales intensity). I tried using hist
x= 0:100:10000;
hist(A_D(:),x);
where A_D is the matrix obtained summing the tif files, but this gives me a plot completely different from the one I have using for example ImageJ and the tiff file with the image sum. How do you think I could solve the problem?

回答(2 个)

Image Analyst
Image Analyst 2012-9-12
The second argument is the location of the bin centers. Your bins are centered at 0, 100, 200, 300, ..... 10,000, and each bin is 100 wide. The first may just get you half a bin since you can have a bin include values from -50 to +50 when you don't have any values less than 0. So, can you tell us where your bins in imageJ are centered? Are they centered the same? Going from 0-50, 50-150, 150-250, 250-350, etc. up to 9950 - 10,050? If not, if they go from 0-100, 100-200, etc. then of course the counts will be different. I suspect that is what is happening.

Alberto
Alberto 2012-9-12
编辑:Alberto 2012-9-12
Hi Image Analyst, thanks for your reply. I tried a number of different values for the size of the bins, but the histogram is still very different from what I got using imagej. Is it possible that somehow the two programs use different intensity values?

类别

Help CenterFile Exchange 中查找有关 Histograms 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by