Are you good at pixels?

I need help conjuring an implementation for these algorithms:

Grayscale image erosion using flat circular structuring elements
Signed Euclidean distance transformation

Here is some research:

Morphological Image Processing

Efficient 2-D Grayscale Morphological Transformations With Arbitrary Flat Structuring Elements

Erosion, dilation and related operators

MORPHOLOGICAL STRUCTURING ELEMENT DECOMPOSITION: IMPLEMENTATION AND COMPARISON

Gray-Scale Structuring Element Decomposition

Euclidean Distance Mapping

Rapid Euclidean Distance Transform Using Grayscale Morphology Decomposition

Fast Euclidean Distance Transformation In Two Scans Using 3x3 Neighborhoods

Fast Euclidean Distance Transformation by Propagation Using Multiple Neighborhoods

FAST AND EXACT SIGNED EUCLIDEAN DISTANCE TRANSFORMATION WITH LINEAR COMPLEXITY

Anti-aliased Euclidean Distance Transform

These techniques perform the bulk of heavy lifting for “Layer Effects” (i.e. Photoshop Layer Styles). I need help with efficient implementations of these algorithms. Any information is welcome, including pointers to other references, help understanding which of these papers is appropriate, some implementation guidance for the techniques in the papers.

Thanks

C’mon guys don’t be shy!