Ask Your Question

Revision history [back]

Optical Flow in C Language

I'm developing in C language (not C++) and I'm interested in various optical flow methods. I already implemented the Lucas-Kanade method with the following call :
IplImage* velx = cvCreateImage(cvSize(ww, hh),IPL_DEPTH_32F, 1); IplImage* vely = cvCreateImage(cvSize(ww, hh),IPL_DEPTH_32F, 1); float *flowx=(float *)velx->imageData; float *flowy=(float *)vely->imageData; cvCalcOpticalFlowLK(subu,subv,cvSize(2*2+1,2*2+1),velx,vely); and also the Farneback method with the following call :
IplImage* opticalflow = cvCreateImage(cvSize(ww, hh),IPL_DEPTH_32F, 2); cvCalcOpticalFlowFarneback(subu,subv,opticalflow,0.5,1,2*4+1,128,7,1.5,0); float *flowx=(float *)opticalflow->imageData; float *flowy=flowx; flowy++;
I want to implement other optical flow methods, like TV-L1 or Brox etc. but these are not documented for C language. It is only documented in C++ language.
What is the equivalent call for OptFlow_DualTVL1() TV-L1 optical flow in C language ? Can I still implement C language with recent versions of OpenCV ? I'm currently using 2.4.12 OpenCV version under GNU/Linux. Thanks :)