Jump to content

how to get the Polygonal boundary


Recommended Posts

Posted

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!

Posted

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.

Posted

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!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.