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
4a53199e
Commit
4a53199e
authored
Oct 09, 2012
by
Andrey Kamaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Quiet logs in stitching module
parent
7cc67701
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
1 deletion
+23
-1
util.hpp
modules/stitching/include/opencv2/stitching/detail/util.hpp
+1
-1
exposure_compensate.cpp
modules/stitching/src/exposure_compensate.cpp
+2
-0
motion_estimators.cpp
modules/stitching/src/motion_estimators.cpp
+6
-0
seam_finders.cpp
modules/stitching/src/seam_finders.cpp
+6
-0
stitcher.cpp
modules/stitching/src/stitcher.cpp
+8
-0
No files found.
modules/stitching/include/opencv2/stitching/detail/util.hpp
View file @
4a53199e
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
#include <list>
#include <list>
#include "opencv2/core/core.hpp"
#include "opencv2/core/core.hpp"
#define ENABLE_LOG
1
#define ENABLE_LOG
0
// TODO remove LOG macros, add logging class
// TODO remove LOG macros, add logging class
#if ENABLE_LOG
#if ENABLE_LOG
...
...
modules/stitching/src/exposure_compensate.cpp
View file @
4a53199e
...
@@ -74,7 +74,9 @@ void GainCompensator::feed(const vector<Point> &corners, const vector<Mat> &imag
...
@@ -74,7 +74,9 @@ void GainCompensator::feed(const vector<Point> &corners, const vector<Mat> &imag
const
vector
<
pair
<
Mat
,
uchar
>
>
&
masks
)
const
vector
<
pair
<
Mat
,
uchar
>
>
&
masks
)
{
{
LOGLN
(
"Exposure compensation..."
);
LOGLN
(
"Exposure compensation..."
);
#if ENABLE_LOG
int64
t
=
getTickCount
();
int64
t
=
getTickCount
();
#endif
CV_Assert
(
corners
.
size
()
==
images
.
size
()
&&
images
.
size
()
==
masks
.
size
());
CV_Assert
(
corners
.
size
()
==
images
.
size
()
&&
images
.
size
()
==
masks
.
size
());
...
...
modules/stitching/src/motion_estimators.cpp
View file @
4a53199e
...
@@ -105,7 +105,9 @@ void HomographyBasedEstimator::estimate(const vector<ImageFeatures> &features, c
...
@@ -105,7 +105,9 @@ void HomographyBasedEstimator::estimate(const vector<ImageFeatures> &features, c
vector
<
CameraParams
>
&
cameras
)
vector
<
CameraParams
>
&
cameras
)
{
{
LOGLN
(
"Estimating rotations..."
);
LOGLN
(
"Estimating rotations..."
);
#if ENABLE_LOG
int64
t
=
getTickCount
();
int64
t
=
getTickCount
();
#endif
const
int
num_images
=
static_cast
<
int
>
(
features
.
size
());
const
int
num_images
=
static_cast
<
int
>
(
features
.
size
());
...
@@ -172,7 +174,9 @@ void BundleAdjusterBase::estimate(const vector<ImageFeatures> &features,
...
@@ -172,7 +174,9 @@ void BundleAdjusterBase::estimate(const vector<ImageFeatures> &features,
vector
<
CameraParams
>
&
cameras
)
vector
<
CameraParams
>
&
cameras
)
{
{
LOG_CHAT
(
"Bundle adjustment"
);
LOG_CHAT
(
"Bundle adjustment"
);
#if ENABLE_LOG
int64
t
=
getTickCount
();
int64
t
=
getTickCount
();
#endif
num_images_
=
static_cast
<
int
>
(
features
.
size
());
num_images_
=
static_cast
<
int
>
(
features
.
size
());
features_
=
&
features
[
0
];
features_
=
&
features
[
0
];
...
@@ -582,7 +586,9 @@ void BundleAdjusterRay::calcJacobian(Mat &jac)
...
@@ -582,7 +586,9 @@ void BundleAdjusterRay::calcJacobian(Mat &jac)
void
waveCorrect
(
vector
<
Mat
>
&
rmats
,
WaveCorrectKind
kind
)
void
waveCorrect
(
vector
<
Mat
>
&
rmats
,
WaveCorrectKind
kind
)
{
{
LOGLN
(
"Wave correcting..."
);
LOGLN
(
"Wave correcting..."
);
#if ENABLE_LOG
int64
t
=
getTickCount
();
int64
t
=
getTickCount
();
#endif
Mat
moment
=
Mat
::
zeros
(
3
,
3
,
CV_32F
);
Mat
moment
=
Mat
::
zeros
(
3
,
3
,
CV_32F
);
for
(
size_t
i
=
0
;
i
<
rmats
.
size
();
++
i
)
for
(
size_t
i
=
0
;
i
<
rmats
.
size
();
++
i
)
...
...
modules/stitching/src/seam_finders.cpp
View file @
4a53199e
...
@@ -55,7 +55,9 @@ void PairwiseSeamFinder::find(const vector<Mat> &src, const vector<Point> &corne
...
@@ -55,7 +55,9 @@ void PairwiseSeamFinder::find(const vector<Mat> &src, const vector<Point> &corne
if
(
src
.
size
()
==
0
)
if
(
src
.
size
()
==
0
)
return
;
return
;
#if ENABLE_LOG
int64
t
=
getTickCount
();
int64
t
=
getTickCount
();
#endif
images_
=
src
;
images_
=
src
;
sizes_
.
resize
(
src
.
size
());
sizes_
.
resize
(
src
.
size
());
...
@@ -90,7 +92,9 @@ void VoronoiSeamFinder::find(const vector<Size> &sizes, const vector<Point> &cor
...
@@ -90,7 +92,9 @@ void VoronoiSeamFinder::find(const vector<Size> &sizes, const vector<Point> &cor
if
(
sizes
.
size
()
==
0
)
if
(
sizes
.
size
()
==
0
)
return
;
return
;
#if ENABLE_LOG
int64
t
=
getTickCount
();
int64
t
=
getTickCount
();
#endif
sizes_
=
sizes
;
sizes_
=
sizes
;
corners_
=
corners
;
corners_
=
corners
;
...
@@ -161,7 +165,9 @@ DpSeamFinder::DpSeamFinder(CostFunction costFunc) : costFunc_(costFunc) {}
...
@@ -161,7 +165,9 @@ DpSeamFinder::DpSeamFinder(CostFunction costFunc) : costFunc_(costFunc) {}
void
DpSeamFinder
::
find
(
const
vector
<
Mat
>
&
src
,
const
vector
<
Point
>
&
corners
,
vector
<
Mat
>
&
masks
)
void
DpSeamFinder
::
find
(
const
vector
<
Mat
>
&
src
,
const
vector
<
Point
>
&
corners
,
vector
<
Mat
>
&
masks
)
{
{
LOGLN
(
"Finding seams..."
);
LOGLN
(
"Finding seams..."
);
#if ENABLE_LOG
int64
t
=
getTickCount
();
int64
t
=
getTickCount
();
#endif
if
(
src
.
size
()
==
0
)
if
(
src
.
size
()
==
0
)
return
;
return
;
...
...
modules/stitching/src/stitcher.cpp
View file @
4a53199e
...
@@ -152,7 +152,9 @@ Stitcher::Status Stitcher::composePanorama(InputArray images, OutputArray pano)
...
@@ -152,7 +152,9 @@ Stitcher::Status Stitcher::composePanorama(InputArray images, OutputArray pano)
Mat
&
pano_
=
pano
.
getMatRef
();
Mat
&
pano_
=
pano
.
getMatRef
();
#if ENABLE_LOG
int64
t
=
getTickCount
();
int64
t
=
getTickCount
();
#endif
vector
<
Point
>
corners
(
imgs_
.
size
());
vector
<
Point
>
corners
(
imgs_
.
size
());
vector
<
Mat
>
masks_warped
(
imgs_
.
size
());
vector
<
Mat
>
masks_warped
(
imgs_
.
size
());
...
@@ -201,7 +203,9 @@ Stitcher::Status Stitcher::composePanorama(InputArray images, OutputArray pano)
...
@@ -201,7 +203,9 @@ Stitcher::Status Stitcher::composePanorama(InputArray images, OutputArray pano)
masks
.
clear
();
masks
.
clear
();
LOGLN
(
"Compositing..."
);
LOGLN
(
"Compositing..."
);
#if ENABLE_LOG
t
=
getTickCount
();
t
=
getTickCount
();
#endif
Mat
img_warped
,
img_warped_s
;
Mat
img_warped
,
img_warped_s
;
Mat
dilated_mask
,
seam_mask
,
mask
,
mask_warped
;
Mat
dilated_mask
,
seam_mask
,
mask
,
mask_warped
;
...
@@ -349,7 +353,9 @@ Stitcher::Status Stitcher::matchImages()
...
@@ -349,7 +353,9 @@ Stitcher::Status Stitcher::matchImages()
full_img_sizes_
.
resize
(
imgs_
.
size
());
full_img_sizes_
.
resize
(
imgs_
.
size
());
LOGLN
(
"Finding features..."
);
LOGLN
(
"Finding features..."
);
#if ENABLE_LOG
int64
t
=
getTickCount
();
int64
t
=
getTickCount
();
#endif
for
(
size_t
i
=
0
;
i
<
imgs_
.
size
();
++
i
)
for
(
size_t
i
=
0
;
i
<
imgs_
.
size
();
++
i
)
{
{
...
@@ -406,7 +412,9 @@ Stitcher::Status Stitcher::matchImages()
...
@@ -406,7 +412,9 @@ Stitcher::Status Stitcher::matchImages()
LOGLN
(
"Finding features, time: "
<<
((
getTickCount
()
-
t
)
/
getTickFrequency
())
<<
" sec"
);
LOGLN
(
"Finding features, time: "
<<
((
getTickCount
()
-
t
)
/
getTickFrequency
())
<<
" sec"
);
LOG
(
"Pairwise matching"
);
LOG
(
"Pairwise matching"
);
#if ENABLE_LOG
t
=
getTickCount
();
t
=
getTickCount
();
#endif
(
*
features_matcher_
)(
features_
,
pairwise_matches_
,
matching_mask_
);
(
*
features_matcher_
)(
features_
,
pairwise_matches_
,
matching_mask_
);
features_matcher_
->
collectGarbage
();
features_matcher_
->
collectGarbage
();
LOGLN
(
"Pairwise matching, time: "
<<
((
getTickCount
()
-
t
)
/
getTickFrequency
())
<<
" sec"
);
LOGLN
(
"Pairwise matching, time: "
<<
((
getTickCount
()
-
t
)
/
getTickFrequency
())
<<
" sec"
);
...
...
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