Load camera_calibration yaml into OpenCV VideoCapture object
I calibrated a webcam via camera_calibration
and got a .yaml
as normal.
Now my project is such that I no longer need to subscribe to the webcam. I need to open it with an OpencV VideoCapture
object, i.e. cap=cv2.VideoCapture(o)
in a .py script performing deep learning in pytorch. I will use this script's output in another cpp script and call the script with pybind11, but that's another topic.
Now I'm looking for a way to load the calibration parameters to the webcam in OpenCV since to my understanding the deep learning results are affected by them. Any help is apprecaited.
I couldn't find any function to call using opencv, but you can just read the file and make cv matrices and assign values from file. And just out of curiosity what DL model are you using? I for one haven't seen any model that accounts for camera intrinsics