请问您可以帮我介绍一下图像处理中使用的掩膜方法通常都有哪些具体的算法吗?谢谢您了
1个回答
展开全部
用选定的图像、图形或物体,对待处理的图像(全部或局部)进行遮挡,来控制图像处理的区域或处理过程。用于覆盖的特定图像或物体称为掩模或模板。光学图像处理中,掩模可以足胶片、滤光片等。数字图像处理中,掩模为二维矩阵数组,有时也用多值图像。数字图像处理中,图像掩模主要用于:①提取感兴趣区,用预先制作的感兴趣区掩模与待处理图像相乘,得到感兴趣区图像,感兴趣区内图像值保持不变,而区外图像值都为0。②屏蔽作用,用掩模对图像上某些区域作屏蔽,使其不参加处理或不参加处理参数的计算,或仅对屏蔽区作处理或统计。③结构特征提取,用相似性变量或图像匹配方法检测和提取图像中与掩模相似的结构特征。④特殊形状图像的制作。
'掩膜
'3x3
'邻域平均 全是1
'3x3高斯均值滤波器
'filters(0) = 1: filters(1) = 2: filters(2) = 1
'filters(3) = 2: filters(4) = 4: filters(5) = 2
'filters(6) = 1: filters(7) = 2: filters(8) = 1
'拉普拉斯1型滤波器 高通边缘检测器掩膜
'filters(0) = -1: filters(1) = 0: filters(2) = -1
'filters(3) = 0: filters(4) = 4: filters(5) = 0
'filters(6) = -1: filters(7) = 0: filters(8) = -1
'锐化 (中锐化:filters(4) = 5 , 高锐化:filters(4) = 6)
'filters(0) = 0: filters(1) = -1: filters(2) = 0
'filters(3) = -1: filters(4) = 6: filters(5) = -1
'filters(6) = 0: filters(7) = -1: filters(8) = 0
'--------------------------------------------
'垂直掩膜
'filters(0) = 3: filters(1) = -6: filters(2) = 3
'filters(3) = 3: filters(4) = -6: filters(5) = 3
'filters(6) = 3: filters(7) = -6: filters(8) = 3
'水平掩膜
'filters(0) = 3: filters(1) = 3: filters(2) = 3
'filters(3) = -6: filters(4) = -6: filters(5) = -6
'filters(6) = 3: filters(7) = 3: filters(8) = 3
'对角线掩膜
'filters(0) = 3: filters(1) = 3: filters(2) = -6
'filters(3) = 3: filters(4) = -6: filters(5) = 3
'filters(6) = -6: filters(7) = 3: filters(8) = 3
'高斯滤镜5x5
'f(0) = 1: f(1) = 4: f(2) = 6: f(3) = 4: f(4) = 1
'f(5) = 4: f(6) = 16: f(7) = 24: f(8) = 16: f(9) = 4
'f(10) = 6: f(11) = 24: f(12) = 36: f(13) = 24: f(14) = 6
'f(15) = 4: f(16) = 16: f(17) = 24: f(18) = 16: f(19) = 4
'f(20) = 1: f(21) = 4: f(22) = 6: f(23) = 4: f(24) = 1
'掩膜
'3x3
'邻域平均 全是1
'3x3高斯均值滤波器
'filters(0) = 1: filters(1) = 2: filters(2) = 1
'filters(3) = 2: filters(4) = 4: filters(5) = 2
'filters(6) = 1: filters(7) = 2: filters(8) = 1
'拉普拉斯1型滤波器 高通边缘检测器掩膜
'filters(0) = -1: filters(1) = 0: filters(2) = -1
'filters(3) = 0: filters(4) = 4: filters(5) = 0
'filters(6) = -1: filters(7) = 0: filters(8) = -1
'锐化 (中锐化:filters(4) = 5 , 高锐化:filters(4) = 6)
'filters(0) = 0: filters(1) = -1: filters(2) = 0
'filters(3) = -1: filters(4) = 6: filters(5) = -1
'filters(6) = 0: filters(7) = -1: filters(8) = 0
'--------------------------------------------
'垂直掩膜
'filters(0) = 3: filters(1) = -6: filters(2) = 3
'filters(3) = 3: filters(4) = -6: filters(5) = 3
'filters(6) = 3: filters(7) = -6: filters(8) = 3
'水平掩膜
'filters(0) = 3: filters(1) = 3: filters(2) = 3
'filters(3) = -6: filters(4) = -6: filters(5) = -6
'filters(6) = 3: filters(7) = 3: filters(8) = 3
'对角线掩膜
'filters(0) = 3: filters(1) = 3: filters(2) = -6
'filters(3) = 3: filters(4) = -6: filters(5) = 3
'filters(6) = -6: filters(7) = 3: filters(8) = 3
'高斯滤镜5x5
'f(0) = 1: f(1) = 4: f(2) = 6: f(3) = 4: f(4) = 1
'f(5) = 4: f(6) = 16: f(7) = 24: f(8) = 16: f(9) = 4
'f(10) = 6: f(11) = 24: f(12) = 36: f(13) = 24: f(14) = 6
'f(15) = 4: f(16) = 16: f(17) = 24: f(18) = 16: f(19) = 4
'f(20) = 1: f(21) = 4: f(22) = 6: f(23) = 4: f(24) = 1
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询