I want to create a visual 2d top-down map of my house, and as I walk around the house I want to film the ceiling where a number of QR codes have been placed. As I walk around, the map will be updated displaying the current position and orientation of the camera.
I believe this can be done using some geometry that takes into account things like the difference in size of the QR code in pixels in the image compared to it's actual known size in cm, the distance from the camera to the ceiling, the distance and angle of the camera frame center to the center of the QR code, and the orientation of the filmed QR code relative to it's actual orientation on the ceiling.
Problem is I have no idea how to put these together for a solution. Can this be done with geometry or another approach?
Secondly I discovered an OpenCV implementation of perspective-n-point that I think might be perfect especially since it takes into account rotation of yaw, pitch and roll but I can't see how the values it returns can be turned into a position on a map.
Thanks