i have one problem using cuda+opencv+nsight eclipse

asked 2014-02-19 11:48:23 -0600

shiv.butekar gravatar image

the following program works fine in my pc

    #include<opencv2/gpu/gpu.hpp>
    #include <opencv2/opencv.hpp>
    using namespace std;
    using namespace cv;
    using namespace cv::gpu;
    int main(int argc, char** argv)
    {
 VideoCapture cap(0);
    if(!cap.isOpened()) return -1;
    Mat host_frame,device_frame;
    namedWindow("host ",CV_GUI_EXPANDED);
    namedWindow("device ",CV_GUI_EXPANDED);
    GpuMat device_image1,device_image2;


setDevice(0);
for(;;)
{
    cap>>host_frame;
     device_image1.upload(host_frame);

    device_image1.copyto((device_image2);  //cv::gpu::cvtColor(device_image2,device_image2,CV_BGR2GRAY);
    device_image2.download(device_frame);
    imwrite("host",host_frame);
    imwrite("device",device_frame);


       waitKey(1);
}}

but tbut when ever i call any function such as cv::gpu::cvtColor() giving parameter apropriate it compile but terminate at run time any solution to this problem thanks in advance please give me solution

edit retag flag offensive close merge delete

Comments

Please add more information about your issue. Do you see any error message?

Vladislav Vinogradov gravatar imageVladislav Vinogradov ( 2014-03-10 03:14:48 -0600 )edit

no i dont see any error it show core dumped

shiv.butekar gravatar imageshiv.butekar ( 2014-03-12 10:34:16 -0600 )edit