I am following a matlab implementation of texture segmentation using Gabor filters. My test image (img) is from Brodatz and as follows:

enter image description here

Below is what I have done so far.

{nrows, ncols} = ImageDimensions[img];
wavelengthmin = 4/Sqrt[2];
wavelengthmax = Sqrt[nrows^2 + ncols^2];
n = Floor[Log2[wavelengthmax/wavelengthmin]];
wavelength = Table[{2, 2} 2^i, {i, 0, n - 2}];
deltaTheta = Pi/4;
orientation = Table[i, {i, 0, Pi - deltaTheta, deltaTheta}];
gabormag = 
     GaborFilter[img, 1, wavelength[[i]], orientation[[j]]]], {i, 1, 
     Length@wavelength}, {j, 1, Length@orientation}]];
gaborWavelength = 
    Table[Norm[wavelength[[i]]], {i, 1, Length@wavelength}], 
K = 3;
gabormagfiltered = gabormag;
  sigma = 0.5 gaborWavelength[[i]];
  gabormagfiltered[[i]] = GaussianFilter[gabormag[[i]], K sigma]
  , {i, 1, Length@gabormag}];

After this, I am stuck on how to use this filtered images to get the final classification.

How can I proceed?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.