필터 지우기
필터 지우기

Intensity histogram from a matrix or a dbin file

조회 수: 1 (최근 30일)
Alberto
Alberto 2012년 9월 12일
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에서 Image Processing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by