中国高校课件下载中心 》 教学资源 》 大学文库

《数字图像处理》课程教学课件(Digital Image Processing)灰度变换与空间滤波 3.3 空间滤波 Fundamentals of spatial filtering

文档信息
资源类别:文库
文档格式:PDF
文档页数:30
文件大小:1.24MB
团购合买:点击进入团购
内容简介
《数字图像处理》课程教学课件(Digital Image Processing)灰度变换与空间滤波 3.3 空间滤波 Fundamentals of spatial filtering
刷新页面文档预览

3 Image Enhancement 3.Intensity transformations spatial filtering Background Some basic intensity transformation Histogram-based image enhancement Fundamentals of spatial filtering Smoothing spatial filters Sharpen spatial filters 第3章第1页

3 Image Enhancement 第3章 第1页 3. Intensity transformations & spatial filtering  Background  Some basic intensity transformation  Histogram-based image enhancement  Fundamentals of spatial filtering  Smoothing spatial filters  Sharpen spatial filters

3 Image Enhancement 3.4 Fundamentals of spatial filtering >Spatial filters vs.frequency filters 1)one-to-one correspondence in many cases 2)Spatial filters offer considerably more versatility because they can be used also for nonlinear filtering,something we cannot do in the frequency domain 第3章第2页

3 Image Enhancement 第3章 第2页 3.4 Fundamentals of spatial filtering Spatial filters vs. frequency filters 1) one-to-one correspondence in many cases 2) Spatial filters offer considerably more versatility because they can be used also for nonlinear filtering, something we cannot do in the frequency domain

3 Image Enhancement 3.4 Fundamentals of spatial filtering Filter(滤波器) Mask(掩模) Kernel(核) Template(模板) Window(窗口) .y g(x,y)=1(-1,-1)f(x-1y-1)+w(-1,0)f(x-1,y)+.+w(0,0)f(x,y)+.+(1,0)f(x+1y)+w1,1)fx+1,y+1)

3 Image Enhancement 3.4 Fundamentals of spatial filtering Filter (滤波器) Mask (掩模) Kernel (核) Template (模板) Window (窗口) g x y w f x y w f x y w f x y w f x y w f x y ( , ) ( 1, 1) ( 1, 1) ( 1,0) ( 1, ) ... (0,0) ( , ) ... (1,0                 ) ( 1, ) (1,1) ( 1, 1)

3 Image Enhancement 3.4 Fundamentals of spatial filtering The general form of linear filtering 给定输入图像f(x,y),和尺寸为mxn的模板w(i,),则 滤波后的输出图像g(x,y)为: gx,)=2立s0fx+s,y+0 S=-at=-b m-1 b=n-1 其中: a= 2) 2 m和n通常取奇数,为什么?

3 Image Enhancement 3.4 Fundamentals of spatial filtering  The general form of linear filtering 给定输入图像f(x,y),和尺寸为mn的模板w(i,j), 则 滤波后的输出图像g(x,y)为: ( , ) ( , ) ( , ) s a b s a t b g x y w s t f x s y t        1 2 m a   1 2 n b   m和n通常取奇数,为什么? 其中: ,

3 lmage Enhancement 3.4 Fundamentals of spatial filtering 如何处理卷积滤波的边界问题? 3x3 mask 8x8 image 第3章第5页

3 Image Enhancement 第3章 第5页 如何处理卷积滤波的边界问题? 33 mask 88 image 3.4 Fundamentals of spatial filtering

3 Image Enhancement 3.4 Fundamentals of spatial filtering 处理边界问题的三种方法 ①丢弃法:对边界部分不予处理,只对距离 边界大于(n-1)/2的像素滤波.滤波后的图 像比原始图像小. ②局部法:对边界部分用模板的重叠区 域滤波,滤波后的图像与原始图像大 小相等 ③ 延拓法:把图像向外延拓几个像素后, 再滤波 第3章第6页

3 Image Enhancement 第3章 第6页 处理边界问题的三种方法 ① 丢弃法:对边界部分不予处理, 只对距离 边界大于(n-1)/2的像素滤波. 滤波后的图 像比原始图像小. ② 局部法: 对边界部分用模板的重叠区 域滤波, 滤波后的图像与原始图像大 小相等 ③ 延拓法:把图像向外延拓几个像素后, 再滤波 3.4 Fundamentals of spatial filtering

