[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft-devel] Signed Euclidean Distance Transform (was Signed distance
From: |
Nicolas Rougier |
Subject: |
Re: [ft-devel] Signed Euclidean Distance Transform (was Signed distance fields: distance from any point to the glyph contours) |
Date: |
Wed, 31 Oct 2012 19:46:15 +0100 |
Thanks for the reference and the code. I've been using code from
http://contourtextures.wikidot.com since it can handle antialiased images and
then I use grayscale rendering of the glyph to increase precision.
Do you know if the Meijster method also handles grayscale images ?
Nicolas
On Oct 31, 2012, at 18:57 , Vinnie Falco wrote:
>> My question relates to a more direct way to compute the signed distance and
>> to know if
>> anyone has already coded it by any chance ? Said differently, is there a
>> quick way to
>> compute the shortest signed distance from any point (x,y) to the glyph
>> contours ?
>
> You can do this in the pixel-domain, using any variant of the
> "Euclidean Distance Transform." The fastest general implementation is
> from Meijster:
>
> http://dissertations.ub.rug.nl/FILES/faculties/science/2004/a.meijster/c2.pdf
>
> I've implemented this code in my open source project:
>
> https://github.com/vinniefalco/LayerEffects/blob/master/VFLib/modules/vf_unfinished/graphics/vf_DistanceTransform.h
>
> Thanks
>
> --
> Follow me on Github: https://github.com/vinniefalco
>
> _______________________________________________
> Freetype-devel mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/freetype-devel