OpenCV's matrix and quaternion The use of opencv's quaternion needs to add the header file <opencv2/core/quaternion.hpp>, it seems that there are quaternions only after 4.5.1
Convert from OpenCV's matrix and quaternion to Eigen's matrix and quaternion, the mutual conversion of quaternion and matrix under Eigen, and the corresponding conversion of matrix in Eigen and Lie group and Lie algebra in Sophus. You can use the functions cv::eigen2cv and cv::cv2eigen to convert between OpenCV's Mat and Eigen's Matrix. This conversion needs to include the header file <opencv2/core/eigen.hpp>,