Work / Drawing the 3D line model onto photos
Drawing the 3D line model onto photos
My camera code ties each inspection photo to the line's 3D model. It draws the model onto the photo, and it finds the 3D spot behind any point in the photo.
What you see. Left, the scene in 3D with the camera. Right, what the camera sees, with the line's 3D model drawn over it in orange. Put the camera's angle off with the sliders and the drawing misses the wires. Solve the pose and it fits again.
Try it yourself
What the real one does
The camera geometry I wrote projects a power grid's 3D data into each inspection photo. The pose is where the camera was and which way it pointed. If it is even a little off, the drawing misses the wires, and solving the pose makes it land.
- It covers mount rotations, the camera's intrinsics, projecting wires and towers from the 3D laser scan (LiDAR) into a photo, and the line back out from a pixel.
- Panarch uses it to check detections against the model and to place in 3D what the camera saw.
How the demo works
A helicopter photo comes with a position from satellite positioning (GNSS) and an orientation from the gimbal. The position is good. The orientation is a few degrees off, and at 100 m a degree is almost two metres. Draw the 3D model into the photo with that pose and the wires land beside the wires.
The left view is the world: terrain and wires from public LiDAR, a white pyramid for the true camera and an orange one for our estimate. The right view is the camera's own picture, with the model drawn through the orange camera.
Solving the pose means finding the heading (yaw), tilt (pitch), roll and zoom (focal length) that make the drawn model and the picture agree. Here that is Gauss-Newton on the reprojection error, which is how far the drawing lands from the photo, in pixels. It runs over points along the wires, one step per frame so you can watch it. In practice the matches come from the image, not from a known answer, and that is where most of the work goes.