I have a rectangle in the 3D scene, which I know its width and height. It is placed in the 3D scene like the image below. I can manually select all points on the rectangle by mouse click.
Given the manually selected points, I want to find the location of the four corners of this rectangle. I have some ideas. However, to avoid reinventing the wheel, I decided to ask. Do you have any suggestions?
To explain it more, look at the point cloud in the below image, I selected all points of the rectangle by mouse click, and all of them are in yellow. Given the yellow points and width and height of the rectangle in the 3d world, I want to write a code that gives me the location of 4 corners. I draw those four green lines for a better explanation.