当前位置:文档之家› 数字图像处理-第七章2014

数字图像处理-第七章2014


( yi m xi c) E N i
Using:
2
yi mxi c x
E 0 & m
Note:
E 0 c
( x x)( y y) m ( x x)
i i i 2 i
y
y
i
i
N
x
x
i
c y m x
i
i
N
7.2.3 Curve Fitting
How to extract the contours of the pears according to this result?
Zero crossing points often occur at `edges' in images -- i.e. points where the intensity of the image changes rapidly, but they also occur at places that are not as easy to associate with edges. It is best to think of the zero crossing detector as some sort of feature detector rather than as a specific edge detector.
7.1.2 二阶边缘检测算子 Laplacian Edge Detection
? f ( x, y)
2 2 2 抖 f ( x, y) + 2 f ( x, y) 2 抖 x y
edge
First derivative Zerocrossing Second derivative
If a noise-free image has sharp edges, the Laplacian can produce closed, connected contours by a threshold. When noises existing, a lowpass filtering is required. Laplacian of Gaussian (LOG)
Gaussian kernel with standard deviation 1.0 and upper and lower thresholds of 128 and 1.
尺度问题
7X7高斯滤波模板
13X13高斯滤波模板
问题思考: 增加高斯核尺度会对边缘梯度强度有什么作用?这意味着当这个尺度增加时必须对跟踪器 的阈值做出什么改变?
•输出二值化的图像,判断为边缘的像素为1,其它为0。
•基本步骤:
滤波: 改善与噪声有关的边缘检测器的性能; 一般滤波器降导致了边缘的损失; 增强边缘和降低噪声之间需要折衷。 边缘计算函数: 将邻域强度值有显著变化的点突显出来。一阶或二阶变化。 检测: 一阶或二阶阈值。 (二阶阈值可子像素分辨率上估计)。
Direct gradient threshold = 54
No closing boundary
Post-processing needed
Comparison with watershed result
Boundary by marker-controlled watershed
Roberts和Sobel的比较
(a) Ront
Canny 算子:
•The Canny operator was designed to be an optimal edge detector :根据对信噪比与定位乘积进行测度得到 最优化逼近算子。
Canny 算子:
(1)图像与高斯平滑滤波器卷积; (2)计算梯度幅值和相角; (3)非极大值抑制non-maximal suppression (NMS ) : 细化幅值图像中的屋脊带,即只保留幅值局部变化最大的 点.保证单像素边缘。 (4)双域值提取边缘:取高低两个阈值作用在幅值图, t1=2t2,得到两个边缘图, 高阈值和低阈值边缘图。跟踪高 阈值边缘图,出现断点时,在低阈值边缘图中的8邻域中搜寻 边缘下一边缘点。
7.2.1 Divide and Conquer
Given: Boundary lies between points A and B
Task: Find Boundary
• Connect A and B with Line
• Find strongest edge along line bisector
2 2 sx sy
梯度幅值双阈值
2 2 Gx Gy
arctan (Gy / Gx )
Gx= -1 1 -1 1
Gy= 1 1 -1 -1
7.1.1 常见的一阶边缘检测算子
Gradient: The derivative to x and y directions
Gradient image
Find Polynomial:
h ( x, y ) = =[
2
2
[ g ( x, y )* f ( x, y)]
g ( x, y )]* f ( x, y)
where ? 2 g ( x, y )
2 2 2 骣 x + y 2 s ÷ ç ÷ e ç 4 ÷ ç ÷ s 桫
x2 + y 2 2s 2
LOG with threshold of 0
• Use edge point as break point
• Repeat
7.2.2 Line fitting (Least Squares)
Given: Many
( xi , yi )
pairs
y
Find: Parameters
(m, c)
( xi , yi )
y mx c
Minimize: Average square distance:
边缘检测的困难:尺度问题 边缘的类型:阶跃式、屋脊式,选择怎样的算子?或 者比较一下两种形式下各个算子的计算结果(考试题 目)
7.3 Curve fitting (Model fitting)
• 思想:用某个解析函数如分段线性或高阶 样条曲线来拟合边缘。称为边缘拟合。无 论边缘点是连续的还是稀疏的。 • 方法:常根据图象一小块区域来建立拟合 模型。 • 常用方法有:
7 Geometric feature detection and description
7.1 Edge Detection
7.2 Curve Fitting 7.3 Shape Description
edge
First derivative
Second derivative
7.1 Edge Detection
•Usually, the upper tracking threshold can be set quite high, and the lower threshold quite low for good results. Setting the lower threshold too high will cause noisy edges to break up. Setting the upper threshold too low increases the number of spurious and undesirable edge fragments appearing in the output. •One problem with the basic Canny operator is to do with Yjunctions i.e. places where three ridges meet in the gradient magnitude image. Such junctions can occur where an edge is partially occluded by another object. The tracker will treat two of the ridges as a single line segment, and the third one as a line that approaches, but doesn't quite connect to, that line segment.
•The simplest is to simply threshold the LoG output at zero, to produce a binary image where the boundaries between foreground and background regions represent the locations of zero crossing points. To locate all boundary points, we simply have to mark each foreground point that has at least one background neighbor. •The problem with this technique is that will tend to bias the location of the zero crossing edge to either the light side of the edge, or the dark side of the edge, depending on whether it is decided to look for the edges of foreground regions or for the edges of background regions. •A better technique is to consider points on both sides of the threshold boundary, and choose the one with the lowest absolute magnitude of the Laplacian, which will hopefully be closest to the zero crossing. •A more accurate approach is to perform some kind of interpolation to estimate the position of the zero crossing to sub-pixel precision.
相关主题