Skip to Content
精通特征工程
book

精通特征工程

by Alice Zheng, Amanda Casari
April 2019
Intermediate to advanced
172 pages
4h 39m
Chinese
Posts & Telecom Press
Content preview from 精通特征工程
自动特征生成:图像特征提取和深度学习
113
原始图像
水平梯度
垂直梯度
8-4:猫图像的梯度
请注意,水平梯度提取出了强烈的
垂直
模式,比如猫眼睛的内部边缘,而垂直梯度则提取
出了强烈的
水平
模式,比如胡须和上下眼睑。乍看上去,这可能有点矛盾,但如果仔细思
考一下,就会明白确实应该是这样的。水平(
x
)梯度识别的是水平方向上的改变,一个
强烈的垂直模式会在基本相同的
x
位置跨越多个
y
像素,因此,垂直模式会造成像素值在
水平方向上的差异。这也是我们的眼睛检测到的结果。
8.2.2
 梯度方向直方图
单个的图像梯度可以提取出图像相邻区域中的微小差异,但我们的眼睛看到的则是更大的
模式。例如,我们看到的是猫的整条胡须,而不仅仅是一个小的部分。人类视觉系统能识
别出一个区域中的连续模式,所以要想总结出邻近区域的图像梯度,还有更多工作要做。
应该将向量描述得多么精确?统计学家会说:“看它的分布!”
SIFT
HOG
都是这样做
的。具体说来,它们计算(归一化)梯度向量的直方图作为图像特征。直方图将数据分装
到多个箱子中,并计算出每个箱子中数据点的数量,这是一种(未归一化的)经验分布。
归一化可以保证所有计数的总和为
1
,用数学语言说就是它具有单位
1
范数。
图像梯度是个向量,而向量可以通过两个分量表示:方向和大小。所以,我们还需要确定
如何设计直方图来表示这两个分量。
SIFT
HOG
给出了一种表示方法,将图像梯度按照
它们的方向角
θ
进行分箱,按照每个梯度的大小进行加权。具体步骤如下。
(1)
0
°
~ 360
°进行等宽分箱。
114 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

精通機器學習

精通機器學習

Aurélien Géron

Publisher Resources

ISBN: 9787115509680