Commit b633c73c authored by Roman Donchenko's avatar Roman Donchenko Committed by OpenCV Buildbot

Merge pull request #1994 from StevenPuttemans:bugfix_3431

parents 26f5d2d6 12c25b93
...@@ -32,13 +32,13 @@ int main() ...@@ -32,13 +32,13 @@ int main()
for (int i = 0; i < image.rows; ++i) for (int i = 0; i < image.rows; ++i)
for (int j = 0; j < image.cols; ++j) for (int j = 0; j < image.cols; ++j)
{ {
Mat sampleMat = (Mat_<float>(1,2) << i,j); Mat sampleMat = (Mat_<float>(1,2) << j,i);
float response = SVM.predict(sampleMat); float response = SVM.predict(sampleMat);
if (response == 1) if (response == 1)
image.at<Vec3b>(j, i) = green; image.at<Vec3b>(i,j) = green;
else if (response == -1) else if (response == -1)
image.at<Vec3b>(j, i) = blue; image.at<Vec3b>(i,j) = blue;
} }
// Show the training data // Show the training data
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment