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

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -