- Visual C++源码
- Visual Basic源码
- C++ Builder源码
- Java源码
- Delphi源码
- C/C++源码
- PHP源码
- Perl源码
- Python源码
- Asm源码
- Pascal源码
- Borland C++源码
- Others源码
- SQL源码
- VBScript源码
- JavaScript源码
- ASP/ASPX源码
- C#源码
- Flash/ActionScript源码
- matlab源码
- PowerBuilder源码
- LabView源码
- Flex源码
- MathCAD源码
- VBA源码
- IDL源码
- Lisp/Scheme源码
- VHDL源码
- Objective-C源码
- Fortran源码
- tcl/tk源码
- QT源码
lbp_new.m
资源名称:LBPV_GM.rar [点击查看]
上传用户:kandtrade
上传日期:2009-06-26
资源大小:12k
文件大小:5k
源码类别:
图形图象
开发平台:
Matlab
- %LBP returns the local binary pattern image or LBP histogram of an image.
- % J = LBP(I,R,N,MAPPING,MODE) 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(I,SP,MAPPING,MODE) computes the LBP codes using n sampling
- % points defined in (n * 2) matrix SP. The sampling points should be
- % defined around the origin (coordinates (0,0)).
- %
- % Examples
- % --------
- % I=imread('rice.png');
- % mapping=getmapping(8,'u2');
- % H1=LBP(I,1,8,mapping,'h'); %LBP histogram in (8,1) neighborhood
- % %using uniform patterns
- % subplot(2,1,1),stem(H1);
- %
- % H2=LBP(I);
- % subplot(2,1,2),stem(H2);
- %
- % SP=[-1 -1; -1 0; -1 1; 0 -1; -0 1; 1 -1; 1 0; 1 1];
- % I2=LBP(I,SP,0,'i'); %LBP code image using sampling points in SP
- % %and no mapping. Now H2 is equal to histogram
- % %of I2.
- function result = lbp(varargin) % image,radius,neighbors,mapping,mode)
- % Version 0.3
- % Authors: Marko Heikkil