Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv_contrib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv_contrib
Commits
874edea9
Commit
874edea9
authored
Mar 21, 2018
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tracking: apply CV_OVERRIDE/CV_FINAL
parent
e4c8510e
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
136 additions
and
137 deletions
+136
-137
feature.hpp
modules/tracking/include/opencv2/tracking/feature.hpp
+24
-24
tracker.hpp
modules/tracking/include/opencv2/tracking/tracker.hpp
+32
-32
PFSolver.hpp
modules/tracking/src/PFSolver.hpp
+5
-5
TrackingFunctionPF.hpp
modules/tracking/src/TrackingFunctionPF.hpp
+3
-3
augmented_unscented_kalman.cpp
modules/tracking/src/augmented_unscented_kalman.cpp
+7
-7
gtrTracker.cpp
modules/tracking/src/gtrTracker.cpp
+2
-2
gtrTracker.hpp
modules/tracking/src/gtrTracker.hpp
+4
-4
mosseTracker.cpp
modules/tracking/src/mosseTracker.cpp
+7
-7
tldDetector.cpp
modules/tracking/src/tldDetector.cpp
+1
-1
tldModel.cpp
modules/tracking/src/tldModel.cpp
+1
-1
tldModel.hpp
modules/tracking/src/tldModel.hpp
+2
-3
tldTracker.hpp
modules/tracking/src/tldTracker.hpp
+7
-7
trackerBoosting.cpp
modules/tracking/src/trackerBoosting.cpp
+4
-4
trackerBoostingModel.hpp
modules/tracking/src/trackerBoostingModel.hpp
+2
-2
trackerCSRT.cpp
modules/tracking/src/trackerCSRT.cpp
+8
-8
trackerCSRTScaleEstimation.cpp
modules/tracking/src/trackerCSRTScaleEstimation.cpp
+1
-1
trackerFeature.cpp
modules/tracking/src/trackerFeature.cpp
+1
-1
trackerKCF.cpp
modules/tracking/src/trackerKCF.cpp
+7
-7
trackerMIL.cpp
modules/tracking/src/trackerMIL.cpp
+4
-4
trackerMILModel.hpp
modules/tracking/src/trackerMILModel.hpp
+2
-2
trackerMedianFlow.cpp
modules/tracking/src/trackerMedianFlow.cpp
+6
-6
unscented_kalman.cpp
modules/tracking/src/unscented_kalman.cpp
+6
-6
No files found.
modules/tracking/include/opencv2/tracking/feature.hpp
View file @
874edea9
...
...
@@ -145,8 +145,8 @@ class CvFeatureParams : public CvParams
};
CvFeatureParams
();
virtual
void
init
(
const
CvFeatureParams
&
fp
);
virtual
void
write
(
FileStorage
&
fs
)
const
;
virtual
bool
read
(
const
FileNode
&
node
);
virtual
void
write
(
FileStorage
&
fs
)
const
CV_OVERRIDE
;
virtual
bool
read
(
const
FileNode
&
node
)
CV_OVERRIDE
;
static
Ptr
<
CvFeatureParams
>
create
(
int
featureType
);
int
maxCatCount
;
// 0 in case of numerical features
int
featSize
;
// 1 in case of simple features (HAAR, LBP) and N_BINS(9)*N_CELLS(4) in case of Dalal's HOG features
...
...
@@ -201,13 +201,13 @@ class CvHaarFeatureParams : public CvFeatureParams
CvHaarFeatureParams
();
virtual
void
init
(
const
CvFeatureParams
&
fp
);
virtual
void
write
(
FileStorage
&
fs
)
const
;
virtual
bool
read
(
const
FileNode
&
node
);
virtual
void
init
(
const
CvFeatureParams
&
fp
)
CV_OVERRIDE
;
virtual
void
write
(
FileStorage
&
fs
)
const
CV_OVERRIDE
;
virtual
bool
read
(
const
FileNode
&
node
)
CV_OVERRIDE
;
virtual
void
printDefaults
()
const
;
virtual
void
printAttrs
()
const
;
virtual
bool
scanAttr
(
const
std
::
string
prm
,
const
std
::
string
val
);
virtual
void
printDefaults
()
const
CV_OVERRIDE
;
virtual
void
printAttrs
()
const
CV_OVERRIDE
;
virtual
bool
scanAttr
(
const
std
::
string
prm
,
const
std
::
string
val
)
CV_OVERRIDE
;
bool
isIntegral
;
};
...
...
@@ -251,10 +251,10 @@ class CvHaarEvaluator : public CvFeatureEvaluator
};
virtual
void
init
(
const
CvFeatureParams
*
_featureParams
,
int
_maxSampleCount
,
Size
_winSize
);
virtual
void
setImage
(
const
Mat
&
img
,
uchar
clsLabel
=
0
,
int
idx
=
1
);
virtual
float
operator
()(
int
featureIdx
,
int
sampleIdx
);
virtual
void
writeFeatures
(
FileStorage
&
fs
,
const
Mat
&
featureMap
)
const
;
virtual
void
init
(
const
CvFeatureParams
*
_featureParams
,
int
_maxSampleCount
,
Size
_winSize
)
CV_OVERRIDE
;
virtual
void
setImage
(
const
Mat
&
img
,
uchar
clsLabel
=
0
,
int
idx
=
1
)
CV_OVERRIDE
;
virtual
float
operator
()(
int
featureIdx
,
int
sampleIdx
)
CV_OVERRIDE
;
virtual
void
writeFeatures
(
FileStorage
&
fs
,
const
Mat
&
featureMap
)
const
CV_OVERRIDE
;
void
writeFeature
(
FileStorage
&
fs
)
const
;
// for old file format
const
std
::
vector
<
CvHaarEvaluator
::
FeatureHaar
>&
getFeatures
()
const
;
inline
CvHaarEvaluator
::
FeatureHaar
&
getFeatures
(
int
idx
)
...
...
@@ -263,7 +263,7 @@ class CvHaarEvaluator : public CvFeatureEvaluator
}
void
setWinSize
(
Size
patchSize
);
Size
setWinSize
()
const
;
virtual
void
generateFeatures
();
virtual
void
generateFeatures
()
CV_OVERRIDE
;
/**
* TODO new method
...
...
@@ -300,12 +300,12 @@ class CvHOGEvaluator : public CvFeatureEvaluator
virtual
~
CvHOGEvaluator
()
{
}
virtual
void
init
(
const
CvFeatureParams
*
_featureParams
,
int
_maxSampleCount
,
Size
_winSize
);
virtual
void
setImage
(
const
Mat
&
img
,
uchar
clsLabel
,
int
idx
);
virtual
float
operator
()(
int
varIdx
,
int
sampleIdx
);
virtual
void
writeFeatures
(
FileStorage
&
fs
,
const
Mat
&
featureMap
)
const
;
virtual
void
init
(
const
CvFeatureParams
*
_featureParams
,
int
_maxSampleCount
,
Size
_winSize
)
CV_OVERRIDE
;
virtual
void
setImage
(
const
Mat
&
img
,
uchar
clsLabel
,
int
idx
)
CV_OVERRIDE
;
virtual
float
operator
()(
int
varIdx
,
int
sampleIdx
)
CV_OVERRIDE
;
virtual
void
writeFeatures
(
FileStorage
&
fs
,
const
Mat
&
featureMap
)
const
CV_OVERRIDE
;
protected
:
virtual
void
generateFeatures
();
virtual
void
generateFeatures
()
CV_OVERRIDE
;
virtual
void
integralHistogram
(
const
Mat
&
img
,
std
::
vector
<
Mat
>
&
histogram
,
Mat
&
norm
,
int
nbins
)
const
;
class
Feature
{
...
...
@@ -364,18 +364,18 @@ struct CvLBPFeatureParams : CvFeatureParams
class
CvLBPEvaluator
:
public
CvFeatureEvaluator
{
public
:
virtual
~
CvLBPEvaluator
()
virtual
~
CvLBPEvaluator
()
CV_OVERRIDE
{
}
virtual
void
init
(
const
CvFeatureParams
*
_featureParams
,
int
_maxSampleCount
,
Size
_winSize
);
virtual
void
setImage
(
const
Mat
&
img
,
uchar
clsLabel
,
int
idx
);
virtual
float
operator
()(
int
featureIdx
,
int
sampleIdx
)
virtual
void
init
(
const
CvFeatureParams
*
_featureParams
,
int
_maxSampleCount
,
Size
_winSize
)
CV_OVERRIDE
;
virtual
void
setImage
(
const
Mat
&
img
,
uchar
clsLabel
,
int
idx
)
CV_OVERRIDE
;
virtual
float
operator
()(
int
featureIdx
,
int
sampleIdx
)
CV_OVERRIDE
{
return
(
float
)
features
[
featureIdx
].
calc
(
sum
,
sampleIdx
);
}
virtual
void
writeFeatures
(
FileStorage
&
fs
,
const
Mat
&
featureMap
)
const
;
virtual
void
writeFeatures
(
FileStorage
&
fs
,
const
Mat
&
featureMap
)
const
CV_OVERRIDE
;
protected
:
virtual
void
generateFeatures
();
virtual
void
generateFeatures
()
CV_OVERRIDE
;
class
Feature
{
...
...
modules/tracking/include/opencv2/tracking/tracker.hpp
View file @
874edea9
...
...
@@ -525,7 +525,7 @@ class CV_EXPORTS_W Tracker : public virtual Algorithm
{
public
:
virtual
~
Tracker
();
virtual
~
Tracker
()
CV_OVERRIDE
;
/** @brief Initialize the tracker with a known bounding box that surrounded the target
@param image The initial frame
...
...
@@ -546,8 +546,8 @@ class CV_EXPORTS_W Tracker : public virtual Algorithm
*/
CV_WRAP
bool
update
(
InputArray
image
,
CV_OUT
Rect2d
&
boundingBox
);
virtual
void
read
(
const
FileNode
&
fn
)
=
0
;
virtual
void
write
(
FileStorage
&
fs
)
const
=
0
;
virtual
void
read
(
const
FileNode
&
fn
)
CV_OVERRIDE
=
0
;
virtual
void
write
(
FileStorage
&
fs
)
const
CV_OVERRIDE
=
0
;
protected
:
...
...
@@ -627,8 +627,8 @@ class CV_EXPORTS TrackerStateEstimatorMILBoosting : public TrackerStateEstimator
void
setCurrentConfidenceMap
(
ConfidenceMap
&
confidenceMap
);
protected
:
Ptr
<
TrackerTargetState
>
estimateImpl
(
const
std
::
vector
<
ConfidenceMap
>&
confidenceMaps
);
void
updateImpl
(
std
::
vector
<
ConfidenceMap
>&
confidenceMaps
);
Ptr
<
TrackerTargetState
>
estimateImpl
(
const
std
::
vector
<
ConfidenceMap
>&
confidenceMaps
)
CV_OVERRIDE
;
void
updateImpl
(
std
::
vector
<
ConfidenceMap
>&
confidenceMaps
)
CV_OVERRIDE
;
private
:
uint
max_idx
(
const
std
::
vector
<
float
>
&
v
);
...
...
@@ -732,8 +732,8 @@ class CV_EXPORTS TrackerStateEstimatorAdaBoosting : public TrackerStateEstimator
std
::
vector
<
int
>
computeSwappedClassifier
();
protected
:
Ptr
<
TrackerTargetState
>
estimateImpl
(
const
std
::
vector
<
ConfidenceMap
>&
confidenceMaps
);
void
updateImpl
(
std
::
vector
<
ConfidenceMap
>&
confidenceMaps
);
Ptr
<
TrackerTargetState
>
estimateImpl
(
const
std
::
vector
<
ConfidenceMap
>&
confidenceMaps
)
CV_OVERRIDE
;
void
updateImpl
(
std
::
vector
<
ConfidenceMap
>&
confidenceMaps
)
CV_OVERRIDE
;
Ptr
<
StrongClassifierDirectSelection
>
boostClassifier
;
...
...
@@ -760,8 +760,8 @@ class CV_EXPORTS TrackerStateEstimatorSVM : public TrackerStateEstimator
~
TrackerStateEstimatorSVM
();
protected
:
Ptr
<
TrackerTargetState
>
estimateImpl
(
const
std
::
vector
<
ConfidenceMap
>&
confidenceMaps
);
void
updateImpl
(
std
::
vector
<
ConfidenceMap
>&
confidenceMaps
);
Ptr
<
TrackerTargetState
>
estimateImpl
(
const
std
::
vector
<
ConfidenceMap
>&
confidenceMaps
)
CV_OVERRIDE
;
void
updateImpl
(
std
::
vector
<
ConfidenceMap
>&
confidenceMaps
)
CV_OVERRIDE
;
};
/************************************ Specific TrackerSamplerAlgorithm Classes ************************************/
...
...
@@ -813,7 +813,7 @@ class CV_EXPORTS TrackerSamplerCSC : public TrackerSamplerAlgorithm
protected
:
bool
samplingImpl
(
const
Mat
&
image
,
Rect
boundingBox
,
std
::
vector
<
Mat
>&
sample
);
bool
samplingImpl
(
const
Mat
&
image
,
Rect
boundingBox
,
std
::
vector
<
Mat
>&
sample
)
CV_OVERRIDE
;
private
:
...
...
@@ -860,7 +860,7 @@ class CV_EXPORTS TrackerSamplerCS : public TrackerSamplerAlgorithm
~
TrackerSamplerCS
();
bool
samplingImpl
(
const
Mat
&
image
,
Rect
boundingBox
,
std
::
vector
<
Mat
>&
sample
);
bool
samplingImpl
(
const
Mat
&
image
,
Rect
boundingBox
,
std
::
vector
<
Mat
>&
sample
)
CV_OVERRIDE
;
Rect
getROI
()
const
;
private
:
Rect
getTrackingROI
(
float
searchFactor
);
...
...
@@ -916,7 +916,7 @@ public:
*/
TrackerSamplerPF
(
const
Mat
&
chosenRect
,
const
TrackerSamplerPF
::
Params
&
parameters
=
TrackerSamplerPF
::
Params
());
protected
:
bool
samplingImpl
(
const
Mat
&
image
,
Rect
boundingBox
,
std
::
vector
<
Mat
>&
sample
);
bool
samplingImpl
(
const
Mat
&
image
,
Rect
boundingBox
,
std
::
vector
<
Mat
>&
sample
)
CV_OVERRIDE
;
private
:
Params
params
;
Ptr
<
MinProblemSolver
>
_solver
;
...
...
@@ -939,13 +939,13 @@ class CV_EXPORTS TrackerFeatureFeature2d : public TrackerFeature
*/
TrackerFeatureFeature2d
(
String
detectorType
,
String
descriptorType
);
~
TrackerFeatureFeature2d
();
~
TrackerFeatureFeature2d
()
CV_OVERRIDE
;
void
selection
(
Mat
&
response
,
int
npoints
);
void
selection
(
Mat
&
response
,
int
npoints
)
CV_OVERRIDE
;
protected
:
bool
computeImpl
(
const
std
::
vector
<
Mat
>&
images
,
Mat
&
response
);
bool
computeImpl
(
const
std
::
vector
<
Mat
>&
images
,
Mat
&
response
)
CV_OVERRIDE
;
private
:
...
...
@@ -961,13 +961,13 @@ class CV_EXPORTS TrackerFeatureHOG : public TrackerFeature
TrackerFeatureHOG
();
~
TrackerFeatureHOG
();
~
TrackerFeatureHOG
()
CV_OVERRIDE
;
void
selection
(
Mat
&
response
,
int
npoints
);
void
selection
(
Mat
&
response
,
int
npoints
)
CV_OVERRIDE
;
protected
:
bool
computeImpl
(
const
std
::
vector
<
Mat
>&
images
,
Mat
&
response
);
bool
computeImpl
(
const
std
::
vector
<
Mat
>&
images
,
Mat
&
response
)
CV_OVERRIDE
;
};
...
...
@@ -990,7 +990,7 @@ class CV_EXPORTS TrackerFeatureHAAR : public TrackerFeature
*/
TrackerFeatureHAAR
(
const
TrackerFeatureHAAR
::
Params
&
parameters
=
TrackerFeatureHAAR
::
Params
()
);
~
TrackerFeatureHAAR
();
~
TrackerFeatureHAAR
()
CV_OVERRIDE
;
/** @brief Compute the features only for the selected indices in the images collection
@param selFeatures indices of selected features
...
...
@@ -1005,7 +1005,7 @@ class CV_EXPORTS TrackerFeatureHAAR : public TrackerFeature
@note This method modifies the response parameter
*/
void
selection
(
Mat
&
response
,
int
npoints
);
void
selection
(
Mat
&
response
,
int
npoints
)
CV_OVERRIDE
;
/** @brief Swap the feature in position source with the feature in position target
@param source The source position
...
...
@@ -1025,7 +1025,7 @@ class CV_EXPORTS TrackerFeatureHAAR : public TrackerFeature
CvHaarEvaluator
::
FeatureHaar
&
getFeatureAt
(
int
id
);
protected
:
bool
computeImpl
(
const
std
::
vector
<
Mat
>&
images
,
Mat
&
response
);
bool
computeImpl
(
const
std
::
vector
<
Mat
>&
images
,
Mat
&
response
)
CV_OVERRIDE
;
private
:
...
...
@@ -1044,11 +1044,11 @@ class CV_EXPORTS TrackerFeatureLBP : public TrackerFeature
~
TrackerFeatureLBP
();
void
selection
(
Mat
&
response
,
int
npoints
);
void
selection
(
Mat
&
response
,
int
npoints
)
CV_OVERRIDE
;
protected
:
bool
computeImpl
(
const
std
::
vector
<
Mat
>&
images
,
Mat
&
response
);
bool
computeImpl
(
const
std
::
vector
<
Mat
>&
images
,
Mat
&
response
)
CV_OVERRIDE
;
};
...
...
@@ -1088,7 +1088,7 @@ class CV_EXPORTS_W TrackerMIL : public Tracker
CV_WRAP
static
Ptr
<
TrackerMIL
>
create
();
virtual
~
TrackerMIL
()
{}
virtual
~
TrackerMIL
()
CV_OVERRIDE
{}
};
/** @brief This is a real-time object tracking based on a novel on-line version of the AdaBoost algorithm.
...
...
@@ -1125,7 +1125,7 @@ class CV_EXPORTS_W TrackerBoosting : public Tracker
CV_WRAP
static
Ptr
<
TrackerBoosting
>
create
();
virtual
~
TrackerBoosting
()
{}
virtual
~
TrackerBoosting
()
CV_OVERRIDE
{}
};
/** @brief Median Flow tracker implementation.
...
...
@@ -1164,7 +1164,7 @@ class CV_EXPORTS_W TrackerMedianFlow : public Tracker
CV_WRAP
static
Ptr
<
TrackerMedianFlow
>
create
();
virtual
~
TrackerMedianFlow
()
{}
virtual
~
TrackerMedianFlow
()
CV_OVERRIDE
{}
};
/** @brief TLD is a novel tracking framework that explicitly decomposes the long-term tracking task into
...
...
@@ -1195,7 +1195,7 @@ class CV_EXPORTS_W TrackerTLD : public Tracker
CV_WRAP
static
Ptr
<
TrackerTLD
>
create
();
virtual
~
TrackerTLD
()
{}
virtual
~
TrackerTLD
()
CV_OVERRIDE
{}
};
/** @brief KCF is a novel tracking framework that utilizes properties of circulant matrix to enhance the processing speed.
...
...
@@ -1261,7 +1261,7 @@ public:
CV_WRAP
static
Ptr
<
TrackerKCF
>
create
();
virtual
~
TrackerKCF
()
{}
virtual
~
TrackerKCF
()
CV_OVERRIDE
{}
};
/** @brief GOTURN (@cite GOTURN) is kind of trackers based on Convolutional Neural Networks (CNN). While taking all advantages of CNN trackers,
...
...
@@ -1294,7 +1294,7 @@ public:
CV_WRAP
static
Ptr
<
TrackerGOTURN
>
create
();
virtual
~
TrackerGOTURN
()
{}
virtual
~
TrackerGOTURN
()
CV_OVERRIDE
{}
};
/** @brief the MOSSE tracker
...
...
@@ -1309,7 +1309,7 @@ class CV_EXPORTS_W TrackerMOSSE : public Tracker
*/
CV_WRAP
static
Ptr
<
TrackerMOSSE
>
create
();
virtual
~
TrackerMOSSE
()
{}
virtual
~
TrackerMOSSE
()
CV_OVERRIDE
{}
};
...
...
@@ -1330,7 +1330,7 @@ public:
/**
* \brief Destructor
*/
~
MultiTracker
();
~
MultiTracker
()
CV_OVERRIDE
;
/**
* \brief Add a new object to be tracked.
...
...
@@ -1524,7 +1524,7 @@ public:
virtual
void
setInitialMask
(
const
Mat
mask
)
=
0
;
virtual
~
TrackerCSRT
()
{}
virtual
~
TrackerCSRT
()
CV_OVERRIDE
{}
};
}
/* namespace cv */
...
...
modules/tracking/src/PFSolver.hpp
View file @
874edea9
...
...
@@ -22,7 +22,7 @@ namespace cv{
PFSolver
();
void
getOptParam
(
OutputArray
params
)
const
;
int
iteration
();
double
minimize
(
InputOutputArray
x
);
double
minimize
(
InputOutputArray
x
)
CV_OVERRIDE
;
void
setParticlesNum
(
int
num
);
int
getParticlesNum
();
...
...
@@ -31,10 +31,10 @@ namespace cv{
void
getParamsSTD
(
OutputArray
std
)
const
;
void
setParamsSTD
(
InputArray
std
);
Ptr
<
MinProblemSolver
::
Function
>
getFunction
()
const
;
void
setFunction
(
const
Ptr
<
MinProblemSolver
::
Function
>&
f
);
TermCriteria
getTermCriteria
()
const
;
void
setTermCriteria
(
const
TermCriteria
&
termcrit
);
Ptr
<
MinProblemSolver
::
Function
>
getFunction
()
const
CV_OVERRIDE
;
void
setFunction
(
const
Ptr
<
MinProblemSolver
::
Function
>&
f
)
CV_OVERRIDE
;
TermCriteria
getTermCriteria
()
const
CV_OVERRIDE
;
void
setTermCriteria
(
const
TermCriteria
&
termcrit
)
CV_OVERRIDE
;
private
:
Mat_
<
double
>
_std
,
_particles
,
_logweight
;
Ptr
<
MinProblemSolver
::
Function
>
_Function
;
...
...
modules/tracking/src/TrackingFunctionPF.hpp
View file @
874edea9
...
...
@@ -9,9 +9,9 @@ namespace cv{
public
:
TrackingFunctionPF
(
const
Mat
&
chosenRect
);
void
update
(
const
Mat
&
image
);
int
getDims
()
const
{
return
4
;
}
double
calc
(
const
double
*
x
)
const
;
void
correctParams
(
double
*
pt
)
const
;
int
getDims
()
const
CV_OVERRIDE
{
return
4
;
}
double
calc
(
const
double
*
x
)
const
CV_OVERRIDE
;
void
correctParams
(
double
*
pt
)
const
CV_OVERRIDE
;
private
:
Mat
_image
;
static
inline
Rect
rectFromRow
(
const
double
*
row
);
...
...
modules/tracking/src/augmented_unscented_kalman.cpp
View file @
874edea9
...
...
@@ -140,16 +140,16 @@ class AugmentedUnscentedKalmanFilterImpl: public UnscentedKalmanFilter
public
:
AugmentedUnscentedKalmanFilterImpl
(
const
AugmentedUnscentedKalmanFilterParams
&
params
);
~
AugmentedUnscentedKalmanFilterImpl
();
~
AugmentedUnscentedKalmanFilterImpl
()
CV_OVERRIDE
;
Mat
predict
(
InputArray
control
);
Mat
correct
(
InputArray
measurement
);
Mat
predict
(
InputArray
control
)
CV_OVERRIDE
;
Mat
correct
(
InputArray
measurement
)
CV_OVERRIDE
;
Mat
getProcessNoiseCov
()
const
;
Mat
getMeasurementNoiseCov
()
const
;
Mat
getErrorCov
()
const
;
Mat
getProcessNoiseCov
()
const
CV_OVERRIDE
;
Mat
getMeasurementNoiseCov
()
const
CV_OVERRIDE
;
Mat
getErrorCov
()
const
CV_OVERRIDE
;
Mat
getState
()
const
;
Mat
getState
()
const
CV_OVERRIDE
;
};
...
...
modules/tracking/src/gtrTracker.cpp
View file @
874edea9
...
...
@@ -81,8 +81,8 @@ public:
protected
:
Rect2d
boundingBox_
;
Mat
image_
;
void
modelEstimationImpl
(
const
std
::
vector
<
Mat
>&
){}
void
modelUpdateImpl
(){}
void
modelEstimationImpl
(
const
std
::
vector
<
Mat
>&
)
CV_OVERRIDE
{}
void
modelUpdateImpl
()
CV_OVERRIDE
{}
};
TrackerGOTURNImpl
::
TrackerGOTURNImpl
(
const
TrackerGOTURN
::
Params
&
parameters
)
:
...
...
modules/tracking/src/gtrTracker.hpp
View file @
874edea9
...
...
@@ -64,10 +64,10 @@ class TrackerGOTURNImpl : public TrackerGOTURN
{
public
:
TrackerGOTURNImpl
(
const
TrackerGOTURN
::
Params
&
parameters
=
TrackerGOTURN
::
Params
());
void
read
(
const
FileNode
&
fn
);
void
write
(
FileStorage
&
fs
)
const
;
bool
initImpl
(
const
Mat
&
image
,
const
Rect2d
&
boundingBox
);
bool
updateImpl
(
const
Mat
&
image
,
Rect2d
&
boundingBox
);
void
read
(
const
FileNode
&
fn
)
CV_OVERRIDE
;
void
write
(
FileStorage
&
fs
)
const
CV_OVERRIDE
;
bool
initImpl
(
const
Mat
&
image
,
const
Rect2d
&
boundingBox
)
CV_OVERRIDE
;
bool
updateImpl
(
const
Mat
&
image
,
Rect2d
&
boundingBox
)
CV_OVERRIDE
;
TrackerGOTURN
::
Params
params
;
...
...
modules/tracking/src/mosseTracker.cpp
View file @
874edea9
...
...
@@ -20,8 +20,8 @@ namespace tracking {
struct
DummyModel
:
TrackerModel
{
virtual
void
modelUpdateImpl
(){}
virtual
void
modelEstimationImpl
(
const
std
::
vector
<
Mat
>&
){}
virtual
void
modelUpdateImpl
()
CV_OVERRIDE
{}
virtual
void
modelEstimationImpl
(
const
std
::
vector
<
Mat
>&
)
CV_OVERRIDE
{}
};
...
...
@@ -30,7 +30,7 @@ const double rate=0.2; // learning rate
const
double
psrThreshold
=
5.7
;
// no detection, if PSR is smaller than this
struct
MosseImpl
:
TrackerMOSSE
struct
MosseImpl
CV_FINAL
:
TrackerMOSSE
{
protected
:
...
...
@@ -130,7 +130,7 @@ protected:
}
virtual
bool
initImpl
(
const
Mat
&
image
,
const
Rect2d
&
boundingBox
)
virtual
bool
initImpl
(
const
Mat
&
image
,
const
Rect2d
&
boundingBox
)
CV_OVERRIDE
{
model
=
makePtr
<
DummyModel
>
();
...
...
@@ -183,7 +183,7 @@ protected:
return
true
;
}
virtual
bool
updateImpl
(
const
Mat
&
image
,
Rect2d
&
boundingBox
)
virtual
bool
updateImpl
(
const
Mat
&
image
,
Rect2d
&
boundingBox
)
CV_OVERRIDE
{
if
(
H
.
empty
())
// not initialized
return
false
;
...
...
@@ -232,8 +232,8 @@ public:
MosseImpl
()
{
isInit
=
0
;
}
// dummy implementation.
virtual
void
read
(
const
FileNode
&
){}
virtual
void
write
(
FileStorage
&
)
const
{}
virtual
void
read
(
const
FileNode
&
)
CV_OVERRIDE
{}
virtual
void
write
(
FileStorage
&
)
const
CV_OVERRIDE
{}
};
// MosseImpl
...
...
modules/tracking/src/tldDetector.cpp
View file @
874edea9
...
...
@@ -337,7 +337,7 @@ namespace cv
{
}
virtual
void
operator
()
(
const
cv
::
Range
&
r
)
const
virtual
void
operator
()
(
const
cv
::
Range
&
r
)
const
CV_OVERRIDE
{
for
(
int
ind
=
r
.
start
;
ind
<
r
.
end
;
++
ind
)
{
...
...
modules/tracking/src/tldModel.cpp
View file @
874edea9
...
...
@@ -195,7 +195,7 @@ namespace cv
{
}
virtual
void
operator
()
(
const
cv
::
Range
&
r
)
const
virtual
void
operator
()
(
const
cv
::
Range
&
r
)
const
CV_OVERRIDE
{
for
(
int
ind
=
r
.
start
;
ind
<
r
.
end
;
++
ind
)
{
...
...
modules/tracking/src/tldModel.hpp
View file @
874edea9
...
...
@@ -42,7 +42,6 @@
#ifndef OPENCV_TLD_MODEL
#define OPENCV_TLD_MODEL
#include "precomp.hpp"
#include "tldDetector.hpp"
#include "tldUtils.hpp"
...
...
@@ -79,8 +78,8 @@ namespace cv
Size
minSize_
;
TrackerTLD
::
Params
params_
;
void
pushIntoModel
(
const
Mat_
<
uchar
>&
example
,
bool
positive
);
void
modelEstimationImpl
(
const
std
::
vector
<
Mat
>&
/*responses*/
){}
void
modelUpdateImpl
(){}
void
modelEstimationImpl
(
const
std
::
vector
<
Mat
>&
/*responses*/
)
CV_OVERRIDE
{}
void
modelUpdateImpl
()
CV_OVERRIDE
{}
Rect2d
boundingBox_
;
RNG
rng
;
};
...
...
modules/tracking/src/tldTracker.hpp
View file @
874edea9
...
...
@@ -96,12 +96,12 @@ class TrackerProxyImpl : public TrackerProxy
{
public
:
TrackerProxyImpl
(
Tparams
params
=
Tparams
())
:
params_
(
params
){}
bool
init
(
const
Mat
&
image
,
const
Rect2d
&
boundingBox
)
bool
init
(
const
Mat
&
image
,
const
Rect2d
&
boundingBox
)
CV_OVERRIDE
{
trackerPtr
=
T
::
create
();
return
trackerPtr
->
init
(
image
,
boundingBox
);
}
bool
update
(
const
Mat
&
image
,
Rect2d
&
boundingBox
)
bool
update
(
const
Mat
&
image
,
Rect2d
&
boundingBox
)
CV_OVERRIDE
{
return
trackerPtr
->
update
(
image
,
boundingBox
);
}
...
...
@@ -119,8 +119,8 @@ class TrackerTLDImpl : public TrackerTLD
{
public
:
TrackerTLDImpl
(
const
TrackerTLD
::
Params
&
parameters
=
TrackerTLD
::
Params
());
void
read
(
const
FileNode
&
fn
);
void
write
(
FileStorage
&
fs
)
const
;
void
read
(
const
FileNode
&
fn
)
CV_OVERRIDE
;
void
write
(
FileStorage
&
fs
)
const
CV_OVERRIDE
;
Ptr
<
TrackerModel
>
getModel
()
{
...
...
@@ -136,7 +136,7 @@ public:
bool
operator
()(
Rect2d
/*box*/
){
return
false
;
}
int
additionalExamples
(
std
::
vector
<
Mat_
<
uchar
>
>&
examplesForModel
,
std
::
vector
<
Mat_
<
uchar
>
>&
examplesForEnsemble
);
protected
:
Pexpert
(){}
Pexpert
()
:
detector_
(
NULL
)
{}
Mat
img_
,
imgBlurred_
;
Rect2d
resultBox_
;
const
TLDDetector
*
detector_
;
...
...
@@ -159,8 +159,8 @@ public:
}
};
bool
initImpl
(
const
Mat
&
image
,
const
Rect2d
&
boundingBox
);
bool
updateImpl
(
const
Mat
&
image
,
Rect2d
&
boundingBox
);
bool
initImpl
(
const
Mat
&
image
,
const
Rect2d
&
boundingBox
)
CV_OVERRIDE
;
bool
updateImpl
(
const
Mat
&
image
,
Rect2d
&
boundingBox
)
CV_OVERRIDE
;
TrackerTLD
::
Params
params
;
Ptr
<
Data
>
data
;
...
...
modules/tracking/src/trackerBoosting.cpp
View file @
874edea9
...
...
@@ -49,13 +49,13 @@ class TrackerBoostingImpl : public TrackerBoosting
{
public
:
TrackerBoostingImpl
(
const
TrackerBoosting
::
Params
&
parameters
=
TrackerBoosting
::
Params
()
);
void
read
(
const
FileNode
&
fn
);
void
write
(
FileStorage
&
fs
)
const
;
void
read
(
const
FileNode
&
fn
)
CV_OVERRIDE
;
void
write
(
FileStorage
&
fs
)
const
CV_OVERRIDE
;
protected
:
bool
initImpl
(
const
Mat
&
image
,
const
Rect2d
&
boundingBox
);
bool
updateImpl
(
const
Mat
&
image
,
Rect2d
&
boundingBox
);
bool
initImpl
(
const
Mat
&
image
,
const
Rect2d
&
boundingBox
)
CV_OVERRIDE
;
bool
updateImpl
(
const
Mat
&
image
,
Rect2d
&
boundingBox
)
CV_OVERRIDE
;
TrackerBoosting
::
Params
params
;
};
...
...
modules/tracking/src/trackerBoostingModel.hpp
View file @
874edea9
...
...
@@ -93,8 +93,8 @@ class TrackerBoostingModel : public TrackerModel
std
::
vector
<
int
>
getSelectedWeakClassifier
();
protected
:
void
modelEstimationImpl
(
const
std
::
vector
<
Mat
>&
responses
);
void
modelUpdateImpl
();
void
modelEstimationImpl
(
const
std
::
vector
<
Mat
>&
responses
)
CV_OVERRIDE
;
void
modelUpdateImpl
()
CV_OVERRIDE
;
private
:
...
...
modules/tracking/src/trackerCSRT.cpp
View file @
874edea9
...
...
@@ -19,8 +19,8 @@ public:
TrackerCSRTModel
(
TrackerCSRT
::
Params
/*params*/
){}
~
TrackerCSRTModel
(){}
protected
:
void
modelEstimationImpl
(
const
std
::
vector
<
Mat
>&
/*responses*/
){}
void
modelUpdateImpl
(){}
void
modelEstimationImpl
(
const
std
::
vector
<
Mat
>&
/*responses*/
)
CV_OVERRIDE
{}
void
modelUpdateImpl
()
CV_OVERRIDE
{}
};
...
...
@@ -28,15 +28,15 @@ class TrackerCSRTImpl : public TrackerCSRT
{
public
:
TrackerCSRTImpl
(
const
TrackerCSRT
::
Params
&
parameters
=
TrackerCSRT
::
Params
());
void
read
(
const
FileNode
&
fn
);
void
write
(
FileStorage
&
fs
)
const
;
void
read
(
const
FileNode
&
fn
)
CV_OVERRIDE
;
void
write
(
FileStorage
&
fs
)
const
CV_OVERRIDE
;
protected
:
TrackerCSRT
::
Params
params
;
bool
initImpl
(
const
Mat
&
image
,
const
Rect2d
&
boundingBox
);
virtual
void
setInitialMask
(
const
Mat
mask
);
bool
updateImpl
(
const
Mat
&
image
,
Rect2d
&
boundingBox
);
bool
initImpl
(
const
Mat
&
image
,
const
Rect2d
&
boundingBox
)
CV_OVERRIDE
;
virtual
void
setInitialMask
(
const
Mat
mask
)
CV_OVERRIDE
;
bool
updateImpl
(
const
Mat
&
image
,
Rect2d
&
boundingBox
)
CV_OVERRIDE
;
void
update_csr_filter
(
const
Mat
&
image
,
const
Mat
&
my_mask
);
void
update_histograms
(
const
Mat
&
image
,
const
Rect
&
region
);
void
extract_histograms
(
const
Mat
&
image
,
cv
::
Rect
region
,
Histogram
&
hf
,
Histogram
&
hb
);
...
...
@@ -232,7 +232,7 @@ public:
this
->
P
=
P
;
this
->
admm_iterations
=
admm_iterations
;
}
virtual
void
operator
()(
const
Range
&
range
)
const
virtual
void
operator
()(
const
Range
&
range
)
const
CV_OVERRIDE
{
for
(
int
i
=
range
.
start
;
i
<
range
.
end
;
i
++
)
{
float
mu
=
5.0
f
;
...
...
modules/tracking/src/trackerCSRTScaleEstimation.cpp
View file @
874edea9
...
...
@@ -35,7 +35,7 @@ public:
this
->
col_len
=
col_len
;
this
->
result
=
result
;
}
virtual
void
operator
()(
const
Range
&
range
)
const
virtual
void
operator
()(
const
Range
&
range
)
const
CV_OVERRIDE
{
for
(
int
s
=
range
.
start
;
s
<
range
.
end
;
s
++
)
{
Size
patch_sz
=
Size
(
static_cast
<
int
>
(
current_scale
*
scale_factors
[
s
]
*
base_target_sz
.
width
),
...
...
modules/tracking/src/trackerFeature.cpp
View file @
874edea9
...
...
@@ -248,7 +248,7 @@ class Parallel_compute : public cv::ParallelLoopBody
//features = featureEvaluator->getFeatures();
}
virtual
void
operator
()(
const
cv
::
Range
&
r
)
const
virtual
void
operator
()(
const
cv
::
Range
&
r
)
const
CV_OVERRIDE
{
for
(
int
jf
=
r
.
start
;
jf
!=
r
.
end
;
++
jf
)
{
...
...
modules/tracking/src/trackerKCF.cpp
View file @
874edea9
...
...
@@ -56,8 +56,8 @@ namespace cv{
TrackerKCFModel
(
TrackerKCF
::
Params
/*params*/
){}
~
TrackerKCFModel
(){}
protected
:
void
modelEstimationImpl
(
const
std
::
vector
<
Mat
>&
/*responses*/
){}
void
modelUpdateImpl
(){}
void
modelEstimationImpl
(
const
std
::
vector
<
Mat
>&
/*responses*/
)
CV_OVERRIDE
{}
void
modelUpdateImpl
()
CV_OVERRIDE
{}
};
}
/* namespace cv */
...
...
@@ -73,16 +73,16 @@ namespace cv{
class
TrackerKCFImpl
:
public
TrackerKCF
{
public
:
TrackerKCFImpl
(
const
TrackerKCF
::
Params
&
parameters
=
TrackerKCF
::
Params
()
);
void
read
(
const
FileNode
&
/*fn*/
);
void
write
(
FileStorage
&
/*fs*/
)
const
;
void
setFeatureExtractor
(
void
(
*
f
)(
const
Mat
,
const
Rect
,
Mat
&
),
bool
pca_func
=
false
);
void
read
(
const
FileNode
&
/*fn*/
)
CV_OVERRIDE
;
void
write
(
FileStorage
&
/*fs*/
)
const
CV_OVERRIDE
;
void
setFeatureExtractor
(
void
(
*
f
)(
const
Mat
,
const
Rect
,
Mat
&
),
bool
pca_func
=
false
)
CV_OVERRIDE
;
protected
:
/*
* basic functions and vars
*/
bool
initImpl
(
const
Mat
&
/*image*/
,
const
Rect2d
&
boundingBox
);
bool
updateImpl
(
const
Mat
&
image
,
Rect2d
&
boundingBox
);
bool
initImpl
(
const
Mat
&
/*image*/
,
const
Rect2d
&
boundingBox
)
CV_OVERRIDE
;
bool
updateImpl
(
const
Mat
&
image
,
Rect2d
&
boundingBox
)
CV_OVERRIDE
;
TrackerKCF
::
Params
params
;
...
...
modules/tracking/src/trackerMIL.cpp
View file @
874edea9
...
...
@@ -49,13 +49,13 @@ class TrackerMILImpl : public TrackerMIL
{
public
:
TrackerMILImpl
(
const
TrackerMIL
::
Params
&
parameters
=
TrackerMIL
::
Params
()
);
void
read
(
const
FileNode
&
fn
);
void
write
(
FileStorage
&
fs
)
const
;
void
read
(
const
FileNode
&
fn
)
CV_OVERRIDE
;
void
write
(
FileStorage
&
fs
)
const
CV_OVERRIDE
;
protected
:
bool
initImpl
(
const
Mat
&
image
,
const
Rect2d
&
boundingBox
);
bool
updateImpl
(
const
Mat
&
image
,
Rect2d
&
boundingBox
);
bool
initImpl
(
const
Mat
&
image
,
const
Rect2d
&
boundingBox
)
CV_OVERRIDE
;
bool
updateImpl
(
const
Mat
&
image
,
Rect2d
&
boundingBox
)
CV_OVERRIDE
;
void
compute_integral
(
const
Mat
&
img
,
Mat
&
ii_img
);
TrackerMIL
::
Params
params
;
...
...
modules/tracking/src/trackerMILModel.hpp
View file @
874edea9
...
...
@@ -87,8 +87,8 @@ class TrackerMILModel : public TrackerModel
void
responseToConfidenceMap
(
const
std
::
vector
<
Mat
>&
responses
,
ConfidenceMap
&
confidenceMap
);
protected
:
void
modelEstimationImpl
(
const
std
::
vector
<
Mat
>&
responses
);
void
modelUpdateImpl
();
void
modelEstimationImpl
(
const
std
::
vector
<
Mat
>&
responses
)
CV_OVERRIDE
;
void
modelUpdateImpl
()
CV_OVERRIDE
;
private
:
int
mode
;
...
...
modules/tracking/src/trackerMedianFlow.cpp
View file @
874edea9
...
...
@@ -75,11 +75,11 @@ using namespace cv;
class
TrackerMedianFlowImpl
:
public
TrackerMedianFlow
{
public
:
TrackerMedianFlowImpl
(
TrackerMedianFlow
::
Params
paramsIn
=
TrackerMedianFlow
::
Params
())
{
params
=
paramsIn
;
isInit
=
false
;}
void
read
(
const
FileNode
&
fn
);
void
write
(
FileStorage
&
fs
)
const
;
void
read
(
const
FileNode
&
fn
)
CV_OVERRIDE
;
void
write
(
FileStorage
&
fs
)
const
CV_OVERRIDE
;
private
:
bool
initImpl
(
const
Mat
&
image
,
const
Rect2d
&
boundingBox
);
bool
updateImpl
(
const
Mat
&
image
,
Rect2d
&
boundingBox
);
bool
initImpl
(
const
Mat
&
image
,
const
Rect2d
&
boundingBox
)
CV_OVERRIDE
;
bool
updateImpl
(
const
Mat
&
image
,
Rect2d
&
boundingBox
)
CV_OVERRIDE
;
bool
medianFlowImpl
(
Mat
oldImage
,
Mat
newImage
,
Rect2d
&
oldBox
);
Rect2d
vote
(
const
std
::
vector
<
Point2f
>&
oldPoints
,
const
std
::
vector
<
Point2f
>&
newPoints
,
const
Rect2d
&
oldRect
,
Point2f
&
mD
);
float
dist
(
Point2f
p1
,
Point2f
p2
);
...
...
@@ -127,8 +127,8 @@ public:
protected
:
Rect2d
boundingBox_
;
Mat
image_
;
void
modelEstimationImpl
(
const
std
::
vector
<
Mat
>&
/*responses*/
){}
void
modelUpdateImpl
(){}
void
modelEstimationImpl
(
const
std
::
vector
<
Mat
>&
/*responses*/
)
CV_OVERRIDE
{}
void
modelUpdateImpl
()
CV_OVERRIDE
{}
};
void
TrackerMedianFlowImpl
::
read
(
const
cv
::
FileNode
&
fn
)
...
...
modules/tracking/src/unscented_kalman.cpp
View file @
874edea9
...
...
@@ -132,19 +132,19 @@ public:
// perform prediction step
// control - the optional control vector, CP x 1
Mat
predict
(
InputArray
control
=
noArray
()
);
Mat
predict
(
InputArray
control
=
noArray
()
)
CV_OVERRIDE
;
// perform correction step
// measurement - current measurement vector, MP x 1
Mat
correct
(
InputArray
measurement
);
Mat
correct
(
InputArray
measurement
)
CV_OVERRIDE
;
// Get system parameters
Mat
getProcessNoiseCov
()
const
;
Mat
getMeasurementNoiseCov
()
const
;
Mat
getErrorCov
()
const
;
Mat
getProcessNoiseCov
()
const
CV_OVERRIDE
;
Mat
getMeasurementNoiseCov
()
const
CV_OVERRIDE
;
Mat
getErrorCov
()
const
CV_OVERRIDE
;
// Get the state estimate
Mat
getState
()
const
;
Mat
getState
()
const
CV_OVERRIDE
;
};
UnscentedKalmanFilterImpl
::
UnscentedKalmanFilterImpl
(
const
UnscentedKalmanFilterParams
&
params
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment