Ask Your Question
0

OpenCv with Cuda on Carma board

asked 2014-05-21 05:06:21 -0500

I have completed compiling opencv for Carma board with Cuda enable.

However when I tried to run a simple code, i always got segmentation errors. But if i just commented out gpu functions, the program run well.

Do you have any ideas about this issue?? Thanks Below is my sample code:

int main (int argc, char* argv[])

{ try { gpu::getCudaEnabledDeviceCount(); Mat src_host = imread("sample.bmp", IMREAD_GRAYSCALE); gpu::GpuMat src,dst;

    src.upload(src_host);

    //gpu::transpose(src,dst);
    //gpu::Canny(src,dst,100,100,3,false);
    //gpu::cvtColor(src, dst, CV_YUV2RGB);

    gpu::blur(src,dst,Size(3,3));
    //gpu::cvtColor(src,dst,CV_BGR2GRAY);

    Mat result_host(src);
    imwrite("output.bmp",result_host);
    waitKey();
}
catch(const cv::Exception& ex)
{
    cout <<"Exception happened\n";
    system("pause");
}

return 0;

}

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-07-15 02:27:20 -0500

Problem solved. Please refer to my blog if you face same issue. http://multicoresamples.blogspot.jp/

edit flag offensive delete link more

Comments

I would ask you to update this answer with the complete solution. We cannot guarantee that this link will be staying active, so copying all results here will maintain the solution.

StevenPuttemans gravatar imageStevenPuttemans ( 2014-07-15 02:39:43 -0500 )edit

Question Tools

Stats

Asked: 2014-05-21 05:06:21 -0500

Seen: 133 times

Last updated: Jul 15 '14