Ask Your Question

Revision history [back]

OpenCV 2.4.10 + Maxwell gpu cmake = <invalid device="" function=""> error

I installed a NVidia Geforce GT750Ti with Auto and PTX=5.0, ArchBin = 2.0 - 5.0. My CUDA version is 7. I tried out some functions. For some reason, my gpu::transpose and gpu::flip functions runs fine, but my gpu::cvtColor and gpu::resize gives an error.

while (1)
{
    frameNo++;
    int _startWhileLoop = (int)getTickCount();
    capL.read(leftFrame);
    cvtColor(leftFrame, leftFrame, CV_BGR2GRAY);
    imageLSrc.upload(leftFrame);
    cout << "breakpoint 1" << endl;
    cv::gpu::resize(imageLSrc, imageLDst, cv::Size(frameWidth, frameHeight)); // Breaks here
    cout << "breakpoint 2" << endl;
    gpu::transpose(imageLDst, imageLSrc);
    gpu::flip(imageLSrc, imageLDst, 1);
    imageLDst.download(leftFrame);
    cv::imshow("und", leftFrame);

    if (waitKey(30) == 27)
        break;
}

error: OpenCV error: Gpu API call <invalid device="" function=""> in unknown function: ....\src\cuda\resize.cu, line 233

When I try gpu::cvtColor it gives similar error: OpenCV error: Gpu API call <invalid device="" function=""> in unknown function: ....\opencv2\gpu\device\detail\transform_detail.hpp, line 320

Spent alot of time remaking opencv with CUDA. If anyone has made it work with GT750ti, please let me know cmake settings

Thanks