Ask Your Question

Revision history [back]

Fail to use GPU related functions.

Thank you all for your time!

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

Steps to reproduce

// C++ code example // g_g could be any a gray scale image

Ptr<cv::cuda::filter> filter = cv::cuda::createGaussianFilter(g_g.type(), g_g.type(), Size(3, 3), 0);

Ptr<cuda::filter> filterX = cv::cuda::createSobelFilter(g_g.type(), g_g.type(), 1, 0, 3, 1, BORDER_DEFAULT);

Fail to use GPU related functions.

Thank you all for your time!

System information (version)

  • OpenCV => 3.2 3.2
  • Operating System / Platform => Windows 10 64 Bit Bit
  • Compiler => Visual Studio 2015 Community 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

Steps

Code to reproduce

// C++ code example
// g_g could be any a gray scale image

Ptr<cv::cuda::filter> filter = cv::cuda::createGaussianFilter(g_g.type(), g_g.type(), Size(3, 3), 0);

Ptr<cuda::filter> 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 = cv::cuda::createSobelFilter(g_g.type(), g_g.type(), 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; }