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
3dc03531
Commit
3dc03531
authored
Jun 07, 2011
by
Maria Dimashova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added CvEM read/write (#1032)
parent
bd33e0a3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
ml.hpp
modules/ml/include/opencv2/ml/ml.hpp
+12
-2
em.cpp
modules/ml/src/em.cpp
+0
-0
No files found.
modules/ml/include/opencv2/ml/ml.hpp
View file @
3dc03531
...
...
@@ -609,6 +609,7 @@ public:
CV_OUT
cv
::
Mat
*
labels
=
0
);
CV_WRAP
virtual
float
predict
(
const
cv
::
Mat
&
sample
,
CV_OUT
cv
::
Mat
*
probs
=
0
)
const
;
CV_WRAP
virtual
double
calcLikelihood
(
const
cv
::
Mat
&
sample
)
const
;
CV_WRAP
int
getNClusters
()
const
;
CV_WRAP
cv
::
Mat
getMeans
()
const
;
...
...
@@ -616,7 +617,8 @@ public:
CV_WRAP
cv
::
Mat
getWeights
()
const
;
CV_WRAP
cv
::
Mat
getProbs
()
const
;
CV_WRAP
inline
double
getLikelihood
()
const
{
return
log_likelihood
;
};
CV_WRAP
inline
double
getLikelihood
()
const
{
return
log_likelihood
;
}
CV_WRAP
inline
double
getLikelihoodDelta
()
const
{
return
log_likelihood_delta
;
}
#endif
CV_WRAP
virtual
void
clear
();
...
...
@@ -627,12 +629,19 @@ public:
const
CvMat
*
get_weights
()
const
;
const
CvMat
*
get_probs
()
const
;
inline
double
get_log_likelihood
()
const
{
return
log_likelihood
;
};
inline
double
get_log_likelihood
()
const
{
return
log_likelihood
;
}
inline
double
get_log_likelihood_delta
()
const
{
return
log_likelihood_delta
;
}
// inline const CvMat * get_log_weight_div_det () const { return log_weight_div_det; };
// inline const CvMat * get_inv_eigen_values () const { return inv_eigen_values; };
// inline const CvMat ** get_cov_rotate_mats () const { return cov_rotate_mats; };
virtual
void
read
(
CvFileStorage
*
fs
,
CvFileNode
*
node
);
virtual
void
write
(
CvFileStorage
*
fs
,
const
char
*
name
)
const
;
virtual
void
write_params
(
CvFileStorage
*
fs
)
const
;
virtual
void
read_params
(
CvFileStorage
*
fs
,
CvFileNode
*
node
);
protected
:
virtual
void
set_params
(
const
CvEMParams
&
params
,
...
...
@@ -645,6 +654,7 @@ protected:
const
CvMat
*
means
);
CvEMParams
params
;
double
log_likelihood
;
double
log_likelihood_delta
;
CvMat
*
means
;
CvMat
**
covs
;
...
...
modules/ml/src/em.cpp
View file @
3dc03531
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