projects
/
platform
/
upstream
/
opencv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fbc221d
)
train_svmsgd.cpp : float response
author
berak
<px1704@web.de>
Mon, 14 Mar 2016 07:09:36 +0000
(08:09 +0100)
committer
berak
<px1704@web.de>
Mon, 14 Mar 2016 07:09:36 +0000
(08:09 +0100)
responses must be float, else we trigger an assertion in line 150
samples/cpp/train_svmsgd.cpp
patch
|
blob
|
history
diff --git
a/samples/cpp/train_svmsgd.cpp
b/samples/cpp/train_svmsgd.cpp
index
e2942d0
..
810f061
100644
(file)
--- a/
samples/cpp/train_svmsgd.cpp
+++ b/
samples/cpp/train_svmsgd.cpp
@@
-167,7
+167,7
@@
void addPointRetrainAndRedraw(Data &data, int x, int y, int response)
currentSample.at<float>(0,0) = (float)x;
currentSample.at<float>(0,1) = (float)y;
data.samples.push_back(currentSample);
- data.responses.push_back(
response
);
+ data.responses.push_back(
static_cast<float>(response)
);
Mat weights(1, 2, CV_32FC1);
float shift = 0;