資源簡介
圖片紋理特征SILTP提取代碼。可用于行人再識別,目標檢測等特征提取。
代碼片段和文件信息
function?descriptors?=?LOMO(images?options)
%%?function?Descriptors?=?LOMO(images?options)
%?Function?for?the?Local?Maximal?Occurrence?(LOMO)?feature?extraction
%
%?Input:
%???:?a?set?of?n?RGB?color?images.?Size:?[h?w?3?n]
%???[optioins]:?optional?parameters.?A?structure?containing?any?of?the
%???following?fields:
%???????numScales:?number?of?pyramid?scales?in?feature?extraction.?Default:?3
%???????blockSize:?size?of?the?sub-window?for?histogram?counting.?Default:?10
%???????blockStep:?sliding?step?for?the?sub-windows.?Default:?5
%???????hsvBins:?number?of?bins?for?HSV?channels.?Default:?[888]
%???????tau:?the?tau?parameter?in?SILTP.?Default:?0.3
%???????R:?the?radius?paramter?in?SILTP.?Specify?multiple?values?for?multiscale?SILTP.?Default:?[3?5]
%???????numPoints:?number?of?neiborhood?points?for?SILTP?encoding.?Default:?4
%???The?above?default?parameters?are?good?for?128x48?and?160x60?person
%???images.?You?may?need?to?adjust?the?numScales?blockSize?and?R?parameters
%???for?other?smaller?or?higher?resolutions.
%
%?Output:
%???descriptors:?the?extracted?LOMO?descriptors.?Size:?[d?n]
%?
%?Example:
%?????I?=?imread(‘../images/000_45_a.bmp‘);
%?????descriptor?=?LOMO(I);
%
%?Reference:
%???Shengcai?Liao?Yang?Hu?Xiangyu?Zhu?and?Stan?Z.?Li.?Person
%???re-identification?by?local?maximal?occurrence?representation?and?metric
%???learning.?In?IEEE?Conference?on?Computer?Vision?and?Pattern?Recognition?2015.
%?
%?Version:?1.0
%?Date:?2015-04-29
%
%?Author:?Shengcai?Liao
%?Institute:?National?Laboratory?of?Pattern?Recognition
%???Institute?of?Automation?Chinese?Academy?of?Sciences
%?Email:?scliao@nlpr.ia.ac.cn
%%?set?parameters
numScales?=?3;
blockSize?=?10;
blockStep?=?5;
hsvBins?=?[888];
tau?=?0.3;
R?=?[3?5];
numPoints?=?4;
if?nargin?>=?2
????if?isfield(options‘numScales‘)?&&?~isempty(options.numScales)?&&?isscalar(options.numScales)?&&?isnumeric(options.numScales)?&&?options.numScales?>?0
????????numScales?=?options.numScales;
????????fprintf(‘numScales?=?%d.\n‘?numScales);
????end
????if?isfield(options‘blockSize‘)?&&?~isempty(options.blockSize)?&&?isscalar(options.blockSize)?&&?isnumeric(options.blockSize)?&&?options.blockSize?>?0
????????blockSize?=?options.blockSize;
????????fprintf(‘blockSize?=?%d.\n‘?blockSize);
????end
????if?isfield(options‘blockStep‘)?&&?~isempty(options.blockStep)?&&?isscalar(options.blockStep)?&&?isnumeric(options.blockStep)?&&?options.blockStep?>?0
????????blockStep?=?options.blockStep;
????????fprintf(‘blockStep?=?%d.\n‘?blockStep);
????end
????if?isfield(options‘hsvBins‘)?&&?~isempty(options.hsvBins)?&&?isvector(options.blockStep)?&&?isnumeric(options.hsvBins)?&&?length(options.hsvBins)?==?3?&&?all(options.hsvBins?>?0)
????????hsvBins?=?options.hsvBins;
????????fprintf(‘hsvBins?=?[%d?%d?%d].\n‘?hsvBins);
????end
????if?isfield(options‘tau‘)?&&?~isempty(options.tau)?&&?isscalar(options.tau)?&&?isnumeric(options.tau)?&&?o
- 上一篇:MK突變檢驗MATLAB代碼
- 下一篇:CMC matlab代碼
評論
共有 條評論