How to orthogonalize angles in a polygon?

Please, help to transform polygon to rectangle or a figure with orthogonal angles. Maybe, does anybody know about GROS (GReedy Orthogonal Simplification) algorithm or something like this?

7 Comments

Please show us a small set of sample data, the operation, and the expected results.
I have a matrix that contains coordinates (x and y) of some polygon. This
polygon is a boundary of some enclosed object (building). Boundary is result of segmentation procedure. But this boundary is zigzag-shaped with many intrusions. So I would like to simplify polygons but to maintain their
essential shape. It means buildings should have orthogonal angles and small
extrusions should be cut off.
I have heard about GROS (GReedy Orthogonal Simplification) Algorithm but
couldn't find MatLab code for it. I would be very grateful if you could
help me (I am a student and it is for my research work).
There is a picture-example of input and output boundaries. I will send it to you by e-mail.
Please do not send it to my email. Post it to a free image hosting website so everyone here can see it.
http://www.mathworks.com/matlabcentral/answers/7924-where-can-i-upload-images-and-files-for-use-on-matlab-answers
OK here is a direct link:
http://img812.imageshack.us/img812/3284/exampleus.png
a link:
http://imageshack.us/photo/my-images/812/exampleus.png/
For reference: I found a useful-looking outline of the technique, http://www.ima.umn.edu/2004-2005/MM8.1-10.05/activities/Keyes-Edward/Final%20Presentation.ppt
Thank you very much but I have seen this presentation already.
I can't create MatLab code using it. So I am
looking for finished m-file or p-file.
Unfortunately mice got in to my storage space about 2 years ago, and I had to throw away a lot of my archives. I do not appear to have any finished m-file or p-file available for this algorithm.

Sign in to comment.

Answers (1)

Please combine your 5 Questions on this topic into just one question. And please consider replying to Sean rather than just re-posting your question.

2 Comments

Could you please tell me who is Sean
and where can I find the answer on my
question? Thank in advance.
I'm Sean, and my comment is appears to have been deleted along with your duplicate posts. I'll repeat the comment above.

Sign in to comment.

Categories

Asked:

on 17 Jan 2012

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!