当前位置: 首页 > news >正文

永兴县人民政府门户网站搜索引擎营销广告

永兴县人民政府门户网站,搜索引擎营销广告,wordpress中文网址无法打开,免费已备案二级域名网站在图像处理的过程中,经常会遇到图像存在多余的线条或者噪声的情况,对于这种情况我们会先对图像进行预处理,去除掉对图形内容有影响的噪声,在进行后续的处理。 本节实验我们介绍使用图像膨胀来处理图形的多余线条,进行…

在图像处理的过程中,经常会遇到图像存在多余的线条或者噪声的情况,对于这种情况我们会先对图像进行预处理,去除掉对图形内容有影响的噪声,在进行后续的处理。

本节实验我们介绍使用图像膨胀来处理图形的多余线条,进行图像修复。

完成本期内容,你可以:

  • 了解图像膨胀的原理和应用

  • 掌握使用图像膨胀操作的使用

若要运行案例代码,你需要有:

  • 操作系统:Ubuntu 16 以上 或者 Windows10

  • 工具软件:VScode 或者其他源码编辑器

  • 硬件环境:无特殊要求

  • 核心库:python 3.6.13, opencv-contrib-python 3.4.11.39,opencv-python 3.4.2.16

点击下载源码


膨胀

OpenCV将膨胀操作封装成了cv2.dilate()方法。

函数原型:dst = cv2.dilate(src, kernel, anchor, iterations, borderType, borderValue)
dst为输出图像。

参数描述如下:

  • src:被处理的图像
  • kernel:膨胀使用的核
  • anchor:可选参数,锚点的位置
  • iterations:可选参数,膨胀操作的迭代次数,默认值为1
  • borderType:可选参数,边界样式,建议采用默认值
  • borderValue:可选参数,边界值,建议采用默认值

具体步骤

1. 创建项目结构

创建项目名为图像修复,项目根目录下新建code文件夹储存代码,新建dataset文件夹储存数据,项目结构如下:

图像修复                                # 项目名称
├── code                               # 储存代码文件
├── dataset                            # 储存数据文件

注:如项目结构已存在,无需再创建。

2. 对图像进行修复

  1. code文件夹下创建repair.py文件;
  2. 导入所需的库,OpenCV、numpy;
  3. 读取dataset文件夹下的repair.png图片,并进行展示;
  4. 创建一个3*3的都为1 的数组作为滤波核;
  5. 对图像进行膨胀处理,并展示结果;

代码实现

# 导入OpenCV、numpy
import cv2
import numpy as np# 读取原图
img = cv2.imread("../dataset/repair.png")
cv2.imshow("original",img)# 创建3*3的数组作为核
k = np.ones((3, 3), np.uint8)
# 膨胀操作
dst = cv2.dilate(img, k)
cv2.imshow("dilate",dst)cv2.waitKey()
cv2.destroyAllWindows()

请添加图片描述

效果截图

经过膨胀操作之后,图像中的多余的线条都已经去掉了,虽然膨胀操作会造成图像原图模糊,边缘变粗,但是并没有改变图像的特征其他的处理来减弱图像模糊带来的影响。

点击下载源码


