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
135c0b6c
Commit
135c0b6c
authored
Mar 28, 2013
by
Andrey Kamaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move cv::TermCriteria out of core.hpp
parent
fbd43589
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
37 deletions
+48
-37
core.hpp
modules/core/include/opencv2/core.hpp
+2
-29
operations.hpp
modules/core/include/opencv2/core/operations.hpp
+0
-8
types.hpp
modules/core/include/opencv2/core/types.hpp
+39
-0
types_c.h
modules/core/include/opencv2/core/types_c.h
+7
-0
No files found.
modules/core/include/opencv2/core.hpp
View file @
135c0b6c
...
...
@@ -896,34 +896,6 @@ private:
int
mti
;
};
/*!
Termination criteria in iterative algorithms
*/
class
CV_EXPORTS
TermCriteria
{
public
:
enum
{
COUNT
=
1
,
//!< the maximum number of iterations or elements to compute
MAX_ITER
=
COUNT
,
//!< ditto
EPS
=
2
//!< the desired accuracy or change in parameters at which the iterative algorithm stops
};
//! default constructor
TermCriteria
();
//! full constructor
TermCriteria
(
int
type
,
int
maxCount
,
double
epsilon
);
//! conversion from CvTermCriteria
TermCriteria
(
const
CvTermCriteria
&
criteria
);
//! conversion to CvTermCriteria
operator
CvTermCriteria
()
const
;
int
type
;
//!< the type of termination criteria: COUNT, EPS or COUNT + EPS
int
maxCount
;
// the maximum number of iterations/elements
double
epsilon
;
// the desired accuracy
};
typedef
void
(
*
BinaryFunc
)(
const
uchar
*
src1
,
size_t
step1
,
const
uchar
*
src2
,
size_t
step2
,
uchar
*
dst
,
size_t
step
,
Size
sz
,
...
...
@@ -3262,9 +3234,10 @@ template<> struct ParamType<uchar>
}
//namespace cv
#include "opencv2/core/operations.hpp"
#include "opencv2/core/mat.hpp"
#include "opencv2/core/mat.
inl.
hpp"
#include "opencv2/core/cvstd.inl.hpp"
#endif // __cplusplus
...
...
modules/core/include/opencv2/core/operations.hpp
View file @
135c0b6c
...
...
@@ -476,14 +476,6 @@ inline int RNG::uniform(int a, int b) { return a == b ? a : (int)(next()%(b - a)
inline
float
RNG
::
uniform
(
float
a
,
float
b
)
{
return
((
float
)
*
this
)
*
(
b
-
a
)
+
a
;
}
inline
double
RNG
::
uniform
(
double
a
,
double
b
)
{
return
((
double
)
*
this
)
*
(
b
-
a
)
+
a
;
}
inline
TermCriteria
::
TermCriteria
()
:
type
(
0
),
maxCount
(
0
),
epsilon
(
0
)
{}
inline
TermCriteria
::
TermCriteria
(
int
_type
,
int
_maxCount
,
double
_epsilon
)
:
type
(
_type
),
maxCount
(
_maxCount
),
epsilon
(
_epsilon
)
{}
inline
TermCriteria
::
TermCriteria
(
const
CvTermCriteria
&
criteria
)
:
type
(
criteria
.
type
),
maxCount
(
criteria
.
max_iter
),
epsilon
(
criteria
.
epsilon
)
{}
inline
TermCriteria
::
operator
CvTermCriteria
()
const
{
return
cvTermCriteria
(
type
,
maxCount
,
epsilon
);
}
inline
uchar
*
LineIterator
::
operator
*
()
{
return
ptr
;
}
inline
LineIterator
&
LineIterator
::
operator
++
()
{
...
...
modules/core/include/opencv2/core/types.hpp
View file @
135c0b6c
...
...
@@ -640,6 +640,32 @@ public:
///////////////////////////// TermCriteria //////////////////////////////
/*!
Termination criteria in iterative algorithms
*/
class
CV_EXPORTS
TermCriteria
{
public
:
enum
{
COUNT
=
1
,
//!< the maximum number of iterations or elements to compute
MAX_ITER
=
COUNT
,
//!< ditto
EPS
=
2
//!< the desired accuracy or change in parameters at which the iterative algorithm stops
};
//! default constructor
TermCriteria
();
//! full constructor
TermCriteria
(
int
type
,
int
maxCount
,
double
epsilon
);
int
type
;
//!< the type of termination criteria: COUNT, EPS or COUNT + EPS
int
maxCount
;
// the maximum number of iterations/elements
double
epsilon
;
// the desired accuracy
};
/////////////////////////////////////////////////////////////////////////
///////////////////////////// Implementation ////////////////////////////
...
...
@@ -1837,6 +1863,18 @@ bool DMatch::operator < (const DMatch &m) const
return
distance
<
m
.
distance
;
}
////////////////////////////// TermCriteria /////////////////////////////
inline
TermCriteria
::
TermCriteria
()
:
type
(
0
),
maxCount
(
0
),
epsilon
(
0
)
{}
inline
TermCriteria
::
TermCriteria
(
int
_type
,
int
_maxCount
,
double
_epsilon
)
:
type
(
_type
),
maxCount
(
_maxCount
),
epsilon
(
_epsilon
)
{}
}
// cv
#endif //__OPENCV_CORE_TYPES_HPP__
\ No newline at end of file
modules/core/include/opencv2/core/types_c.h
View file @
135c0b6c
...
...
@@ -740,6 +740,13 @@ typedef struct CvTermCriteria
CV_TERMCRIT_EPS */
int
max_iter
;
double
epsilon
;
#ifdef __cplusplus
CvTermCriteria
(
int
_type
=
0
,
int
_iter
=
0
,
double
_eps
=
0
)
:
type
(
_type
),
max_iter
(
_iter
),
epsilon
(
_eps
)
{}
CvTermCriteria
(
const
cv
::
TermCriteria
&
t
)
:
type
(
t
.
type
),
max_iter
(
t
.
maxCount
),
epsilon
(
t
.
epsilon
)
{}
operator
cv
::
TermCriteria
()
const
{
return
cv
::
TermCriteria
(
type
,
max_iter
,
epsilon
);
}
#endif
}
CvTermCriteria
;
...
...
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