python opencv开发

File "cc.py", line 54, in <module>
    from visualization import *
  File "/home/shilinzhe/Reweight-CC-master/visualization.py", line 9, in <module>
    FONT = ImageFont.truetype(font='mono', size=24) #font='arial', size=24)
  File "/home/shilinzhe/anaconda3/envs/reweight/lib/python3.8/site-packages/PIL/ImageFont.py", line 853, in truetype
    return freetype(font)
  File "/home/shilinzhe/anaconda3/envs/reweight/lib/python3.8/site-packages/PIL/ImageFont.py", line 850, in freetype
    return FreeTypeFont(font, size, index, encoding, layout_engine)
  File "/home/shilinzhe/anaconda3/envs/reweight/lib/python3.8/site-packages/PIL/ImageFont.py", line 209, in __init__
    self.font = core.getfont(
OSError: cannot open resource

https://blog.csdn.net/m0_37422289/article/details/81362959

open  /usr/share/fonts/truetype , find a  usable font 

FONT = ImageFont.truetype(font='FreeMono', size=24) #font='arial', size=24)

 

找不到bgsegm

pip install opencv-contrib-python

Opencv ValueError: not enough values to unpack (expected 3, got 2)

原因是用的是Opencv4.0,把返回值从三个改回两个了

原代码:_,contours, hierarchy = cv2.findContours(img_gray, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE)
改为: contours, hierarchy = cv2.findContours(img_gray, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE)

 

 

pointPolygonTest

https://docs.opencv.org/2.4/modules/imgproc/doc/structural_analysis_and_shape_descriptors.html?highlight=pointpolygontest#pointpolygontest

https://zhuanlan.zhihu.com/p/150202146?from_voters_page=true

 

SystemError: new style getargs format but argument is not a tuple

https://blog.csdn.net/weixin_44113645/article/details/85861296

OpenCV4学习笔记(79)——bgsegm背景提取模块

https://blog.csdn.net/weixin_45224869/article/details/107092814?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromBaidu-1.control&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromBaidu-1.control

利用opencv进行移动物体检测

https://www.cnblogs.com/arkenstone/p/8560846.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值