Minor fixes

pull/710/head
Vladislav Samsonov 9 years ago
parent 329f49e92a
commit 2d68b30528
  1. 2
      modules/optflow/include/opencv2/optflow/pcaflow.hpp
  2. 2
      modules/optflow/src/learn_prior.py
  3. 7
      modules/optflow/src/pcaflow.cpp

@ -96,7 +96,7 @@ protected:
public:
OpticalFlowPCAFlow( Ptr<const PCAPrior> _prior = Ptr<const PCAPrior>(), const Size _basisSize = Size( 18, 14 ),
float _sparseRate = 0.02, float _retainedCornersFraction = 0.7,
float _sparseRate = 0.024, float _retainedCornersFraction = 0.2,
float _occlusionsThreshold = 0.0003, float _dampingFactor = 0.00002 );
void calc( InputArray I0, InputArray I1, InputOutputArray flow );

@ -16,7 +16,7 @@ Gamma should be selected experimentally.''')
argparser.add_argument('-f',
'--files',
nargs='+',
help='List of optical flow .flo files for learning',
help='List of optical flow .flo files for learning. You can pass a directory here and it will be scanned recursively for .flo files.',
required=True)
argparser.add_argument('-o',
'--output',

@ -117,9 +117,8 @@ static inline void symOrtho( double a, double b, double &c, double &s, double &r
static void solveLSQR( const Mat &A, const Mat &b, OutputArray xOut, const double damp = 0.0,
const unsigned iter_lim = 10 )
{
int m = A.size().height;
int n = A.size().width;
CV_Assert( m == b.size().height );
const int n = A.size().width;
CV_Assert( A.size().height == b.size().height );
CV_Assert( A.type() == CV_32F );
CV_Assert( b.type() == CV_32F );
xOut.create( n, 1, CV_32F );
@ -164,7 +163,7 @@ static void solveLSQR( const Mat &A, const Mat &b, OutputArray xOut, const doubl
v += AT * u;
alfa = cv::norm( v, NORM_L2 );
if ( alfa > 0 )
v = ( 1 / alfa ) * v;
v *= 1 / alfa;
}
double rhobar1 = sqrt( rhobar * rhobar + damp * damp );

Loading…
Cancel
Save