1. Mask operations on matrices
https://docs.opencv.org/master/d7/d37...
Mask operations on matrices are quite simple.
The idea is that we recalculate each pixels value in an image according to a mask matrix (also known as kernel). This mask holds values that will adjust how much influence neighboring pixels (and the current pixel) have on the new pixel value.
From a mathematical point of view we make a weighted average, with our specified values.