手势识别
JChowCUG
这个作者很懒,什么都没留下…
展开
-
Python opencv 鼠标点击图片,返回坐标
import cv2img = cv2.imread(’./data/cat.png’)def on_EVENT_LBUTTONDOWN(event, x, y, flags, param):if event == cv2.EVENT_LBUTTONDOWN:xy = “%d,%d” % (x, y)print(‘x, y = {}, {}’.format(x, y))cv2.circ...原创 2019-07-24 18:46:52 · 6166 阅读 · 0 评论 -
python opencv 显示文件夹下所有的图片(文件夹下还有文件夹)
import osimport cv2import numpy as npdef imshow(path):im_gray = cv2.imread(path, cv2.IMREAD_GRAYSCALE)im_color = cv2.applyColorMap(im_gray, cv2.COLORMAP_JET)# save imagecv2.namedWindow(‘input_i...原创 2019-07-24 19:47:15 · 2155 阅读 · 0 评论 -
Python 读取txt文件数据逗号为分隔符
fname = './data/loc.txt'with open(fname, 'r+', encoding='utf-8') as f: s = [i[:-1].split(',') for i in f.readlines()]原创 2019-07-24 20:14:13 · 32040 阅读 · 4 评论 -
python opencv 显示文件夹下的图像(文件夹下还有文件夹),并把鼠标点击的坐标,储存到txt
import cv2import osdef on_EVENT_LBUTTONDOWN(event, x, y, flags, param):if event == cv2.EVENT_LBUTTONDOWN: xy = "%d,%d" % (x, y) info = '{}, {}, {}'.format(path, x, y) with open('./data/...原创 2019-07-24 21:08:04 · 602 阅读 · 1 评论