I built a mobile base from scratch, and now I am focused on getting the robot to charge.
The robot is using an on-board webcam (and PC) to detect a QR barcode on the charger unit. Using OpenCV I find various barcode attributes such as center point of the barcode, edge lengths, degrees of the edges, area, and so on. The specifics of the way the barcode is captured by the webcam has enough data to locate the robot relative to the charger, but, is it ever a huge pain in the rear. It is leading me to ask questions like this: https://math.stackexchange.com/questions/4281368/how-to-combine-equations-that-are-describing-related-physical-phenomena
So here is my question: Does anyone know of a library (preferably in c++) that uses a webcam and a QR code that can provide accurate information of where the camera is relative to the QR barcode? I am looking for the following data form the lib:
- distance of camera from QR code (how far are the two apart?)
- rotation of camera relative to QR code (if camera drives straight will it hit the QR code in the center?)
- camera center to QR center error reporting (by how much is the center of the barcode and the center of the camera off; assuming the camera is square to QR code)
If I am re-engineering the wheel here, I am ready to throw in the towel and use a precanned solution... Please let there be a docking library out there for my hardware...
Thanks.