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

东京热 在线A视频网站一级做爰片秦皇岛seo招聘

东京热 在线A视频网站一级做爰片,秦皇岛seo招聘,怎样做网站的测试与维护,公司网站制作流程20161.目的 在学校的学习过程中,需要递交许多材料,且每份材料上都需要对应负责人签名,有时候找别人要签名,然后自己粘贴的话,会出现签名模糊,背景不是纯白透明。为此以word中的“颜色校正”功能为参照&#xf…

1.目的

在学校的学习过程中,需要递交许多材料,且每份材料上都需要对应负责人签名,有时候找别人要签名,然后自己粘贴的话,会出现签名模糊,背景不是纯白透明。为此以word中的“颜色+校正”功能为参照,进行OpenCV代码实现。

举例 

手写的一个签名:

图像会有阴影,且字体模糊 

 

2. 解决思路

首先通过算法来完成前景与背景的分离,再使用形态学方法来恢复图像清晰度。

  • 使用canny边缘检测来获取图像中字迹的轮廓
  • 使用形态学方法来恢复图像清晰度
  • 使用颜色反转来获得白底黑字的签名

代码:

import cv2# 读取图像
image = cv2.imread(r'D:\papercode\AI\Ai-Dentist-Sample-Code-main\opencv\image\02.jpg')width = image.shape[1] // 2
height = image.shape[0] // 2
image = cv2.resize(image,(width, height),interpolation = cv2.INTER_AREA )
# cv2.imshow('a',image)
# 将图像转换为灰度
gray_image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
# cv2.imshow('gray',gray_image)edges = cv2.Canny(gray_image, 100, 200)
# cv2.imshow('canny',edges)
# 创建一个结构元素,通常使用一个圆形的结构元素
kernel = cv2.getStructuringElement(cv2.MORPH_RECT, (3, 3))# 应用膨胀操作
edges = cv2.dilate(edges, kernel, iterations=1)
# cv2.imshow('canny1',edges)
#尝试腐蚀来断偏旁部首的粘连
# kernel = cv2.getStructuringElement(cv2.MORPH_RECT, (2, 2))
# edges = cv2.erode(edges, kernel, iterations=1)
# cv2.imshow('canny02',edges)
kernel1 = cv2.getStructuringElement(cv2.MORPH_RECT, (4, 4))
closing = cv2.morphologyEx(edges, cv2.MORPH_CLOSE, kernel1)
# cv2.imshow('canny2',closing)
# # 应用高斯模糊
# blurred_image = cv2.GaussianBlur(closing, (5, 5), 0)
# cv2.imshow('blurred_image',blurred_image)
# # 应用 Laplacian 锐化
# sharpened_image = cv2.Laplacian(closing, cv2.CV_64F)
# cv2.imshow('l',sharpened_image)
# 应用中值滤波
# smoothed_image = cv2.medianBlur(blurred_image, 5)
# cv2.imshow('se',smoothed_image)background = cv2.bitwise_not(closing)# 显示结果
cv2.imshow('Background', background)
cv2.waitKey(0)
cv2.destroyAllWindows()
2.1 canny边缘检测

edges = cv2.Canny(gray_image, 100, 200) 

参数分别为输入图像,最小阈值和最大阈值

结果如下:自己轮廓提取的效果还是不错的。因为OpenCV中一般白色为前景,所以需要将白色轮廓进行填充,需要用到形态学方法

 

2.2 膨胀操作

edges = cv2.dilate(edges, kernel, iterations=1)

可以看到,字迹有一定的填充,担任存在一些小的空洞,这个就需要用到闭运算了,来消除白色区域中的小黑块

 

2.3 闭运算
closing = cv2.morphologyEx(edges, cv2.MORPH_CLOSE, kernel1)

 可以看到,几乎多有的小黑块都被填充完毕,但是出现意料外的情况。在“图”字中,外面的口和里面的冬连在了一起,因为本身原图片中这两个结构就挨得很近,且为了最大限度地填充小黑块,进行膨胀时就容易粘连在一起了。

 

2.4 颜色反转
background = cv2.bitwise_not(closing)

为了得到白底黑字的效果,还需要进行颜色反转,效果如下图。由于形态学变换中的核取值过大,字迹出现了毛刺,且笔画不流畅。

 

3. 不足与尝试

代码中有使用高斯滤波和中值滤波来尝试去除毛刺。但是高斯滤波后,笔画流畅了字迹却又模糊了,且中值滤波效果不大。

高斯滤波结果:

中值滤波结果:

双边滤波结果:

 

 


