Effacer les filtres
Effacer les filtres

Intensity histogram from a matrix or a dbin file

1 vue (au cours des 30 derniers jours)
Alberto
Alberto le 12 Sep 2012
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?

Réponses (2)

Image Analyst
Image Analyst le 12 Sep 2012
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 le 12 Sep 2012
Modifié(e) : Alberto le 12 Sep 2012
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?

Catégories

En savoir plus sur Image Processing Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by