Runtime crash while running sample reg module code from opencv-contrib VS17

0

I've successfully compiled opencv-contrib module using cmake on visual studio 2017.

I am trying to run sample registration code given here as it is.

For all functions (testShift, testEuclidean etc) I am getting a runtime crash at following line:

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

Below is the crashing code snippet at mapperpyramid.cpp in MapperPyramid::calculate method:

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();
    }

Following is the exception message:

Exception thrown at 0x0000000000000000 in Reg_Test.exe: 0xC0000005: Access violation executing location 0x0000000000000000.

I've also checked baseMapper_ is not null. init variable is empty but that is supposed to be initialized by the crashing line.

opencv
visual-studio-2017
opencv-contrib
asked on Stack Overflow Jan 24, 2019 by MayureshPG • edited Jan 24, 2019 by atline

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0