Ask Your Question

Andre's profile - activity

2014-10-23 03:36:52 -0600 asked a question Filter2D with multi channel kernel

Blockquote

Hello, i have to make a convolution of a 3 channels image (RGB) with a 3 channels kernel (RGB). My code is the following: Filter2D (image_in, image_out, -1, kernel) ; image_in and kernel are 3 channels matrices.

This call doest return any assertion fault or issue and seems to work well (but I just tested with R=G=B images), although the documentation specifies that:

"kernel – convolution kernel (or rather a correlation kernel), a single-channel floating point matrix; if you want to apply different kernels to different channels, split the image into separate color planes using split() and process them individually".

I am a little bit confused. What is really happening ? Does Filter2D work with 3 channels kernel ? Does it use only one channel (the first one) ?