Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv_contrib
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_contrib
Commits
b05edca6
Commit
b05edca6
authored
Sep 22, 2016
by
Pavel Rojtberg
Committed by
Pavel Rojtberg
Sep 22, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aruco: use references instead of pointers in IdentifyCandidatesParallel
parent
dfc6bc5e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
aruco.cpp
modules/aruco/src/aruco.cpp
+10
-10
No files found.
modules/aruco/src/aruco.cpp
View file @
b05edca6
...
...
@@ -529,9 +529,9 @@ static bool _identifyOneCandidate(Ptr<Dictionary> &dictionary, InputArray _image
*/
class
IdentifyCandidatesParallel
:
public
ParallelLoopBody
{
public
:
IdentifyCandidatesParallel
(
const
Mat
*
_grey
,
InputArrayOfArrays
_candidates
,
IdentifyCandidatesParallel
(
const
Mat
&
_grey
,
InputArrayOfArrays
_candidates
,
InputArrayOfArrays
_contours
,
Ptr
<
Dictionary
>
&
_dictionary
,
vector
<
int
>
*
_idsTmp
,
vector
<
char
>
*
_validCandidates
,
vector
<
int
>
&
_idsTmp
,
vector
<
char
>&
_validCandidates
,
const
Ptr
<
DetectorParameters
>
&
_params
)
:
grey
(
_grey
),
candidates
(
_candidates
),
contours
(
_contours
),
dictionary
(
_dictionary
),
idsTmp
(
_idsTmp
),
validCandidates
(
_validCandidates
),
params
(
_params
)
{}
...
...
@@ -543,9 +543,9 @@ class IdentifyCandidatesParallel : public ParallelLoopBody {
for
(
int
i
=
begin
;
i
<
end
;
i
++
)
{
int
currId
;
Mat
currentCandidate
=
candidates
.
getMat
(
i
);
if
(
_identifyOneCandidate
(
dictionary
,
*
grey
,
currentCandidate
,
currId
,
params
))
{
(
*
validCandidates
)
[
i
]
=
1
;
(
*
idsTmp
)
[
i
]
=
currId
;
if
(
_identifyOneCandidate
(
dictionary
,
grey
,
currentCandidate
,
currId
,
params
))
{
validCandidates
[
i
]
=
1
;
idsTmp
[
i
]
=
currId
;
}
}
}
...
...
@@ -553,11 +553,11 @@ class IdentifyCandidatesParallel : public ParallelLoopBody {
private
:
IdentifyCandidatesParallel
&
operator
=
(
const
IdentifyCandidatesParallel
&
);
// to quiet MSVC
const
Mat
*
grey
;
const
Mat
&
grey
;
InputArrayOfArrays
candidates
,
contours
;
Ptr
<
Dictionary
>
&
dictionary
;
vector
<
int
>
*
idsTmp
;
vector
<
char
>
*
validCandidates
;
vector
<
int
>
&
idsTmp
;
vector
<
char
>
&
validCandidates
;
const
Ptr
<
DetectorParameters
>
&
params
;
};
...
...
@@ -632,8 +632,8 @@ static void _identifyCandidates(InputArray _image, vector< vector< Point2f > >&
// this is the parallel call for the previous commented loop (result is equivalent)
parallel_for_
(
Range
(
0
,
ncandidates
),
IdentifyCandidatesParallel
(
&
grey
,
_candidates
,
_contours
,
_dictionary
,
&
idsTmp
,
&
validCandidates
,
params
));
IdentifyCandidatesParallel
(
grey
,
_candidates
,
_contours
,
_dictionary
,
idsTmp
,
validCandidates
,
params
));
for
(
int
i
=
0
;
i
<
ncandidates
;
i
++
)
{
if
(
validCandidates
[
i
]
==
1
)
{
...
...
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