1 #pragma once
2 
3 #include <mbgl/util/image.hpp>
4 
5 namespace mbgl {
6 namespace util {
7 
8 /*
9     C++ port of https://github.com/mapbox/tiny-sdf, which is in turn based on the
10     Felzenszwalb/Huttenlocher distance transform paper (https://cs.brown.edu/~pff/papers/dt-final.pdf).
11     Note there exists an alternative C++ implementation from the paper’s authors at
12     https://cs.brown.edu/~pff/dt/, which this implementation is not based on.
13 
14     Takes an alpha channel raster input and transforms it into an alpha channel
15     Signed Distance Field (SDF) output of the same dimensions.
16 */
17 AlphaImage transformRasterToSDF(const AlphaImage& rasterInput, double radius, double cutoff);
18 
19 } // namespace util
20 } // namespace mbgl
21