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
85364ac9
Commit
85364ac9
authored
Apr 03, 2012
by
Maria Dimashova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed Algorithm
parent
64a5c0b1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
algorithm.cpp
modules/core/src/algorithm.cpp
+6
-5
No files found.
modules/core/src/algorithm.cpp
View file @
85364ac9
...
...
@@ -329,7 +329,7 @@ void AlgorithmInfo::read(Algorithm* algo, const FileNode& fn) const
{
const
Param
&
p
=
data
->
params
.
vec
[
i
].
second
;
const
string
&
pname
=
data
->
params
.
vec
[
i
].
first
;
FileNode
n
=
fn
[
pname
];
const
FileNode
n
=
fn
[
pname
];
if
(
n
.
empty
()
)
continue
;
if
(
p
.
type
==
Param
::
INT
)
...
...
@@ -343,13 +343,13 @@ void AlgorithmInfo::read(Algorithm* algo, const FileNode& fn) const
else
if
(
p
.
type
==
Param
::
MAT
)
{
Mat
m
;
cv
::
read
(
f
n
,
m
);
cv
::
read
(
n
,
m
);
algo
->
set
(
pname
,
m
);
}
else
if
(
p
.
type
==
Param
::
MAT_VECTOR
)
{
vector
<
Mat
>
mv
;
cv
::
read
(
f
n
,
mv
);
cv
::
read
(
n
,
mv
);
algo
->
set
(
pname
,
mv
);
}
else
if
(
p
.
type
==
Param
::
ALGORITHM
)
...
...
@@ -537,7 +537,7 @@ void AlgorithmInfo::get(const Algorithm* algo, const char* name, int argType, vo
}
else
if
(
argType
==
Param
::
MAT_VECTOR
)
{
CV_Assert
(
p
->
type
==
Param
::
MAT
);
CV_Assert
(
p
->
type
==
Param
::
MAT
_VECTOR
);
*
(
vector
<
Mat
>*
)
value
=
p
->
getter
?
(
algo
->*
f
.
get_mat_vector
)()
:
*
(
vector
<
Mat
>*
)((
uchar
*
)
algo
+
p
->
offset
);
...
...
@@ -585,7 +585,8 @@ void AlgorithmInfo::addParam_(Algorithm& algo, const char* name, int argType,
{
CV_Assert
(
argType
==
Param
::
INT
||
argType
==
Param
::
BOOLEAN
||
argType
==
Param
::
REAL
||
argType
==
Param
::
STRING
||
argType
==
Param
::
MAT
||
argType
==
Param
::
ALGORITHM
);
argType
==
Param
::
MAT
||
argType
==
Param
::
MAT_VECTOR
||
argType
==
Param
::
ALGORITHM
);
data
->
params
.
add
(
string
(
name
),
Param
(
argType
,
readOnly
,
(
int
)((
size_t
)
value
-
(
size_t
)(
void
*
)
&
algo
),
getter
,
setter
,
help
));
...
...
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