opencv
换个名字就很好
这个作者很懒,什么都没留下…
展开
-
background matting v3 inference webcam
opencv webcam read show原创 2022-12-29 19:05:24 · 180 阅读 · 0 评论 -
dlib 人脸检测
将test下的所有文件复制到newtest文件夹下原创 2022-06-03 19:16:00 · 104 阅读 · 0 评论 -
获取图片的尺寸
img.shape可以的到尺寸因为cv2读入后img是numpy array,img.size 指的是图片的宽高通道的相乘后的数,需要指定维度才能获得宽高通道,比如,np.size(img, 0)指的是h的大小,np.size(img, 1) wnp.size(img, 2) c 这个维度适用于彩色通道读入,单通道读入会报错如果是torch类型数据img.shape和img.size()返回的内容含义是一样的,都是h, w, c。import cv2raw_img_pth =原创 2022-05-30 15:12:20 · 2490 阅读 · 0 评论 -
cv2画圈写字保存图像
画圈Syntax: cv2.circle(image, center_coordinates, radius, color, thickness)Parameters: image: It is the image on which circle is to be drawn. center_coordinates: It is the center coordinates of circle. The coordinates are represented as tuples of two val原创 2022-03-16 16:15:57 · 1407 阅读 · 0 评论 -
cv2.resize
import cv2 img = cv2.imread('/home/img/python.png', cv2.IMREAD_UNCHANGED) print('Original Dimensions : ',img.shape) scale_percent = 60 # percent of original sizewidth = int(img.shape[1] * scale_percent / 100)height = int(img.shape[0] * scale_percen原创 2022-03-15 17:33:47 · 4915 阅读 · 0 评论 -
plt.savefig()
# importing required modulesimport matplotlib.pyplot as plt# creating plotting dataxaxis =[1, 4, 9, 16, 25, 36, 49, 64, 81, 100]yaxis =[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]# plottingplt.plot(xaxis, yaxis)plt.xlabel("X")plt.ylabel("Y")# saving the fil原创 2022-03-07 15:17:32 · 1495 阅读 · 1 评论 -
cv2读出来的图片的颜色通道是bgr
When the image file is read with the OpenCV function imread(), the order of colors is BGR (blue, green, red).ref:Convert BGR and RGB with Python, OpenCV (cvtColor)原创 2022-01-05 17:27:36 · 1807 阅读 · 0 评论 -
AttributeError: module ‘cv2‘ has no attribute ‘imread‘
cv2安装有误,卸了重装即可。pip uninstall opencv-pythonpip uninstall opencv-contrib-pythonpip install opencv-pythonpip install opencv-contrib-python原创 2022-01-05 14:44:31 · 1254 阅读 · 0 评论