I have two points lets say:
- P(x,y) [point lies at the top of image]
- P'(x',y') [point lies at bottom of image]
Now i want to draw a line betwen these two points....and the line should appear on image means should be visible.
how to do this????
I have two points lets say:
Now i want to draw a line betwen these two points....and the line should appear on image means should be visible.
how to do this????
Like this:
figure;
hold on;
imagesc(img);
line([x1,x2],[y1,y2],'Color','r','LineWidth',2)
hold off
Where y is the "down" direction and x is the "right" direction in the image. Change the color and width as necessary to be visible.
load clown
image(X)
colormap(map)
c = size(X,2)
mid = round(c/2)
X(:,mid) = 1
image(X)
You could download and use hline and vline in conjunction with hold on, using the techniques from visiting Steve on Image Processing. Or just use his techniques. Either way it works.