Ask Your Question

rkurian's profile - activity

2019-11-07 13:45:27 -0500 received badge  Popular Question (source)
2013-09-13 12:40:09 -0500 received badge  Supporter (source)
2013-09-13 11:48:11 -0500 commented question GPU resize Ubuntu 12.04

Actually passing a GpuMat instance to imwrite was the issue.

2013-09-13 11:47:22 -0500 commented answer GPU resize Ubuntu 12.04

I don't know how I missed that! Passing the GpuMat dst to imwrite was the issue.

2013-09-13 11:45:40 -0500 received badge  Scholar (source)
2013-09-13 01:59:42 -0500 received badge  Editor (source)
2013-09-13 01:57:58 -0500 commented question GPU resize Ubuntu 12.04

I also get this sometimes: OpenCV Error: Gpu API call (out of memory) in mallocPitch, file /home/opencv-2.4.6.1/modules/core/src/gpumat.cpp, line 1415 2.4.6.1Error: /home/opencv-2.4.6.1/modules/core/src/gpumat.cpp:1415: error: (-217) out of memory in function mallocPitch Not sure when I get the previous error vs this one.

2013-09-13 01:51:20 -0500 asked a question GPU resize Ubuntu 12.04

I installed OpenCV 2.4.6.1 on Ubuntu 12.04 with CUDA turned on. I have Cuda version 5.0 installed. While I can run the sample on http://opencv.willowgarage.com/wiki/OpenCV_GPU, when I try to run the following progrm:

#include <iostream>
#include "opencv2/opencv.hpp"
#include "opencv2/gpu/gpu.hpp"

using namespace cv;

int main (int argc, char* argv[])
{
    try
    {
        std::cout << CV_VERSION ;
        Mat src_host = imread("sunset.jpg", CV_LOAD_IMAGE_COLOR);
        gpu::GpuMat dst, src;
        src.upload(src_host);

        gpu::resize(src, dst, Size(256, 256), 0, 0, INTER_CUBIC);
        Mat dst_host(dst);
        imwrite("out.jpeg", dst);

        return 0;
    }
    catch(const cv::Exception& ex)
    {
        std::cout << "Error: " << ex.what() << std::endl;
    }
    return 0;
}

I get the following error: OpenCV Error: Assertion failed (k == STD_VECTOR_MAT) in getMat, file /home/opencv-2.4.6.1/modules/core/src/matrix.cpp, line 988 2.4.6.1Error: /home/opencv-2.4.6.1/modules/core/src/matrix.cpp:988: error: (-215) k == STD_VECTOR_MAT in function getMat

I have a GTX 460 which scores a 2.1 on the Nvidia compute capability score. Has any one else run into this problem?