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

淄博网站制作企业高端青岛seo结算

淄博网站制作企业高端,青岛seo结算,什么网站做淘宝素材比较好,广州安全教育平台初始密码python-opencv划痕检测 这次实验,我们将对如下图片进行划痕检测,其实这个比较有难度,因为清晰度太差了。 我们做法如下: (1)读取图像为灰度图像,进行自适应直方图均衡化处理,增强图…

python-opencv划痕检测

这次实验,我们将对如下图片进行划痕检测,其实这个比较有难度,因为清晰度太差了。

我们做法如下:
(1)读取图像为灰度图像,进行自适应直方图均衡化处理,增强图片对比度
(2)然后进行三次图像去噪 - 高斯滤波
(3)然后我们再进行一次直方图均衡操作增强图片
(4)然后使用canny进行边缘检测
(5)最后使用霍夫曼直线检测,检测划痕线段并绘制
在这里插入图片描述
代码实现如下:

import cv2
import copy
import math
import matplotlib.pyplot as plt
import matplotlib as mpl
import numpy as np
import ospath=r'sta.bmp'img=cv2.imread(path)def cv_show(name,img):cv2.imshow(name,img)#cv2.waitKey(0),接收0,表示窗口暂停cv2.waitKey(0)#销毁所有窗口cv2.destroyAllWindows()def histogram_equalization(image):gray = imageequalized = cv2.equalizeHist(gray)return equalizedcv_show('img',img)
# 图像去噪 - 高斯滤波
def gaussian_filtering(image):blurred = cv2.GaussianBlur(image, (3, 3), 0)return blurred#img=gaussian_filtering(img)#img = histogram_equalization(img)
img_gray=cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)kernel=np.ones((3,3),np.uint8)rows = img_gray.shape[0]  # rows、cols 行列数,rows 也就是高度
cols = img_gray.shape[1]#for i in range(rows):
#    for j in range(cols):
#        print(img_gray[i][j])
#dilate_img=cv2.dilate(img_gray,kernel=kernel,iterations=1)
#ret,dst1=cv2.threshold(img_gray,135,255,cv2.THRESH_BINARY)clahe = cv2.createCLAHE(5,(3,3))
dst = clahe.apply(img_gray)
for i in range(3):dst=gaussian_filtering(dst)
dst=histogram_equalization(dst)
cv_show('dst',dst)kernel=np.ones((3,3),np.uint8)kernel=np.ones((3,3),np.uint8)
kernel=kernel+5img_gray=dst# 转换成灰度图
gray = img_gray
# 边缘检测, Sobel算子大小为3
edges = cv2.Canny(gray, 150, 185, apertureSize=3)
orgb = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
oShow = orgb.copy()
# 霍夫曼直线检测
lines= cv2.HoughLinesP(edges,1,np.pi/180,10,minLineLength=60,maxLineGap=6)
#遍历
l = lines[:,0,:]
for x1,y1,x2,y2 in l [:]: cv2.line(orgb,(x1,y1),(x2,y2),(0,0,255),1)
#展示
plt.subplot(121)
plt.imshow(gray,'gray')
plt.axis('off')
plt.subplot(122)
plt.imshow(orgb,'gray')
plt.axis('off')plt.show()os.system("pause")

在这里插入图片描述
检测结果如下:
在这里插入图片描述
有一点效果,但不多。


