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
4d09d62f
Commit
4d09d62f
authored
Jun 29, 2012
by
Andrey Kamaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added Ptr<T> support to AlgorithmInfo; fixed some warnings
parent
a25c27ca
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
15 deletions
+43
-15
core.hpp
modules/core/include/opencv2/core/core.hpp
+10
-0
operations.hpp
modules/core/include/opencv2/core/operations.hpp
+21
-3
features2d_init.cpp
modules/features2d/src/features2d_init.cpp
+1
-1
window.cpp
modules/highgui/src/window.cpp
+1
-1
window_QT.cpp
modules/highgui/src/window_QT.cpp
+10
-10
No files found.
modules/core/include/opencv2/core/core.hpp
View file @
4d09d62f
...
...
@@ -4409,6 +4409,16 @@ public:
Ptr
<
Algorithm
>
(
Algorithm
::*
getter
)()
=
0
,
void
(
Algorithm
::*
setter
)(
const
Ptr
<
Algorithm
>&
)
=
0
,
const
string
&
help
=
string
());
template
<
typename
_Tp
,
typename
_Base
>
void
addParam
(
Algorithm
&
algo
,
const
char
*
name
,
Ptr
<
_Tp
>&
value
,
bool
readOnly
=
false
,
Ptr
<
_Tp
>
(
Algorithm
::*
getter
)()
=
0
,
void
(
Algorithm
::*
setter
)(
const
Ptr
<
_Tp
>&
)
=
0
,
const
string
&
help
=
string
());
template
<
typename
_Tp
>
void
addParam
(
Algorithm
&
algo
,
const
char
*
name
,
Ptr
<
_Tp
>&
value
,
bool
readOnly
=
false
,
Ptr
<
_Tp
>
(
Algorithm
::*
getter
)()
=
0
,
void
(
Algorithm
::*
setter
)(
const
Ptr
<
_Tp
>&
)
=
0
,
const
string
&
help
=
string
());
protected
:
AlgorithmInfoData
*
data
;
void
set
(
Algorithm
*
algo
,
const
char
*
name
,
int
argType
,
...
...
modules/core/include/opencv2/core/operations.hpp
View file @
4d09d62f
...
...
@@ -3843,7 +3843,7 @@ template<typename _Tp> inline Ptr<_Tp> Algorithm::create(const string& name)
}
template
<
typename
_Tp
>
void
Algorithm
::
set
(
const
char
*
_name
,
const
Ptr
<
_Tp
>&
value
)
inline
void
Algorithm
::
set
(
const
char
*
_name
,
const
Ptr
<
_Tp
>&
value
)
{
Ptr
<
Algorithm
>
algo_ptr
=
value
.
template
ptr
<
cv
::
Algorithm
>
();
if
(
algo_ptr
.
empty
())
{
...
...
@@ -3851,12 +3851,12 @@ void Algorithm::set(const char* _name, const Ptr<_Tp>& value)
}
info
()
->
set
(
this
,
_name
,
ParamType
<
Algorithm
>::
type
,
&
algo_ptr
);
}
template
<
typename
_Tp
>
void
Algorithm
::
set
(
const
string
&
_name
,
const
Ptr
<
_Tp
>&
value
)
inline
void
Algorithm
::
set
(
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
{
...
...
@@ -3872,6 +3872,24 @@ template<typename _Tp> inline typename ParamType<_Tp>::member_type Algorithm::ge
return
value
;
}
template
<
typename
_Tp
,
typename
_Base
>
inline
void
AlgorithmInfo
::
addParam
(
Algorithm
&
algo
,
const
char
*
parameter
,
Ptr
<
_Tp
>&
value
,
bool
readOnly
,
Ptr
<
_Tp
>
(
Algorithm
::*
getter
)(),
void
(
Algorithm
::*
setter
)(
const
Ptr
<
_Tp
>&
),
const
string
&
help
)
{
//TODO: static assert: _Tp inherits from _Base
addParam_
(
algo
,
parameter
,
ParamType
<
_Base
>::
type
,
&
value
,
readOnly
,
(
Algorithm
::
Getter
)
getter
,
(
Algorithm
::
Setter
)
setter
,
help
);
}
template
<
typename
_Tp
>
inline
void
AlgorithmInfo
::
addParam
(
Algorithm
&
algo
,
const
char
*
parameter
,
Ptr
<
_Tp
>&
value
,
bool
readOnly
,
Ptr
<
_Tp
>
(
Algorithm
::*
getter
)(),
void
(
Algorithm
::*
setter
)(
const
Ptr
<
_Tp
>&
),
const
string
&
help
)
{
//TODO: static assert: _Tp inherits from Algorithm
addParam_
(
algo
,
parameter
,
ParamType
<
Algorithm
>::
type
,
&
value
,
readOnly
,
(
Algorithm
::
Getter
)
getter
,
(
Algorithm
::
Setter
)
setter
,
help
);
}
}
#endif // __cplusplus
...
...
modules/features2d/src/features2d_init.cpp
View file @
4d09d62f
...
...
@@ -144,7 +144,7 @@ CV_INIT_ALGORITHM(DenseFeatureDetector, "Feature2D.Dense",
obj
.
info
()
->
addParam
(
obj
,
"varyImgBoundWithScale"
,
obj
.
varyImgBoundWithScale
));
CV_INIT_ALGORITHM
(
GridAdaptedFeatureDetector
,
"Feature2D.Grid"
,
obj
.
info
()
->
addParam
(
obj
,
"detector"
,
(
Ptr
<
Algorithm
>&
)
obj
.
detector
);
obj
.
info
()
->
addParam
(
obj
,
"detector"
,
obj
.
detector
);
obj
.
info
()
->
addParam
(
obj
,
"maxTotalKeypoints"
,
obj
.
maxTotalKeypoints
);
obj
.
info
()
->
addParam
(
obj
,
"gridRows"
,
obj
.
gridRows
);
obj
.
info
()
->
addParam
(
obj
,
"gridCols"
,
obj
.
gridCols
));
...
...
modules/highgui/src/window.cpp
View file @
4d09d62f
...
...
@@ -521,7 +521,7 @@ void icvSetOpenGlCleanCallback(const char*, CvOpenGlCleanCallback, void*)
#if defined (HAVE_QT)
CvFont
cv
::
fontQt
(
const
string
&
nameFont
,
int
pointSize
,
Scalar
color
,
int
weight
,
int
style
,
int
spacing
)
CvFont
cv
::
fontQt
(
const
string
&
nameFont
,
int
pointSize
,
Scalar
color
,
int
weight
,
int
style
,
int
/*spacing*/
)
{
return
cvFontQt
(
nameFont
.
c_str
(),
pointSize
,
color
,
weight
,
style
);
}
...
...
modules/highgui/src/window_QT.cpp
View file @
4d09d62f
...
...
@@ -2414,13 +2414,13 @@ void DefaultViewPort::startDisplayInfo(QString text, int delayms)
}
void
DefaultViewPort
::
setOpenGlDrawCallback
(
CvOpenGlDrawCallback
callback
,
void
*
userdata
)
void
DefaultViewPort
::
setOpenGlDrawCallback
(
CvOpenGlDrawCallback
/*callback*/
,
void
*
/*userdata*/
)
{
CV_Error
(
CV_OpenGlNotSupported
,
"Window doesn't support OpenGL"
);
}
void
DefaultViewPort
::
setOpenGlCleanCallback
(
CvOpenGlCleanCallback
callback
,
void
*
userdata
)
void
DefaultViewPort
::
setOpenGlCleanCallback
(
CvOpenGlCleanCallback
/*callback*/
,
void
*
/*userdata*/
)
{
CV_Error
(
CV_OpenGlNotSupported
,
"Window doesn't support OpenGL"
);
}
...
...
@@ -3058,7 +3058,7 @@ void DefaultViewPort::drawInstructions(QPainter *painter)
}
void
DefaultViewPort
::
setSize
(
QSize
size_
)
void
DefaultViewPort
::
setSize
(
QSize
/*size_*/
)
{
}
...
...
@@ -3101,11 +3101,11 @@ void OpenGlViewPort::setMouseCallBack(CvMouseCallback callback, void* param)
mouseData
=
param
;
}
void
OpenGlViewPort
::
writeSettings
(
QSettings
&
settings
)
void
OpenGlViewPort
::
writeSettings
(
QSettings
&
/*settings*/
)
{
}
void
OpenGlViewPort
::
readSettings
(
QSettings
&
settings
)
void
OpenGlViewPort
::
readSettings
(
QSettings
&
/*settings*/
)
{
}
...
...
@@ -3114,15 +3114,15 @@ double OpenGlViewPort::getRatio()
return
(
double
)
width
()
/
height
();
}
void
OpenGlViewPort
::
setRatio
(
int
flags
)
void
OpenGlViewPort
::
setRatio
(
int
/*flags*/
)
{
}
void
OpenGlViewPort
::
updateImage
(
const
CvArr
*
arr
)
void
OpenGlViewPort
::
updateImage
(
const
CvArr
*
/*arr*/
)
{
}
void
OpenGlViewPort
::
startDisplayInfo
(
QString
text
,
int
delayms
)
void
OpenGlViewPort
::
startDisplayInfo
(
QString
/*text*/
,
int
/*delayms*/
)
{
}
...
...
@@ -3350,9 +3350,9 @@ void GlFuncTab_QT::unmapBuffer(unsigned int target) const
__END__
;
}
void
GlFuncTab_QT
::
generateBitmapFont
(
const
std
::
string
&
family
,
int
height
,
int
weight
,
bool
italic
,
bool
underline
,
int
start
,
int
count
,
int
base
)
const
void
GlFuncTab_QT
::
generateBitmapFont
(
const
std
::
string
&
family
,
int
height
,
int
weight
,
bool
italic
,
bool
/*underline*/
,
int
start
,
int
count
,
int
base
)
const
{
CV_FUNCNAME
(
"GlFuncTab_QT::generateBitmapFont"
);
//
CV_FUNCNAME( "GlFuncTab_QT::generateBitmapFont" );
QFont
font
(
QString
(
family
.
c_str
()),
height
,
weight
,
italic
);
...
...
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