# How to compute Gabor feature vector? I'm working on semi automatic texture segmentation using level set and gabor feature vector described by Manjunath und Ma . I consider their feature representation is better than others since I can get good result on several images but somehow performs really bad on other images data. So I guess there's something wrong with my understanding.

They describe that the feature vectors consist of $\mu_{mn}$ (mean) and $\sigma_{mn}$ (standard deviation). I use scale $S = 4$ and orientation $K = 6$, thus my feature vector will be 48 dimension (4 * 6 * 2 = 48):

$f = \{ \mu_{00}, \sigma_{00}, \mu_{01}, \sigma_{01}, \mu_{02}...\mu_{35}, \sigma_{35} \} \tag1$

I am confused with their equation:

$W(x, y) = \int I(x_1,y_1)g_{mn} * (x - x_1, y - y_1) dx_1 dy_1 \tag2$

$\mu_{mn} = \int \int |W_{mn}(x,y)|dxdy \tag3$

$\sigma_{mn} = \sqrt{ \int \int (|W_{mn}(x,y) - \mu_{mn}|)^2 dxdy } \tag4$

So my first question is: are $\mu$ and $\sigma$ simply mean and average? So far, I just average every pixel value of the magnitude to obtain $\mu$ and compute the standard deviation to obtain $\sigma$.

After I compute the feature vector, I need to do distance measure between two vectors $f_i$ and $f_j$

$d(i, j) = \sum_{}^{m}\sum_{}^{n} d_{mn}(i, j) \tag5$

$d_{mn}(i, j) = |\frac{\mu_{mn}^i - \mu_{mn}^j}{\alpha(\mu_{mn})}| + |\frac{\sigma_{mn}^i - \sigma_{mn}^j}{\alpha(\sigma_{mn})}| \tag6$

I'm really puzzled with $\alpha(\mu_{mn})$ and $\alpha(\sigma_{mn})$ ? What are they? I have tried to calculate 48 standard deviations from $(1)$

$\alpha = \{ \alpha(\mu_{00}), \alpha(\sigma_{00}), \alpha(\mu_{01}), \alpha(\sigma_{01}), \alpha(\mu_{02})...\alpha(\mu_{35}), \alpha(\sigma_{35}) )\} \tag7$

and use it to calculate the distance function but I'm not convinced with my calculation since it seems not better than simple euclidean distance.

1. Texture Features for Browsing and Retrieval of Image Data by B.S. Manjunath and W.Y. Ma (1996)

$\mu$ and $\sigma$ are simply mean and standard deviation. I assume there is also a normalizing coefficient out there. Or the normalization as you mentioned comes from $\alpha$, since it $\alpha$s are vectors composed of the standard deviation and mean.