Merge remote-tracking branch 'origin/2.4' into merge-2.4
Conflicts: CMakeLists.txt modules/highgui/src/cap.cpp modules/nonfree/src/surf.ocl.cpp modules/ocl/include/opencv2/ocl/ocl.hpp modules/ocl/src/color.cpp modules/ocl/src/gftt.cpp modules/ocl/src/imgproc.cpp samples/ocl/facedetect.cpp
This commit is contained in:
@@ -32,13 +32,13 @@ int main()
|
||||
for (int i = 0; i < image.rows; ++i)
|
||||
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);
|
||||
|
||||
if (response == 1)
|
||||
image.at<Vec3b>(j, i) = green;
|
||||
image.at<Vec3b>(i,j) = green;
|
||||
else if (response == -1)
|
||||
image.at<Vec3b>(j, i) = blue;
|
||||
image.at<Vec3b>(i,j) = blue;
|
||||
}
|
||||
|
||||
// Show the training data
|
||||
|
Reference in New Issue
Block a user