0

I am trying to understand the Leptonica code to perform 1 BIT Morphology(dilation and erosion) . Can anyone please elaborate below points.

  1. 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).
  2. After this how Leptonica is using rasterop for binary morphology. A visual example will be highly welcome.
Kumar Vishal
  • 121
  • 1
  • 9

1 Answers1

0
  1. The OR operations simulate MAX operations. Indeed, the dilation is a rank filter that takes the maximum value into a given neighborhood (defined by the structuring element). The best courses are from one of the original author of this method: Jean Serra. The courses are online. Else, here is a simple example: http://homepages.inf.ed.ac.uk/rbf/HIPR2/dilate.htm
FiReTiTi
  • 5,597
  • 12
  • 30
  • 58