Code covered by the BSD License  

Highlights from
Grab 2D points

image thumbnail
from Grab 2D points by Nassim Khaled
This code is used to digitize 2d figures that you find in publications, journals, or simply scanned

image_plot(I,A,B)
%This function shows a matrix image and plots a straight line(defined by
%two points).
%The user is should be aware of the difference between the image 
%coordinates and the normal coordinates.
%      Inputs:          
%           I: an image matrix of dimension mxnx3 or mxn
%           A: 2x1 matrix of type double/First point of the straight line
%           B: 2x1 matrix of type double/Second point of the straight line
%   Example:   image_plot(I,[1,2],[3,4]);
%              
%This function is written by :
%                             Nassim Khaled
%                             American University of Beirut
%                             Research Assistant 
function image_plot(I,A,B)
imshow(I);
hold on
plot([A(1),B(1)],[A(2),B(2)])
plot([A(1),B(1)],[A(2),B(2)],'r*')
hold off

Contact us at files@mathworks.com