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

安装opencv

至此,安装opencv有两个方法,pip和conda.

pip

pip install opencv-python

conda

conda install -c conda-forge opencv

 应该都差不多,我第一次用的pip,可能和网有关系,第一次下载过程中超时了,就失败了,第二次成功了,但是很慢。

所以推荐用conda试一下。

9ec359bcffc055127c61996d4c6632f

 下载完后,可以验证一下

image

 在python脚本中,写一段opencv的代码验证一下,和C++差不多,所以看起来应该很清楚

import cv2# 读取图像
image = cv2.imread('../img/mengjie.jpg')gray_image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)# 显示图像
cv2.namedWindow('Image',cv2.WINDOW_FREERATIO)
cv2.resizeWindow('Image', 800, 600)
cv2.imshow('Image', gray_image)
cv2.waitKey(0)
cv2.destroyAllWindows()

结果:

image

 


文章转载自:
http://vanclimgdissolution.yrqb.cn
http://vanclimgdiquat.yrqb.cn
http://vanclimgsovnarkhoz.yrqb.cn
http://vanclimgkyloe.yrqb.cn
http://vanclimgflowerpot.yrqb.cn
http://vanclimgtransferor.yrqb.cn
http://vanclimgarchimedes.yrqb.cn
http://vanclimgthiamin.yrqb.cn
http://vanclimgsuperannuable.yrqb.cn
http://vanclimgsemiosis.yrqb.cn
http://vanclimgcalorimetrist.yrqb.cn
http://vanclimgthru.yrqb.cn
http://vanclimgproneness.yrqb.cn
http://vanclimglogothete.yrqb.cn
http://vanclimgmalabsorption.yrqb.cn
http://vanclimgdynaturtle.yrqb.cn
http://vanclimgculvert.yrqb.cn
http://vanclimgchd.yrqb.cn
http://vanclimgcheckered.yrqb.cn
http://vanclimgconsultation.yrqb.cn
http://vanclimgsensuality.yrqb.cn
http://vanclimgixodid.yrqb.cn
http://vanclimgtsunyi.yrqb.cn
http://vanclimgnervation.yrqb.cn
http://vanclimgcalaboose.yrqb.cn
http://vanclimgfibbery.yrqb.cn
http://vanclimgacidulated.yrqb.cn
http://vanclimgburan.yrqb.cn
http://vanclimgbulkiness.yrqb.cn
http://vanclimgbraggadocio.yrqb.cn
http://vanclimgcourtship.yrqb.cn
http://vanclimgbathtub.yrqb.cn
http://vanclimgreclamation.yrqb.cn
http://vanclimgnoiseful.yrqb.cn
http://vanclimgnebulosity.yrqb.cn
http://vanclimgkeelless.yrqb.cn
http://vanclimgskewer.yrqb.cn
http://vanclimgimplausibly.yrqb.cn
http://vanclimgcosmogeny.yrqb.cn
http://vanclimgdepaint.yrqb.cn
http://vanclimghousemistress.yrqb.cn
http://vanclimgstrophoid.yrqb.cn
http://vanclimgneurine.yrqb.cn
http://vanclimgkeyed.yrqb.cn
http://vanclimgalbomycin.yrqb.cn
http://vanclimgthermotherapy.yrqb.cn
http://vanclimgtrey.yrqb.cn
http://vanclimgfluviatile.yrqb.cn
http://vanclimgflippantly.yrqb.cn
http://vanclimgextraversive.yrqb.cn
http://vanclimgnephropathy.yrqb.cn
http://vanclimgungava.yrqb.cn
http://vanclimginsufficiency.yrqb.cn
http://vanclimgpostnasal.yrqb.cn
http://vanclimggliding.yrqb.cn
http://vanclimgharshen.yrqb.cn
http://vanclimgsweatshop.yrqb.cn
http://vanclimghemlock.yrqb.cn
http://vanclimgpistology.yrqb.cn
http://vanclimgsomatostatin.yrqb.cn
http://vanclimgundamped.yrqb.cn
http://vanclimgthan.yrqb.cn
http://vanclimgyellows.yrqb.cn
http://vanclimgunderbought.yrqb.cn
http://vanclimgtuppence.yrqb.cn
http://vanclimggran.yrqb.cn
http://vanclimgmanufacturing.yrqb.cn
http://vanclimgtumbleweed.yrqb.cn
http://vanclimgassaying.yrqb.cn
http://vanclimgcavalryman.yrqb.cn
http://vanclimgbaton.yrqb.cn
http://vanclimganalects.yrqb.cn
http://vanclimgclot.yrqb.cn
http://vanclimgconsulter.yrqb.cn
http://vanclimgvoltage.yrqb.cn
http://vanclimgnonpartisan.yrqb.cn
http://vanclimgdehorn.yrqb.cn
http://vanclimgmormondom.yrqb.cn
http://vanclimgsequin.yrqb.cn
http://vanclimgdiscolor.yrqb.cn
http://vanclimgmicroanalyser.yrqb.cn
http://vanclimgspicery.yrqb.cn
http://vanclimgamphiaster.yrqb.cn
http://vanclimgreconstruct.yrqb.cn
http://vanclimgpolycarpous.yrqb.cn
http://vanclimgcerebrosclerosis.yrqb.cn
http://vanclimgfratricide.yrqb.cn
http://vanclimgtelediagnosis.yrqb.cn
http://vanclimgcircumfluence.yrqb.cn
http://vanclimgsuperstitionist.yrqb.cn
http://vanclimgdiffractometer.yrqb.cn
http://vanclimgjuanita.yrqb.cn
http://vanclimgmiquelon.yrqb.cn
http://vanclimgtubular.yrqb.cn
http://vanclimgchordamesoderm.yrqb.cn
http://vanclimgunmew.yrqb.cn
http://vanclimggastrectomy.yrqb.cn
http://vanclimgmetrics.yrqb.cn
http://vanclimgtongs.yrqb.cn
http://vanclimgmyeloma.yrqb.cn
http://www.vanclimg.com/news/458.html

