从opencv-contrib VS17运行示例reg模块代码时,运行时崩溃

时间:2019-01-24 02:32:58

标签: opencv visual-studio-2017 opencv-contrib

我已经在Visual Studio 2017上使用cmake成功编译了opencv-contrib模块。

我正尝试按给出的here来运行示例注册码。

对于所有功能(testShift,testEuclidean等),我在以下行遇到运行时崩溃:

Ptr<Map> mapPtr = mappPyr.calculate(img1, img2);

下面是MapperPyramid :: calculate方法中mapperpyramid.cpp的崩溃代码段:

Ptr<Map> MapperPyramid::calculate(InputArray _img1, InputArray image2, Ptr<Map> init) const
{
    Mat img1 = _img1.getMat();
    Mat img2;

    if(!init.empty()) {
        // We have initial values for the registration: we move img2 to that initial reference
        init->inverseWarp(image2, img2);
    } else {
        init = baseMapper_.getMap(); <-- This is the crashing line
        img2 = image2.getMat();
    }

以下是异常消息:

  

在Reg_Test.exe中的0x0000000000000000处引发的异常:0xC0000005:执行访问位置0x0000000000000000的访问冲突。

我还检查了baseMapper_不为空。 init变量为空,但应该由崩溃行初始化。

0 个答案:

没有答案
相关问题