Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
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
Commits
225bae13
Commit
225bae13
authored
Mar 15, 2018
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stitching: apply CV_OVERRIDE/CV_FINAL
parent
4d0dd3e5
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
108 additions
and
108 deletions
+108
-108
blenders.hpp
...s/stitching/include/opencv2/stitching/detail/blenders.hpp
+6
-6
exposure_compensate.hpp
.../include/opencv2/stitching/detail/exposure_compensate.hpp
+6
-6
matchers.hpp
...s/stitching/include/opencv2/stitching/detail/matchers.hpp
+8
-8
motion_estimators.hpp
...ng/include/opencv2/stitching/detail/motion_estimators.hpp
+24
-24
seam_finders.hpp
...itching/include/opencv2/stitching/detail/seam_finders.hpp
+7
-7
timelapsers.hpp
...titching/include/opencv2/stitching/detail/timelapsers.hpp
+1
-1
warpers.hpp
...es/stitching/include/opencv2/stitching/detail/warpers.hpp
+33
-33
warpers.hpp
modules/stitching/include/opencv2/stitching/warpers.hpp
+15
-15
matchers.cpp
modules/stitching/src/matchers.cpp
+5
-5
seam_finders.cpp
modules/stitching/src/seam_finders.cpp
+3
-3
No files found.
modules/stitching/include/opencv2/stitching/detail/blenders.hpp
View file @
225bae13
...
...
@@ -104,9 +104,9 @@ public:
float
sharpness
()
const
{
return
sharpness_
;
}
void
setSharpness
(
float
val
)
{
sharpness_
=
val
;
}
void
prepare
(
Rect
dst_roi
);
void
feed
(
InputArray
img
,
InputArray
mask
,
Point
tl
);
void
blend
(
InputOutputArray
dst
,
InputOutputArray
dst_mask
);
void
prepare
(
Rect
dst_roi
)
CV_OVERRIDE
;
void
feed
(
InputArray
img
,
InputArray
mask
,
Point
tl
)
CV_OVERRIDE
;
void
blend
(
InputOutputArray
dst
,
InputOutputArray
dst_mask
)
CV_OVERRIDE
;
//! Creates weight maps for fixed set of source images by their masks and top-left corners.
//! Final image can be obtained by simple weighting of the source images.
...
...
@@ -131,9 +131,9 @@ public:
int
numBands
()
const
{
return
actual_num_bands_
;
}
void
setNumBands
(
int
val
)
{
actual_num_bands_
=
val
;
}
void
prepare
(
Rect
dst_roi
);
void
feed
(
InputArray
img
,
InputArray
mask
,
Point
tl
);
void
blend
(
InputOutputArray
dst
,
InputOutputArray
dst_mask
);
void
prepare
(
Rect
dst_roi
)
CV_OVERRIDE
;
void
feed
(
InputArray
img
,
InputArray
mask
,
Point
tl
)
CV_OVERRIDE
;
void
blend
(
InputOutputArray
dst
,
InputOutputArray
dst_mask
)
CV_OVERRIDE
;
private
:
int
actual_num_bands_
,
num_bands_
;
...
...
modules/stitching/include/opencv2/stitching/detail/exposure_compensate.hpp
View file @
225bae13
...
...
@@ -92,8 +92,8 @@ class CV_EXPORTS NoExposureCompensator : public ExposureCompensator
{
public
:
void
feed
(
const
std
::
vector
<
Point
>
&
/*corners*/
,
const
std
::
vector
<
UMat
>
&
/*images*/
,
const
std
::
vector
<
std
::
pair
<
UMat
,
uchar
>
>
&
/*masks*/
)
{
}
void
apply
(
int
/*index*/
,
Point
/*corner*/
,
InputOutputArray
/*image*/
,
InputArray
/*mask*/
)
{
}
const
std
::
vector
<
std
::
pair
<
UMat
,
uchar
>
>
&
/*masks*/
)
CV_OVERRIDE
{
}
void
apply
(
int
/*index*/
,
Point
/*corner*/
,
InputOutputArray
/*image*/
,
InputArray
/*mask*/
)
CV_OVERRIDE
{
}
};
/** @brief Exposure compensator which tries to remove exposure related artifacts by adjusting image
...
...
@@ -103,8 +103,8 @@ class CV_EXPORTS GainCompensator : public ExposureCompensator
{
public
:
void
feed
(
const
std
::
vector
<
Point
>
&
corners
,
const
std
::
vector
<
UMat
>
&
images
,
const
std
::
vector
<
std
::
pair
<
UMat
,
uchar
>
>
&
masks
);
void
apply
(
int
index
,
Point
corner
,
InputOutputArray
image
,
InputArray
mask
);
const
std
::
vector
<
std
::
pair
<
UMat
,
uchar
>
>
&
masks
)
CV_OVERRIDE
;
void
apply
(
int
index
,
Point
corner
,
InputOutputArray
image
,
InputArray
mask
)
CV_OVERRIDE
;
std
::
vector
<
double
>
gains
()
const
;
private
:
...
...
@@ -120,8 +120,8 @@ public:
BlocksGainCompensator
(
int
bl_width
=
32
,
int
bl_height
=
32
)
:
bl_width_
(
bl_width
),
bl_height_
(
bl_height
)
{}
void
feed
(
const
std
::
vector
<
Point
>
&
corners
,
const
std
::
vector
<
UMat
>
&
images
,
const
std
::
vector
<
std
::
pair
<
UMat
,
uchar
>
>
&
masks
);
void
apply
(
int
index
,
Point
corner
,
InputOutputArray
image
,
InputArray
mask
);
const
std
::
vector
<
std
::
pair
<
UMat
,
uchar
>
>
&
masks
)
CV_OVERRIDE
;
void
apply
(
int
index
,
Point
corner
,
InputOutputArray
image
,
InputArray
mask
)
CV_OVERRIDE
;
private
:
int
bl_width_
,
bl_height_
;
...
...
modules/stitching/include/opencv2/stitching/detail/matchers.hpp
View file @
225bae13
...
...
@@ -130,7 +130,7 @@ public:
int
num_octaves_descr
=
/*4*/
3
,
int
num_layers_descr
=
/*2*/
4
);
private
:
void
find
(
InputArray
image
,
ImageFeatures
&
features
);
void
find
(
InputArray
image
,
ImageFeatures
&
features
)
CV_OVERRIDE
;
Ptr
<
FeatureDetector
>
detector_
;
Ptr
<
DescriptorExtractor
>
extractor_
;
...
...
@@ -147,7 +147,7 @@ public:
OrbFeaturesFinder
(
Size
_grid_size
=
Size
(
3
,
1
),
int
nfeatures
=
1500
,
float
scaleFactor
=
1.3
f
,
int
nlevels
=
5
);
private
:
void
find
(
InputArray
image
,
ImageFeatures
&
features
);
void
find
(
InputArray
image
,
ImageFeatures
&
features
)
CV_OVERRIDE
;
Ptr
<
ORB
>
orb
;
Size
grid_size
;
...
...
@@ -169,7 +169,7 @@ public:
int
diffusivity
=
KAZE
::
DIFF_PM_G2
);
private
:
void
find
(
InputArray
image
,
detail
::
ImageFeatures
&
features
)
;
void
find
(
InputArray
image
,
ImageFeatures
&
features
)
CV_OVERRIDE
;
Ptr
<
AKAZE
>
akaze
;
};
...
...
@@ -181,10 +181,10 @@ public:
SurfFeaturesFinderGpu
(
double
hess_thresh
=
300.
,
int
num_octaves
=
3
,
int
num_layers
=
4
,
int
num_octaves_descr
=
4
,
int
num_layers_descr
=
2
);
void
collectGarbage
();
void
collectGarbage
()
CV_OVERRIDE
;
private
:
void
find
(
InputArray
image
,
ImageFeatures
&
features
);
void
find
(
InputArray
image
,
ImageFeatures
&
features
)
CV_OVERRIDE
;
cuda
::
GpuMat
image_
;
cuda
::
GpuMat
gray_image_
;
...
...
@@ -288,10 +288,10 @@ public:
BestOf2NearestMatcher
(
bool
try_use_gpu
=
false
,
float
match_conf
=
0.3
f
,
int
num_matches_thresh1
=
6
,
int
num_matches_thresh2
=
6
);
void
collectGarbage
();
void
collectGarbage
()
CV_OVERRIDE
;
protected
:
void
match
(
const
ImageFeatures
&
features1
,
const
ImageFeatures
&
features2
,
MatchesInfo
&
matches_info
);
void
match
(
const
ImageFeatures
&
features1
,
const
ImageFeatures
&
features2
,
MatchesInfo
&
matches_info
)
CV_OVERRIDE
;
int
num_matches_thresh1_
;
int
num_matches_thresh2_
;
...
...
@@ -342,7 +342,7 @@ public:
full_affine_
(
full_affine
)
{}
protected
:
void
match
(
const
ImageFeatures
&
features1
,
const
ImageFeatures
&
features2
,
MatchesInfo
&
matches_info
);
void
match
(
const
ImageFeatures
&
features1
,
const
ImageFeatures
&
features2
,
MatchesInfo
&
matches_info
)
CV_OVERRIDE
;
bool
full_affine_
;
};
...
...
modules/stitching/include/opencv2/stitching/detail/motion_estimators.hpp
View file @
225bae13
...
...
@@ -104,7 +104,7 @@ public:
private
:
virtual
bool
estimate
(
const
std
::
vector
<
ImageFeatures
>
&
features
,
const
std
::
vector
<
MatchesInfo
>
&
pairwise_matches
,
std
::
vector
<
CameraParams
>
&
cameras
);
std
::
vector
<
CameraParams
>
&
cameras
)
CV_OVERRIDE
;
bool
is_focals_estimated_
;
};
...
...
@@ -121,7 +121,7 @@ class CV_EXPORTS AffineBasedEstimator : public Estimator
private
:
virtual
bool
estimate
(
const
std
::
vector
<
ImageFeatures
>
&
features
,
const
std
::
vector
<
MatchesInfo
>
&
pairwise_matches
,
std
::
vector
<
CameraParams
>
&
cameras
);
std
::
vector
<
CameraParams
>
&
cameras
)
CV_OVERRIDE
;
};
/** @brief Base class for all camera parameters refinement methods.
...
...
@@ -162,7 +162,7 @@ protected:
// Runs bundle adjustment
virtual
bool
estimate
(
const
std
::
vector
<
ImageFeatures
>
&
features
,
const
std
::
vector
<
MatchesInfo
>
&
pairwise_matches
,
std
::
vector
<
CameraParams
>
&
cameras
);
std
::
vector
<
CameraParams
>
&
cameras
)
CV_OVERRIDE
;
/** @brief Sets initial camera parameter to refine.
...
...
@@ -221,14 +221,14 @@ public:
private
:
bool
estimate
(
const
std
::
vector
<
ImageFeatures
>
&
,
const
std
::
vector
<
MatchesInfo
>
&
,
std
::
vector
<
CameraParams
>
&
)
std
::
vector
<
CameraParams
>
&
)
CV_OVERRIDE
{
return
true
;
}
void
setUpInitialCameraParams
(
const
std
::
vector
<
CameraParams
>
&
)
{}
void
obtainRefinedCameraParams
(
std
::
vector
<
CameraParams
>
&
)
const
{}
void
calcError
(
Mat
&
)
{}
void
calcJacobian
(
Mat
&
)
{}
void
setUpInitialCameraParams
(
const
std
::
vector
<
CameraParams
>
&
)
CV_OVERRIDE
{}
void
obtainRefinedCameraParams
(
std
::
vector
<
CameraParams
>
&
)
const
CV_OVERRIDE
{}
void
calcError
(
Mat
&
)
CV_OVERRIDE
{}
void
calcJacobian
(
Mat
&
)
CV_OVERRIDE
{}
};
...
...
@@ -244,10 +244,10 @@ public:
BundleAdjusterReproj
()
:
BundleAdjusterBase
(
7
,
2
)
{}
private
:
void
setUpInitialCameraParams
(
const
std
::
vector
<
CameraParams
>
&
cameras
);
void
obtainRefinedCameraParams
(
std
::
vector
<
CameraParams
>
&
cameras
)
const
;
void
calcError
(
Mat
&
err
);
void
calcJacobian
(
Mat
&
jac
);
void
setUpInitialCameraParams
(
const
std
::
vector
<
CameraParams
>
&
cameras
)
CV_OVERRIDE
;
void
obtainRefinedCameraParams
(
std
::
vector
<
CameraParams
>
&
cameras
)
const
CV_OVERRIDE
;
void
calcError
(
Mat
&
err
)
CV_OVERRIDE
;
void
calcJacobian
(
Mat
&
jac
)
CV_OVERRIDE
;
Mat
err1_
,
err2_
;
};
...
...
@@ -264,10 +264,10 @@ public:
BundleAdjusterRay
()
:
BundleAdjusterBase
(
4
,
3
)
{}
private
:
void
setUpInitialCameraParams
(
const
std
::
vector
<
CameraParams
>
&
cameras
);
void
obtainRefinedCameraParams
(
std
::
vector
<
CameraParams
>
&
cameras
)
const
;
void
calcError
(
Mat
&
err
);
void
calcJacobian
(
Mat
&
jac
);
void
setUpInitialCameraParams
(
const
std
::
vector
<
CameraParams
>
&
cameras
)
CV_OVERRIDE
;
void
obtainRefinedCameraParams
(
std
::
vector
<
CameraParams
>
&
cameras
)
const
CV_OVERRIDE
;
void
calcError
(
Mat
&
err
)
CV_OVERRIDE
;
void
calcJacobian
(
Mat
&
jac
)
CV_OVERRIDE
;
Mat
err1_
,
err2_
;
};
...
...
@@ -288,10 +288,10 @@ public:
BundleAdjusterAffine
()
:
BundleAdjusterBase
(
6
,
2
)
{}
private
:
void
setUpInitialCameraParams
(
const
std
::
vector
<
CameraParams
>
&
cameras
);
void
obtainRefinedCameraParams
(
std
::
vector
<
CameraParams
>
&
cameras
)
const
;
void
calcError
(
Mat
&
err
);
void
calcJacobian
(
Mat
&
jac
);
void
setUpInitialCameraParams
(
const
std
::
vector
<
CameraParams
>
&
cameras
)
CV_OVERRIDE
;
void
obtainRefinedCameraParams
(
std
::
vector
<
CameraParams
>
&
cameras
)
const
CV_OVERRIDE
;
void
calcError
(
Mat
&
err
)
CV_OVERRIDE
;
void
calcJacobian
(
Mat
&
jac
)
CV_OVERRIDE
;
Mat
err1_
,
err2_
;
};
...
...
@@ -312,10 +312,10 @@ public:
BundleAdjusterAffinePartial
()
:
BundleAdjusterBase
(
4
,
2
)
{}
private
:
void
setUpInitialCameraParams
(
const
std
::
vector
<
CameraParams
>
&
cameras
);
void
obtainRefinedCameraParams
(
std
::
vector
<
CameraParams
>
&
cameras
)
const
;
void
calcError
(
Mat
&
err
);
void
calcJacobian
(
Mat
&
jac
);
void
setUpInitialCameraParams
(
const
std
::
vector
<
CameraParams
>
&
cameras
)
CV_OVERRIDE
;
void
obtainRefinedCameraParams
(
std
::
vector
<
CameraParams
>
&
cameras
)
const
CV_OVERRIDE
;
void
calcError
(
Mat
&
err
)
CV_OVERRIDE
;
void
calcJacobian
(
Mat
&
jac
)
CV_OVERRIDE
;
Mat
err1_
,
err2_
;
};
...
...
modules/stitching/include/opencv2/stitching/detail/seam_finders.hpp
View file @
225bae13
...
...
@@ -74,7 +74,7 @@ public:
class
CV_EXPORTS
NoSeamFinder
:
public
SeamFinder
{
public
:
void
find
(
const
std
::
vector
<
UMat
>&
,
const
std
::
vector
<
Point
>&
,
std
::
vector
<
UMat
>&
)
{}
void
find
(
const
std
::
vector
<
UMat
>&
,
const
std
::
vector
<
Point
>&
,
std
::
vector
<
UMat
>&
)
CV_OVERRIDE
{}
};
/** @brief Base class for all pairwise seam estimators.
...
...
@@ -83,7 +83,7 @@ class CV_EXPORTS PairwiseSeamFinder : public SeamFinder
{
public
:
virtual
void
find
(
const
std
::
vector
<
UMat
>
&
src
,
const
std
::
vector
<
Point
>
&
corners
,
std
::
vector
<
UMat
>
&
masks
);
std
::
vector
<
UMat
>
&
masks
)
CV_OVERRIDE
;
protected
:
void
run
();
...
...
@@ -107,11 +107,11 @@ class CV_EXPORTS VoronoiSeamFinder : public PairwiseSeamFinder
{
public
:
virtual
void
find
(
const
std
::
vector
<
UMat
>
&
src
,
const
std
::
vector
<
Point
>
&
corners
,
std
::
vector
<
UMat
>
&
masks
);
std
::
vector
<
UMat
>
&
masks
)
CV_OVERRIDE
;
virtual
void
find
(
const
std
::
vector
<
Size
>
&
size
,
const
std
::
vector
<
Point
>
&
corners
,
std
::
vector
<
UMat
>
&
masks
);
private
:
void
findInPair
(
size_t
first
,
size_t
second
,
Rect
roi
);
void
findInPair
(
size_t
first
,
size_t
second
,
Rect
roi
)
CV_OVERRIDE
;
};
...
...
@@ -126,7 +126,7 @@ public:
void
setCostFunction
(
CostFunction
val
)
{
costFunc_
=
val
;
}
virtual
void
find
(
const
std
::
vector
<
UMat
>
&
src
,
const
std
::
vector
<
Point
>
&
corners
,
std
::
vector
<
UMat
>
&
masks
);
std
::
vector
<
UMat
>
&
masks
)
CV_OVERRIDE
;
private
:
enum
ComponentState
...
...
@@ -242,7 +242,7 @@ public:
~
GraphCutSeamFinder
();
void
find
(
const
std
::
vector
<
UMat
>
&
src
,
const
std
::
vector
<
Point
>
&
corners
,
std
::
vector
<
UMat
>
&
masks
);
std
::
vector
<
UMat
>
&
masks
)
CV_OVERRIDE
;
private
:
// To avoid GCGraph dependency
...
...
@@ -261,7 +261,7 @@ public:
bad_region_penalty_
(
bad_region_penalty
)
{}
void
find
(
const
std
::
vector
<
cv
::
UMat
>
&
src
,
const
std
::
vector
<
cv
::
Point
>
&
corners
,
std
::
vector
<
cv
::
UMat
>
&
masks
);
std
::
vector
<
cv
::
UMat
>
&
masks
)
CV_OVERRIDE
;
void
findInPair
(
size_t
first
,
size_t
second
,
Rect
roi
);
private
:
...
...
modules/stitching/include/opencv2/stitching/detail/timelapsers.hpp
View file @
225bae13
...
...
@@ -80,7 +80,7 @@ protected:
class
CV_EXPORTS
TimelapserCrop
:
public
Timelapser
{
public
:
virtual
void
initialize
(
const
std
::
vector
<
Point
>
&
corners
,
const
std
::
vector
<
Size
>
&
sizes
);
virtual
void
initialize
(
const
std
::
vector
<
Point
>
&
corners
,
const
std
::
vector
<
Size
>
&
sizes
)
CV_OVERRIDE
;
};
//! @}
...
...
modules/stitching/include/opencv2/stitching/detail/warpers.hpp
View file @
225bae13
...
...
@@ -141,20 +141,20 @@ template <class P>
class
CV_EXPORTS_TEMPLATE
RotationWarperBase
:
public
RotationWarper
{
public
:
Point2f
warpPoint
(
const
Point2f
&
pt
,
InputArray
K
,
InputArray
R
);
Point2f
warpPoint
(
const
Point2f
&
pt
,
InputArray
K
,
InputArray
R
)
CV_OVERRIDE
;
Rect
buildMaps
(
Size
src_size
,
InputArray
K
,
InputArray
R
,
OutputArray
xmap
,
OutputArray
ymap
);
Rect
buildMaps
(
Size
src_size
,
InputArray
K
,
InputArray
R
,
OutputArray
xmap
,
OutputArray
ymap
)
CV_OVERRIDE
;
Point
warp
(
InputArray
src
,
InputArray
K
,
InputArray
R
,
int
interp_mode
,
int
border_mode
,
OutputArray
dst
);
OutputArray
dst
)
CV_OVERRIDE
;
void
warpBackward
(
InputArray
src
,
InputArray
K
,
InputArray
R
,
int
interp_mode
,
int
border_mode
,
Size
dst_size
,
OutputArray
dst
);
Size
dst_size
,
OutputArray
dst
)
CV_OVERRIDE
;
Rect
warpRoi
(
Size
src_size
,
InputArray
K
,
InputArray
R
);
Rect
warpRoi
(
Size
src_size
,
InputArray
K
,
InputArray
R
)
CV_OVERRIDE
;
float
getScale
()
const
{
return
projector_
.
scale
;
}
void
setScale
(
float
val
)
{
projector_
.
scale
=
val
;
}
float
getScale
()
const
CV_OVERRIDE
{
return
projector_
.
scale
;
}
void
setScale
(
float
val
)
CV_OVERRIDE
{
projector_
.
scale
=
val
;
}
protected
:
...
...
@@ -186,22 +186,22 @@ public:
*/
PlaneWarper
(
float
scale
=
1.
f
)
{
projector_
.
scale
=
scale
;
}
Point2f
warpPoint
(
const
Point2f
&
pt
,
InputArray
K
,
InputArray
R
);
Point2f
warpPoint
(
const
Point2f
&
pt
,
InputArray
K
,
InputArray
R
)
CV_OVERRIDE
;
Point2f
warpPoint
(
const
Point2f
&
pt
,
InputArray
K
,
InputArray
R
,
InputArray
T
);
virtual
Rect
buildMaps
(
Size
src_size
,
InputArray
K
,
InputArray
R
,
InputArray
T
,
OutputArray
xmap
,
OutputArray
ymap
);
Rect
buildMaps
(
Size
src_size
,
InputArray
K
,
InputArray
R
,
OutputArray
xmap
,
OutputArray
ymap
);
Rect
buildMaps
(
Size
src_size
,
InputArray
K
,
InputArray
R
,
OutputArray
xmap
,
OutputArray
ymap
)
CV_OVERRIDE
;
Point
warp
(
InputArray
src
,
InputArray
K
,
InputArray
R
,
int
interp_mode
,
int
border_mode
,
OutputArray
dst
);
int
interp_mode
,
int
border_mode
,
OutputArray
dst
)
CV_OVERRIDE
;
virtual
Point
warp
(
InputArray
src
,
InputArray
K
,
InputArray
R
,
InputArray
T
,
int
interp_mode
,
int
border_mode
,
OutputArray
dst
);
Rect
warpRoi
(
Size
src_size
,
InputArray
K
,
InputArray
R
);
Rect
warpRoi
(
Size
src_size
,
InputArray
K
,
InputArray
R
)
CV_OVERRIDE
;
Rect
warpRoi
(
Size
src_size
,
InputArray
K
,
InputArray
R
,
InputArray
T
);
protected
:
void
detectResultRoi
(
Size
src_size
,
Point
&
dst_tl
,
Point
&
dst_br
);
void
detectResultRoi
(
Size
src_size
,
Point
&
dst_tl
,
Point
&
dst_br
)
CV_OVERRIDE
;
};
...
...
@@ -219,11 +219,11 @@ public:
*/
AffineWarper
(
float
scale
=
1.
f
)
:
PlaneWarper
(
scale
)
{}
Point2f
warpPoint
(
const
Point2f
&
pt
,
InputArray
K
,
InputArray
R
);
Rect
buildMaps
(
Size
src_size
,
InputArray
K
,
InputArray
R
,
OutputArray
xmap
,
OutputArray
ymap
);
Point2f
warpPoint
(
const
Point2f
&
pt
,
InputArray
K
,
InputArray
R
)
CV_OVERRIDE
;
Rect
buildMaps
(
Size
src_size
,
InputArray
K
,
InputArray
R
,
OutputArray
xmap
,
OutputArray
ymap
)
CV_OVERRIDE
;
Point
warp
(
InputArray
src
,
InputArray
K
,
InputArray
R
,
int
interp_mode
,
int
border_mode
,
OutputArray
dst
);
Rect
warpRoi
(
Size
src_size
,
InputArray
K
,
InputArray
R
);
int
interp_mode
,
int
border_mode
,
OutputArray
dst
)
CV_OVERRIDE
;
Rect
warpRoi
(
Size
src_size
,
InputArray
K
,
InputArray
R
)
CV_OVERRIDE
;
protected
:
/** @brief Extracts rotation and translation matrices from matrix H representing
...
...
@@ -256,10 +256,10 @@ public:
*/
SphericalWarper
(
float
scale
)
{
projector_
.
scale
=
scale
;
}
Rect
buildMaps
(
Size
src_size
,
InputArray
K
,
InputArray
R
,
OutputArray
xmap
,
OutputArray
ymap
);
Point
warp
(
InputArray
src
,
InputArray
K
,
InputArray
R
,
int
interp_mode
,
int
border_mode
,
OutputArray
dst
);
Rect
buildMaps
(
Size
src_size
,
InputArray
K
,
InputArray
R
,
OutputArray
xmap
,
OutputArray
ymap
)
CV_OVERRIDE
;
Point
warp
(
InputArray
src
,
InputArray
K
,
InputArray
R
,
int
interp_mode
,
int
border_mode
,
OutputArray
dst
)
CV_OVERRIDE
;
protected
:
void
detectResultRoi
(
Size
src_size
,
Point
&
dst_tl
,
Point
&
dst_br
);
void
detectResultRoi
(
Size
src_size
,
Point
&
dst_tl
,
Point
&
dst_br
)
CV_OVERRIDE
;
};
...
...
@@ -281,10 +281,10 @@ public:
*/
CylindricalWarper
(
float
scale
)
{
projector_
.
scale
=
scale
;
}
Rect
buildMaps
(
Size
src_size
,
InputArray
K
,
InputArray
R
,
OutputArray
xmap
,
OutputArray
ymap
);
Point
warp
(
InputArray
src
,
InputArray
K
,
InputArray
R
,
int
interp_mode
,
int
border_mode
,
OutputArray
dst
);
Rect
buildMaps
(
Size
src_size
,
InputArray
K
,
InputArray
R
,
OutputArray
xmap
,
OutputArray
ymap
)
CV_OVERRIDE
;
Point
warp
(
InputArray
src
,
InputArray
K
,
InputArray
R
,
int
interp_mode
,
int
border_mode
,
OutputArray
dst
)
CV_OVERRIDE
;
protected
:
void
detectResultRoi
(
Size
src_size
,
Point
&
dst_tl
,
Point
&
dst_br
)
void
detectResultRoi
(
Size
src_size
,
Point
&
dst_tl
,
Point
&
dst_br
)
CV_OVERRIDE
{
RotationWarperBase
<
CylindricalProjector
>::
detectResultRoiByBorder
(
src_size
,
dst_tl
,
dst_br
);
}
...
...
@@ -437,7 +437,7 @@ class CV_EXPORTS PlaneWarperGpu : public PlaneWarper
public
:
PlaneWarperGpu
(
float
scale
=
1.
f
)
:
PlaneWarper
(
scale
)
{}
Rect
buildMaps
(
Size
src_size
,
InputArray
K
,
InputArray
R
,
OutputArray
xmap
,
OutputArray
ymap
)
Rect
buildMaps
(
Size
src_size
,
InputArray
K
,
InputArray
R
,
OutputArray
xmap
,
OutputArray
ymap
)
CV_OVERRIDE
{
Rect
result
=
buildMaps
(
src_size
,
K
,
R
,
d_xmap_
,
d_ymap_
);
d_xmap_
.
download
(
xmap
);
...
...
@@ -445,7 +445,7 @@ public:
return
result
;
}
Rect
buildMaps
(
Size
src_size
,
InputArray
K
,
InputArray
R
,
InputArray
T
,
OutputArray
xmap
,
OutputArray
ymap
)
Rect
buildMaps
(
Size
src_size
,
InputArray
K
,
InputArray
R
,
InputArray
T
,
OutputArray
xmap
,
OutputArray
ymap
)
CV_OVERRIDE
{
Rect
result
=
buildMaps
(
src_size
,
K
,
R
,
T
,
d_xmap_
,
d_ymap_
);
d_xmap_
.
download
(
xmap
);
...
...
@@ -454,7 +454,7 @@ public:
}
Point
warp
(
InputArray
src
,
InputArray
K
,
InputArray
R
,
int
interp_mode
,
int
border_mode
,
OutputArray
dst
)
OutputArray
dst
)
CV_OVERRIDE
{
d_src_
.
upload
(
src
);
Point
result
=
warp
(
d_src_
,
K
,
R
,
interp_mode
,
border_mode
,
d_dst_
);
...
...
@@ -463,7 +463,7 @@ public:
}
Point
warp
(
InputArray
src
,
InputArray
K
,
InputArray
R
,
InputArray
T
,
int
interp_mode
,
int
border_mode
,
OutputArray
dst
)
OutputArray
dst
)
CV_OVERRIDE
{
d_src_
.
upload
(
src
);
Point
result
=
warp
(
d_src_
,
K
,
R
,
T
,
interp_mode
,
border_mode
,
d_dst_
);
...
...
@@ -491,7 +491,7 @@ class CV_EXPORTS SphericalWarperGpu : public SphericalWarper
public
:
SphericalWarperGpu
(
float
scale
)
:
SphericalWarper
(
scale
)
{}
Rect
buildMaps
(
Size
src_size
,
InputArray
K
,
InputArray
R
,
OutputArray
xmap
,
OutputArray
ymap
)
Rect
buildMaps
(
Size
src_size
,
InputArray
K
,
InputArray
R
,
OutputArray
xmap
,
OutputArray
ymap
)
CV_OVERRIDE
{
Rect
result
=
buildMaps
(
src_size
,
K
,
R
,
d_xmap_
,
d_ymap_
);
d_xmap_
.
download
(
xmap
);
...
...
@@ -500,7 +500,7 @@ public:
}
Point
warp
(
InputArray
src
,
InputArray
K
,
InputArray
R
,
int
interp_mode
,
int
border_mode
,
OutputArray
dst
)
OutputArray
dst
)
CV_OVERRIDE
{
d_src_
.
upload
(
src
);
Point
result
=
warp
(
d_src_
,
K
,
R
,
interp_mode
,
border_mode
,
d_dst_
);
...
...
@@ -523,7 +523,7 @@ class CV_EXPORTS CylindricalWarperGpu : public CylindricalWarper
public
:
CylindricalWarperGpu
(
float
scale
)
:
CylindricalWarper
(
scale
)
{}
Rect
buildMaps
(
Size
src_size
,
InputArray
K
,
InputArray
R
,
OutputArray
xmap
,
OutputArray
ymap
)
Rect
buildMaps
(
Size
src_size
,
InputArray
K
,
InputArray
R
,
OutputArray
xmap
,
OutputArray
ymap
)
CV_OVERRIDE
{
Rect
result
=
buildMaps
(
src_size
,
K
,
R
,
d_xmap_
,
d_ymap_
);
d_xmap_
.
download
(
xmap
);
...
...
@@ -532,7 +532,7 @@ public:
}
Point
warp
(
InputArray
src
,
InputArray
K
,
InputArray
R
,
int
interp_mode
,
int
border_mode
,
OutputArray
dst
)
OutputArray
dst
)
CV_OVERRIDE
{
d_src_
.
upload
(
src
);
Point
result
=
warp
(
d_src_
,
K
,
R
,
interp_mode
,
border_mode
,
d_dst_
);
...
...
@@ -565,7 +565,7 @@ public:
SphericalPortraitWarper
(
float
scale
)
{
projector_
.
scale
=
scale
;
}
protected
:
void
detectResultRoi
(
Size
src_size
,
Point
&
dst_tl
,
Point
&
dst_br
);
void
detectResultRoi
(
Size
src_size
,
Point
&
dst_tl
,
Point
&
dst_br
)
CV_OVERRIDE
;
};
struct
CV_EXPORTS
CylindricalPortraitProjector
:
ProjectorBase
...
...
@@ -581,7 +581,7 @@ public:
CylindricalPortraitWarper
(
float
scale
)
{
projector_
.
scale
=
scale
;
}
protected
:
void
detectResultRoi
(
Size
src_size
,
Point
&
dst_tl
,
Point
&
dst_br
)
void
detectResultRoi
(
Size
src_size
,
Point
&
dst_tl
,
Point
&
dst_br
)
CV_OVERRIDE
{
RotationWarperBase
<
CylindricalPortraitProjector
>::
detectResultRoiByBorder
(
src_size
,
dst_tl
,
dst_br
);
}
...
...
@@ -600,7 +600,7 @@ public:
PlanePortraitWarper
(
float
scale
)
{
projector_
.
scale
=
scale
;
}
protected
:
void
detectResultRoi
(
Size
src_size
,
Point
&
dst_tl
,
Point
&
dst_br
)
void
detectResultRoi
(
Size
src_size
,
Point
&
dst_tl
,
Point
&
dst_br
)
CV_OVERRIDE
{
RotationWarperBase
<
PlanePortraitProjector
>::
detectResultRoiByBorder
(
src_size
,
dst_tl
,
dst_br
);
}
...
...
modules/stitching/include/opencv2/stitching/warpers.hpp
View file @
225bae13
...
...
@@ -65,7 +65,7 @@ public:
class
PlaneWarper
:
public
WarperCreator
{
public
:
Ptr
<
detail
::
RotationWarper
>
create
(
float
scale
)
const
{
return
makePtr
<
detail
::
PlaneWarper
>
(
scale
);
}
Ptr
<
detail
::
RotationWarper
>
create
(
float
scale
)
const
CV_OVERRIDE
{
return
makePtr
<
detail
::
PlaneWarper
>
(
scale
);
}
};
/** @brief Affine warper factory class.
...
...
@@ -74,7 +74,7 @@ public:
class
AffineWarper
:
public
WarperCreator
{
public
:
Ptr
<
detail
::
RotationWarper
>
create
(
float
scale
)
const
{
return
makePtr
<
detail
::
AffineWarper
>
(
scale
);
}
Ptr
<
detail
::
RotationWarper
>
create
(
float
scale
)
const
CV_OVERRIDE
{
return
makePtr
<
detail
::
AffineWarper
>
(
scale
);
}
};
/** @brief Cylindrical warper factory class.
...
...
@@ -83,26 +83,26 @@ public:
class
CylindricalWarper
:
public
WarperCreator
{
public
:
Ptr
<
detail
::
RotationWarper
>
create
(
float
scale
)
const
{
return
makePtr
<
detail
::
CylindricalWarper
>
(
scale
);
}
Ptr
<
detail
::
RotationWarper
>
create
(
float
scale
)
const
CV_OVERRIDE
{
return
makePtr
<
detail
::
CylindricalWarper
>
(
scale
);
}
};
/** @brief Spherical warper factory class */
class
SphericalWarper
:
public
WarperCreator
{
public
:
Ptr
<
detail
::
RotationWarper
>
create
(
float
scale
)
const
{
return
makePtr
<
detail
::
SphericalWarper
>
(
scale
);
}
Ptr
<
detail
::
RotationWarper
>
create
(
float
scale
)
const
CV_OVERRIDE
{
return
makePtr
<
detail
::
SphericalWarper
>
(
scale
);
}
};
class
FisheyeWarper
:
public
WarperCreator
{
public
:
Ptr
<
detail
::
RotationWarper
>
create
(
float
scale
)
const
{
return
makePtr
<
detail
::
FisheyeWarper
>
(
scale
);
}
Ptr
<
detail
::
RotationWarper
>
create
(
float
scale
)
const
CV_OVERRIDE
{
return
makePtr
<
detail
::
FisheyeWarper
>
(
scale
);
}
};
class
StereographicWarper
:
public
WarperCreator
{
public
:
Ptr
<
detail
::
RotationWarper
>
create
(
float
scale
)
const
{
return
makePtr
<
detail
::
StereographicWarper
>
(
scale
);
}
Ptr
<
detail
::
RotationWarper
>
create
(
float
scale
)
const
CV_OVERRIDE
{
return
makePtr
<
detail
::
StereographicWarper
>
(
scale
);
}
};
class
CompressedRectilinearWarper
:
public
WarperCreator
...
...
@@ -113,7 +113,7 @@ public:
{
a
=
A
;
b
=
B
;
}
Ptr
<
detail
::
RotationWarper
>
create
(
float
scale
)
const
{
return
makePtr
<
detail
::
CompressedRectilinearWarper
>
(
scale
,
a
,
b
);
}
Ptr
<
detail
::
RotationWarper
>
create
(
float
scale
)
const
CV_OVERRIDE
{
return
makePtr
<
detail
::
CompressedRectilinearWarper
>
(
scale
,
a
,
b
);
}
};
class
CompressedRectilinearPortraitWarper
:
public
WarperCreator
...
...
@@ -124,7 +124,7 @@ public:
{
a
=
A
;
b
=
B
;
}
Ptr
<
detail
::
RotationWarper
>
create
(
float
scale
)
const
{
return
makePtr
<
detail
::
CompressedRectilinearPortraitWarper
>
(
scale
,
a
,
b
);
}
Ptr
<
detail
::
RotationWarper
>
create
(
float
scale
)
const
CV_OVERRIDE
{
return
makePtr
<
detail
::
CompressedRectilinearPortraitWarper
>
(
scale
,
a
,
b
);
}
};
class
PaniniWarper
:
public
WarperCreator
...
...
@@ -135,7 +135,7 @@ public:
{
a
=
A
;
b
=
B
;
}
Ptr
<
detail
::
RotationWarper
>
create
(
float
scale
)
const
{
return
makePtr
<
detail
::
PaniniWarper
>
(
scale
,
a
,
b
);
}
Ptr
<
detail
::
RotationWarper
>
create
(
float
scale
)
const
CV_OVERRIDE
{
return
makePtr
<
detail
::
PaniniWarper
>
(
scale
,
a
,
b
);
}
};
class
PaniniPortraitWarper
:
public
WarperCreator
...
...
@@ -146,19 +146,19 @@ public:
{
a
=
A
;
b
=
B
;
}
Ptr
<
detail
::
RotationWarper
>
create
(
float
scale
)
const
{
return
makePtr
<
detail
::
PaniniPortraitWarper
>
(
scale
,
a
,
b
);
}
Ptr
<
detail
::
RotationWarper
>
create
(
float
scale
)
const
CV_OVERRIDE
{
return
makePtr
<
detail
::
PaniniPortraitWarper
>
(
scale
,
a
,
b
);
}
};
class
MercatorWarper
:
public
WarperCreator
{
public
:
Ptr
<
detail
::
RotationWarper
>
create
(
float
scale
)
const
{
return
makePtr
<
detail
::
MercatorWarper
>
(
scale
);
}
Ptr
<
detail
::
RotationWarper
>
create
(
float
scale
)
const
CV_OVERRIDE
{
return
makePtr
<
detail
::
MercatorWarper
>
(
scale
);
}
};
class
TransverseMercatorWarper
:
public
WarperCreator
{
public
:
Ptr
<
detail
::
RotationWarper
>
create
(
float
scale
)
const
{
return
makePtr
<
detail
::
TransverseMercatorWarper
>
(
scale
);
}
Ptr
<
detail
::
RotationWarper
>
create
(
float
scale
)
const
CV_OVERRIDE
{
return
makePtr
<
detail
::
TransverseMercatorWarper
>
(
scale
);
}
};
...
...
@@ -167,21 +167,21 @@ public:
class
PlaneWarperGpu
:
public
WarperCreator
{
public
:
Ptr
<
detail
::
RotationWarper
>
create
(
float
scale
)
const
{
return
makePtr
<
detail
::
PlaneWarperGpu
>
(
scale
);
}
Ptr
<
detail
::
RotationWarper
>
create
(
float
scale
)
const
CV_OVERRIDE
{
return
makePtr
<
detail
::
PlaneWarperGpu
>
(
scale
);
}
};
class
CylindricalWarperGpu
:
public
WarperCreator
{
public
:
Ptr
<
detail
::
RotationWarper
>
create
(
float
scale
)
const
{
return
makePtr
<
detail
::
CylindricalWarperGpu
>
(
scale
);
}
Ptr
<
detail
::
RotationWarper
>
create
(
float
scale
)
const
CV_OVERRIDE
{
return
makePtr
<
detail
::
CylindricalWarperGpu
>
(
scale
);
}
};
class
SphericalWarperGpu
:
public
WarperCreator
{
public
:
Ptr
<
detail
::
RotationWarper
>
create
(
float
scale
)
const
{
return
makePtr
<
detail
::
SphericalWarperGpu
>
(
scale
);
}
Ptr
<
detail
::
RotationWarper
>
create
(
float
scale
)
const
CV_OVERRIDE
{
return
makePtr
<
detail
::
SphericalWarperGpu
>
(
scale
);
}
};
#endif
...
...
modules/stitching/src/matchers.cpp
View file @
225bae13
...
...
@@ -74,7 +74,7 @@ struct MatchPairsBody : ParallelLoopBody
:
matcher
(
_matcher
),
features
(
_features
),
pairwise_matches
(
_pairwise_matches
),
near_pairs
(
_near_pairs
)
{}
void
operator
()(
const
Range
&
r
)
const
void
operator
()(
const
Range
&
r
)
const
CV_OVERRIDE
{
cv
::
RNG
rng
=
cv
::
theRNG
();
// save entry rng state
const
int
num_images
=
static_cast
<
int
>
(
features
.
size
());
...
...
@@ -122,7 +122,7 @@ struct FindFeaturesBody : ParallelLoopBody
std
::
vector
<
ImageFeatures
>
&
features
,
const
std
::
vector
<
std
::
vector
<
cv
::
Rect
>
>
*
rois
)
:
finder_
(
finder
),
images_
(
images
),
features_
(
features
),
rois_
(
rois
)
{}
void
operator
()(
const
Range
&
r
)
const
void
operator
()(
const
Range
&
r
)
const
CV_OVERRIDE
{
for
(
int
i
=
r
.
start
;
i
<
r
.
end
;
++
i
)
{
...
...
@@ -152,18 +152,18 @@ typedef std::set<std::pair<int,int> > MatchesSet;
// These two classes are aimed to find features matches only, not to
// estimate homography
class
CpuMatcher
:
public
FeaturesMatcher
class
CpuMatcher
CV_FINAL
:
public
FeaturesMatcher
{
public
:
CpuMatcher
(
float
match_conf
)
:
FeaturesMatcher
(
true
),
match_conf_
(
match_conf
)
{}
void
match
(
const
ImageFeatures
&
features1
,
const
ImageFeatures
&
features2
,
MatchesInfo
&
matches_info
);
void
match
(
const
ImageFeatures
&
features1
,
const
ImageFeatures
&
features2
,
MatchesInfo
&
matches_info
)
CV_OVERRIDE
;
private
:
float
match_conf_
;
};
#ifdef HAVE_OPENCV_CUDAFEATURES2D
class
GpuMatcher
:
public
FeaturesMatcher
class
GpuMatcher
CV_FINAL
:
public
FeaturesMatcher
{
public
:
GpuMatcher
(
float
match_conf
)
:
match_conf_
(
match_conf
)
{}
...
...
modules/stitching/src/seam_finders.cpp
View file @
225bae13
...
...
@@ -1068,7 +1068,7 @@ void DpSeamFinder::updateLabelsUsingSeam(
}
class
GraphCutSeamFinder
::
Impl
:
public
PairwiseSeamFinder
class
GraphCutSeamFinder
::
Impl
CV_FINAL
:
public
PairwiseSeamFinder
{
public
:
Impl
(
int
cost_type
,
float
terminal_cost
,
float
bad_region_penalty
)
...
...
@@ -1076,8 +1076,8 @@ public:
~
Impl
()
{}
void
find
(
const
std
::
vector
<
UMat
>
&
src
,
const
std
::
vector
<
Point
>
&
corners
,
std
::
vector
<
UMat
>
&
masks
);
void
findInPair
(
size_t
first
,
size_t
second
,
Rect
roi
);
void
find
(
const
std
::
vector
<
UMat
>
&
src
,
const
std
::
vector
<
Point
>
&
corners
,
std
::
vector
<
UMat
>
&
masks
)
CV_OVERRIDE
;
void
findInPair
(
size_t
first
,
size_t
second
,
Rect
roi
)
CV_OVERRIDE
;
private
:
void
setGraphWeightsColor
(
const
Mat
&
img1
,
const
Mat
&
img2
,
...
...
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