Erosion |
erode(M, Melem, r_origin, c_origin, b) Performs binary erosion on matrix M at threshold b using structuring element Melem with origin at row r_origin and column c_origin.
erode4(M, b) Performs erosion on matrix M at threshold b using 4 neighbors.
erode8(M, b) Performs erosion on matrix M at threshold b using 4 neighbors.
The erode function has binary output: foreground is always set to 255, while background is always set to 0.