OpenCv Error: GPU API call(out of memory) in copy, file gpumat.cpp, line 1053
Hi All, I have an issue with running CUDA gpu on OpenCV 2.4.2. I have a 8600 GTS graphics card with CUDA enabled (v1.1). I compiled OpenCV with CUDA on. And it built binaries successfully.
I tried to run a simple code from opencv_gpu tutorial. It gives me an error as mentioned in the subject.
try
{
cv::Mat src_host = cv::imread("lena.jpg", CV_LOAD_IMAGE_GRAYSCALE);
cv::gpu::GpuMat dst, src;
src.upload(src_host);
cv::gpu::threshold(src, dst, 128.0, 255.0, CV_THRESH_BINARY);
cv::Mat result_host(dst);
cv::imshow("Result", result_host);
cv::waitKey();
}
catch(const cv::Exception& ex)
{
std::cout << "Error: " << ex.what() << std::endl;
}
A similar issue is posted in another thread as given below. But there has been no solution. Can anybody give am idea of what could be the problem
http://answers.opencv.org/question/2542/gpu-api-call-error-out-of-memory-in-mallocpitch/