projects
/
profile
/
ivi
/
opencv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
09f9b35
)
2 fixed unassigned reshapes in em (#3674)
author
berak
<px1704@web.de>
Wed, 28 May 2014 08:37:16 +0000
(10:37 +0200)
committer
berak
<px1704@web.de>
Wed, 28 May 2014 08:37:16 +0000
(10:37 +0200)
modules/ml/src/em.cpp
patch
|
blob
|
history
diff --git
a/modules/ml/src/em.cpp
b/modules/ml/src/em.cpp
index
12c720d
..
34426a1
100644
(file)
--- a/
modules/ml/src/em.cpp
+++ b/
modules/ml/src/em.cpp
@@
-135,7
+135,7
@@
Vec2d EM::predict(InputArray _sample, OutputArray _probs) const
sample.convertTo(tmp, CV_64FC1);
sample = tmp;
}
- sample.reshape(1, 1);
+ sample
= sample
.reshape(1, 1);
Mat probs;
if( _probs.needed() )
@@
-266,7
+266,7
@@
void EM::setTrainData(int startStep, const Mat& samples,
if(weights0 && (startStep == EM::START_E_STEP && covs0))
{
weights0->convertTo(weights, CV_64FC1);
- weights.reshape(1,1);
+ weights
= weights
.reshape(1,1);
preprocessProbability(weights);
}