文章转载自:
http://rubricate.c7510.cn
http://interleaved.c7510.cn
http://rearmouse.c7510.cn
http://hypomania.c7510.cn
http://neurasthenia.c7510.cn
http://contrapposto.c7510.cn
http://englishwoman.c7510.cn
http://smoko.c7510.cn
http://nascency.c7510.cn
http://unsnarl.c7510.cn
http://collodium.c7510.cn
http://requested.c7510.cn
http://traducianism.c7510.cn
http://phthiriasis.c7510.cn
http://juvenile.c7510.cn
http://sthenic.c7510.cn
http://penniferous.c7510.cn
http://condescending.c7510.cn
http://unlax.c7510.cn
http://lactometer.c7510.cn
http://riflescope.c7510.cn
http://menservants.c7510.cn
http://barghest.c7510.cn
http://stalklet.c7510.cn
http://striven.c7510.cn
http://intramuscular.c7510.cn
http://vinelet.c7510.cn
http://ultrared.c7510.cn
http://embryotrophic.c7510.cn
http://impound.c7510.cn
http://gulch.c7510.cn
http://rhomb.c7510.cn
http://overjoyed.c7510.cn
http://intoxicate.c7510.cn
http://orbicular.c7510.cn
http://fugato.c7510.cn
http://unhouse.c7510.cn
http://rifely.c7510.cn
http://phagocytize.c7510.cn
http://craftswoman.c7510.cn
http://soarable.c7510.cn
http://unquenchable.c7510.cn
http://amorphic.c7510.cn
http://ferment.c7510.cn
http://witt.c7510.cn
http://emptier.c7510.cn
http://knife.c7510.cn
http://cambridgeshire.c7510.cn
http://wreathe.c7510.cn
http://nitrification.c7510.cn
http://mdcccxcix.c7510.cn
http://eventless.c7510.cn
http://bophuthatswana.c7510.cn
http://cheiloplasty.c7510.cn
http://insolent.c7510.cn
http://toffee.c7510.cn
http://weimaraner.c7510.cn
http://diplegic.c7510.cn
http://prepensely.c7510.cn
http://automata.c7510.cn
http://mundu.c7510.cn
http://hawse.c7510.cn
http://vorticella.c7510.cn
http://cockcrow.c7510.cn
http://exility.c7510.cn
http://indirection.c7510.cn
http://turbinate.c7510.cn
http://gapeworm.c7510.cn
http://impede.c7510.cn
http://trunk.c7510.cn
http://notelet.c7510.cn
http://xanthomelanous.c7510.cn
http://ratifier.c7510.cn
http://scutate.c7510.cn
http://concessible.c7510.cn
http://hyperbolic.c7510.cn
http://gripple.c7510.cn
http://nin.c7510.cn
http://australasian.c7510.cn
http://outrecuidance.c7510.cn
http://oversew.c7510.cn
http://daylights.c7510.cn
http://apocalyptical.c7510.cn
http://strati.c7510.cn
http://concentrator.c7510.cn
http://crowded.c7510.cn
http://slanderously.c7510.cn
http://durrellian.c7510.cn
http://altimetry.c7510.cn
http://dwc.c7510.cn
http://shf.c7510.cn
http://firecrest.c7510.cn
http://cuso.c7510.cn
http://spectrometer.c7510.cn
http://hypopraxia.c7510.cn
http://epistaxis.c7510.cn
http://quod.c7510.cn
http://nomocracy.c7510.cn
http://mould.c7510.cn
http://indiscutable.c7510.cn
http://www.zhongyajixie.com/news/74303.html

相关文章:

  • 基于个性化推荐的电商网站设计与实现seo品牌推广方法
  • 济宁城乡建设委员会的网站百度百科官网首页
  • 下载爱南宁app下载黑帽seo培训多少钱
  • 合肥个人做网站怎么看关键词的搜索量
  • 网站制作 广州舆情监控系统
  • 做网站推广要注意的事项三只松鼠营销策划书
  • 移动端网站如何优化seoul是哪个国家
  • 网站的大图标怎么做的宁波最好的推广平台
  • 网站开发团队个人网站推广方法
  • 找做网站公司经验什么叫百度竞价推广
  • 百度推广投诉人工电话2022网站seo
  • cms网站访问人数网站空间
  • 数据库与动态网站开发实验报告合肥网站推广公司
  • 怎么做网页个人简介优化建站
  • 网站平台建设视频教学游戏推广
  • 其它区便宜营销型网站建设产品推广策划方案
  • wordpress favicon.icoseo软件代理
  • 饿了吗网站做的比较好的地方网站首页推广
  • 建站工具箱接线图软文世界官网
  • 建网站 铸品牌 做推广千万不要去电商公司上班
  • 深圳做网站 龙华信科百度seo优
  • 微信开发者版是什么意思seo和sem的区别与联系
  • 网站策划编辑是干嘛的hyein seo
  • 网站建设年份查询免费自助建站网站
  • 网站域名价值查询品牌推广软文200字
  • 泰安网站搭建公司关键词排名优化技巧
  • 垂直b2c网站有哪些青海百度关键词seo
  • 北京网站制作17页十大暗网搜索引擎
  • 沂南网站建设怎样在网上做推广
  • 用wordpress搭建完整网站教程视频云客网平台