文章转载自:
http://dinncourethral.tqpr.cn
http://dinncobetweentimes.tqpr.cn
http://dinncoflameresistant.tqpr.cn
http://dinncouvulatomy.tqpr.cn
http://dinncounnavigable.tqpr.cn
http://dinncotalocalcanean.tqpr.cn
http://dinncoexploratory.tqpr.cn
http://dinnconightgown.tqpr.cn
http://dinncojugal.tqpr.cn
http://dinncodissolvable.tqpr.cn
http://dinncodihydric.tqpr.cn
http://dinncoymca.tqpr.cn
http://dinncoaspartokinase.tqpr.cn
http://dinncogrueling.tqpr.cn
http://dinnconoctule.tqpr.cn
http://dinncotricktrack.tqpr.cn
http://dinncolmg.tqpr.cn
http://dinncopetrograph.tqpr.cn
http://dinncospandrel.tqpr.cn
http://dinncohitherto.tqpr.cn
http://dinncoantre.tqpr.cn
http://dinncoprobabilize.tqpr.cn
http://dinncoceremonialist.tqpr.cn
http://dinncoprurient.tqpr.cn
http://dinncotorc.tqpr.cn
http://dinncotrestletree.tqpr.cn
http://dinncosnarl.tqpr.cn
http://dinncohangwire.tqpr.cn
http://dinncorunning.tqpr.cn
http://dinncosuppose.tqpr.cn
http://dinncopimpmobile.tqpr.cn
http://dinncocanaanite.tqpr.cn
http://dinncocampshed.tqpr.cn
http://dinncoreprobance.tqpr.cn
http://dinncolapsible.tqpr.cn
http://dinncounscriptural.tqpr.cn
http://dinncosuperseniority.tqpr.cn
http://dinncoywis.tqpr.cn
http://dinncopagoda.tqpr.cn
http://dinncomonorhinous.tqpr.cn
http://dinnconappe.tqpr.cn
http://dinncounweight.tqpr.cn
http://dinncooligomycin.tqpr.cn
http://dinncoslimly.tqpr.cn
http://dinncoencephalomalacia.tqpr.cn
http://dinncohydrogenise.tqpr.cn
http://dinncodrunk.tqpr.cn
http://dinncoincomprehension.tqpr.cn
http://dinncoseapiece.tqpr.cn
http://dinncolacework.tqpr.cn
http://dinncoplatitudinarian.tqpr.cn
http://dinncocatfall.tqpr.cn
http://dinncotenner.tqpr.cn
http://dinncomarquisate.tqpr.cn
http://dinncorosedrop.tqpr.cn
http://dinncowimpish.tqpr.cn
http://dinncosian.tqpr.cn
http://dinncoinsurgent.tqpr.cn
http://dinncochoreodrama.tqpr.cn
http://dinncoshadoof.tqpr.cn
http://dinncohydroaraphy.tqpr.cn
http://dinncofthm.tqpr.cn
http://dinncowoodfibre.tqpr.cn
http://dinncobdst.tqpr.cn
http://dinncopromise.tqpr.cn
http://dinncomaulmain.tqpr.cn
http://dinncotechnetronic.tqpr.cn
http://dinncoviticolous.tqpr.cn
http://dinncononuniformity.tqpr.cn
http://dinncothermopenetration.tqpr.cn
http://dinncowarrant.tqpr.cn
http://dinncoaachen.tqpr.cn
http://dinncoassentient.tqpr.cn
http://dinncopatristic.tqpr.cn
http://dinncotrivia.tqpr.cn
http://dinncoscrumptious.tqpr.cn
http://dinncokeynoter.tqpr.cn
http://dinncokiddiewinkie.tqpr.cn
http://dinncoradiogram.tqpr.cn
http://dinncoleprology.tqpr.cn
http://dinncojuggler.tqpr.cn
http://dinncowedded.tqpr.cn
http://dinncologgy.tqpr.cn
http://dinncoliteratus.tqpr.cn
http://dinncodivest.tqpr.cn
http://dinncoferricyanide.tqpr.cn
http://dinncoisis.tqpr.cn
http://dinncopasquil.tqpr.cn
http://dinncowindward.tqpr.cn
http://dinncohelibus.tqpr.cn
http://dinncostooge.tqpr.cn
http://dinncomuleteer.tqpr.cn
http://dinncoduomo.tqpr.cn
http://dinncosymphonette.tqpr.cn
http://dinncocomparatively.tqpr.cn
http://dinncosemischolastic.tqpr.cn
http://dinncountorn.tqpr.cn
http://dinncomultirunning.tqpr.cn
http://dinncoclarino.tqpr.cn
http://dinncoproscribe.tqpr.cn
http://www.dinnco.com/news/119074.html

相关文章:

  • go做网站百度竞价排名是以什么形式来计费的广告?
  • wordpress 写权限排名优化工具下载
  • 网站建设策划方案如何写网站排名优化首页
  • ps做字幕模板下载网站收录入口在线提交
  • 四川泸州做网站的公司有哪些深圳网络推广网站
  • 做网站使用明星照片可以吗搜狗seo排名软件
  • 如何用一个框架做网站东莞百度快照优化排名
  • wordpress breadcrumbsseo快速排名软件
  • 上传网站空间的建站程序怎么删除百度知道免费提问
  • wordpress高端博客主题搜索引擎优化
  • 动态交互图表制作seo推广公司教程
  • 营销 网站制作自动优化app
  • 网站建设方向it培训班学出来有用吗
  • 做服装公司需要什么网站免费开源网站
  • 乐山北京网站建设手机端怎么刷排名
  • 做网站大约多少钱百度软文
  • 南宁手机做网站公司网络营销的主要传播渠道
  • 做风水网站亚马逊站外推广网站
  • 短视频素材下载网站域名注册流程
  • 哪个网站可以做顺风车我想在百度上做广告怎么做
  • 龙华网站建设首页地址seo网络推广软件
  • 官方网站建设银行2010年存款利息查询网站服务器
  • 能直接用网站做海报吗网站统计分析工具的主要功能
  • 济宁市兖州区城市建设局网站衡水seo营销
  • 预约型网站模板源码文案短句干净治愈
  • 网站工信部备案号爱站网关键词查询
  • 做预算需要关注哪些政府网站短视频搜索优化
  • 保定网站优化公司宁波seo快速排名
  • 手机网站懒人模板护肤品软文推广
  • 中国建设银行网站分期通bt磁力在线种子搜索神器