mirror of
https://github.com/opencv/opencv.git
synced 2025-06-28 15:30:49 +08:00
Add method KeypointBasedMotionEstimator::estimate(InputArray, InputArray) to support both cpu & opencl algorithm processing
the orignal estimate function has input parameters defined as "Mat", this prevent users to call into algorithm opencl path
This commit is contained in:
parent
1c53595817
commit
1fc60e6d64
@ -236,6 +236,7 @@ public:
|
|||||||
Ptr<IOutlierRejector> outlierRejector() const { return outlierRejector_; }
|
Ptr<IOutlierRejector> outlierRejector() const { return outlierRejector_; }
|
||||||
|
|
||||||
virtual Mat estimate(const Mat &frame0, const Mat &frame1, bool *ok = 0);
|
virtual Mat estimate(const Mat &frame0, const Mat &frame1, bool *ok = 0);
|
||||||
|
Mat estimate(InputArray frame0, InputArray frame1, bool *ok = 0);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ptr<MotionEstimatorBase> motionEstimator_;
|
Ptr<MotionEstimatorBase> motionEstimator_;
|
||||||
|
@ -710,6 +710,14 @@ KeypointBasedMotionEstimator::KeypointBasedMotionEstimator(Ptr<MotionEstimatorBa
|
|||||||
|
|
||||||
|
|
||||||
Mat KeypointBasedMotionEstimator::estimate(const Mat &frame0, const Mat &frame1, bool *ok)
|
Mat KeypointBasedMotionEstimator::estimate(const Mat &frame0, const Mat &frame1, bool *ok)
|
||||||
|
{
|
||||||
|
InputArray image0 = frame0;
|
||||||
|
InputArray image1 = frame1;
|
||||||
|
|
||||||
|
return estimate(image0, image1, ok);
|
||||||
|
}
|
||||||
|
|
||||||
|
Mat KeypointBasedMotionEstimator::estimate(InputArray frame0, InputArray frame1, bool *ok)
|
||||||
{
|
{
|
||||||
// find keypoints
|
// find keypoints
|
||||||
detector_->detect(frame0, keypointsPrev_);
|
detector_->detect(frame0, keypointsPrev_);
|
||||||
|
Loading…
Reference in New Issue
Block a user