Ask Your Question

Summer Sun's profile - activity

2017-08-02 03:22:16 -0600 commented answer OpenCL can not detect my nVidia GPU via OpenCV

I have already installed NVIDIA CUDA toolkit. But the haveOpenCL() still return false... Do you have any further idea?

2017-08-02 02:18:18 -0600 commented answer OpenCL can not detect my nVidia GPU via OpenCV

Hi the cv::ocl::getPlatfomsInfo(platforms); give me an error OpenCL function is not available: [clGetPlatformIDs] in function opencl_check_fn, do you have any idea?

2017-08-01 07:11:00 -0600 commented answer About GpuMat

What if I have to access elements of GpuMat frequently? Upload Mat to GpuMat is too slow... I would appreciate if you could have a look at this question.

2017-07-31 08:57:01 -0600 asked a question Fail to use GPU related functions.

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