W3C home > Mailing lists > Public > www-svg@w3.org > March 2012

Re: slow morphology (was: Proposal : 4 more sources for the "in" property of filters)

From: Jasper van de Gronde <th.v.d.gronde@hccnet.nl>
Date: Wed, 07 Mar 2012 17:15:59 +0100
Message-ID: <4F5789BF.7000601@hccnet.nl>
To: www-svg@w3.org
On 07-03-12 11:58, Yves followdsvg wrote:
> ...
> fillgraphic   = sourcegraphic IN (morphology(sourcegraphic, expand 1/2
> strokewidth))
> strokegraphic = sourcegraphic - fillgraphic
> 
> but this is very CPU intensive because of morphology.

Although many applications have very slow implementations, dilations and
erosions (by a square SE) are linear in the number of input/output
pixels. The size of the structuring element in principle does not
contribute to the time complexity, although it might contribute to the
memory complexity.

I hereby promise to fix Inkscape (I've been meaning to for some time),
probably tomorrow evening. Any other software that should receive a bug
report with a pointer to some of the available techniques? A
particularly nice approach was described last year in:

"Computationally efficient, one-pass algorithm for morphological filters."
by Petr Dokladal and Eva Dokladalova
doi: 10.1016/j.jvcir.2011.03.005
Received on Wednesday, 7 March 2012 16:16:36 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:50 GMT