Filter löschen
Filter löschen

plotting histogram at each pixel of imagesc, possible?

4 Ansichten (letzte 30 Tage)
jenka
jenka am 15 Okt. 2012
Hi everybody, I have a quick question. I have two variables a=11x119x50 and b=119x50. I am plotting b as imagsc(b). Now I would like to click on pixel of my imagesc(b) and it should give me a plot (plot(a:,i,j) or histogram of values that corerespond to a(:,i,j) where i and j equal to the pixel I click one. Is it possible to do and how? Thanks

Antworten (1)

Image Analyst
Image Analyst am 15 Okt. 2012
Use ginput() to get a coordinate then get the vector
[column, row] = ginput(1);
vector11 = a(:, row, column);
[counts binCenters] = hist(vector11, numberOfBins);

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by