WLD特征

Abstract—Inspired by Weber’s Law, this paper proposes a simple, yet very powerful and robust local descriptor, called the Weber
Local Descriptor (WLD). It is based on the fact that human perception of a pattern depends not only on the change of a stimulus (such
as sound, lighting) but also on the original intensity of the stimulus. Specifically, WLD consists of two components: differential excitation and orientation. The differential excitation component is a function of the ratio between two terms: One is the relative intensity differences of a current pixel against its neighbors, the other is the intensity of the current pixel. The orientation component is the gradient orientation of the current pixel. For a given image, we use the two components to construct a concatenated WLD histogram. Experimental results on the Brodatz and KTH-TIPS2-a texture databases show that WLD impressively outperforms the other widely used descriptors (e.g., Gabor and SIFT). In addition, experimental results on human face detection also show a promising performance comparable to the best known results on the MIT+CMU frontal face test set, the AR face data set, and the CMU profile test set.

 有Matlab代码   http://vipl.ict.ac.cn/resources/codes

在纹理分类(文称比Gabor、SIFT都好)、人脸检测都取得了不错的效果。
关键是速度还很快!跟LBP一个数量级。

原链接已经把代码移除,大家可以参考这份代码:
https://github.com/popboy126/FC_WLD

%用于计算WLD
function value=WLD(subImage)
%用于计算H的矩阵
    f1=[1,1,1;1,-8,1;1,1,1];
    f2=[0,0,0;0,1,0;0,0,0];
    f3=[1,2,1;0,0,0;-1,-2,-1];
    f4=[1,0,-1,2,0,-2,1,0,-1];

    v1=filter2(f1,subImage);
    v2=filter2(f2,subImage);
    [row col]=size(v1);
    Epcl=zeros(1,8);%用于存放Epcl
    for i=1:row
        for j=1:col
            a(i,j)=atan(v1(i,j)/v2(i,j));%计算a
            k=classifyEpcl(a(i,j));
            Epcl(k)=Epcl(k)+1;
        end
    end
    
    %下面计算梯度
    v3=filter2(f3,subImage);
    v4=filter2(f4,subImage);
    Fai=zeros(1,12);
    for i=1:row
        for j=1:col
            Theta(i,j)=atan(v3(i,j)/v4(i,j));%计算a
            if v3(i,j)>0 && v4(i,j)>0
                ;
            elseif v3(i,j)>0 && v4(i,j)<0
                Theta(i,j)=Theta(i,j)+2*pi;
            else
                Theta(i,j)=Theta(i,j)+pi;
            end
            k=classifyFai(Theta(i,j));
            Fai(k)=Fai(k)+1;
        end
    end
    wld_2D=Epcl'*Fai;
    value=wld_2D(:)';
end


OpenCV的实现:
http://download.csdn.net/download/chaojidemi/3862417

展开阅读全文

没有更多推荐了,返回首页