From 79ac072e6ce00d168307c37a63e7a5c5c7b8d595 Mon Sep 17 00:00:00 2001 From: berak Date: Mon, 14 Mar 2016 08:09:36 +0100 Subject: [PATCH] train_svmsgd.cpp : float response responses must be float, else we trigger an assertion in line 150 --- samples/cpp/train_svmsgd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/cpp/train_svmsgd.cpp b/samples/cpp/train_svmsgd.cpp index e2942d01ea..810f061467 100644 --- 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(0,0) = (float)x; currentSample.at(0,1) = (float)y; data.samples.push_back(currentSample); - data.responses.push_back(response); + data.responses.push_back(static_cast(response)); Mat weights(1, 2, CV_32FC1); float shift = 0;