gimp/app
Jehan b00037b850 app: improve end point detection for smart colorization.
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.
2018-11-16 20:39:04 +01:00
..
actions Issue #2489 - Gimp 2.10.8 layer menu text along path 2018-11-13 11:30:49 +09:00
config app: Add option in the windows menu to hide the image tab bar. 2018-10-23 11:52:07 +02:00
core app: improve end point detection for smart colorization. 2018-11-16 20:39:04 +01:00
dialogs Issue #2379 - Crash on saving 2018-10-31 23:46:06 +01:00
display Fix compilation on Mac 10.6 and 10.7 (#2112) 2018-10-24 10:45:07 +02:00
file Issue #2379 - Crash on saving 2018-10-31 23:46:06 +01:00
gegl app: remove gimp_parallel_distribute(); use gegl_parallel_distribute() 2018-11-14 10:52:06 -05:00
gui app: Add option in the windows menu to hide the image tab bar. 2018-10-23 11:52:07 +02:00
menus libgimpbase, app: remove the plug-in menu_path compat code 2018-07-13 14:07:44 +02:00
operations app: propagate space in gimp_layer_mode_get_format 2018-11-01 01:51:47 +01:00
paint app: remove gimp_parallel_distribute(); use gegl_parallel_distribute() 2018-11-14 10:52:06 -05:00
pdb app: edit the bucket fill tool options with new line art options. 2018-11-14 13:37:42 +01:00
plug-in app: fix "Bad interpreter" error messaging. 2018-08-19 12:48:02 +02:00
propgui app: in prop-GUI, use "direction" UI-meta of angle props for dial 2018-07-24 02:25:25 -04:00
tests app: fix tests for new show-tabs option 2018-10-27 05:43:13 -04:00
text app: add gimp_data_factory_data_cancel() 2018-10-01 05:24:45 -04:00
tools app: force the image flush after a selection fill. 2018-11-16 13:41:12 +01:00
vectors Revert "app: make unattached vectors enable to rotate." 2018-09-06 08:39:51 +09:00
widgets app: in performance logs, add new-lines between variable definitions 2018-11-10 02:52:31 -05:00
xcf Issue #2345 - Add xyY to color sample readouts 2018-10-23 17:37:28 +02:00
.gitignore Move git-version.h to the toplevel also in .gitignore 2018-01-29 20:26:18 +01:00
Makefile.am app: add source location information to the Linux GimpBacktrace backend 2018-09-22 22:39:08 -04:00
about.h Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
app.c app: more GimpBacktrace tidying 2018-09-03 15:57:53 -04:00
app.h Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
errors.c Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
errors.h Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
gimp-debug.c Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
gimp-debug.h Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
gimp-intl.h Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
gimp-log.c Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
gimp-log.h Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
gimp-priorities.h Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
gimp-version.c Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
gimp-version.h Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
gimpcore.def app: Add gimp_channel_flood() function 2016-01-25 22:58:28 +01:00
language.c Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
language.h Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
main.c app: open the Windows console a bit earlier. 2018-08-15 14:34:26 +02:00
sanity.c configure.ac: require babl >= 0.1.60 2018-11-15 12:55:46 -05:00
sanity.h Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
signals.c Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
signals.h Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
tests.c Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
tests.h Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
unique.c Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
unique.h Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00