Comments on: Computational Stippling: Can Machines Do as Well as Humans? http://blog.wolfram.com/2016/05/06/computational-stippling-can-machines-do-as-well-as-humans/ News, views, and ideas from the front lines at Wolfram Research. Wed, 08 Aug 2018 18:36:06 +0000 hourly 1 http://wordpress.org/?v=3.2.1 By: Wolfram Blog http://blog.wolfram.com/2016/05/06/computational-stippling-can-machines-do-as-well-as-humans/comment-page-1/#comment-127596 Wolfram Blog Fri, 10 Nov 2017 19:12:02 +0000 http://blog.internal.wolfram.com/?p=30628#comment-127596 Hi! Thank you for the in-depth question. The first and biggest difference from dithering to stippling is their targets. While the former one is used on **raster image** for reduced color palette (please refer to Wolfram language function: ColorQuantize[img,Dithering->True]), the latter one is essentially a **vector graphics** composed with a large group of primitives (e.g. points or disks). But in another way to put above difference, it's also one of their relations. Dithering image can be viewed as a special case of stippling, where every primitives are restricted to be unit square (i.e. a pixel) and their positions restricted to pairs of integers. There is deeper difference from the algorithm aspect. I believe you must have noticed the evenly spaced points here and there in a dithering image. As you have pointed out, the Floyd-Steinberg dithering algorithm, one of the most famous of its kind, is a type of error-diffusion (https://en.wikipedia.org/wiki/Error_diffusion) algorithm. The principle behind error-diffusion is somewhat related to so-called recurrence relation (https://en.wikipedia.org/wiki/Recurrence_relation), a famous example of whom is the bit-shift map (https://en.wikipedia.org/wiki/Bit_shift_map). This path goes way deep into a beautiful branch of math - symbolic dynamics (https://en.wikipedia.org/wiki/Symbolic_dynamics), where complexity and chaos arise naturally. Put aside the math, noticing the finite precision of color values, I suspect the phenomena of even space among some points in the dithering image comes from a similar reason as it for the periodicity of bit-shift map (https://en.wikipedia.org/wiki/Dyadic_transformation#Periodicity_and_non-periodicity). On the other hand, stippling seems to be a more predictable algorithm. It's unstructured appearance could be totally from the initial randomness and an early stopping before converge. Given infinite times of iteration, I would not be surprised to see most of the Centroidal Voronoi cells converging to regular hexagons. Hope this is helpful to you. Hi! Thank you for the in-depth question.

The first and biggest difference from dithering to stippling is their targets. While the former one is used on **raster image** for reduced color palette (please refer to Wolfram language function: ColorQuantize[img,Dithering->True]), the latter one is essentially a **vector graphics** composed with a large group of primitives (e.g. points or disks).

But in another way to put above difference, it’s also one of their relations. Dithering image can be viewed as a special case of stippling, where every primitives are restricted to be unit square (i.e. a pixel) and their positions restricted to pairs of integers.

There is deeper difference from the algorithm aspect.

