06 Edge and feature detection 特征的检测提取与描述

Edge and feature detection 特征的检测提取与描述

摘要:

  1. 之前都是图到图的转换,这章是需要从图中提去到信息 Images → symbols
  2. 低通滤波->只允许低频通过->剩下高频->用于边缘提取(边缘是高频信息)
  3. 霍夫变换是用来辨别找出物件中的特征

Feature detection

Point features: corners 点特征
Edge detection 边缘特征
Line detection 线特征
Interest Points and Corners

Point features: corners 点特征

Correspondence 对应: matching points, patches, edges, or regions across images
Example: matching points in multiple views for stereo depth extraction 在多个视图中匹配点以提取立体深度
Overview of Keypoint Matching 找关键点的流程

  1. Find a set of distinctive key-points
  2. Define a region around each key point
  3. Extract and normalize the region content
  4. Compute a local descriptor from the normalized region
  5. Match local descriptors

Detect points that are repeatable and distinctive 独特&有可重复性

判断 模板在边,角,还是内部外部 来找边缘


38-44!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


好的特性:
Invariance and covariance 旋转平移不变性

Edge detection 边缘特征

Definition of edge Discontinuity or abrupt change in the gray level or color. 在灰度或颜色上的不连续或突变
They may occur at any orientation 它们可能发生在任何方向
They may occur at many scales. 它们可能以多种规模出现
Types of edges
For most edge detection algorithms, the assumption is the “step edge” given below (as 1D profile) 屋顶形状
Others: Roof edge Bars or spike edges Ramp edges

Ideally, intensity edges in pictures are related to physical geometric boundaries. 理想情况下,图像中的强度边缘与物理几何边界有关。

Each edge element has properties

  1. Type of edge
  2. Amount of contrast
  3. Position
  4. Orientation
  5. Fuzziness/width/frequency content 

Start with step edges Two major approaches: Take first derivative and threshold the magnitude 对大小取一阶导数和阈值
Take second derivative and find the zero-crossing 求二阶导,求过零点

Characterizing edges 边缘描述 An edge is a place of rapid change in the image intensity function. 边缘是图像强度函数快速变化的地方

低通滤波就是边缘提取

Designing an edge detector 设计边缘检测算子 Criteria for a good edge detector: Good detection: the optimal detector should find all real edges, ignoring noise or other artifacts Good localization 1.the edges detected must be as close as possible to the true edges 2.the detector must return one point only for each true edge point Cues of edge detection Differences in color, intensity, or texture across the boundary
Continuity and closure
High-level knowledge

Canny edge detector

This is probably the most widely used edge detector in computer vision 这可能是计算机视觉中应用最广泛的边缘检测器
Theoretical model: step-edges corrupted by additive Gaussian noise 理论模型:加性高斯噪声对阶跃边缘的破坏
Define an objective function to optimize to obtain the best edge detection filter. 定义目标函数进行优化,得到最佳的边缘检测滤波器。
Objective function to optimize consists of three components: Good detection: There should be a low probability of failing to mark real edge points, and low probability of falsely marking nonedge points (Signal-to-noise ratio: SNR) Good localization. The points marked as edge points by the operator should be as close as possible to the center of the true edge. (Localization) Only one response to a single edge.

Canny边缘检测算法的处理流程
1.Filter image with x, y derivatives of Gaussian 2.Find magnitude and orientation of gradient 3.Non-maximum suppression: Thin multi-pixel wide “ridges” down to single pixel width 4.Thresholding and linking (hysteresis): Define two thresholds: low and high Use the high threshold to start edge curves and the low threshold to continue them Canny边缘检测算法可以分为以下5个步骤:
1)使用高斯滤波器,以平滑图像,滤除噪声。
2)计算图像中每个像素点的梯度强度和方向。
3)应用非极大值(Non-Maximum Suppression)抑制,以消除边缘检测带来的杂散响应。
4)应用双阈值(Double-Threshold)检测来确定真实的和潜在的边缘。
5)通过抑制孤立的弱边缘最终完成边缘检测

原理:Suppress all pixels which are not on a local maximum along the gradient direction. 沿边缘的垂直方向删除所有不在局部最大值上的像素(即:把厚的边缘变薄,取最深的一个像素)。

Line detection 线特征

Total least squares(完全最小二乘)

Instead of vertical distance to the line, use the perpendicular distance. If 𝑎^2+𝑏^2=1 then the distance between point (𝑥_𝑖,𝑦_𝑖) and the line is 𝑑_𝑖=|𝑎𝑥_𝑖+𝑏𝑦_𝑖+𝑐| i.e., substitute the coordinates (𝑥_𝑖,𝑦_𝑖) in the equation of the line.

Hough transform 霍夫变换

把图像由图像空间(xy坐标固定,ab是系数)转换到参数空间(𝜃𝜌固定) It maps contributions of points in image space to the parameter space. 它将图像空间中的点映射到参数空间。
If there is a lot of support from many points to one set of parameters 如果有很多支持从多个点到一组参数
then we have detected a related set of points 然后我们检测到一组相关的点
Requires a model (line in this case, but could also be other parameterized shapes) 需要一个模型(在本例中是直线,但也可以是其他参数化的形状)

Steps 用霍夫变换来检测直线

  1. Create a grid of parameter values
  2. Each point votes for a set of parameters, incrementing those values in grid
  3. Find maximum or local maxima in grid