How is the multiplication in Gaussian Blur implemented I have a question regarding how the Gaussian blur works. A pixel consists on the combination of 3 colors: R,G and B. I have read that the Gaussian kernel is multiplied by the input image
by placing the center pixel of the kernel on the image pixel and multiplying the values in the original image with the pixels in the kernel that overlap. What I am not sure about is how the multiplication is carried out. For instance, lets suppose the pixel is composed as follows(I have chosen arbitrary numbers):
R: 10100010
G: 01000110
B: 10001110
My question is how the multiplication implemented:
1- The three colors are &quot;concatenated&quot; meaning that the value in the kernel is multiplied by the concatenation of R,G and B. In this case the concatenation would be 10100010 01000110 10001110
2- Multiply the value of each color independently by the kernel. This would imply multiplying first R by the kernel, then G by the kernel and then B by the kernel.
Each color is conceptually treated independently. If they were concatenated, multiplying a value with a color close to the maximum possible value for one channel could cause it to overflow into the lower bits of the next.
That said, if you’re asking for performance purposes, a lot of the hardware that does this kind of work can perform all of the per-channel multiplies in a single operation.