Optical Flow in C Language [closed]

asked 2018-02-20 08:45:45 -0600

archimedium gravatar image

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 :)

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by berak
close date 2018-02-20 08:59:12.223367

Comments

opencv moved to c++ in 2010 already. the remainders of the deprecated c-api are no longer maintained, and you must not use it to write any new code.

"Can I still implement C language with recent versions of OpenCV ?" -- that's hard to say, but "should I" ? NO.

berak gravatar imageberak ( 2018-02-20 09:01:22 -0600 )edit