[inX inY] = LINEINMASK(XS,YS,BW,XV,YV) computes a the segments of the
line specified by verticies XV and YV that are inside the mask BW.
Points XS and YS specify the limits (or pixel values) of the
coordinates of the matrix BW.