How to plot lines on image ?
Show older comments
How to plot lines on image ?
Accepted Answer
More Answers (1)
Image Analyst
on 26 Dec 2019
The other answer will put a periodic grid over the image. If you want arbitrary lines from (x1,y1) to (x2, y2), you can use plot() or line().
hold on; % Make sure plot() does not blow away the image.
line(x, y, 'Color', 'r'); % OR....
plot(x, y, 'r-');
Yet another option is to place a line plot (like your question's tag) over the image. For that, see the attached m-file.

From your question, it is not clear what kind of lines you want.
Categories
Find more on Image Processing Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!