0

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

JassD
  • 1
  • 1
  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community Aug 04 '22 at 04:34
  • You can use solvePnp to get the poss of the qr code, relative to the camera and invert that to get the camera pose, relative to the qr code. – Micka Aug 04 '22 at 05:37
  • You want fiducials. Take a look at AprilTags. – RootTwo Aug 04 '22 at 07:07
  • 1
    if you stick with QR codes, be aware that such a pose will have jittery/uncertain rotation, of the marker (in camera space). inverting that will cause a "camera pose" (in marker space) that wiggles around significantly (translation). -- proper AR fiducials (april, aruco) reduce that problem. – Christoph Rackwitz Aug 04 '22 at 09:52

0 Answers0