FORUMS: list search recent posts

Channel Blend, Convolution Kernel

COW Forums : VEGAS Pro

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Ellen Maurer
Channel Blend, Convolution Kernel
on Nov 12, 2015 at 1:53:01 pm

Hi!
If you know some books, tutorials or any other sources of information about what these 2 filter can do please help me.

Ellen


Return to posts index

Wayne Waag
Re: Channel Blend, Convolution Kernel
on Nov 12, 2015 at 5:04:05 pm

I use the Channel Blend filter to do color space conversions--in particular, converting from BT601(SD) to BT709 (HD). Some applications I use (e.g. Mercalli SAL and Proshow Producer) apply the SD color coefficients when rendering HD files, resulting in some color inaccuracies. Here is a link on the problem with the Mercalli Standalone and the use of the Channel Blend filter for correction. https://forums.creativecow.net/thread/24/991725

wwaag


Return to posts index

Ellen Maurer
Re: Channel Blend, Convolution Kernel
on Nov 18, 2015 at 3:37:24 pm

I can't understand a lot of the terms. Will you please help me understand why Channel Blend has so many boxes and how to use numbers with them?


Return to posts index


Wayne Waag
Re: Channel Blend, Convolution Kernel
on Nov 18, 2015 at 5:45:06 pm

I can't understand a lot of the terms.

You're not alone in this regard. My understanding is very limited as well. A good starting point is an article written by Glenn Chan comparing HD and SD color spaces. http://www.glennchan.info/articles/technical/hd-versus-sd-color-space/hd-ve... In fact, there are quite a few very useful articles on his website regarding color space issues in Vegas.

Will you please help me understand why Channel Blend has so many boxes and how to use numbers with them?

Here is the Channel Blend filter for the 601 to 709 conversion.



In very general terms, the Channel Blend filter enables you make systematic changes to how colors will be displayed. Vegas works in a basic RGB color space, meaning that each pixel can be described as a combination of Red, Green, and Blue. If you open an image in Photoshop, it will display the RGB values which can range from 0 to 255 for the location of your cursor. Although Vegas doesn't display these values, it uses them internally. The channel blend filter allows you to alter these. Very simplistically, e.g. in row 1, the red channel, the 601 to 709 conversion preset tells Vegas to reduce the red a bit, add a little green and a smidgeon of blue. For the green channel, we're reducing the red, enhancing the green, and reducing the blue component. Since each channel has these RGB components, hence the need for all these boxes. Throw in transparency (alpha), and you've got a pretty large matrix of numbers.

In all honesty, I can't imagine using this filter except for those color space conversions in which the coefficients have been mathematically determined. As stated earlier, I didn't derive these coefficients, but found them in a search. Hopefully, someone with greater expertise can add or correct any misstatements I've made. The bottom line--I wouldn't worry with this filter except if you have a need for color space conversions.

wwaag


Return to posts index

Mike Kujbida
Re: Channel Blend, Convolution Kernel
on Nov 18, 2015 at 6:13:45 pm

Ellen, I searched the Sony Vegas Pro forum and this was one of the few useful posts I could find. Courtesy of user MarkWWW.


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 becomming to dark or light). (This scaling factor will be worked out automatcally 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.


If you want your head to explode, here are a few more threads from that forum to browse through :)

Fx Channel Blend: How does it work?

Channel Blend, what to use it for?

Practical use for Channel blend Sony Vegas


Return to posts index

Ellen Maurer
Re: Channel Blend, Convolution Kernel
on Nov 18, 2015 at 6:54:26 pm

Fortunately Convolution Kernel looks more easy to understand now, after reading your information. Can't wait to see the information in those links for Channel Blend. Thank you Mr. Mike.

Mr. Wayne, Channel Blend is still hard to, at least, play with it. I have seen some grading tutorials on youtube and one of their filters was Channel Blend. Its impact on the grading process is spectacular. They provided links to download the filter packages and when I saw the settings for CB all became so confusing, even after reading its help file.

