hms2006 Posted May 27, 2015 Report Share Posted May 27, 2015 Hi, i want to get the boundary of a polygon using the labview. As the polygon is input in a matrix of 1 and 0, and 0 means the shadow of the polygon, so i need to get the index of 0 around the polygon (the boundary), is there any algorithm in labview to realize this ? Thank you! Quote Link to comment
hooovahh Posted May 27, 2015 Report Share Posted May 27, 2015 So you have a 2D array of numbers, and you want to find the perimeter around an object outlined by values of 1? There are probably tons of ways to achieve this. Look on the array palette and see what you can come up with. I'd suggest reshaping the array into a 1D, and use the search 1D array looking for 1, then that used with the quotient and remainder can give you the upper left edge. Similar functions where reversing the 1D array could get the lower right edge. If you get stuck post what code you've come up with. Quote Link to comment
hms2006 Posted May 28, 2015 Author Report Share Posted May 28, 2015 Thanks for your reply, you maybe wrongly to take what i mean, the polygon is in a matrix of N*64, and i think i have a mehod to realize this, thank you again! Quote Link to comment
hooovahh Posted May 28, 2015 Report Share Posted May 28, 2015 i think i have a mehod to realize this Be sure and share it with the community, others may have similar questions. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.