Ask Your Question

iliTheFallen's profile - activity

2014-07-02 06:12:40 -0600 commented question Papers which OpenCV Implementations are Based.

Very thx tuannhtn. It seems they may help me in this.

2014-07-01 11:34:09 -0600 asked a question Papers which OpenCV Implementations are Based.

Hi All,

Is there any pool or a kind of search engine that i can use to match implementations in OpenCV with the papers that they are based? Because i need to cite LK Optical Flow GPU implementation and explain some part of it.

Thanks in advance, Ilker

2014-05-08 03:56:57 -0600 asked a question Pyramidal LK on GPU has Different Results than Its CPU Counterpart...

Hi All,

I've been trying to make use of GPU counterpart(i.e. the one running on CUDA) of Pyramidal LK method; however this method does not return approximately the same next-points as does its cpu counterpart. Here is how i implemented :

    lk                  = new PyrLKOpticalFlow();
    lk->useInitialFlow  = true;
    lk->winSize.width   = 4;
    lk->winSize.height  = 4;
    lk->iters           = 20;
    lk->maxLevel        = 5;
    cv::Mat status(1, num_points, CV_8UC1, (void*)out_lk_status);
    GpuMat dev_status;
    //For pts...
    cv::Mat prev_pts(1, num_points, CV_32FC2, (void*)pts_prev);
    cv::Mat cur_pts(1, num_points, CV_32FC2, (void*)out_pts_cur);
    cv::Mat i_cpu(310, 
                  470,
                  CV_8UC1,
                  (void*)(IMG[I]->imageData));
    cv::Mat j_cpu(310, 
                  470,
                  CV_8UC1,
                  (void*)(IMG[J]->imageData));
    GpuMat dev_prev_pts;
    GpuMat dev_cur_pts;
    GpuMat i_gpu(i_cpu);
    GpuMat j_gpu(j_cpu);

    dev_prev_pts.upload(prev_pts);
    dev_cur_pts.upload(cur_pts);
    lk->sparse(i_gpu,
               j_gpu,
               dev_prev_pts,
               dev_cur_pts,
               dev_status);
    dev_cur_pts.download(cur_pts);
    dev_status.download(status);

and this is the working copy of its cpu counterpart :

    cvCalcOpticalFlowPyrLK( IMG[I], IMG[J], PYR[I], PYR[J], points[0], points[1], nPts, cvSize(4,4), Level, status, 0, cvTermCriteria(CV_TERMCRIT_ITER|CV_TERMCRIT_EPS,20,0.03), CV_LKFLOW_INITIAL_GUESSES);

You can see the pixel results(for a particular pair of consecutive frames) in the following link.

prev_pts_gpu_pts_cpu_pts

What should i have suspicion of?

P.S. My OpenCV version is 2.4.8.2.

Kind Regards,
Ilker