I am trying to understand the Leptonica code to perform 1 BIT Morphology(dilation and erosion) . Can anyone please elaborate below points.
- Dilation can be implemented as follows: start with a cleared destination image (all OFF pixels). Then do a sequence of logical OR operations of the source image with the destination, each time with a specific shift, as determined by a pattern called a structuring element (Sel).
- After this how Leptonica is using rasterop for binary morphology. A visual example will be highly welcome.