3 lmage Enhancement 3.4.2空间的相关和卷积 相关和卷积的关系: 卷积 Correlation Convolution 一维情况: Origin w rotated180° (a)00010000 12328 6.0。o6。 82321 (i) (b) 0010000 00010000 (j) 12328 82321 Starting position alignment Zero padding (c)000000010000000d 0000000100000000(k) 12328 82321 (d)0000000100000000 0000000100000000(1) 相关 12328 82321 Position after one shift (e)0000000100000000 0000000100000000(m) }2328 82321 -Position after four shifts (D0000000100000000 000.0000100000000(n) Final position2 3 82321 Full correlation result Full convolution result (g) 000823210000 0001232=80000 (o) Cropped correlation result Cropped convolution result (h) 08232100 01232800 (p) FIGURE 3.29 Illustration of 1-D correlation and convolution of a filter with a discrete unit impulse.Note that correlation and convolution are functions of displacement

3 Image Enhancement 第3章 第7页 3.4.2空间的相关和卷积  相关和卷积的关系: 一维情况: 相关 卷积

3 Image Enhancement 3.4.2空间的相关和卷积 相关和卷积的关系: 一维情况: 相关:,=∑kn+个 卷积:*川=立n-个 任意一个函数和冲激函数的相关相当于“复制”冲激位 置上此函数的反转“版本” 为执行卷积,需先把参加运算的一个函数旋转180°,然 后再执行相关中的相同操作

3 Image Enhancement 3.4.2空间的相关和卷积  相关和卷积的关系: 一维情况: 相关: [ ] [ ] [ ] xy k r n x k y n k      卷积: [ ] [ ] [ ] [ ] k x n y n x k y n k       为执行卷积,需先把参加运算的一个函数旋转180o,然 后再执行相关中的相同操作。 任意一个函数和冲激函数的相关相当于“复制”冲激位 置上此函数的反转“版本

3 Image Enhancement 3.4.2空间的相关和卷积 Padded f 0 0 相关和卷积: 0 -Origin f(x,y) 00000 0010 0 二维情况: 00000 w(x.y) 0 000010 0 00100 123 00L-0--00 00000 456000000000 相关: 00000 789000000000 (a) (b) Initial position forw Full correlation result Cropped correlation result 11 23000000 00000000000000 (x,y)☆f(x,y)=(3.4-1) 14 56000000 00000000009870 17_8_9000000 00000000006540 000000000 00098700003210 ,)f+sy+0 00001000000065400000000 000000000000321000 000000000000000000 000000000000000000 卷积: 000000000000000000 (c) (d) (e) Rotated w Full convolution result Cropped convolution result 0 87元000000 00000000000000 (x,y)★f(x,y)=(3.4-2) 5 4000000 00000000001230 21000000 00000000004560 之2,-y-0 0000000000012300007890 0001000000045600000000 000000000000789000 000000000000000000 000000000000000000 图3.30 000000000000000000 (g) (h)

3 Image Enhancement 3.4.2空间的相关和卷积  相关和卷积: 二维情况: 图3.30 ( , ) ( , ) (3.4 1) ( , ) ( , ) a b s a t b x y f x y w s t f x s y t         ☆ ( , ) ( , ) (3.4 2) ( , ) ( , ) a b s a t b x y f x y w s t f x s y t         ★ 相关: 卷积:

3 Image Enhancement 3.5 Smoothing spatial filtering >The goal of smoothing spatial filtering 1) Input输入 平滑滤波器(smoothing) 输出 原始图像 (去噪,noise reduction) 增强图像 2) Input输入 平滑滤波器(smoothing) 输出 阈值化 原始图像 (模糊,blurring 增强图像 弱化小物体) (Thresholding) (强化大物体) 类似图像分割

3 Image Enhancement The goal of smoothing spatial filtering 1) Input输入 原始图像 输出 增强图像 平滑滤波器(smoothing) (去噪,noise reduction) Input输入 原始图像 输出 增强图像 (强化大物体) 平滑滤波器(smoothing) (模糊,blurring 弱化小物体) 阈值化 (Thresholding) 2) 类似图像分割 3.5 Smoothing spatial filtering

共30页,试读已结束,阅读完整版请下载
刷新页面下载完整文档
VIP每日下载上限内不扣除下载券和下载次数;
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
相关文档