In order to correct gradual changes of intensities in the background of grey-scales images, I have been blurring them and then subtracting the original images from the convolved one.
In some cases, I have seen improvement using median blur instead of blur.
I was therefore wondering if I could go further and use a filter that convolves a grey-scale image so that each pixel will take the value of the most represented pixel value in the histogram of a rectangular neighbourhood.
Do you know the name of this convolution ?
Are you aware of any implementation in OpenCV ?
Thank you very much,