I believe you must have noticed the evenly spaced points here and there in a dithering image. As you have pointed out, the Floyd-Steinberg dithering algorithm, one of the most famous of its kind, is a type of error-diffusion (https://en.wikipedia.org/wiki/Error_diffusion) algorithm. The principle behind error-diffusion is somewhat related to so-called recurrence relation (https://en.wikipedia.org/wiki/Recurrence_relation), a famous example of whom is the bit-shift map (https://en.wikipedia.org/wiki/Bit_shift_map). This path goes way deep into a beautiful branch of math – symbolic dynamics (https://en.wikipedia.org/wiki/Symbolic_dynamics), where complexity and chaos arise naturally. Put aside the math, noticing the finite precision of color values, I suspect the phenomena of even space among some points in the dithering image comes from a similar reason as it for the periodicity of bit-shift map (https://en.wikipedia.org/wiki/Dyadic_transformation#Periodicity_and_non-periodicity).

On the other hand, stippling seems to be a more predictable algorithm. It’s unstructured appearance could be totally from the initial randomness and an early stopping before converge. Given infinite times of iteration, I would not be surprised to see most of the Centroidal Voronoi cells converging to regular hexagons.

Hope this is helpful to you.

]]>
By: Andreas http://blog.wolfram.com/2016/05/06/computational-stippling-can-machines-do-as-well-as-humans/comment-page-1/#comment-127517 Andreas Sun, 05 Nov 2017 14:13:16 +0000 http://blog.internal.wolfram.com/?p=30628#comment-127517 How does this method relate to Floyd-Steinberg dithering?http://wiki.evilmadscientist.com/Producing_a_stippled_image_with_Gimp Is there a connection to all those dithering algorithms? https://en.wikipedia.org/wiki/Dither How does this method relate to Floyd-Steinberg dithering?http://wiki.evilmadscientist.com/Producing_a_stippled_image_with_Gimp
Is there a connection to all those dithering algorithms?
https://en.wikipedia.org/wiki/Dither

]]>
By: Andrew http://blog.wolfram.com/2016/05/06/computational-stippling-can-machines-do-as-well-as-humans/comment-page-1/#comment-121097 Andrew Fri, 03 Jun 2016 02:37:48 +0000 http://blog.internal.wolfram.com/?p=30628#comment-121097 Stippling is a kind of drawing style using only points to mimic lines, edges, and grayscale. Sounds perfect for a computer then. Stippling is a kind of drawing style using only points to mimic lines, edges, and grayscale. Sounds perfect for a computer then.

]]>
By: Silvia Hao http://blog.wolfram.com/2016/05/06/computational-stippling-can-machines-do-as-well-as-humans/comment-page-1/#comment-121084 Silvia Hao Thu, 02 Jun 2016 06:14:35 +0000 http://blog.internal.wolfram.com/?p=30628#comment-121084 Hi Daniel, thank you very much for your insightful suggestion! I'll try it and see if I can make better results! Hi Daniel, thank you very much for your insightful suggestion! I’ll try it and see if I can make better results!

]]>
By: Silvia Hao http://blog.wolfram.com/2016/05/06/computational-stippling-can-machines-do-as-well-as-humans/comment-page-1/#comment-121083 Silvia Hao Thu, 02 Jun 2016 06:08:12 +0000 http://blog.internal.wolfram.com/?p=30628#comment-121083 Hi Robert. Thank you for your suggestion! I was going to using Poisson disk sampling as an alternative method, but eventually didn't have enough time for it. However, as a comparison between CVD and Poisson sampling, I think methods based on the former one might be more beneficial for parallel computing. Hi Robert. Thank you for your suggestion! I was going to using Poisson disk sampling as an alternative method, but eventually didn’t have enough time for it. However, as a comparison between CVD and Poisson sampling, I think methods based on the former one might be more beneficial for parallel computing.

]]>
By: Daniel Scott Matthews http://blog.wolfram.com/2016/05/06/computational-stippling-can-machines-do-as-well-as-humans/comment-page-1/#comment-120999 Daniel Scott Matthews Thu, 19 May 2016 02:54:32 +0000 http://blog.internal.wolfram.com/?p=30628#comment-120999 Very interesting work. If you are interesting in brush strokes you may find that separating an image into layers based on hue and then those layers based on wavelets (detail size) will given you areas that correspond to different brush sizes and paint colours. Build the image up in layers from the large areas (low frequency) to the fine details. Order colours for a given brush size from dark to light so that the small highlights are the top-most details, as they are often added last in traditional painting. Very interesting work. If you are interesting in brush strokes you may find that separating an image into layers based on hue and then those layers based on wavelets (detail size) will given you areas that correspond to different brush sizes and paint colours. Build the image up in layers from the large areas (low frequency) to the fine details. Order colours for a given brush size from dark to light so that the small highlights are the top-most details, as they are often added last in traditional painting.

]]>
By: Robert http://blog.wolfram.com/2016/05/06/computational-stippling-can-machines-do-as-well-as-humans/comment-page-1/#comment-120955 Robert Tue, 10 May 2016 14:48:41 +0000 http://blog.internal.wolfram.com/?p=30628#comment-120955 Out of curiosity did you ever consider using a modified version of Poisson disk sampling where the radius of the sample disk was varied with the intensity of the pixel at that point? I feel like you could achieve similar results with less complexity. Out of curiosity did you ever consider using a modified version of Poisson disk sampling where the radius of the sample disk was varied with the intensity of the pixel at that point? I feel like you could achieve similar results with less complexity.

]]>
By: Silvia Hao http://blog.wolfram.com/2016/05/06/computational-stippling-can-machines-do-as-well-as-humans/comment-page-1/#comment-120954 Silvia Hao Tue, 10 May 2016 10:52:54 +0000 http://blog.internal.wolfram.com/?p=30628#comment-120954 And I do think low-discrepancy sequence provide a much better initial point set than the random generated one. And I do think low-discrepancy sequence provide a much better initial point set than the random generated one.

]]>
By: Silvia Hao http://blog.wolfram.com/2016/05/06/computational-stippling-can-machines-do-as-well-as-humans/comment-page-1/#comment-120953 Silvia Hao Tue, 10 May 2016 10:49:03 +0000 http://blog.internal.wolfram.com/?p=30628#comment-120953 Hi Michael, thank you very much for your praise! I feel so flattered to be mentioned with the true masters. The stippling algorithms based on CVD are sometimes thought as "too good", lacking the small imperfections found in handcrafted arts. There are actually some papers on this comparison, like this one: https://engineering.purdue.edu/purpl/level2/papers/CAe2007_Ross.pdf Nevertheless, I believe carefully designed disturbance can be added to the CVD results so human will not be able to recognize them from the real handcrafted ones. Hi Michael, thank you very much for your praise! I feel so flattered to be mentioned with the true masters. The stippling algorithms based on CVD are sometimes thought as “too good”, lacking the small imperfections found in handcrafted arts. There are actually some papers on this comparison, like this one:

