-
Richard Jones
November 19, 2015 at 11:51 amEarly in 2010 I asked for guidance about the Convolution Kernel in the Sony Creative Software Forum (Pro)and received t6he following hugely informative replies from MarkWWW and Glen Chan. This is the best I have seen on this subject and now use the Kernel occasionally along the lines suggested but usually starting from one or other of the Presets.
Hope this helps.
Richard
You can see the kinds of things it can do by just looking at the various presets that are provided – things like blur or sharpen, enhance edges, or create a bumpmap or embossed effect.
What the Convolution Kernel does is to create an output image by applying arithmetical processes to the values of the pixels in the input image.
Specifically, the value of each output pixel is calculated by taking the values of the corresponding input pixel, together with the values of the eight input pixels that surround it, and multiplying each of them by a fixed value (these fixed values are the numbers shown in the Convolution Matrix). These 9 multiplied values are then all added together and multiplied by a scaling factor (Scale), normally chosen to bring the result back down to a number close to 1 (to stop the result becoming to dark or light). (This scaling factor will be worked out automatically for you if you tick the Auto Normalise box.) Then a final adjustment is applied by adding a specific fixed value (the Offset) to the value of the output pixel. (There is one further complication in that the matrix can be rotated with respect to the frame of the picture if required.)
The result of these arithmetic processes is that each pixel in the output picture is generated from the information in the patch of 9 pixels surrounding its location in the input picture.
I think the easiest way to start to see what this means and how it works is to look at the Blur preset. Here you can see that the centre pixel is being multiplied by 5, and all its 8 neighbours are being multiplied by 4. Once these values are added together the total is then auto-scaled by a factor of 0.027 (8*4 + 5 = 37 and 0.027 = 1/37) to get the result back into the normal range, and I think it is pretty easy to see that what is going to appear at the output pixel is going to be an average of the values of the pixels in the neighbourhood of the input pixel (with a slight emphasis to the centre pixel). And if you imagine what will happen when you apply this averaging process for every pixel in the output image, it is pretty intuitive to see that the result will be a blurred representation of the original image.
Probably the next simplest preset to understand is the Emboss preset. Here you can see that we are only looking at the values of the pixels to the top left and bottom right of each pixel – the value of all the other 6 neighbours and even the value of the pixel itself in the input picture are ignored. If you consider what the effect of the multiplication and adding will be you can see that the value of the output pixel will be positive if the pixel to its upper left was brighter than that to its lower right, and negative if the opposite is the case. for all pixels where the upper left and lower right neighbours are of equal brightness, the value will be zero. (Since we need each value to be in the range between zero and one, we need to add an offset of 0.5 to make sure that this is the case.) Now if we consider what will happen when we apply this arithmetic to every pixel in the output image we can see that we will get large areas of roughly unifiorm grey (where there was little or no difference between TL and BR), but some areas of light or dark (where there was a difference between TL and BR, i.e. at edges and other features). That is, we will get an outline view of the edges/features in the original picture, such that the outlines are either light or dark depending on the direction of the light gradient at that point. And to the human eye/brain, this looks like an embossed image – the brighter edges are interpreted as being illuminated and the dark edges as being in shadow, under low angle illumination.
The Bump preset can be understood as a more extreme version of the Emboss effect, but with the original image imformation added back in – notice that the value for the centre pixel is now 1 rather than the zero in the Emboss preset. And the various Edge effects can be understood by generalising the Emboss effect to the case where we are looking in every direction to find a difference (gradient), not just in the TL-BR direction.
If you experiment with various values in the matrix, you will be able to create more variants of these kinds of effects. It’s probably a good idea to leave the Auto Normalise box ticked unless you deliberately want to lighten or darken the output.
Hope that helps to demystify things a bit.
MarkWWW*********
Convolution Kernel:
Suppose in the middle row you put in 0.25, 0.5, 0.25
This will blur the image (horizontally).You can think of it as this: You take the centre pixel of the original. You take 0.25 of that, and put that to the pixel to the left. 0.5 of the original pixel stays there. And then 0.25 of the original pixel will go to the pixel to the right.
2- If you have the “normalize” box checked, then the FX will make sure that everything adds up to 1.
Suppose in the middle row you put 1, 2, 1. Without the box checked, the left pixel will get 1X the original pixel and the centre pixel will get 2X of the original pixel. Everything will be a lot brighter.
If the normalize box is checked, nothing gets over-distributed.3- If you have -0.25, 1.5, and -0.25 then you’ll get a sharpen filter.
4- Sometimes, the convolution kernel can approximate the erode tools in programs like Combustion. You can use it for cleaning up mattes.
Glenn Chan (Sony Creative Software – Pro: 10 March 2008) -
Ellen Maurer
November 19, 2015 at 9:02 pmThank you, Mr. Jones. Now I have a lot of hopes to really understand what this filter can do.
Ellen
-
Ellen Maurer
November 24, 2015 at 6:39 pm -
Wayne Waag
November 25, 2015 at 2:54 amI think Channel Blend is a more complex Color Balance.
You’re probably right. I’ll repeat what I wrote previously.
In all honesty, I can’t imagine using this filter except for those color space conversions in which the coefficients have been mathematically determined.
Use of the Channel Blend filter for these conversions makes sense. However, use of the filter for doing color corrections makes no sense at all, to me at least. Vegas has so many other tools that are so much easier to use (and understand) where you can immediately see the effects of the changes you make. In particular, I like to use Color Curves. It’s probably the one tool I use most often for color grading.
If you do discover something useful, please share.
wwaag
-
Ellen Maurer
November 25, 2015 at 4:01 pmI am trying to recreate a film look. I suppose (am sure) the author used Sony Vegas. No matter how much I combine Sony Vegas filters I can’t make it. So I thought to discover strange filters like Channel Blend and Convolution Kernel.
For Channel Blend there’s only left to understand the last 2 columns and the use for the last row. 🙂
With thanks,
Ellen -
Ellen Maurer
December 10, 2015 at 9:18 amAnyone of you have ever tried to use Convolution Kernel to make the image a little touched by a soft painted look?
-
Wayne Waag
December 10, 2015 at 4:34 pmNo. My suggestion would be to to search for applications of the convolution filter in Photoshop which is known as the Custom Filter. It has an actual matrix, while Vegas uses sliders. The operations appear to be the same though. Here is a link to a tutorial that may be of value. https://www.youtube.com/watch?v=JDFVdl6wEPg In just a quick search, I didn’t find very much. There is also a convolution filter in Gimp, another search possibility.
wwaag
Some contents or functionalities here are not available due to your cookie preferences!This happens because the functionality/content marked as “Google Youtube” uses cookies that you choosed to keep disabled. In order to view this content or use this functionality, please enable cookies: click here to open your cookie preferences.
Reply to this Discussion! Login or Sign Up
