- From: Anthony Grasso <Anthony.Grasso@cisra.canon.com.au>
- Date: Thu, 2 Dec 2010 09:30:21 +0000
- To: W3C SVG Comments List <www-svg@w3.org>
Hi SVG WG, As per ACTION-2900 [1] which relates to ISSUE-2335 [2], I investigated support for the bias attribute in feConvolveMatrix. I ran two test files (filters-convolvematrix-01.svg [3*] and filters-convolvematrix-02.svg [4*]) over the currently specified algorithm and my interpretation of Jasper's (Option 2 as specified in the issue) algorithm. --- Current feConvolveMatrix algorithm: cR = (cO (*) kernel)/divisor + bias aR = (aO (*) kernal)/divisor + bias Where: (*) = convolution cO = original colour channels aO = original alpha channel ---- My interpretation of Jasper's feConvolveMatrix algorithm: aR = (aO (*) (kernel/divisor)) + bias cR = (cO (*) (kernel/divisor)) + bias*aR Where: (*) = convolution cO = original colour channels aO = original alpha channel Note that the divisor is applied to the kernel for each kernel iteration as opposed to what is currently specified where the divisor is applied after the kernel has modified an area of the image. --- The results from the above test are on the wiki [5]. The top two 3x3 grids in the results were generated with the old algorithm and the bottom two 3x3 grids where generated using the new algorithm. I ran the same tests over Opera, Firefox and Batik to see how they implemented the algorithm for feConvolveMatrix. - Batik: Completely failed to render and gave no error message as to why - Opera: Images rendered but seemed a bit too light - Firefox: Images rendered pretty close to my interpretation of Jaspers algorithm - Chrome: Images rendered but seemed to be very different to that produced by Opera and Firefox Given that all the results I've seen so far vary, we should probably just decide on which algorithm to use at the telcon tomorrow and put that in the specification. I have no strong opinions, but for the record I do like the output produced by Jasper's algorithm and Firefox's algorithm. Cheers, Anthony [1] http://www.w3.org/Graphics/SVG/WG/track/actions/2900 [2] http://www.w3.org/Graphics/SVG/WG/track/issues/2335 [3*] http://www.w3.org/Graphics/SVG/WG/wiki/images/2/27/Filters-convolvematrix-01.svg [4*] http://www.w3.org/Graphics/SVG/WG/wiki/images/5/52/Filters-convolvematrix-02.svg [5] http://www.w3.org/Graphics/SVG/WG/wiki/images/3/3f/FeConvolveMatrix-test-results.png * These tests require an additional file to run: http://www.w3.org/Graphics/SVG/WG/wiki/images/9/9d/Townsville.jpg > -----Original Message----- > From: SVG Working Group Issue Tracker [mailto:sysbot+tracker@w3.org] > Sent: Friday, 5 November 2010 9:48 PM > To: Anthony Grasso > Subject: ACTION-2900: Investigate support for bias in cannon > impelmentation (SVG Working Group) > > > ACTION-2900: Investigate support for bias in cannon impelmentation (SVG > Working Group) > > http://www.w3.org/Graphics/SVG/WG/track/actions/2900 > > On: Anthony Grasso > Due: 2010-11-12 > > If you do not want to be notified on new action items for this group, > please update your settings at: > http://www.w3.org/Graphics/SVG/WG/track/users/40183#settings The information contained in this email message and any attachments may be confidential and may also be the subject to legal professional privilege. If you are not the intended recipient, any use, interference with, disclosure or copying of this material is unauthorised and prohibited. If you have received this email in error, please immediately advise the sender by return email and delete the information from your system.
Received on Thursday, 2 December 2010 09:30:47 UTC