image - how to convert polyline to bitmap in matlab -
i have polyline, given 2 vectors x, y, of coordinates, both vectors of same length, , x(i) corresponds y(i).
i need easy way create boolean matrix, has 1 polyline passes, , 0 doesn't.
is there nice way of doing this?
i thought poly2mask, doc says closes polygon, not looking for
thanks
you can extend line left , right edge of graph. copy row numbers , change column first , last. add top-left , top-right corners coordinate array. use poly2mask
draw huge polygon. remove except last line of polygon. trim left , right ends.
you can use line
draw lines.
Comments
Post a Comment