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
53e68546
Commit
53e68546
authored
Feb 28, 2017
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stitching: force "stable" RNG
parent
f46fa6e0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
matchers.cpp
modules/stitching/src/matchers.cpp
+3
-0
No files found.
modules/stitching/src/matchers.cpp
View file @
53e68546
...
@@ -70,9 +70,12 @@ struct MatchPairsBody : ParallelLoopBody
...
@@ -70,9 +70,12 @@ struct MatchPairsBody : ParallelLoopBody
void
operator
()(
const
Range
&
r
)
const
void
operator
()(
const
Range
&
r
)
const
{
{
cv
::
RNG
rng
=
cv
::
theRNG
();
// save entry rng state
const
int
num_images
=
static_cast
<
int
>
(
features
.
size
());
const
int
num_images
=
static_cast
<
int
>
(
features
.
size
());
for
(
int
i
=
r
.
start
;
i
<
r
.
end
;
++
i
)
for
(
int
i
=
r
.
start
;
i
<
r
.
end
;
++
i
)
{
{
cv
::
theRNG
()
=
cv
::
RNG
(
rng
.
state
+
i
);
// force "stable" RNG seed for each processed pair
int
from
=
near_pairs
[
i
].
first
;
int
from
=
near_pairs
[
i
].
first
;
int
to
=
near_pairs
[
i
].
second
;
int
to
=
near_pairs
[
i
].
second
;
int
pair_idx
=
from
*
num_images
+
to
;
int
pair_idx
=
from
*
num_images
+
to
;
...
...
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