https://engineering.purdue.edu/purpl/level2/papers/CAe2007_Ross.pdf

Nevertheless, I believe carefully designed disturbance can be added to the CVD results so human will not be able to recognize them from the real handcrafted ones.

]]>
By: Silvia Hao http://blog.wolfram.com/2016/05/06/computational-stippling-can-machines-do-as-well-as-humans/comment-page-1/#comment-120952 Silvia Hao Tue, 10 May 2016 10:34:50 +0000 http://blog.internal.wolfram.com/?p=30628#comment-120952 Hi Daniel, Thank you very much for your appreciation! About your first question, I think it's a good idea if the shape of the interested region is not too complex and if its area is not too small comparing to its minimal bounding box. But when those conditions are not met, there are two alternative choices I would like to go. One is finding the conformal map between the region and the unit square, then directly transform the well-spaced point set on the latter one to the former one. Another way is generating initial points only inside the region and on the boundary contours of it, then doing the normal Lloyd's iteration with additional constraint on the points on the boundary contours so they can only move along the contour lines. That way, a point set inside the region should keep be inside after any times of Lloyd's iteration. About the second question, I'm aware of low discrepancy sequences and have some basic knowledge on their usage in quasi-Monte Carlo, but didn't know the mentioned post on StackExchange forum. According to your suggestion, I compared Halton sequence (with base 2 and 3) with CVD. The result can be summarized in the following graph: https://www.dropbox.com/s/7myhe2h37aj4zvg/compare%20with%20Halton%20sequence.png?dl=0 It looks like, in certain sense, the quasi-random method lies between random and CVD. If not sensitive to time consumption, I think CVD might be a better choice than quasi-random method for stippling generation. It's worth mention that 2 dimentional low-discrepancy sequences are indeed used to simulate stippling effect in the area of non-photorealistic computer graphics. (e.g. section 2.3 of the book Non-Photorealistic Computer Graphics (by Thomas Strothotte and Stefan Schlechtweg) mentioned Sobol distribution). Hi Daniel,

Thank you very much for your appreciation!

About your first question, I think it’s a good idea if the shape of the interested region is not too complex and if its area is not too small comparing to its minimal bounding box. But when those conditions are not met, there are two alternative choices I would like to go. One is finding the conformal map between the region and the unit square, then directly transform the well-spaced point set on the latter one to the former one. Another way is generating initial points only inside the region and on the boundary contours of it, then doing the normal Lloyd’s iteration with additional constraint on the points on the boundary contours so they can only move along the contour lines. That way, a point set inside the region should keep be inside after any times of Lloyd’s iteration.

About the second question, I’m aware of low discrepancy sequences and have some basic knowledge on their usage in quasi-Monte Carlo, but didn’t know the mentioned post on StackExchange forum. According to your suggestion, I compared Halton sequence (with base 2 and 3) with CVD. The result can be summarized in the following graph:

https://www.dropbox.com/s/7myhe2h37aj4zvg/compare%20with%20Halton%20sequence.png?dl=0

It looks like, in certain sense, the quasi-random method lies between random and CVD. If not sensitive to time consumption, I think CVD might be a better choice than quasi-random method for stippling generation.

It’s worth mention that 2 dimentional low-discrepancy sequences are indeed used to simulate stippling effect in the area of non-photorealistic computer graphics. (e.g. section 2.3 of the book Non-Photorealistic Computer Graphics (by Thomas Strothotte and Stefan Schlechtweg) mentioned Sobol distribution).

]]>