43
#ifndef OPENCV_VIDEOSTAB_MOTION_STABILIZING_HPP
44
#define OPENCV_VIDEOSTAB_MOTION_STABILIZING_HPP
48
#include "opencv2/core.hpp"
49
#include "opencv2/videostab/global_motion.hpp"
66
int
size,
const
std::vector<Mat> &motions,
const
Range
&range,
67
Mat
*stabilizationMotions) = 0;
74
bool
empty()
const
{
return
stabilizers_.empty(); }
77
int
size,
const
std::vector<Mat> &motions,
const
Range
&range,
78
Mat
*stabilizationMotions) CV_OVERRIDE;
81
std::vector<Ptr<IMotionStabilizer> > stabilizers_;
89
virtual
Mat
stabilize(
90
int
idx,
const
std::vector<Mat> &motions,
const
Range
&range) = 0;
93
int
size,
const
std::vector<Mat> &motions,
const
Range
&range,
94
Mat
*stabilizationMotions) CV_OVERRIDE;
102
void
setParams(
int
radius,
float
stdev = -1.f);
103
int
radius()
const
{
return
radius_; }
104
float
stdev()
const
{
return
stdev_; }
106
virtual
Mat
stabilize(
107
int
idx,
const
std::vector<Mat> &motions,
const
Range
&range) CV_OVERRIDE;
112
std::vector<float> weight_;
115
inline
GaussianMotionFilter::GaussianMotionFilter(
int
_radius,
float
_stdev) { setParams(_radius, _stdev); }
122
void
setMotionModel(
MotionModel
val) { model_ = val; }
125
void
setFrameSize(
Size
val) { frameSize_ = val; }
126
Size
frameSize()
const
{
return
frameSize_; }
128
void
setTrimRatio(
float
val) { trimRatio_ = val; }
129
float
trimRatio()
const
{
return
trimRatio_; }
131
void
setWeight1(
float
val) { w1_ = val; }
132
float
weight1()
const
{
return
w1_; }
134
void
setWeight2(
float
val) { w2_ = val; }
135
float
weight2()
const
{
return
w2_; }
137
void
setWeight3(
float
val) { w3_ = val; }
138
float
weight3()
const
{
return
w3_; }
140
void
setWeight4(
float
val) { w4_ = val; }
141
float
weight4()
const
{
return
w4_; }
144
int
size,
const
std::vector<Mat> &motions,
const
Range
&range,
145
Mat
*stabilizationMotions) CV_OVERRIDE;
151
float
w1_, w2_, w3_, w4_;
153
std::vector<double> obj_, collb_, colub_;
154
std::vector<int> rows_, cols_;
155
std::vector<double> elems_, rowlb_, rowub_;
157
void
set(
int
row,
int
col,
double
coef)
159
rows_.push_back(row);
160
cols_.push_back(col);
161
elems_.push_back(coef);
165CV_EXPORTS
Mat
ensureInclusionConstraint(
const
Mat
&M,
Size
size,
float
trimRatio);
167CV_EXPORTS
float
estimateOptimalTrimRatio(
const
Mat
&M,
Size
size);
n-dimensional dense array class
Definition:
mat.hpp:802
Template class specifying a continuous subsequence (slice) of a sequence.
Definition:
core/types.hpp:590
Template class for specifying the size of an image or rectangle.
Definition:
core/types.hpp:316
Definition:
motion_stabilizing.hpp:98
Definition:
motion_stabilizing.hpp:60
virtual void stabilize(int size, const std::vector< Mat > &motions, const Range &range, Mat *stabilizationMotions)=0
assumes that [0, size-1) is in or equals to [range.first, range.second)
Definition:
motion_stabilizing.hpp:118
virtual void stabilize(int size, const std::vector< Mat > &motions, const Range &range, Mat *stabilizationMotions) CV_OVERRIDE
assumes that [0, size-1) is in or equals to [range.first, range.second)
Definition:
motion_stabilizing.hpp:85
virtual void stabilize(int size, const std::vector< Mat > &motions, const Range &range, Mat *stabilizationMotions) CV_OVERRIDE
assumes that [0, size-1) is in or equals to [range.first, range.second)
Definition:
motion_stabilizing.hpp:71
virtual void stabilize(int size, const std::vector< Mat > &motions, const Range &range, Mat *stabilizationMotions) CV_OVERRIDE
assumes that [0, size-1) is in or equals to [range.first, range.second)
MotionModel
Describes motion model between two point clouds.
Definition:
motion_core.hpp:60
"black box" representation of the file storage associated with a file on disk.
Definition:
aruco.hpp:75
Definition:
cvstd_wrapper.hpp:74