Outline polygon with square region
Afficher commentaires plus anciens
I have a polygon image(mask, 0's and 1's).
Let us pretend it is a octagon of width 200 pixels in a 500x500 pixel image. I want to draw a bounding box around the octagon, however, I want the bounding box to only be made up of 90 degree angles.
Another way to imagine the problem is, take a polygon and put it on a checkerboard. The sub-squares of the checkerboard that has the polygon in it gets a value of 1, and the squares that does not gets a value of 0.
Any ideas on how to easily do this?
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Computational Geometry dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!