Commit 2d68b305 authored by Vladislav Samsonov's avatar Vladislav Samsonov

Minor fixes

parent 329f49e9
......@@ -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 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment