I have gotten someone else's code from at least a year ago, I don't have any information about which version of OpenCv they used, I am guessing maybe OpenCV 3. I am using OpenCV 4 and I need to "translate" their code to OpenCV 4.
Let's start with
from cv2 import aruco
They (old code I got) used the aruco.detectMarkers command similar to this:
corners, ids, rejectedImgPoints = aruco.detectMarkers(
gray,
aruco_dictionary,
parameters,
cameraMatrix,
distCoeff
)
However, in the new Open CV 4, the inputs for "aruco.detectMarkers" are only these three: image (gray), aruco_dictionary and parameters so this command fails. I can get it to work by calling it as:
corners, ids, rejectedImgPoints = aruco.detectMarkers(
gray,
aruco_dictionary,
parameters
)
So camera matrix and distortion coefficients are not an input. However, if I am not giving the camera matrix and distortion coefficients as an input, am I not loosing some input information? Will that give me a different output than they have originally gotten using their command?
I can't find any documentation for the older version of the aruco.detectMarkers function to compare these two.