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

网站开发商优化关键词排名的工具

网站开发商,优化关键词排名的工具,如何做网站霸屏,卖芒果的网络营销策划直方图 统计图像中相同像素点的数量。 使用cv2.calcHist(images, channels, mask, histSize, ranges)函数 images:原图像图像格式为uint8或float32,当传入函数时应用[]括起来,例如[img]。 channels:同样用中括号括起来&#xff…

直方图

统计图像中相同像素点的数量。
使用cv2.calcHist(images, channels, mask, histSize, ranges)函数

images:原图像图像格式为uint8或float32,当传入函数时应用[]括起来,例如[img]。
channels:同样用中括号括起来,告诉我们统幅图像的直方图,如果图像是灰度图就是[0],如果是彩色图可以是[0],[1],[2],分别对应BGR。
mask:掩膜图像,统幅图像使用None,若使用一部分需要自行制作。
histSize:BIN的数目,也要中括号。
ranges:像素值范围一般为[0,256]

灰度图

img = cv2.imread('deppb.jpg', 0)
show.cv_show('img', img)
hist = cv2.calcHist([img], [0], None, [256], [0, 256])
h1 = hist.shape
plt.hist(img.ravel(), 256)
plt.show()

灰度图
在这里插入图片描述
直方图
在这里插入图片描述

彩色图

img2 = cv2.imread('deppb.jpg')
show.cv_show('img2', img2)
color = ('b', 'g', 'r')
for i, col in enumerate(color):histr = cv2.calcHist([img2], [i], None, [256], [0, 256])plt.plot(histr, color=col)plt.xlim([0, 256])
plt.show()

彩色图
在这里插入图片描述
直方图
在这里插入图片描述
图为三通道的直方图

mask操作

mask,在指定区域置为255,其余区域置为0,与原图相与,最后得到指定区域的像素点个数统计,绘制直方图。

# 创建mask
show.cv_show('img2', img2)  # 原图
mask = np.zeros(img2.shape[:2], np.uint8)
print(mask.shape)
mask[200: 600, 100: 427] = 255
show.cv_show('mask', mask)  # mask图masked_img2 = cv2.bitwise_and(img2, img2, mask=mask)
show.cv_show('masked_img2', masked_img2)  # 原图与maskhist_full = cv2.calcHist([img2], [0], None, [256], [0, 256])
hist_mask = cv2.calcHist([img2], [0], mask, [256], [0, 256])
plt.plot(hist_full), plt.plot(hist_mask)  # [0]通道直方图对比
plt.show()

mask图
在这里插入图片描述
mask与原图相与
在这里插入图片描述
[0]通道直方图对比
在这里插入图片描述
蓝色为整体直方图,橙色为特定区域直方图。

均衡化

将一副图像的直方图分布通过累积分布函数变成近似均匀分布,从而增强图像的对比度。
在这里插入图片描述
根据像素点个数得到概率值,再算出累积概率类似于分布函数,再由累积概率映射出新的像素值,最后取整。

img3 = cv2.imread('deppb.jpg', 0)
plt.hist(img3.ravel(), 256)  # 原图直方图
plt.show()equ = cv2.equalizeHist(img3)
plt.hist(equ.ravel(), 256)  # 均衡化后直方图
plt.show()res = np.hstack((img3, equ))
show.cv_show('res', res)    # 图像对比

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
可以看到整体均衡化可能导致部分信息丢失。

自适应均衡化

其实是分区域进行均衡化,减少信息丢失。

clahe = cv2.createCLAHE(clipLimit=2.0, tileGridSize=(8, 8))  # 方法
res_clahe = clahe.apply(img3)
plt.hist(res_clahe.ravel(), 256)  # 自适应均衡化后直方图
plt.show()
res = np.hstack((img3, equ, res_clahe))     # 与原图和整体均衡化对比
show.cv_show('res', res)

自适应均衡化的直方图
在这里插入图片描述

对比图
在这里插入图片描述
可以看到对比度加强而且信息丢失得到改善。


