【问题标题】:OpenCV findHomography errorsOpenCV findHomography 错误
【发布时间】:2013-08-31 08:38:26
【问题描述】:

我正在使用 OpenCV 的 SURF 特征检测来比较两个图像。 当我选择两个相同的图像(有时选择相同的图像)时,我得到了:

 OpenCV Error: Assertion failed (CV_IS_MAT(imagePoints) && CV_IS_MAT(objectPoints)) in cvFindHomography, file /home/OpenCV/OpenCV-2.4.3/modules/calib3d/src/fundam.cpp, line 232 
Qt has caught an exception thrown from an event handler. Throwing 
exceptions from an event handler is not supported in Qt. You must 
reimplement QApplication::notify() and catch all exceptions there. 

terminate called after throwing an instance of 'cv::Exception' 
what(): /home/OpenCV/OpenCV-2.4.3/modules/calib3d/src/fundam.cpp:232: error: (-215) CV_IS_MAT(imagePoints) && CV_IS_MAT(objectPoints) in function cvFindHomography 

Le programme s'est terminé subitement

使用两个不同图像的代码的第二次执行表明:

what(): /home/OpenCV/OpenCV-2.4.3/modules/calib3d/src/fundam.cpp:235: error: (-215) count >= 4 in function cvFindHomography

我每次都用不同的图像重复执行多次,一些测试给了我想要的结果。

【问题讨论】:

    标签: c++ qt opencv


    【解决方案1】:

    您似乎没有足够的点数来计算单应性。您至少需要 4 分才能做到这一点,并且您匹配的分数需要相等(imagePointsobjectPoints)。有关说明,请参阅 reference

    【讨论】:

      猜你喜欢
      • 2012-01-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-12-26
      • 2014-09-01
      • 2012-10-20
      • 2016-01-31
      • 2014-08-28
      相关资源
      最近更新 更多