Ask Your Question

FacundoGFlores's profile - activity

2014-11-01 11:27:44 -0600 asked a question Geometric Transform Equivalent From Scipy

Hello! Is there any equivalent function for "Geometric Transform" from Ndimage? If not, How can I do it with OpenCV?

2014-10-17 12:21:34 -0600 asked a question How to extend gpu modules for Python

Hello I've seen Opencv 3.0 has a lot of new functions using GPU. I was reading "How to extend new modules to Python?" and now I'm wondering if it is possible to extend all the "GPU module" to python using the method that I mentioned previously, if not, what would be a gentle way to accomplish it? Could you give me an example?

2014-04-15 09:30:33 -0600 asked a question Error while running OpenCV + CUDA

I have the following code:

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

int main (int argc, char* argv[])
{
    try
    {
        cv::Mat src_host = cv::imread("file.png", 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::Mat result_host;
        dst.download(result_host);
        cv::imshow("Result", result_host);
        cv::waitKey();
    }
    catch(const cv::Exception& ex)
    {
        std::cout << "Error: " << ex.what() << std::endl;
    }
    return 0;
}

And I'm compiling it with the following:

 g++ -I/usr/local/opencv/include -L/usr/local/opencv/lib -L/usr/local/cuda/lib64 p.cpp -lopencv_core -lopencv_gpu -lopencv_highgui -lnppc -lnppi

The I get:

OpenCV Error: Gpu API call (unknown error) in copy, file /home/facu/Documentos/opencv-2.4.6.1/modules/core/src/gpumat.cpp, line 1196
Error: /home/facu/Documentos/opencv-2.4.6.1/modules/core/src/gpumat.cpp:1196: error: (-217) unknown error in function copy

I compiled OpenCV with CUDA_SUPPORT=ON so I don't know why I'm having issues. I'm using OpenCV 2.4.6 and CUDA 5.5.