필터 지우기
필터 지우기

How can i display the image position with maximum pixel value?

조회 수: 3 (최근 30일)
sam  CP
sam CP 2018년 6월 24일
댓글: Image Analyst 2018년 6월 24일
if true
%find the max pixel value
max_v = max(max(v));
% find the position of pixels having this value.
[r, c] = find(v == max_v);
end
How can i display the image position having the above(maximum ) pixel value?

답변 (1개)

Jan
Jan 2018년 6월 24일
It depends on what "display" means. Maybe either a simple:
disp([r,c])
or perhaps:
plot(c, r, 'o')
The more specific the question, the more likely is a matching answer.
  댓글 수: 2
sam  CP
sam CP 2018년 6월 24일
Yes, i got the pixel value in a matrix[r,c], How can i show the image for the corresponding pixel value ?
Image Analyst
Image Analyst 2018년 6월 24일
That is not a matrix. If you look in the workspace panel, you'll see that you have two separate vectors: r and c. It did not stitch them side by side to create a matrix from them as if you had done
m = [r, c];
In that case you would have a matrix, but it did not do that. This is just the normal way to indicate that the function is returning multiple outlets.
Now, if you had done either of the things Jan suggested, I think that at least one of them would be what you wanted. Are you going to try them?

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

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

Start Hunting!

Translated by