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
5f419c01
Commit
5f419c01
authored
Jan 09, 2019
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #13583 from qchateau:fix_13582
parents
78da6794
ed760793
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
exposure_compensate.cpp
modules/stitching/src/exposure_compensate.cpp
+8
-4
No files found.
modules/stitching/src/exposure_compensate.cpp
View file @
5f419c01
...
@@ -201,6 +201,12 @@ void GainCompensator::singleFeed(const std::vector<Point> &corners, const std::v
...
@@ -201,6 +201,12 @@ void GainCompensator::singleFeed(const std::vector<Point> &corners, const std::v
double
alpha
=
0.01
;
double
alpha
=
0.01
;
double
beta
=
100
;
double
beta
=
100
;
int
num_eq
=
num_images
-
countNonZero
(
skip
);
int
num_eq
=
num_images
-
countNonZero
(
skip
);
gains_
.
create
(
num_images
,
1
);
gains_
.
setTo
(
1
);
// No image process, gains are all set to one, stop here
if
(
num_eq
==
0
)
return
;
Mat_
<
double
>
A
(
num_eq
,
num_eq
);
A
.
setTo
(
0
);
Mat_
<
double
>
A
(
num_eq
,
num_eq
);
A
.
setTo
(
0
);
Mat_
<
double
>
b
(
num_eq
,
1
);
b
.
setTo
(
0
);
Mat_
<
double
>
b
(
num_eq
,
1
);
b
.
setTo
(
0
);
...
@@ -248,12 +254,10 @@ void GainCompensator::singleFeed(const std::vector<Point> &corners, const std::v
...
@@ -248,12 +254,10 @@ void GainCompensator::singleFeed(const std::vector<Point> &corners, const std::v
#endif
#endif
CV_CheckTypeEQ
(
l_gains
.
type
(),
CV_64FC1
,
""
);
CV_CheckTypeEQ
(
l_gains
.
type
(),
CV_64FC1
,
""
);
gains_
.
create
(
num_images
,
1
);
for
(
int
i
=
0
,
j
=
0
;
i
<
num_images
;
++
i
)
for
(
int
i
=
0
,
j
=
0
;
i
<
num_images
;
++
i
)
{
{
if
(
skip
(
i
,
0
))
// Only assign non-skipped gains. Other gains are already set to 1
gains_
.
at
<
double
>
(
i
,
0
)
=
1
;
if
(
!
skip
(
i
,
0
))
else
gains_
.
at
<
double
>
(
i
,
0
)
=
l_gains
(
j
++
,
0
);
gains_
.
at
<
double
>
(
i
,
0
)
=
l_gains
(
j
++
,
0
);
}
}
}
}
...
...
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