I am using Accord.NET framework.
Suppose, I have three Gabor filters, and, I need to apply them to an image in parallel.
Is the following a correct concept of a parallel Filter Bank?
Bitmap bmp = (Bitmap)Bitmap.FromFile(@"C:\Lenna.png");
GaborFilter gf1 = new GaborFilter();
gf1.GaborKernelSize = 3;
gf1.Lambda = 4.0;
gf1.Theta = 45.0;////////////////////Theta is 45
gf1.Psi = 1.0;
gf1.Sigma = 2.0;
gf1.Gamma = 0.3;
GaborFilter gf2 = new GaborFilter();
gf2.GaborKernelSize = 3;
gf2.Lambda = 4.0;
gf2.Theta = 90.0;/////////////////////Theta is 90
gf2.Psi = 1.0;
gf2.Sigma = 2.0;
gf2.Gamma = 0.3;
GaborFilter gf3 = new GaborFilter();
gf3.GaborKernelSize = 3;
gf3.Lambda = 4.0;
gf3.Theta = 135.0;////////////////////Theta is 135
gf3.Psi = 1.0;
gf3.Sigma = 2.0;
gf3.Gamma = 0.3;
bmp = gf1.Apply(bmp);
bmp = gf2.Apply(bmp);
bmp = gf3.Apply(bmp);
MyWinForm f = new MyWinForm ();
f.PictureBox = bmp;
f.ShowDialog();
If not, then, how can I make them work in parallel?
A filter bank is just a set of filters each one with different parameters which aims to get a response for different component of the signal.
In your case, Gabor filters, the parameters that you change is the orientation so each one of the filters will give the response of the features in the image with the selected orientation. For a filter bank of size N (N different filters) if we apply it to an image we would get N different images each one is the result of a specific filter.
In your code you apply the filters one after the other were the output of the first filter is the input for the next one. In this case you can't filter the image in parallel.
Applying a Gabor fitler is just a convolution of a Gabor kernel with the image. Therefore Instead of applying each Gabor filter on the image separately you can just convolve the Gabor filters together and get a new filter which than can be applied once on the entire image.