필터 지우기
필터 지우기

plotting histogram at each pixel of imagesc, possible?

조회 수: 4 (최근 30일)
jenka
jenka 2012년 10월 15일
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

답변 (1개)

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

카테고리

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