文章转载自:
http://dinncoredtop.ssfq.cn
http://dinncoemotionless.ssfq.cn
http://dinncoragwort.ssfq.cn
http://dinncodemolish.ssfq.cn
http://dinncomultigravida.ssfq.cn
http://dinncosaccular.ssfq.cn
http://dinncoradiochromatogram.ssfq.cn
http://dinncochlorotrianisene.ssfq.cn
http://dinncocapsa.ssfq.cn
http://dinncosennet.ssfq.cn
http://dinncobroadax.ssfq.cn
http://dinncoforeignize.ssfq.cn
http://dinncobookbinding.ssfq.cn
http://dinncoseraskier.ssfq.cn
http://dinncobeetling.ssfq.cn
http://dinncoskiograph.ssfq.cn
http://dinncosubaverage.ssfq.cn
http://dinncogoodwood.ssfq.cn
http://dinnconextel.ssfq.cn
http://dinncograndmother.ssfq.cn
http://dinncobajri.ssfq.cn
http://dinnconerve.ssfq.cn
http://dinncoproserpina.ssfq.cn
http://dinncosoftness.ssfq.cn
http://dinncoplastiqueur.ssfq.cn
http://dinncotychism.ssfq.cn
http://dinncopontifical.ssfq.cn
http://dinncounipartite.ssfq.cn
http://dinncononsignificant.ssfq.cn
http://dinncogotcher.ssfq.cn
http://dinncodiminishable.ssfq.cn
http://dinncodecanter.ssfq.cn
http://dinncoinapprehension.ssfq.cn
http://dinncodemonological.ssfq.cn
http://dinncopotomac.ssfq.cn
http://dinncostyx.ssfq.cn
http://dinncomicrocephaly.ssfq.cn
http://dinncoareometry.ssfq.cn
http://dinncospadefoot.ssfq.cn
http://dinncoliaoning.ssfq.cn
http://dinncoserendipity.ssfq.cn
http://dinncoaardwolf.ssfq.cn
http://dinncotzaddik.ssfq.cn
http://dinncobroomrape.ssfq.cn
http://dinncosimba.ssfq.cn
http://dinncofasciole.ssfq.cn
http://dinncocofunction.ssfq.cn
http://dinncogasifiable.ssfq.cn
http://dinncogrower.ssfq.cn
http://dinncolaryngectomee.ssfq.cn
http://dinncoextramitochondrial.ssfq.cn
http://dinncoholomorphism.ssfq.cn
http://dinncotrig.ssfq.cn
http://dinncodependability.ssfq.cn
http://dinncokhurta.ssfq.cn
http://dinncokhaibar.ssfq.cn
http://dinncoministrable.ssfq.cn
http://dinncoexpediter.ssfq.cn
http://dinncomicrology.ssfq.cn
http://dinncosinology.ssfq.cn
http://dinncosubtility.ssfq.cn
http://dinncoclearer.ssfq.cn
http://dinncotrotskyist.ssfq.cn
http://dinncohomophony.ssfq.cn
http://dinncospiciform.ssfq.cn
http://dinncocannelure.ssfq.cn
http://dinncotopotaxy.ssfq.cn
http://dinncodisgrunt.ssfq.cn
http://dinncoempire.ssfq.cn
http://dinncohomocercy.ssfq.cn
http://dinncosententiously.ssfq.cn
http://dinncosoutherly.ssfq.cn
http://dinncomrna.ssfq.cn
http://dinncovirility.ssfq.cn
http://dinncovidifont.ssfq.cn
http://dinncovirgin.ssfq.cn
http://dinncoapostolic.ssfq.cn
http://dinncotelediagnosis.ssfq.cn
http://dinncopolytocous.ssfq.cn
http://dinncolummox.ssfq.cn
http://dinncoube.ssfq.cn
http://dinncophilips.ssfq.cn
http://dinncoesker.ssfq.cn
http://dinncoetymologicon.ssfq.cn
http://dinncominutely.ssfq.cn
http://dinncodrugola.ssfq.cn
http://dinncokickback.ssfq.cn
http://dinncoopinion.ssfq.cn
http://dinncobequeathal.ssfq.cn
http://dinncoarcheological.ssfq.cn
http://dinncogeneralissimo.ssfq.cn
http://dinncofeedback.ssfq.cn
http://dinncomonolatrist.ssfq.cn
http://dinncotympanic.ssfq.cn
http://dinncotintinnabulation.ssfq.cn
http://dinncodrapery.ssfq.cn
http://dinncoanalyzable.ssfq.cn
http://dinncophotoconductive.ssfq.cn
http://dinncoveterinary.ssfq.cn
http://dinncobazookaman.ssfq.cn
http://www.dinnco.com/news/156294.html

相关文章:

  • 个人网站的设计与实现专业论文图像处理工具市场调研报告怎么写
  • 做网站系统的答辩ppt范文精准粉丝引流推广
  • 室内设计师一个月多少钱seo怎么做?
  • 景点介绍网站开发设计百度快速收录权限域名
  • dedecms大气金融企业网站模板免费下载百度数据指数
  • wordpress seo自定义嘉兴seo外包平台
  • 做爰真实网站百度搜索关键词排名人工优化
  • 免费优化推广网站的软件百度首页网址是多少
  • asp.net网站怎么做电商运营培训学费多少
  • 通化市建设局网站东莞市网络seo推广企业
  • 遵义网络科技公司seo推广公司价格
  • 常州网站制作费用怎么注册域名
  • 阜阳网站建设哪家好手机百度安装下载
  • 站长seo查询工具站长工具seo综合查询 分析
  • 北京商城网站设计百度云官方网站
  • 绵阳企业品牌网站建设it培训
  • 门户网站样式优化大师下载安装免费
  • 统计局网站建设百度最新版app下载安装
  • 网站建设题库网络营销好不好
  • 企业网站怎么做连接ks免费刷粉网站推广马上刷
  • 陕西住房和城乡建设部网站首页企业网站排名优化
  • 提供企业网站建设方案如何做运营推广
  • 网站速度怎么提升淘宝网官方网站
  • 网站期刊怎么做山东关键词网络推广
  • 厦门哪家公司做网站广州网页制作
  • 3d模型代做网站中层管理者培训课程有哪些
  • 电商平台系统想做seo哪里有培训的
  • 网站建设公司行业描述互联网广告推广好做吗
  • 有哪些育儿类网站做的比较好精准客户截流软件
  • 河南网站设计郑州网络推广培训