• Jehan's avatar
    app: improve end point detection for smart colorization. · b00037b8
    Jehan authored
    Previous algorithm was relying on strokes of small radius to detect
    points of interest. In order to work with various sizes of strokes, we
    were computing an approximate median stroke thickness, then using this
    median value to erode the binary line art.
    
    Unfortunately this was not working that well for very fat strokes, and
    also it was potentially opening holes in the line art. These holes were
    usually filled back later during the spline and segment creations. Yet
    it could not be totally assured, and we had some experience where color
    filling would leak out of line art zones without any holes from the
    start (which is the opposite of where this new feature is supposed to
    go)!
    
    This updated code computes instead some radius estimate for every border
    point of strokes, and the detection of end points uses this information
    of local thickness. Using local approximation is obviously much more
    accurate than a single thickness approximation for the whole drawing,
    while not making the processing slower (in particular since we got rid
    of the quite expensive erosion step).
    This fixes the aforementionned issues (i.e. work better with fat strokes
    and do not create invisible holes in closed lines), and also is not
    subject to the problem of mistakenly increasing median radius when you
    color fill in sample merge mode (i.e. using also the color data in the
    input)!
    Also it is algorithmically less intensive, which is obviously very good.
    
    This new version of the algorithm is a reimplementation in GIMP of new
    code by Sébastien Fourey and David Tschumperlé, as a result of our many
    discussions and tests with the previous algorithm.
    
    Note that we had various tests, experiments and propositions to try and
    improve these issues. Skeletonization was evoked, but would have been
    most likely much slower. Simpler erosion based solely on local radius
    was also a possibility but it may have created too much noise (skeleton
    barbs), with high curvature, hence may have created too many new
    artificial endpoints.
    This new version also creates more endpoints though (and does not seem
    to lose any previously detected endpoints), which may be a bit annoying
    yet acceptable with the new bucket fill stroking interaction. In any
    case, on simple examples, it seems to do the job quite well.
    b00037b8
Name
Last commit
Last update
.gitlab Loading commit data...
app Loading commit data...
app-tools Loading commit data...
build Loading commit data...
cursors Loading commit data...
data Loading commit data...
desktop Loading commit data...
devel-docs Loading commit data...
docs Loading commit data...
etc Loading commit data...
icons Loading commit data...
libgimp Loading commit data...
libgimpbase Loading commit data...
libgimpcolor Loading commit data...
libgimpconfig Loading commit data...
libgimpmath Loading commit data...
libgimpmodule Loading commit data...
libgimpthumb Loading commit data...
libgimpwidgets Loading commit data...
m4macros Loading commit data...
menus Loading commit data...
modules Loading commit data...
pdb Loading commit data...
plug-ins Loading commit data...
po Loading commit data...
po-libgimp Loading commit data...
po-plug-ins Loading commit data...
po-python Loading commit data...
po-script-fu Loading commit data...
po-tags Loading commit data...
po-tips Loading commit data...
po-windows-installer Loading commit data...
themes Loading commit data...
tools Loading commit data...
.dir-locals.el Loading commit data...
.gitignore Loading commit data...
.kateconfig Loading commit data...
AUTHORS Loading commit data...
COPYING Loading commit data...
ChangeLog.pre-1-0 Loading commit data...
ChangeLog.pre-1-2 Loading commit data...
ChangeLog.pre-2-0 Loading commit data...
ChangeLog.pre-2-2 Loading commit data...
ChangeLog.pre-2-4 Loading commit data...
ChangeLog.pre-2-6 Loading commit data...
ChangeLog.pre-git Loading commit data...
HACKING Loading commit data...
INSTALL.in Loading commit data...
LICENSE Loading commit data...
MAINTAINERS Loading commit data...
Makefile.am Loading commit data...
NEWS Loading commit data...
NEWS.pre-2-0 Loading commit data...
NEWS.pre-2-10 Loading commit data...
NEWS.pre-2-2 Loading commit data...
NEWS.pre-2-4 Loading commit data...
NEWS.pre-2-6 Loading commit data...
NEWS.pre-2-8 Loading commit data...
README Loading commit data...
README.i18n Loading commit data...
acinclude.m4 Loading commit data...
authors.dtd Loading commit data...
authors.xml Loading commit data...
authors.xsl Loading commit data...
authors4gimp-web.xsl Loading commit data...
autogen.sh Loading commit data...
config.h.win32 Loading commit data...
configure.ac Loading commit data...
gimp-zip.in Loading commit data...
gimp.doap Loading commit data...
gimp.pc.in Loading commit data...
gimpthumb.pc.in Loading commit data...
gimpui.pc.in Loading commit data...