Ask Your Question
0

OpenCv Error: GPU API call(out of memory) in copy, file gpumat.cpp, line 1053

asked 2012-11-02 10:16:13 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >50 is welcome to improve it.

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/

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-03-07 02:34:03 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >50 is welcome to improve it.

I have the same error when I compile several times my application.

Anyone knows why this error occurs?

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-11-02 10:16:13 -0600

Seen: 1,821 times

Last updated: Mar 07 '13