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
d93ec07d
Commit
d93ec07d
authored
Dec 31, 2018
by
Quentin Chateau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Setter/getter for number of gain filtering iterations
parent
6b96512d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
exposure_compensate.hpp
.../include/opencv2/stitching/detail/exposure_compensate.hpp
+4
-1
exposure_compensate.cpp
modules/stitching/src/exposure_compensate.cpp
+2
-2
No files found.
modules/stitching/include/opencv2/stitching/detail/exposure_compensate.hpp
View file @
d93ec07d
...
...
@@ -158,12 +158,14 @@ class CV_EXPORTS_W BlocksCompensator : public ExposureCompensator
{
public
:
BlocksCompensator
(
int
bl_width
=
32
,
int
bl_height
=
32
,
int
nr_feeds
=
1
)
:
bl_width_
(
bl_width
),
bl_height_
(
bl_height
),
nr_feeds_
(
nr_feeds
)
{}
:
bl_width_
(
bl_width
),
bl_height_
(
bl_height
),
nr_feeds_
(
nr_feeds
)
,
nr_gain_filtering_iterations_
(
2
)
{}
CV_WRAP
void
apply
(
int
index
,
Point
corner
,
InputOutputArray
image
,
InputArray
mask
)
CV_OVERRIDE
;
CV_WRAP
void
getMatGains
(
CV_OUT
std
::
vector
<
Mat
>&
umv
)
CV_OVERRIDE
;
CV_WRAP
void
setMatGains
(
std
::
vector
<
Mat
>&
umv
)
CV_OVERRIDE
;
CV_WRAP
void
setNrFeeds
(
int
nr_feeds
)
{
nr_feeds_
=
nr_feeds
;
}
CV_WRAP
int
getNrFeeds
()
{
return
nr_feeds_
;
}
CV_WRAP
void
setNrGainsFilteringIterations
(
int
nr_iterations
)
{
nr_gain_filtering_iterations_
=
nr_iterations
;
}
CV_WRAP
int
getNrGainsFilteringIterations
()
const
{
return
nr_gain_filtering_iterations_
;
}
protected
:
template
<
class
Compensator
>
...
...
@@ -177,6 +179,7 @@ private:
int
bl_width_
,
bl_height_
;
std
::
vector
<
UMat
>
gain_maps_
;
int
nr_feeds_
;
int
nr_gain_filtering_iterations_
;
};
/** @brief Exposure compensator which tries to remove exposure related artifacts by adjusting image block
...
...
modules/stitching/src/exposure_compensate.cpp
View file @
d93ec07d
...
...
@@ -412,8 +412,8 @@ void BlocksCompensator::feed(const std::vector<Point> &corners, const std::vecto
UMat
gain_map
=
getGainMap
(
compensator
,
bl_idx
,
bl_per_img
);
bl_idx
+=
bl_per_img
.
width
*
bl_per_img
.
height
;
sepFilter2D
(
gain_map
,
gain_map
,
CV_32F
,
ker
,
ker
);
sepFilter2D
(
gain_map
,
gain_map
,
CV_32F
,
ker
,
ker
);
for
(
int
i
=
0
;
i
<
nr_gain_filtering_iterations_
;
++
i
)
sepFilter2D
(
gain_map
,
gain_map
,
CV_32F
,
ker
,
ker
);
gain_maps_
[
img_idx
]
=
gain_map
;
}
...
...
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