I have a mask of size mxn.
I would like to add a line to this mask, such that all the points which passes through it will be set to true.
The line is defined by two points: (x1,y1),(x2,y2).
What is the best way to achieve this result?
Please notice that I only have the Image processing toolbox.
Example for possible input, and desired output:
%generates a mask
m = 152; n=131;
mask = false(m,n);
%example for possible input points
y1 = 68; x1 = 69;
y2 = 28; x2 = 75;
% code for adding the line into the mask%
imshow(mask);
desired result:
Thanks!