Matlab-vision包学习-Feature Detection,Extraction and Matching-提取HOG描述子
2015-10-05 08:59
555 查看
这一篇介绍提取HOG描述子的函数。
函数/Functions
函数名称:extractHOGFeatures
功能:提取HOG描述子
语法:features = extractHOGFeatures(I);
[features,validPoints] = extractHOGFeatures(I,Points);
[_,visualization] = extractHOGFeatures(I,_);
[_] = extractHOGFeatures(_,Name,Value);
其中,I为3-D彩色图像或2-D灰度图像,features为1xN的HOG描述子向量,N为描述子的长度,该描述子是输入图像区域的局部形状信息编码。当指定Points(同extractFeatures函数输入Points)时,则获取指定点附近的HOG描述子,visualization表示可用于任何可视化的函数的输入参数,例如plot(visualization),Name为用一对单引号包含的字符串,Value为对应Name的值。
Name&Value参数
举例:
函数/Functions
函数名称:extractHOGFeatures
功能:提取HOG描述子
语法:features = extractHOGFeatures(I);
[features,validPoints] = extractHOGFeatures(I,Points);
[_,visualization] = extractHOGFeatures(I,_);
[_] = extractHOGFeatures(_,Name,Value);
其中,I为3-D彩色图像或2-D灰度图像,features为1xN的HOG描述子向量,N为描述子的长度,该描述子是输入图像区域的局部形状信息编码。当指定Points(同extractFeatures函数输入Points)时,则获取指定点附近的HOG描述子,visualization表示可用于任何可视化的函数的输入参数,例如plot(visualization),Name为用一对单引号包含的字符串,Value为对应Name的值。
Name | Value |
---|---|
'CellSize' | HOG单元(HOG cell)大小,默认值为[8,8],为捕获大尺度空间信息,可以增加‘CellSize'的取值 |
’BlockSize' | 块中单元的大小,默认值为[2,2],当取值较大时将降低抑制局部亮度变化的能力,当取值较小时,能够抑制亮度变化 |
‘BlockOverlap' | 相邻块(block)之间的重叠HOG单元的个数,默认值为ceil(BlockSize/2),该参数只在从区域(region)获取HOG特征时有用。 |
’NumBins' | 方向直方图分段(orientation histogram bins)的数目,默认值为9,必须为正整数,如果想要获取精细的方向信息,该值可以设置大一些,但是将增加处理时间和HOG特征长度 |
‘UseSignedOrienation' | 默认值为false,当该值置为true时,方向直方图中所取方向的范围为[-180,180],若置为false,方向的取值范围为[0,180],此时,方向角度小于0的将统计如+180bins中,利用带符号的方向,可以区分区域中从light-to-dark和dark-to-light |
close all; clear all; clc; Img = imread('cameraman.tif'); [featureVector,hogVisualization] = extractHOGFeatures(Img); figure; imshow(Img); hold on; plot(hogVisualization); title('从图像区域中直接抽取HOG描述子'); clear Img; clear featureVector; Img = imread('gantrycrane.png'); CornersPoints = detectFASTFeatures(rgb2gray(Img)); strongest = selectStrongest(CornersPoints,3); %选择前三个 [featureVector,validPoints,hogVisualization] = extractHOGFeatures(Img,strongest); figure; imshow(Img); hold on; plot(hogVisualization,'Color','green'); title('抽取FAST检测的特征点周围区域的HOG描述子'); clear Img; clear featureVector;
相关文章推荐
- 《数字图像处理原理与实践(MATLAB文本)》书代码Part7
- Matlab-vision包学习-Feature Detection,Extraction and Matching-提取描述子
- 谱聚类(NJW算法 Matlab代码)
- Matlab-vision包学习-Feature Detection,Extraction and Matching-SURF检测blob
- matlab 利用while循环计算平均值和方差(第二版)
- Matlab-vision包学习-Feature Detection,Extraction and Matching-MSER特征提取
- matlab 利用while循环计算平均值和方差
- Matlab-vision包学习-Feature Detection,Extraction and Matching-最小特征值角点检测
- Matlab-vision包学习-Feature Detection,Extraction and Matching-Harris角点检测
- Matlab-vision包学习-Feature Detection,Extraction and Matching-FAST角点检测
- Matlab-vision包学习-Feature Detection,Extraction and Matching-BRISK角点检测
- C程序调用matlab (Win8 64 bit + VS 2013 + Matlab R2014a)
- matlab中hold指令、figure指令及subplot指令的使用
- matlab中hold指令、figure指令及subplot指令的使用
- matlab中axis的使用
- Deep Learning(二)Deep Belief Nets(DBNs) 结合MATLAB代码 分析
- Todd's Matlab讲义第2讲:Matlab 编程
- matlab+opencv
- Todd's Matlab讲义第1讲:向量,函数和作图
- Matlab—将绘图保存为视频VideoWrite()函数用法与自定义视频尺寸