mirror of
https://github.com/opencv/opencv.git
synced 2026-07-25 21:33:04 +04:00
core: deprecate MatCommaInitializer_
This commit is contained in:
+5
-3
@@ -273,9 +273,11 @@ int main(int argc, char *argv[])
|
||||
namedWindow("Output3", 1);
|
||||
imshow("Input", src);
|
||||
|
||||
kernel = (Mat_<double>(3, 3) << 1, 0, -1,
|
||||
1, 0, -1,
|
||||
1, 0, -1);
|
||||
kernel = Mat_<double>({3, 3}, {
|
||||
1, 0, -1,
|
||||
1, 0, -1,
|
||||
1, 0, -1
|
||||
});
|
||||
|
||||
/*
|
||||
Uncomment the kernels you want to use or write your own kernels to test out
|
||||
|
||||
@@ -51,9 +51,11 @@ int main( int argc, char* argv[])
|
||||
waitKey();
|
||||
|
||||
//![kern]
|
||||
Mat kernel = (Mat_<char>(3,3) << 0, -1, 0,
|
||||
-1, 5, -1,
|
||||
0, -1, 0);
|
||||
Mat kernel = Mat_<char>({3,3}, {
|
||||
0, -1, 0,
|
||||
-1, 5, -1,
|
||||
0, -1, 0
|
||||
});
|
||||
//![kern]
|
||||
|
||||
t = (double)getTickCount();
|
||||
|
||||
+1
-6
@@ -54,14 +54,9 @@ int main(int,char**)
|
||||
//! [matlab]
|
||||
|
||||
// create a 3x3 double-precision identity matrix
|
||||
//! [comma]
|
||||
Mat C = (Mat_<double>(3,3) << 0, -1, 0, -1, 5, -1, 0, -1, 0);
|
||||
cout << "C = " << endl << " " << C << endl << endl;
|
||||
//! [comma]
|
||||
// do the same with initializer_list
|
||||
|
||||
//! [list]
|
||||
C = (Mat_<double>({0, -1, 0, -1, 5, -1, 0, -1, 0})).reshape(3);
|
||||
Mat C = Mat_<double>({3, 3}, {0, -1, 0, -1, 5, -1, 0, -1, 0});
|
||||
cout << "C = " << endl << " " << C << endl << endl;
|
||||
//! [list]
|
||||
|
||||
|
||||
@@ -201,9 +201,11 @@ int main(int argc, char *argv[])
|
||||
namedWindow("Output", 1);
|
||||
imshow("Input", src);
|
||||
|
||||
kernel = (Mat_<float>(3, 3) << 1, 0, -1,
|
||||
2, 0, -2,
|
||||
1, 0, -1);
|
||||
kernel = Mat_<float>({3, 3}, {
|
||||
1., 0., -1.,
|
||||
2., 0., -2.,
|
||||
1., 0., -1.
|
||||
});
|
||||
|
||||
t = (double)getTickCount();
|
||||
|
||||
@@ -227,4 +229,4 @@ int main(int argc, char *argv[])
|
||||
waitKey(0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user