Fail to use GPU related functions.

asked 2017-07-31 08:03:16 -0600

updated 2017-08-01 01:34:59 -0600

System information (version)

  • OpenCV => 3.2
  • Operating System / Platform => Windows 10 64 Bit
  • Compiler => Visual Studio 2015 Community
  • CUDA Toolkit Version => 8.0

Detailed description

I am using GPU based functions and operations. I build OpenCV on my own, and most GPU functions and operations work fine. But when it comes to filter related functions like createGaussianFilter or createSobelFilter error below is catched:

C:\OpenCV\opencv-3.2.0\modules\cudafilters\src\filtering.cpp:414: error: (-215) rowFilter_ != 0 in function `anonymous-namespace'::SeparableLinearFilter::SeparableLinearFilter

Code to reproduce

// C++ code example
// A very simple snnipet
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/core/cuda.hpp>
#include <opencv2/cudaimgproc.hpp>
#include <opencv2/cudafilters.hpp>
#include <iostream>

using namespace cv;
using namespace std;

int main(int argc, char** argv)
{
    try
    {
        Ptr<cuda::Filter> filterX = cuda::createSobelFilter(CV_64F, CV_64F, 1, 0, 3, 1, BORDER_DEFAULT); // x direction
    }
    catch (cv::Exception& e)
    {
        const char* err_msg = e.what();
        std::cout << "exception caught: " << err_msg << std::endl;
    }

    return 0;
}
edit retag flag offensive close merge delete