The code shown in the remove_walls_not_int_contour is using cv2.pointPolygonTest() to see if the wall is inside the outer contour or not.
However, some floorplan's outer contour was too tight for the wall bounding rectangle box that it detected some walls as if it was outside of the outer contour.
So one way I tried fixing this issue was instead of doing a pointPolygonTest with a outer contour of the house , which is an output from
The code shown in the remove_walls_not_int_contour is using cv2.pointPolygonTest() to see if the wall is inside the outer contour or not. However, some floorplan's outer contour was too tight for the wall bounding rectangle box that it detected some walls as if it was outside of the outer contour.
So one way I tried fixing this issue was instead of doing a pointPolygonTest with a outer contour of the house , which is an output from
I tried it with a bounding rectangle box of a outer contour of a house.
the code below is what I did.