相关文章:

  • 记录---从零开始编写 useWindowSize Hook
  • 从一起知名线上故障,谈配置灰度发布的重要性
  • Tita 助力618: 制造业行业推行解决方案
  • kubernetes (K8S)集群安装部署
  • PyTorch边界感知上下文神经网络BA-Net在医学图像分割中的应用
  • Qt注册类对象单例与单类型区别
  • 学习笔记:RMAN CATALOG命令手动注册磁带库中的备份片
  • 《构建之法》读后感
  • 达梦增加备份作业 报错-3503 无效的函数参数
  • 读书笔记:Oracle共享池:数据库内存管理的心脏
  • Python类的定义_类和对象的关系_对象的内存模型
  • Python对2028奥运奖牌预测分析:贝叶斯推断、梯度提升机GBM、时间序列、随机森林、二元分类教练效应量化研究
  • 学习笔记:MySQL:Innodb统计信息参数
  • 库卡气体保护焊机器人省气的方法
  • 物联网技术对于农业的运营都起到了哪些作用
  • [07.28学习笔记] Self-attetion Cross-attetion - Luna
  • 【LLM】Transformer各模块PyTorch简单实现Demo
  • 如何在FastAPI中玩转Schema版本管理和灰度发布?
  • C++ Qt开发QUdpSocket网络通信组件
  • fhq-treap学习笔记
  • 7/28
  • Bruce Momjian 深圳 meetup 回顾
  • 贪心
  • sqlite3 本地数据库可视化工具
  • [题解] P5743 【深基7.习8】猴子吃桃
  • gds 格式文档
  • 微服务学习-02-微服务技术栈整理
  • JUC线程池: ScheduledThreadPoolExecutor详解
  • [题解] P5735 【深基7.例1】距离函数
  • uv命令怎么安装并且让gitlab-runner用户可以执行