How to find coordinates of a rotated room in a floor plan?

조회 수: 3 (최근 30일)
CHINTALA NIRMAL SRINIVAS
CHINTALA NIRMAL SRINIVAS 2020년 6월 22일
댓글: Matt J 2020년 6월 22일
I am new to this platform. So please help me in clarifying my doubt. Actually I had a floorplan in which I need to identify roomc oordinates. I use regionprops() to get the bounding boxes around it and got the coordinates of the rooms. But what if the floor plan is rotated with some angle, then regionprops() is not giving correct coordinates. Could anyone please help me? Also I want to close all the doors in the floorplan image so that I could identify all the rooms. I do not know how to close the doors if the floor plan is rotated.Can somebody please help me?
I could not close all the doors.

답변 (1개)

Matt J
Matt J 2020년 6월 22일
편집: Matt J 2020년 6월 22일
Use imerode to get rid of everything except the thicker lines demarcating the walls. Then use houghlines to fit line segments to each of the walls. Once you have the equations for the lines you can compute the rotation angle.
  댓글 수: 2
CHINTALA NIRMAL SRINIVAS
CHINTALA NIRMAL SRINIVAS 2020년 6월 22일
Actually I had a standard code given by superior to get the coordinates. But it is giving incorrect output for rotated floor plans. I am trying to figure out where it is going wrong. It is unable to close all the doors. But I don't understand why as I do not have much knowledge about the functions in matlab. Could you please tell me where it is going wrong?I am here attached the zip folder of it. Kindly help me to solve this issue.
Matt J
Matt J 2020년 6월 22일
I think my suggestion would be much simpler.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Surfaces, Volumes, and Polygons에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by