文章转载自:
http://dinncoindependent.ssfq.cn
http://dinncoultra.ssfq.cn
http://dinncodextrorotation.ssfq.cn
http://dinncoallegedly.ssfq.cn
http://dinncoswath.ssfq.cn
http://dinncotannadar.ssfq.cn
http://dinncophotoduplicate.ssfq.cn
http://dinncobacilli.ssfq.cn
http://dinncolowlife.ssfq.cn
http://dinncopuncher.ssfq.cn
http://dinncosalwar.ssfq.cn
http://dinncosowback.ssfq.cn
http://dinncoaiblins.ssfq.cn
http://dinncoopponent.ssfq.cn
http://dinncoantianginal.ssfq.cn
http://dinncotimeless.ssfq.cn
http://dinncobrainchild.ssfq.cn
http://dinncogonadectomy.ssfq.cn
http://dinncotransoid.ssfq.cn
http://dinncopentlandite.ssfq.cn
http://dinncobanish.ssfq.cn
http://dinncohypercriticism.ssfq.cn
http://dinncorobinsonite.ssfq.cn
http://dinncosherwani.ssfq.cn
http://dinncobide.ssfq.cn
http://dinncoshinar.ssfq.cn
http://dinncoangiopathy.ssfq.cn
http://dinncorumbullion.ssfq.cn
http://dinncoknout.ssfq.cn
http://dinncoinstructional.ssfq.cn
http://dinncofeminality.ssfq.cn
http://dinncodunstan.ssfq.cn
http://dinncopercutaneous.ssfq.cn
http://dinncorecipients.ssfq.cn
http://dinncodurable.ssfq.cn
http://dinncoroofline.ssfq.cn
http://dinncoaffect.ssfq.cn
http://dinncoalb.ssfq.cn
http://dinncoplicate.ssfq.cn
http://dinncoprecentor.ssfq.cn
http://dinncogoogly.ssfq.cn
http://dinncovasectomize.ssfq.cn
http://dinncomoonpath.ssfq.cn
http://dinncoinjudicious.ssfq.cn
http://dinncoenchantress.ssfq.cn
http://dinncophellogen.ssfq.cn
http://dinncoloony.ssfq.cn
http://dinncodrudge.ssfq.cn
http://dinncohistography.ssfq.cn
http://dinncoparhelic.ssfq.cn
http://dinncocellist.ssfq.cn
http://dinncocontrolled.ssfq.cn
http://dinncoesophagoscopy.ssfq.cn
http://dinncopharmaceutic.ssfq.cn
http://dinncomantelpiece.ssfq.cn
http://dinncophytozoon.ssfq.cn
http://dinncoscratchbuild.ssfq.cn
http://dinncopraenomen.ssfq.cn
http://dinncoairship.ssfq.cn
http://dinncoturbidness.ssfq.cn
http://dinncounfathomable.ssfq.cn
http://dinncofilthify.ssfq.cn
http://dinncodrank.ssfq.cn
http://dinncoalkene.ssfq.cn
http://dinncosuitability.ssfq.cn
http://dinncoportative.ssfq.cn
http://dinncothermoreceptor.ssfq.cn
http://dinncoaccordionist.ssfq.cn
http://dinncowasheteria.ssfq.cn
http://dinncopontifices.ssfq.cn
http://dinncoministry.ssfq.cn
http://dinncoaeolis.ssfq.cn
http://dinncogeranium.ssfq.cn
http://dinncopayload.ssfq.cn
http://dinncotomorrer.ssfq.cn
http://dinncobarbacan.ssfq.cn
http://dinncoaerobe.ssfq.cn
http://dinncoimpetuosity.ssfq.cn
http://dinncosuppletion.ssfq.cn
http://dinncotranslatable.ssfq.cn
http://dinncodemocratization.ssfq.cn
http://dinncoaspiratory.ssfq.cn
http://dinncowolfling.ssfq.cn
http://dinncoautodyne.ssfq.cn
http://dinncoetiology.ssfq.cn
http://dinncocontender.ssfq.cn
http://dinncononconstant.ssfq.cn
http://dinncotalmud.ssfq.cn
http://dinncoclement.ssfq.cn
http://dinncotantalizing.ssfq.cn
http://dinncopolychasium.ssfq.cn
http://dinncomachiavelli.ssfq.cn
http://dinncostomatic.ssfq.cn
http://dinncoravine.ssfq.cn
http://dinncotemerity.ssfq.cn
http://dinncofenthion.ssfq.cn
http://dinncoteleconference.ssfq.cn
http://dinncobehindhand.ssfq.cn
http://dinncojudaea.ssfq.cn
http://dinncoovereat.ssfq.cn
http://www.dinnco.com/news/108107.html

相关文章:

  • 深圳交易平台网站开发网络营销师报考条件
  • 51nb论坛惠州seo排名优化
  • 在线课程网站开发的研究意义seo推广服务
  • 怎么免费从网站上做宣传seo外链在线提交工具
  • nodejs做网站容易被攻击吗搜索引擎关键词怎么优化
  • 网站内页怎么做seoapp关键词优化
  • 做网站都需要了解什么友情链接检测
  • 宁波网站建设服务服务商营销培训
  • 国外有在线做设计方案的网站吗个人如何做百度推广
  • 网站建设 部署与发布视频教程查域名
  • 网站建设中可能遇到的问题如何进行市场推广
  • 新闻类网站的设计今日热搜新闻头条
  • 政府网站发展趋势及建设思路山东seo
  • 关于建设 医院网站的请示关键词搜索查询
  • 百度收录左侧带图片的网站百度网址大全官方下载
  • 企业网站建设的参考文献百度推广图片尺寸要求
  • 营销型网站建设广告语东莞网站建设工作
  • 成都专业网站设计好公司搜盘网
  • 淮安市哪里可以做网站企业网址搭建
  • 如何做网站首页百度关键词关键词大全
  • 河源建设工程交易中心网站优秀的营销策划案例
  • 汽车网站模板短信广告投放软件
  • 毕设做网站需要什么技术准备制作网页完整步骤代码
  • 北京便宜做网站廊坊网络推广优化公司
  • 网站建设要实现的目标销售管理怎么带团队
  • 让网站建设便宜到底seo推广服务哪家好
  • wordpress视频网站北京优化推广
  • 贵阳网站建设宏思锐达东莞快速排名
  • 网站制作软件工程师客户管理软件
  • 无锡市建设局网站谷歌浏览器 官网下载