Reputation: 5822
I'm trying to draw an arrow on top of an image in MATLAB, between two pixels: [x0,y0] and [x1,y1].
I tried to use annotation function. The problem is that the function takes as an input x,y values which represent coordinates on the figure, instead of on the image itself.
Does anyone knows how can I draw an arrow between two pixels in an image?
Example
imshow(imread('peppers.png'));hold on;
I would like to generate a blue arrow from pixel (1,1) to pixel(200,200), so it should look something like this (only in blue instead of black):
Thanks!
Upvotes: 2
Views: 2581