Filter löschen
Filter löschen

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

2 Ansichten (letzte 30 Tage)
sara
sara am 11 Apr. 2015
Kommentiert: Image Analyst am 12 Apr. 2015
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?

Akzeptierte Antwort

Image Analyst
Image Analyst am 11 Apr. 2015
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 Kommentare
sara
sara am 12 Apr. 2015
thank you so much
Image Analyst
Image Analyst am 12 Apr. 2015
You're welcome. If we're done here, can you mark the Answer as "Accepted"? Thanks in advance.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Image Processing and Computer Vision finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by