필터 지우기
필터 지우기

How can I show a "found" pixel in an image?

조회 수: 2 (최근 30일)
sara
sara 2015년 4월 11일
댓글: Image Analyst 2015년 4월 12일
Hi. I use find command for different things, like for finding max,(max(I(:))), like for finding specific corners, etc. How can I show the found pixel in image? It gives me numbers. How can I show it in image with a red dot, a marker, over the image?

채택된 답변

Image Analyst
Image Analyst 2015년 4월 11일
imshow() shows all the pixels in the entire image, including the one you want. If you want a red cross in the overlay above your image, do this
imshow(rgbImage);
hold on;
plot(x, y, 'r+', 'LineWidth', 2, 'MarkerSize', 30); % Put up red cross.
% If you want a blue circle instead, try this:
plot(x, y, 'bo', 'LineWidth', 2, 'MarkerSize', 30); % Put up blue circle.
% If you want a yellow square instead, try this:
plot(x, y, 'ys', 'LineWidth', 2, 'MarkerSize', 30); % Put up blue circle.
If your data is in terms of row, column rather than x,y, then make sure you do plot(column, row, 'r+'), and NOT plot(row, column, 'r+')
  댓글 수: 6
sara
sara 2015년 4월 12일
thank you so much
Image Analyst
Image Analyst 2015년 4월 12일
You're welcome. If we're done here, can you mark the Answer as "Accepted"? Thanks in advance.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Processing and Computer Vision에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by