1 | initial version |
in a more "modern" world, you'd do:
cv::Mat_<float> kernel(3,3); kernel << -1, -1, -1, 0, 1, 1, 1, 1, 1; .. Mat src = .... Mat dst; filter2D(src, dst, 0, 1, kernel);
2 | No.2 Revision |
in a more "modern" world, you'd do:
cv::Mat_<float> kernel(3,3);
kernel << -1, -1, -1, 0, 1, 1, 1, 1, 1;
..
Mat src = ....
Mat dst;
filter2D(src, dst, 0, 1, 3 | No.3 Revision |
in a more "modern" world, you'd do:
cv::Mat_<float> kernel(3,3);
kernel << -1, -1, -1, 0, 1, 1, 1, 1, 1;
..
Mat src = ....
Mat dst;
filter2D(src, dst, 0, 1, -1, kernel);
4 | No.4 Revision |
in a more "modern" world, you'd do:
cv::Mat_<float> kernel(3,3);
kernel << -1, -1, -1,
-1, 0, 1,
0, 1, 1, 1, 1, 1;
..
Mat src = ....
Mat dst;
filter2D(src, dst, -1, kernel);
5 | No.5 Revision |
in a more "modern" world, you'd do:
cv::Mat_<float> kernel(3,3);
kernel << -1, -1, -1,
-1, 0, 1,
1, 1, 1;
..
Mat src = ....
... // your input.
Mat dst;
dst; // output. intentionally left blank.
filter2D(src, dst, -1, kernel);