Stitcher in openCV 3.0 [closed]

asked Sep 9 '15

JohannesZ gravatar image

updated Sep 10 '15

Hi there,

dealing with the stitcher module in openCV 3.0 (newest checkout from GitHub), Win7 32bit and VS 2013, and searching this forum I did not find a reasonable answer yet. A straighforward implementation for my problem:

cv::Mat imgLeft = cv::imread("panoLeftS.jpg");
cv::Mat imgRight = cv::imread("panoRightS.jpg");

std::vector<cv::Mat> images;
images.push_back(imgLeft);
images.push_back(imgRight);

cv::Mat pano;
cv::Stitcher stitcher = cv::Stitcher::createDefault(false);

stitcher.setRegistrationResol(-1); // 0.6
stitcher.setSeamEstimationResol(-1);   // 0.1
stitcher.setCompositingResol(-1);   //1
stitcher.setPanoConfidenceThresh(-1);   //1
stitcher.setWaveCorrection(true);
stitcher.setWaveCorrectKind(cv::detail::WAVE_CORRECT_HORIZ);

cv::Stitcher::Status status = stitcher.stitch(images, pano);

if (status != cv::Stitcher::OK)
{
    std::cout << "Can't stitch images, error code = " << status << std::endl;
    return -1;
}

In debug mode, everything is working fine. Running in release mode I am always getting a segfault in this line (ocl.cpp) without any detailed information:

bool allocate(UMatData* u, int accessFlags, UMatUsageFlags usageFlags) const
    {
        if(!u)
            return false;

        UMatDataAutoLock lock(u);

        //here is the crash (!)
        if(u->handle == 0)
        {
            CV_Assert(u->origdata != 0);
            Context& ctx = Context::getDefault();
            int createFlags = 0, flags0 = 0;
            getBestFlags(ctx, accessFlags, usageFlags, createFlags, flags0);

What I am doing wrong? On my two machines, I set the OPENCV_OPENCL_DEVICE = Intel(R) OpenCL:CPU:0 and installed the Intel openCL driver set.

Do you have any hints what could be the problem??

Thanks for your help! Johannes

Preview: (hide)

Closed for the following reason question is not relevant or outdated by sturkmen
close date 2020-09-17 05:09:53.655087