Function: Use structural elements to transform the top hat of the image;
Top hat transformation definition: the difference between an image and its open operation result is called top hat transformation;
Corresponding to the top hat is the bottom hat transformation;
Definition of bottom hat transformation: the difference between the closed operation of an image and this image is called black hat transformation;
The main purpose of changing the top hat or bottom hat is to get an image with a uniform background.
Parameter translation (the order corresponds to the order of the above parameters):
Input image,
Input structure elements (you can use operators such as gen_disc_se to generate different structure elements),
Output transformed image
description:
1. The type of input image and input structure element must be the same;
2. The calculation relationship between the input image i and the input structure element s is as follows:
3. As can be seen from the above formula, the definition of top hat transformation: the difference between an image and its open operation result;