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

1 次查看(过去 30 天)
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
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.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 3-D Scene Control 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by