Skip to content

Commit

Permalink
added comments and reference for Chambolle paper
Browse files Browse the repository at this point in the history
  • Loading branch information
ernest-galbrun committed Jul 4, 2014
1 parent 693c4e5 commit 4bd55c6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion modules/cudaoptflow/include/opencv2/cudaoptflow.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,10 @@ class CV_EXPORTS OpticalFlowDual_TVL1_CUDA

double gamma;
/**
* parameter for robustness
* parameter used for motion estimation. It adds a variable allowing for illumination variations
* Set this parameter to 1. if you have varying illumination.
* See: Chambolle et al, A First-Order Primal-Dual Algorithm for Convex Problems with Applications to Imaging
* Journal of Mathematical imaging and vision, may 2011 Vol 40 issue 1, pp 120-145
*/
double theta;

Expand Down
6 changes: 3 additions & 3 deletions modules/video/src/tvl1flow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class OpticalFlowDual_TVL1 : public DenseOpticalFlow
double tau;
double lambda;
double theta;
double gamma;
double gamma;
int nscales;
int warps;
double epsilon;
Expand Down Expand Up @@ -1320,7 +1320,7 @@ void OpticalFlowDual_TVL1::procOneScale(const Mat_<float>& I0, const Mat_<float>
remap(I1, I1w, flowMap1, flowMap2, INTER_CUBIC);
remap(I1x, I1wx, flowMap1, flowMap2, INTER_CUBIC);
remap(I1y, I1wy, flowMap1, flowMap2, INTER_CUBIC);
//calculate I1(x+u0) and its gradient
//calculate I1(x+u0) and its gradient
calcGradRho(I0, I1w, I1wx, I1wy, u1, u2, grad, rho_c);

float error = std::numeric_limits<float>::max();
Expand Down Expand Up @@ -1440,7 +1440,7 @@ CV_INIT_ALGORITHM(OpticalFlowDual_TVL1, "DenseOpticalFlow.DualTVL1",
obj.info()->addParam(obj, "outerIterations", obj.outerIterations, false, 0, 0,
"outer iterations (number of inner loops) used in the numerical scheme");
obj.info()->addParam(obj, "gamma", obj.gamma, false, 0, 0,
"coefficient for additional Ali term");
"coefficient for additional illumination variation term");
obj.info()->addParam(obj, "useInitialFlow", obj.useInitialFlow))

} // namespace
Expand Down

0 comments on commit 4bd55c6

Please sign in to comment.