MATLAB: Can I plot a dot at a specified pixel location

image processingplot according to pixel location

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 640×640.
Thank you.

Best Answer

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