1
0
mirror of https://github.com/opencv/opencv_contrib.git synced 2025-10-19 02:16:34 +08:00

Passing of the prior file to the evaluation tool

This commit is contained in:
Vladislav Samsonov
2016-06-13 19:25:51 +03:00
parent f9ef5d456e
commit 329f49e92a
3 changed files with 17 additions and 9 deletions

View File

@@ -66,7 +66,7 @@ namespace optflow
* Solution will be regularized according to this prior.
* You need to generate appropriate prior file with "learn_prior.py" script beforehand.
*/
class PCAPrior
class CV_EXPORTS_W PCAPrior
{
private:
Mat L1;
@@ -84,10 +84,10 @@ public:
void fillConstraints( float *A1, float *A2, float *b1, float *b2 ) const;
};
class OpticalFlowPCAFlow : public DenseOpticalFlow
class CV_EXPORTS_W OpticalFlowPCAFlow : public DenseOpticalFlow
{
protected:
const PCAPrior *prior;
const Ptr<const PCAPrior> prior;
const Size basisSize;
const float sparseRate; // (0 .. 0.1)
const float retainedCornersFraction; // [0 .. 1]
@@ -95,7 +95,7 @@ protected:
const float dampingFactor;
public:
OpticalFlowPCAFlow( const PCAPrior *_prior = 0, const Size _basisSize = Size( 18, 14 ),
OpticalFlowPCAFlow( Ptr<const PCAPrior> _prior = Ptr<const PCAPrior>(), const Size _basisSize = Size( 18, 14 ),
float _sparseRate = 0.02, float _retainedCornersFraction = 0.7,
float _occlusionsThreshold = 0.0003, float _dampingFactor = 0.00002 );