资源简介
图像lbp特征,一个简单的lbp特征提取算法,matlab编写。
代码片段和文件信息
%LBP returns the local binary pattern image or LBP histogram of an image.
% J = LBP(IRNMAPPINGMODE) returns either a local binary pattern
% coded image or the local binary pattern histogram of an intensity
% image I. The LBP codes are computed using N sampling points on a
% circle of radius R and using mapping table defined by MAPPING.
% See the getmapping function for different mappings and use 0 for
% no mapping. Possible values for MODE are
% ‘h‘ or ‘hist‘ to get a histogram of LBP codes
% ‘nh‘ to get a normalized histogram
% Otherwise an LBP code image is returned.
%
% J = LBP(I) returns the original (basic) LBP histogram of image I
%
% J = LBP(ISPMAPPINGMODE) computes the LBP codes using n sampling
% points defined in (n * 2) matrix SP. The sampling points should be
% defined around the origin (coordinates (00)).
%
% Examples
% --------
% I=imread(‘rice.png‘);
% mapping=getmapping(8‘u2‘);
% H1=lbp(I18mapping‘h‘); %LBP histogram in (81) neighborhood
% using uniform patterns
% subplot(211)stem(H1);
%
% H2=lbp(I);
% subplot(212)stem(H2);
%
% SP=[-1 -1; -1 0; -1 1; 0 -1; -0 1; 1 -1; 1 0; 1 1];
% I2=LBP(ISP0‘i‘); %LBP code image using sampling points in SP
% and no mapping. Now H2 is equal to histogram
% of I2.
function result = lbp(varargin) % imageradiusneighborsmappingmode)
% Version 0.3.3
% Authors: Marko Heikkil?and Timo Ahonen
% Changelog
% Version 0.3.2: A bug fix to enable using mappings together with a
% predefined spoints array
% Version 0.3.1: Changed MAPPING input to be a struct containing the mapping
% table and the number of bins to make the function run faster with high number
% of sampling points. Lauge Sorensen is acknowledged for spotting this problem.
% Check number of input arguments.
error(nargchk(15nargin));
image=varargin{1};
d_image=double(image);
if nargin==1
spoints=[-1 -1; -1 0; -1 1; 0 -1; -0 1; 1 -1; 1 0; 1 1];
neighbors=8;
mapping=0;
mode=‘h‘;
end
if (nargin == 2) && (length(varargin{2}) == 1)
error(‘Input arguments‘);
end
if (nargin > 2) && (length(varargin{2}) == 1)
radius=varargin{2};
neighbors=varargin{3};
spoints=zeros(neighbors2);
% Angle step.
a = 2*pi/neighbors;
for i = 1:neighbors
spoints(i1) = -radius*sin((i-1)*a);
spoints(i2) = radius*cos((i-1)*a);
end
if(nargin >= 4)
mapping=varargin{4};
if(isstruct(mapping) && mapping.samples ~= neighbors)
error(‘Incompatible mapping‘);
end
else
mapping=0;
end
if(nargin >= 5)
mode=varargin{5};
else
mode=‘h‘;
end
end
if (nargin > 1) && (length(varargin{2}) > 1)
spoints=varargin{2};
neighbors=siz
相关资源
- LBP纹理特征官方MATLAB代码和测试用例
- 基于MATLAB的LBP图片特征提取算法,人
- 支持lbp直方图的图像相似度计算
- LBP算法的Matlab代码
- 局部二值模式进行编码的人脸识别
- 多尺度LBP
- LBP(局部二值模式)特征提取
- LBP方法
- LBP特征提取的MATLAB实现
- LBP-DBN人脸识别matlab代码
- matlab实现HOG+LBP+HIKSVM行人检测算法
- 三种LBP模式的子程序
- MATLAB实现LTP和LBP算法
- 改进的LBP算法CLBP实现图像纹理特征的
- LBP 纹理模式的LBP特征表示及分类原理
- LBP 统一化LBP算子
- LBP 实现图像纹理特征的提取
- LBP-face-recongnition-system 一个基于LBP(局
- adaboost-train-test 级联分类器学习
- MBLBP 基于块的LBP
- renlianshibie Gabor小波人脸识别
- LBPPLPQFER 人脸表情识别matlab程序LBP+L
- LBP
- pedestrian-detectionsvms.tar
- LBP-SIFT-image-matching-algorithm-combined
- LBP 改程序是本人编写的
- adaboostPknnPlbp
- lbp算法MATLAB代码
- LBP算法matlab代码
- LBP特征提取及其直方图
评论
共有 条评论