zoukankan      html  css  js  c++  java
  • 图像算法中掩膜的意义 (转)

    什么是掩膜(mask) -高斯核
    数字图像处理中的掩膜的概念是借鉴于PCB制版的过程,在半导体制造中,许多芯片工艺步骤采用光刻技术,用于这些步骤的图形“底片”称为掩膜(也称作“掩模”),其作用是:在硅片上选定的区域中对一个不透明的图形模板遮盖,继而下面的腐蚀或扩散将只影响选定的区域以外的区域。 
    图像掩膜与其类似,用选定的图像、图形或物体,对处理的图像(全部或局部)进行遮挡,来控制图像处理的区域或处理过程。 
    光学图像处理中,掩模可以是胶片、滤光片等。数字图像处理中,掩模为二维矩阵数组,有时也用多值图像。数字图像处理中,图像掩模主要用于:

    ①提取感兴趣区,用预先制作的感兴趣区掩模与待处理图像相乘,得到感兴趣区图像,感兴趣区内图像值保持不变,而区外图像值都为0。 
    ②屏蔽作用,用掩模对图像上某些区域作屏蔽,使其不参加处理或不参加处理参数的计算,或仅对屏蔽区作处理或统计。 
    ③结构特征提取,用相似性变量或图像匹配方法检测和提取图像中与掩模相似的结构特征。 
    ④特殊形状图像的制作。

    掩膜是一种图像滤镜的模板,实用掩膜经常处理的是遥感图像。当提取道路或者河流,或者房屋时,通过一个n*n的矩阵来对图像进行像素过滤,然后将我们需要的地物或者标志突出显示出来。这个矩阵就是一种掩膜。

    掩膜  
      '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 

  • 相关阅读:
    使用CustomValidate自定义验证控件
    C#中金额的大小写转换
    Andriod出错之Unable to build: the file dx.jar was not loaded from the SDK folder!
    VC 编写的打字练习
    机房工作笔记Ping只有单向通
    web服务协同学习笔记(1)
    Dll 学习3 将MDI子窗口封装在DLL中
    机房工作学习文件共享
    Andriod出错之Failed to find an AVD compatible with target 'Android 2.2'
    Andriod出错之wrapper was not properly loaded first
  • 原文地址:https://www.cnblogs.com/bile/p/7978083.html
Copyright © 2011-2022 走看看