Morphological Transformations and Histogram Equalization Dr. Rongzhong Li CSC391/691 Fall 2016 CameraCalibration Example Images are from: OpenCV-Python Documentation
Input + Neighbor + Rule = Output Cellular Automaton Input + Neighbor + Rule = Output 1 1 && || 1 1 Growth of Crystal, Replication of bacteria, Complex rules=> randomness, Stephen Wolfram Conway's Game of Life
Kernel Shape 1 1 1 Complexity? Optimization?
Morphological Transformations Transform(Origin, Kernel) Erosion Dilation Opening = Erosion + Dilation Closing = Dilation + Erosion Morphological Gradient = diff( Dilation, Erosion) Top Hat = diff(Origin, Opening) Black Hat = diff(Origin, Closing) Original image Kernel 1
Erosion A pixel in the original image (either 1 or 0) will be considered 1 only if all the pixels under the kernel is 1, otherwise it is eroded (made to zero).
Dilation Opposite of erosion. A pixel element is '1' if at least one pixel under the kernel is '1'.
1st Level Combination Opening = Erosion + Dilation Closing = Dilation + Erosion
Morphological Gradient = diff(Dilation, Erosion) Top Hat 2nd Level Combination Morphological Gradient = diff(Dilation, Erosion) Top Hat = diff(Origin, Opening) Black Hat = diff(Origin, Closing)
Generating Examples from Scratch Reduce problem complexity
Results of Combinations
Histogram Threshold 2 3 1 4 128 4 3 2 1
Histogram Threshold 50
Histogram Equalization 50 150
Enhancing Details