没有做过
看看这个http://www.bearcave.com/misl/misl_tech/wavelets/packet/download.html

解决方案 »

  1.   

    gabor 小波
    你去google搜索下这个 有收获 绝对
      

  2.   

    /* extract texture feature */
    void GaborFeature(float *feature, Matrix *img, int side,double Ul,double Uh,int scale,int orientation,int flag)
    {
    int h, w, xs, ys, r1, r2, r3, r4, hei, wid, s, n, base;
    Matrix *IMG, *IMG_imag, *Gr, *Gi, *Tmp_1, *Tmp_2, *F_1, *F_2, *G_real, *G_imag, *F_real, *F_imag, *F;
    double m, v;
    hei = img->height;
    wid = img->width;
    xs = (int) pow(2.0, ceil(log2((double) img->height)));
    ys = (int) pow(2.0, ceil(log2((double) img->width))); CreateMatrix(&IMG, xs, ys);
    for (h=0;h<hei;h++) 
    for (w=0;w<wid;w++)
    IMG->data[h][w] = img->data[h][w]; CreateMatrix(&F_real, xs, ys);
    CreateMatrix(&F_imag, xs, ys);
    CreateMatrix(&IMG_imag, xs, ys); Mat_FFT2(F_real, F_imag, IMG, IMG_imag);/* ----------- compute the Gabor filtered output ------------- */ CreateMatrix(&Gr, 2*side+1, 2*side+1);
    CreateMatrix(&Gi, 2*side+1, 2*side+1);
    CreateMatrix(&Tmp_1, xs, ys);
    CreateMatrix(&Tmp_2, xs, ys);
    CreateMatrix(&F_1, xs, ys);
    CreateMatrix(&F_2, xs, ys);
    CreateMatrix(&G_real, xs, ys);
    CreateMatrix(&G_imag, xs, ys);
    CreateMatrix(&F, hei, wid); base = scale*orientation; for (s=0;s<scale;s++) {
    for (n=0;n<orientation;n++) {
    Gabor(Gr, Gi, s+1, n+1, Ul, Uh, scale, orientation, flag);
    Mat_Copy(F_1, Gr, 0, 0, 0, 0, 2*side, 2*side);
    Mat_Copy(F_2, Gi, 0, 0, 0, 0, 2*side, 2*side);
    Mat_FFT2(G_real, G_imag, F_1, F_2); Mat_Product(Tmp_1, G_real, F_real);
    Mat_Product(Tmp_2, G_imag, F_imag);
    Mat_Substract(IMG, Tmp_1, Tmp_2); Mat_Product(Tmp_1, G_real, F_imag);
    Mat_Product(Tmp_2, G_imag, F_real);
    Mat_Sum(IMG_imag, Tmp_1, Tmp_2); Mat_IFFT2(Tmp_1, Tmp_2, IMG, IMG_imag);
    Mat_Shift(IMG, Tmp_1, side);
    Mat_Shift(IMG_imag, Tmp_2, side); m = 0;
    for (h=0;h<hei;h++)
    for (w=0;w<wid;w++) {
    F->data[h][w] = sqrt(pow(IMG->data[h][w], 2.0)+pow(IMG_imag->data[h][w], 2.0));
    m += F->data[h][w];
    } m /= (double) (hei*wid);
    feature[s*orientation+n] = (float) m; v = 0;
    for (h=0;h<hei;h++)
    for (w=0;w<wid;w++) 
    v += (F->data[h][w]-m)*(F->data[h][w]-m); v /= (double) (hei*wid);
    feature[base+s*orientation+n] = (float) sqrt(v);//提取特征
    }
    } FreeMatrix(Gr);
    FreeMatrix(Gi);
    FreeMatrix(Tmp_1);
    FreeMatrix(Tmp_2);
    FreeMatrix(F_1);
    FreeMatrix(F_2);
    FreeMatrix(G_real);
    FreeMatrix(G_imag);
    FreeMatrix(F_real);
    FreeMatrix(F_imag);
    FreeMatrix(IMG);
    FreeMatrix(IMG_imag);
    FreeMatrix(F);
    }
      

  3.   

    下了个原码,看不懂,我想利用gabor提取纹理特征,做图像检索
      

  4.   

    用Gabor对图像做一个卷积,要采用多尺度,多通道的形式就可以提取纹理了。
    不过用Gabor做纹理提取实际是上比较麻烦的,因为参数太多