"in row 1, the red channel, .... reduce the red a bit, add a little green and a smidgeon of blue." These boxes?


"For the green channel, we're reducing the red, enhancing the green, and reducing the blue component." I'm lost, I don't know in which boxes to look at. I see no negative blue value. Hope you'll help me. Thank you.

Ellen


Return to posts index


Wayne Waag
Re: Channel Blend, Convolution Kernel
on Nov 18, 2015 at 7:21:48 pm

Ellen,

It may be helpful to first look at the default preset. For the red channel which corresponds to the first row, you'll see the value for red is 1.0 and the rest are zeros. So, in the above screen shot that I gave as an example, .914 is a bit less than 1.0, thus reduced, .079 is a bit more than 0.0, thus Green is added, etc. The same is true for the Green channel or the second row, the red component is reduced from zero, the green component is greater than 1.0, thus enhanced, and the blue component is reduced, i.e. less than zero.

wwaag


Return to posts index

Ellen Maurer
Re: Channel Blend, Convolution Kernel
on Nov 18, 2015 at 8:01:26 pm

I try to find a logic. Why the default preset has 1 in the red channel and the other 2 are set to 0. And so Green channel has 1 in the red box, Blue channel has 1 in the green box, and in the Alpha row a value 1 is almost in the Blue box.


Return to posts index

Wayne Waag
Re: Channel Blend, Convolution Kernel
on Nov 18, 2015 at 9:02:56 pm

And so Green channel has 1 in the red box, Blue channel has 1 in the green box,

No, you're simply misreading it. In the 2nd row (green channel), the value is 1.0--note the *G after the box. Same for blue channel. The value is 1.0-- the *B afterward.

wwaag


Return to posts index


Ellen Maurer
Re: Channel Blend, Convolution Kernel
on Nov 18, 2015 at 9:41:56 pm

I'm so sorry. I really try to understand everything. I guess I don't know how to look at it.
Is it ok how I see the boxes, the rows and columns?


Return to posts index

Wayne Waag
Re: Channel Blend, Convolution Kernel
on Nov 18, 2015 at 10:20:06 pm

Yes, that's correct. You have the red channel circled in red.

wwaag


Return to posts index

Richard Jones
Re: Channel Blend, Convolution Kernel
on Nov 19, 2015 at 11:51:31 am
Last Edited By Richard Jones on Nov 19, 2015 at 11:52:56 am

Early 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)


Return to posts index


Ellen Maurer
Re: Channel Blend, Convolution Kernel
on Nov 19, 2015 at 9:02:29 pm

Thank you, Mr. Jones. Now I have a lot of hopes to really understand what this filter can do.

Ellen


Return to posts index

Ellen Maurer
Re: Channel Blend, Convolution Kernel
on Nov 24, 2015 at 6:39:30 pm
Last Edited By Ellen Maurer on Nov 24, 2015 at 7:30:53 pm

I think Channel Blend is a more complex Color Balance.

I noticed how the distribute presets look like. I tried to understand why the 1 values are in those specific columns. Is this the reason?




Return to posts index

Wayne Waag
Re: Channel Blend, Convolution Kernel
on Nov 25, 2015 at 2:54:36 am

I 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


Return to posts index


Ellen Maurer
Re: Channel Blend, Convolution Kernel
on Nov 25, 2015 at 4:01:19 pm

I 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


Return to posts index

Ellen Maurer
Re: Channel Blend, Convolution Kernel
on Dec 10, 2015 at 9:18:50 am

Anyone of you have ever tried to use Convolution Kernel to make the image a little touched by a soft painted look?


Return to posts index

Wayne Waag
Re: Channel Blend, Convolution Kernel
on Dec 10, 2015 at 4:34:14 pm
Last Edited By Wayne Waag on Dec 10, 2015 at 5:13:08 pm

No. 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.



In just a quick search, I didn't find very much. There is also a convolution filter in Gimp, another search possibility.

wwaag


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]