资源简介
图片纹理特征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代码
相关资源
- CMC matlab代码
- MK突变检验MATLAB代码
- Zernike多项式matlab代码
- KNN分类器完整的matlab代码
- 遗传算法优化pid控制器参数的matlab程
- 隐式广义预测控制matlab程序
- JONSWAP海谱模型
- matlab 人工鱼群求解TSP
- MQAM和MPSK误符号率曲线绘制
- 最好用的串口调试助手_MATLAB
- Matlab小波包分解函数
- Matlab自动识别串口设备名称
- 基于峭度的ICA matlab代码程序
-
Simuli
nk电池仿真模型 - RLC电路matlab仿真m文件
- matlab矩阵运算
- 最大匹配matlab程序
- 凸轮仿真加工MATLAB程序
- LCE OCE GCEmatlab代码用于图像分割精度评
- 连续粒子群算法的matlab程序
- 窗口傅里叶正反变换matlab程序
- 改进的Bradley二值化matlab程序
- 改进的bernsen二值化算法
- matlab_webrtc_fullaec.m
- 边缘检测的matlab实现代码
- A*算法最短路径万能通用matlab代码
- 蚁群算法最短路径万能matlab源代码
- MATLAB蚁群算法ACA最短路径-注释完整
- 卡尔曼平滑
- matlab强化学习平衡杆代码
评论
共有 条评论