Merge pull request #19532 from amirtu:OCV-166_getDefaultName_overload

This commit is contained in:
Alexander Alekhin 2021-02-15 15:33:54 +00:00
commit 5a06d679cf
7 changed files with 17 additions and 0 deletions

View File

@ -64,6 +64,8 @@ namespace {
{
}
virtual String getDefaultName() const { return "DenseOpticalFlow.BroxOpticalFlow"; }
virtual void calc(InputArray I0, InputArray I1, InputOutputArray flow, Stream& stream);
virtual double getFlowSmoothness() const { return alpha_; }

View File

@ -129,6 +129,8 @@ namespace
virtual void calc(InputArray I0, InputArray I1, InputOutputArray flow, Stream& stream);
virtual String getDefaultName() const { return "DenseOpticalFlow.FarnebackOpticalFlow"; }
private:
int numLevels_;
double pyrScale_;

View File

@ -347,6 +347,8 @@ namespace
sparse(prevImg, nextImg, prevPts, nextPts, status, err, stream);
}
}
virtual String getDefaultName() const { return "SparseOpticalFlow.SparsePyrLKOpticalFlow"; }
};
class DensePyrLKOpticalFlowImpl : public DensePyrLKOpticalFlow, private PyrLKOpticalFlowBase
@ -388,6 +390,8 @@ namespace
GpuMat flows[] = {u, v};
cuda::merge(flows, 2, _flow, stream);
}
virtual String getDefaultName() const { return "DenseOpticalFlow.DensePyrLKOpticalFlow"; }
};
}

View File

@ -119,6 +119,9 @@ namespace
virtual void calc(InputArray I0, InputArray I1, InputOutputArray flow, Stream& stream);
virtual String getDefaultName() const { return "DenseOpticalFlow.OpticalFlowDual_TVL1"; }
private:
double tau_;
double lambda_;

View File

@ -867,6 +867,8 @@ namespace
OutputArray status,
OutputArray err = cv::noArray()) CV_OVERRIDE;
virtual String getDefaultName() const CV_OVERRIDE { return "SparseOpticalFlow.SparsePyrLKOpticalFlow"; }
private:
#ifdef HAVE_OPENCL
bool checkParam()

View File

@ -618,6 +618,8 @@ public:
virtual void calc(InputArray I0, InputArray I1, InputOutputArray flow) CV_OVERRIDE;
virtual String getDefaultName() const CV_OVERRIDE { return "DenseOpticalFlow.FarnebackOpticalFlow"; }
private:
int numLevels_;
double pyrScale_;

View File

@ -102,6 +102,8 @@ public:
}
OpticalFlowDual_TVL1();
virtual String getDefaultName() const CV_OVERRIDE { return "DenseOpticalFlow.DualTVL1OpticalFlow"; }
void calc(InputArray I0, InputArray I1, InputOutputArray flow) CV_OVERRIDE;
void collectGarbage() CV_OVERRIDE;