OpenCV learning box filtering how to realize image processing
This article will explain in detail how to achieve image processing with OpenCV learning box filtering. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.
1. Square filtering
square filtering is a form of mean filtering. In the mean filtering, the pixel value of the filtering result is the neighborhood average value of any point, which is equal to the mean value of the sum of the neighborhood pixel values, while in the square filtering, you can freely choose whether to normalize the mean filtering results, that is, you can freely choose whether the filtering result is the average value of the sum of neighborhood pixel values or the sum of neighborhood pixel values.
2. C++ code # include # include using namespace cv;using namespace std;int main () {/ /-the image used for box filtering-Mat img = imread ("1.jpg"); if (img.empty ()) {cout