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
42414b56
Commit
42414b56
authored
Oct 25, 2012
by
Andrey Kamaev
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #92 from LeonidBeynenson/cv_algorithm_changes_2.4
parents
12747068
d6aa3bd8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
12 deletions
+46
-12
core.hpp
modules/core/include/opencv2/core/core.hpp
+25
-7
internal.hpp
modules/core/include/opencv2/core/internal.hpp
+5
-5
operations.hpp
modules/core/include/opencv2/core/operations.hpp
+16
-0
algorithm.cpp
modules/core/src/algorithm.cpp
+0
-0
No files found.
modules/core/include/opencv2/core/core.hpp
View file @
42414b56
...
...
@@ -4341,15 +4341,24 @@ public:
CV_WRAP
vector
<
Mat
>
getMatVector
(
const
string
&
name
)
const
;
CV_WRAP
Ptr
<
Algorithm
>
getAlgorithm
(
const
string
&
name
)
const
;
CV_WRAP_AS
(
setInt
)
void
set
(
const
string
&
name
,
int
value
);
CV_WRAP_AS
(
setDouble
)
void
set
(
const
string
&
name
,
double
value
);
CV_WRAP_AS
(
setBool
)
void
set
(
const
string
&
name
,
bool
value
);
CV_WRAP_AS
(
setString
)
void
set
(
const
string
&
name
,
const
string
&
value
);
CV_WRAP_AS
(
setMat
)
void
set
(
const
string
&
name
,
const
Mat
&
value
);
CV_WRAP_AS
(
setMatVector
)
void
set
(
const
string
&
name
,
const
vector
<
Mat
>&
value
);
CV_WRAP_AS
(
setAlgorithm
)
void
set
(
const
string
&
name
,
const
Ptr
<
Algorithm
>&
value
);
void
set
(
const
string
&
name
,
int
value
);
void
set
(
const
string
&
name
,
double
value
);
void
set
(
const
string
&
name
,
bool
value
);
void
set
(
const
string
&
name
,
const
string
&
value
);
void
set
(
const
string
&
name
,
const
Mat
&
value
);
void
set
(
const
string
&
name
,
const
vector
<
Mat
>&
value
);
void
set
(
const
string
&
name
,
const
Ptr
<
Algorithm
>&
value
);
template
<
typename
_Tp
>
void
set
(
const
string
&
name
,
const
Ptr
<
_Tp
>&
value
);
CV_WRAP
void
setInt
(
const
string
&
name
,
int
value
);
CV_WRAP
void
setDouble
(
const
string
&
name
,
double
value
);
CV_WRAP
void
setBool
(
const
string
&
name
,
bool
value
);
CV_WRAP
void
setString
(
const
string
&
name
,
const
string
&
value
);
CV_WRAP
void
setMat
(
const
string
&
name
,
const
Mat
&
value
);
CV_WRAP
void
setMatVector
(
const
string
&
name
,
const
vector
<
Mat
>&
value
);
CV_WRAP
void
setAlgorithm
(
const
string
&
name
,
const
Ptr
<
Algorithm
>&
value
);
template
<
typename
_Tp
>
void
setAlgorithm
(
const
string
&
name
,
const
Ptr
<
_Tp
>&
value
);
void
set
(
const
char
*
name
,
int
value
);
void
set
(
const
char
*
name
,
double
value
);
void
set
(
const
char
*
name
,
bool
value
);
...
...
@@ -4359,6 +4368,15 @@ public:
void
set
(
const
char
*
name
,
const
Ptr
<
Algorithm
>&
value
);
template
<
typename
_Tp
>
void
set
(
const
char
*
name
,
const
Ptr
<
_Tp
>&
value
);
void
setInt
(
const
char
*
name
,
int
value
);
void
setDouble
(
const
char
*
name
,
double
value
);
void
setBool
(
const
char
*
name
,
bool
value
);
void
setString
(
const
char
*
name
,
const
string
&
value
);
void
setMat
(
const
char
*
name
,
const
Mat
&
value
);
void
setMatVector
(
const
char
*
name
,
const
vector
<
Mat
>&
value
);
void
setAlgorithm
(
const
char
*
name
,
const
Ptr
<
Algorithm
>&
value
);
template
<
typename
_Tp
>
void
setAlgorithm
(
const
char
*
name
,
const
Ptr
<
_Tp
>&
value
);
CV_WRAP
string
paramHelp
(
const
string
&
name
)
const
;
int
paramType
(
const
char
*
name
)
const
;
CV_WRAP
int
paramType
(
const
string
&
name
)
const
;
...
...
modules/core/include/opencv2/core/internal.hpp
View file @
42414b56
...
...
@@ -263,20 +263,20 @@ namespace cv
}
//namespace cv
#define CV_INIT_ALGORITHM(classname, algname, memberinit) \
static Algorithm* create##classname() \
static
::cv::
Algorithm* create##classname() \
{ \
return new classname; \
} \
\
static AlgorithmInfo& classname##_info() \
static
::cv::
AlgorithmInfo& classname##_info() \
{ \
static AlgorithmInfo classname##_info_var(algname, create##classname); \
static
::cv::
AlgorithmInfo classname##_info_var(algname, create##classname); \
return classname##_info_var; \
} \
\
static AlgorithmInfo& classname##_info_auto = classname##_info(); \
static
::cv::
AlgorithmInfo& classname##_info_auto = classname##_info(); \
\
AlgorithmInfo* classname::info() const \
::cv::
AlgorithmInfo* classname::info() const \
{ \
static volatile bool initialized = false; \
\
...
...
modules/core/include/opencv2/core/operations.hpp
View file @
42414b56
...
...
@@ -3921,6 +3921,22 @@ inline void Algorithm::set(const string& _name, const Ptr<_Tp>& value)
this
->
set
<
_Tp
>
(
_name
.
c_str
(),
value
);
}
template
<
typename
_Tp
>
inline
void
Algorithm
::
setAlgorithm
(
const
char
*
_name
,
const
Ptr
<
_Tp
>&
value
)
{
Ptr
<
Algorithm
>
algo_ptr
=
value
.
template
ptr
<
cv
::
Algorithm
>
();
if
(
algo_ptr
.
empty
())
{
CV_Error
(
CV_StsUnsupportedFormat
,
"unknown/unsupported Ptr type of the second parameter of the method Algorithm::set"
);
}
info
()
->
set
(
this
,
_name
,
ParamType
<
Algorithm
>::
type
,
&
algo_ptr
);
}
template
<
typename
_Tp
>
inline
void
Algorithm
::
setAlgorithm
(
const
string
&
_name
,
const
Ptr
<
_Tp
>&
value
)
{
this
->
set
<
_Tp
>
(
_name
.
c_str
(),
value
);
}
template
<
typename
_Tp
>
inline
typename
ParamType
<
_Tp
>::
member_type
Algorithm
::
get
(
const
string
&
_name
)
const
{
typename
ParamType
<
_Tp
>::
member_type
value
;
...
...
modules/core/src/algorithm.cpp
View file @
42414b56
This diff is collapsed.
Click to expand it.
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