This function is the black top hat (also called bottom hat).
In mathematical morphology and digital image processing,
top-hat transform is an operation that extracts small elements and details from given images.
The black top-hat transform is defined dually as the difference between the closed and the input image.
Top-hat transforms are used for various image processing tasks, such as feature extraction, background equalization,
image enhancement, and others. (Wikipedia)
This function is the black top hat (also called bottom hat). In mathematical morphology and digital image processing, top-hat transform is an operation that extracts small elements and details from given images. The black top-hat transform is defined dually as the difference between the closed and the input image. Top-hat transforms are used for various image processing tasks, such as feature extraction, background equalization, image enhancement, and others. (Wikipedia)
See
http://docs.opencv.org/2.4/doc/tutorials/imgproc/opening_closing_hats/opening_closing_hats.html
Param: image
Image to process.
Param: options
Bottom hat options.
Returns
The bottom-hatted image.