ISSUE-2335: Last Call Comment: Clarify feConvolveMatrix bias property

Last Call Comment: Clarify feConvolveMatrix bias property

State:
OPEN
Product:
SVG 1.1 F2 Last Call
Raised by:
Erik Dahlström
Opened on:
2010-06-23
Description:
I would really like the bias property clarified in SVG 1.1 SE. The problem with the current explanation is that it seems to be contradictory (and if you take the most explicit explanation, frankly not that useful).

In the explanation of the property it is said to be intended to have (as one possibility) a gray zero response. However, in the basic convolution formula the bias is added directly to the premultiplied color values. If you follow this definition the bias property does not give you any effective control over the zero response! Depending on the alpha component a bias of 0.5 could be anything from out-of-range white to 0.5 gray.

We've discussed this problem before and the last post in that thread that I could find was by me (on Nabble, as my laptop, with a lot of my e-mails is being serviced) and summarized the progress as follows:

<quote>
For reference, the pseudo-code in the SVG specification suggests
the following (preserveAlpha=false):
-------------------------------------
Option 1:
aF = filtered alpha without bias
cF = filtered (premultiplied) color without bias
aR = aF + bias
cR = cF + bias
-------------------------------------

I previously suggested:
-------------------------------------
Option 2:
cR = cF + bias*aR
-------------------------------------

You seem to suggest:
-------------------------------------
Option 3:
cR = cF + bias*(aR-bias)
-------------------------------------
I'm not sure what the advantage of this would be though. For example, if
you have a uniformly colored shape (opacity also uniform) and apply the
filter -1 1 (with bias=0.5) I would expect a response of
(0.25,0.25,0.25,0.5), and not (0,0,0,0.5).

Another option would be to do an explicit conversion from and to
premultiplied colors:
-------------------------------------
Option 4:
cR = (cF/aF + bias)*aR
-------------------------------------
Conceptually this might be cleaner, but it does have the disadvantage of
needing a division. Specifically, what color should result if aF=0?
</quote>

Original mail:
http://www.w3.org/mid/4C21BDBC.3090800@hccnet.nl
Related Actions Items:
Related emails:
  1. SVG/profiles/1.1F2/DoC disco.xsl,1.4,1.5 dump.html,1.3,1.4 (from cvsmail@w3.org on 2011-05-04)
  2. FW: ISSUE-2335: Clarify feConvolveMatrix bias property [SVG 1.1 F2 Last Call] (from Anthony.Grasso@cisra.canon.com.au on 2011-02-27)
  3. SVG/profiles/1.1F2/master filters.html,1.40,1.41 (from cvsmail@w3.org on 2010-12-21)
  4. RE: ISSUE-2335: Clarify feConvolveMatrix bias property [SVG 1.1 F2 Last Call] (from Anthony.Grasso@cisra.canon.com.au on 2010-12-10)
  5. Re: {minutes} 9 December 2010 SVG WG telcon (from chris@w3.org on 2010-12-10)
  6. SVG/profiles/1.1F2/master filters.html,1.39,1.40 refs.html,1.30,1.31 (from cvsmail@w3.org on 2010-12-09)
  7. Re: [ISSUE-2335] feConvolveMatrix bias property in SVG 1.1 SE (from th.v.d.gronde@hccnet.nl on 2010-12-02)
  8. ACTION-2900: Investigate support for bias - ISSUE-2335: Clarify feConvolveMatrix bias property [SVG 1.1 F2 Last Call] (from Anthony.Grasso@cisra.canon.com.au on 2010-12-02)
  9. RE: [ISSUE-2335] feConvolveMatrix bias property in SVG 1.1 SE (from Anthony.Grasso@cisra.canon.com.au on 2010-12-02)
  10. status update (from cam@mcc.id.au on 2010-11-25)
  11. Agenda Nov 18 2010 SVG WG telcon (from ed@opera.com on 2010-11-17)
  12. Re: [ISSUE-2335] feConvolveMatrix bias property in SVG 1.1 SE (from th.v.d.gronde@hccnet.nl on 2010-11-10)
  13. [ISSUE-2335] feConvolveMatrix bias property in SVG 1.1 SE (from Anthony.Grasso@cisra.canon.com.au on 2010-11-10)
  14. Minutes, Lyon TPAC f2f 5 Nov 2010 (from chris@w3.org on 2010-11-05)
  15. Minutes, 14 Sept 2010 SVG WG telcon (from chris@w3.org on 2010-09-14)
  16. Minutes, Paris F2F day 4 (September 8, 2010) (from anthony.grasso@cisra.canon.com.au on 2010-09-09)
  17. Minutes Paris F2F day 1 (September 3, 2010) (from anthony.grasso@cisra.canon.com.au on 2010-09-04)
  18. SVG/profiles/1.1F2/DoC getxml.html,NONE,1.1 disco.xsl,1.3,1.4 dump.html,1.2,1.3 dump.xml,1.1,NONE (from cvsmail@w3.org on 2010-08-02)
  19. SVG/profiles/1.1F2/DoC disco.xsl,1.2,1.3 dump.html,1.1,1.2 (from cvsmail@w3.org on 2010-07-29)
  20. Minutes July 6 2010 SVG WG telcon (from anthony.grasso@cisra.canon.com.au on 2010-07-07)
  21. Re: feConvolveMatrix bias property in SVG 1.1 SE (from ed@opera.com on 2010-06-23)
  22. ISSUE-2335: Clarify feConvolveMatrix bias property [SVG 1.1 F2 Last Call] (from sysbot+tracker@w3.org on 2010-06-23)

Related notes:

Jasper writes: "For me the main use case is to apply a filter which could have both positive and negative results (read: laplacian or discretized derivative) and wanting to shift zero to 0.5. In this case I'd pretty much always want to preserve alpha, I think."

Erik Dahlström, 14 Sep 2010, 19:44:27

ACTION: Accept

Anthony Grasso, 10 Dec 2010, 04:47:03

CHANGE-TYPE: Editorial

Anthony Grasso, 10 Dec 2010, 04:47:31

RESOLUTION: Updated wording for bias attribute and clarify the convolve matrix formula. Add a new test for this case.

Anthony Grasso, 10 Dec 2010, 04:49:00

COMMENTER-RESPONSE: Accept

Anthony Grasso, 21 Feb 2011, 07:02:02

Display change log ATOM feed


Dirk Schulze <dschulze@adobe.com>, Chair, Chris Lilley <chris@w3.org>, Staff Contact
Tracker: documentation, (configuration for this group), originally developed by Dean Jackson, is developed and maintained by the Systems Team <w3t-sys@w3.org>.
$Id: 2335.html,v 1.1 2020/01/17 13:21:18 carcone Exp $