OpenCV断言失败错误 - 透视变换

时间:2016-09-21 07:33:28

标签: java android opencv feature-detection opencv4android

我正在使用OpenCV for Android Version 3.1.0。我试图使用AKAZE探测器和AKAZE描述符。当我在我的模拟器上运行代码时出现以下错误。

OpenCV Error: Assertion failed (scn + 1 == m.cols) in void CV:perspectiveTransform(cv::InputArray, cv::OutputArray, cv::InputArray), 
file/Volumes/Linux/builds/master_pack-android/opencv/modules/core/src/matmul.cpp, line 2125

core::perspectiveTransform_10() caught cv::Exception: /Volumes/Linux/builds/master_pack-android/opencv/modules/core/src/matmul.cpp:2125: 
error: (-215) scn + 1 == m.cols in function void CV:perspectiveTransform(cv::InputArray, cv::OutputArray, cv::InputArray)

我正在使用

private final Mat firstCorners = new Mat(4,1, CvType.CV_32FC2)

private final Mat secondCorners = new Mat(4,1, CvType.CV_32FC2)

final Mat homography = Calib3d.findHomography(first, second, Calib3d.RANSAC, 1)

Core.perspectiveTransform(firstCorners, secondCorners, homography)

我尝试了新的Mat(4,1,CvType.CV_32FC1)但没有用

对此有任何帮助。

0 个答案:

没有答案