I'm studying convolutional layers and I'm pretty confused. Supposing that I give to my network (CNN) an RGB image, so an image with three channels. Since the image has 3 channels, then the kernels applied to my image will be 3 in each convolutional layer (I don't care exactly about the size of the kernels at this moment).
Therefore the convolutional operation at the first layer will be given by: the sum of the products between each channel of the image and the corresponding channel of the kernel (see figure below)
However, if it works in this way, the output of the first convolutional layer would be an image of two dimensions and not an RGB image with 3 channels, as I think, it should be.
Since it wasn't clear, I have found the following picture hoping that it could help me. However, it wasn't clear as well. Could anyone help me?