Skip to content

When using solvePnPGeneric to get reprojectionError, exception occurred. #16040

@hanseun

Description

@hanseun

solvePnPGeneric work normally when reprojectionError parameter is skipped, but exception occurred reprojectionError parameter was sent to the function.

...
Mat reprojectionError = new Mat(2,1,CvType.CV_64FC1);
Calib3d.solvePnPGeneric(objectPoints, imgPointsMat, cameraMatrix, distCoeffs, rvecs, tvecs, false, Calib3d.SOLVEPNP_IPPE, rvec, tvec, reprojectionError);
...

  • Environment : java
  • Version : opencv 4.1.1 / opencv_contrib 4.1.1
  • Log:

Caused by: CvException [org.opencv.core.CvException: cv::Exception: OpenCV(4.1.1) ../modules/core/src/norm.cpp:1018: error: (-215:Assertion failed) _src1.sameSize(_src2) && _src1.type() == _src2.type() in function 'norm'
]
at org.opencv.calib3d.Calib3d.solvePnPGeneric_0(Native Method)
at org.opencv.calib3d.Calib3d.solvePnPGeneric(Calib3d.java:6641)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions