mirror of
https://github.com/opencv/opencv.git
synced 2026-09-19 15:23:23 -05:00
Move function definition from header to cpp.
This commit is contained in:
@@ -1414,17 +1414,7 @@ namespace cv
|
|||||||
class CV_EXPORTS FarnebackOpticalFlow
|
class CV_EXPORTS FarnebackOpticalFlow
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
FarnebackOpticalFlow()
|
FarnebackOpticalFlow();
|
||||||
{
|
|
||||||
numLevels = 5;
|
|
||||||
pyrScale = 0.5;
|
|
||||||
fastPyramids = false;
|
|
||||||
winSize = 13;
|
|
||||||
numIters = 10;
|
|
||||||
polyN = 5;
|
|
||||||
polySigma = 1.1;
|
|
||||||
flags = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int numLevels;
|
int numLevels;
|
||||||
double pyrScale;
|
double pyrScale;
|
||||||
@@ -1437,21 +1427,7 @@ namespace cv
|
|||||||
|
|
||||||
void operator ()(const oclMat &frame0, const oclMat &frame1, oclMat &flowx, oclMat &flowy);
|
void operator ()(const oclMat &frame0, const oclMat &frame1, oclMat &flowx, oclMat &flowy);
|
||||||
|
|
||||||
void releaseMemory()
|
void releaseMemory();
|
||||||
{
|
|
||||||
frames_[0].release();
|
|
||||||
frames_[1].release();
|
|
||||||
pyrLevel_[0].release();
|
|
||||||
pyrLevel_[1].release();
|
|
||||||
M_.release();
|
|
||||||
bufM_.release();
|
|
||||||
R_[0].release();
|
|
||||||
R_[1].release();
|
|
||||||
blurredFrame_[0].release();
|
|
||||||
blurredFrame_[1].release();
|
|
||||||
pyramid0_.clear();
|
|
||||||
pyramid1_.clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void prepareGaussian(
|
void prepareGaussian(
|
||||||
|
|||||||
@@ -241,6 +241,34 @@ static oclMat allocMatFromBuf(int rows, int cols, int type, oclMat &mat)
|
|||||||
return mat = oclMat(rows, cols, type);
|
return mat = oclMat(rows, cols, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cv::ocl::FarnebackOpticalFlow::FarnebackOpticalFlow()
|
||||||
|
{
|
||||||
|
numLevels = 5;
|
||||||
|
pyrScale = 0.5;
|
||||||
|
fastPyramids = false;
|
||||||
|
winSize = 13;
|
||||||
|
numIters = 10;
|
||||||
|
polyN = 5;
|
||||||
|
polySigma = 1.1;
|
||||||
|
flags = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void cv::ocl::FarnebackOpticalFlow::releaseMemory()
|
||||||
|
{
|
||||||
|
frames_[0].release();
|
||||||
|
frames_[1].release();
|
||||||
|
pyrLevel_[0].release();
|
||||||
|
pyrLevel_[1].release();
|
||||||
|
M_.release();
|
||||||
|
bufM_.release();
|
||||||
|
R_[0].release();
|
||||||
|
R_[1].release();
|
||||||
|
blurredFrame_[0].release();
|
||||||
|
blurredFrame_[1].release();
|
||||||
|
pyramid0_.clear();
|
||||||
|
pyramid1_.clear();
|
||||||
|
}
|
||||||
|
|
||||||
void cv::ocl::FarnebackOpticalFlow::prepareGaussian(
|
void cv::ocl::FarnebackOpticalFlow::prepareGaussian(
|
||||||
int n, double sigma, float *g, float *xg, float *xxg,
|
int n, double sigma, float *g, float *xg, float *xxg,
|
||||||
double &ig11, double &ig03, double &ig33, double &ig55)
|
double &ig11, double &ig03, double &ig33, double &ig55)
|
||||||
|
|||||||
Reference in New Issue
Block a user