fixed the type inconsistent with document.
Document say probs will have CV_64F type. But in effect, it has CV_32F type. http://docs.opencv.org/3.0.0/d1/dfb/classcv_1_1ml_1_1EM.html#a2ea7da92a75bc7a7d665c241f547b9b9
This commit is contained in:
parent
b4112a5878
commit
f0434d60b0
@ -161,7 +161,7 @@ public:
|
|||||||
{
|
{
|
||||||
bool needprobs = _outputs.needed();
|
bool needprobs = _outputs.needed();
|
||||||
Mat samples = _inputs.getMat(), probs, probsrow;
|
Mat samples = _inputs.getMat(), probs, probsrow;
|
||||||
int ptype = CV_32F;
|
int ptype = CV_64F;
|
||||||
float firstres = 0.f;
|
float firstres = 0.f;
|
||||||
int i, nsamples = samples.rows;
|
int i, nsamples = samples.rows;
|
||||||
|
|
||||||
@ -187,7 +187,7 @@ public:
|
|||||||
|
|
||||||
Vec2d predict2(InputArray _sample, OutputArray _probs) const
|
Vec2d predict2(InputArray _sample, OutputArray _probs) const
|
||||||
{
|
{
|
||||||
int ptype = CV_32F;
|
int ptype = CV_64F;
|
||||||
Mat sample = _sample.getMat();
|
Mat sample = _sample.getMat();
|
||||||
CV_Assert(isTrained());
|
CV_Assert(isTrained());
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user