Can I plot a dot at a specified pixel location?
9 ビュー (過去 30 日間)
古いコメントを表示
I have a set of pixel locations, and I need to draw a dot at each of these know pixel locations. For example, I need to draw a dot in the figure at a point with pixel location (640,400), and then draw a dot at another point with pixel location (640,600).
The screen pixel size is 640x640.
Thank you.
0 件のコメント
採用された回答
Image Analyst
2014 年 7 月 5 日
if ndims(yourImage == 1)
% Grayscale image.
yourImage(row, column) = 255;
else
% Color image
yourImage(rows, column, :) = 255; % or [255,255,255] if that doesn't work.
end
8 件のコメント
Safwan Ibrahim
2017 年 10 月 5 日
"or set a range of pixels, like a rectangle, instead of just one small pixel." Can you please tell us how can you do that ?
Image Analyst
2017 年 10 月 6 日
Like this
yourImage(row1:row2, column1:column2, :) = 255; % or [255,255,255] if that doesn't work.
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!