Date: 2024-12-16 11:22:24
Score: 0.5
Natty:
One solution would be to:
- Detect lines in your second image using either the Hough Transform, RANSAC or any other suitable technique.
- Check for the intersections of these lines in the 2D/image space. These are your 3D mesh vertices (with z coordinates = 0). The lines connecting these vertices are edges.
- Create new vertices by using the x and y coordinates of the previous vertices and replacing z by your walls height (z_height).
- Connect these vertices to the others: vertices with the same x and y coordinates (but z=0 and z=z_height) share an edge and the edges in the z=0 plane are the same than in the z=z_height plane.
- Create quad faces from the edges (or break them into tri faces if needed). Be careful that the vertices/edges order must stay consistent (usually counter-clockwise).
- Save the result in a file, in whatever format you want: STL, OBJ, OFF, etc.
Reasons:
- Long answer (-0.5):
- No code block (0.5):
- Low reputation (0.5):
Posted by: el_grezeq