1 Star 0 Fork 0

繁华落尽 / Stitching-ID-Card-master

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
鼠标事件.py 624 Bytes
一键复制 编辑 原始数据 按行查看 历史
繁华落尽 提交于 2021-02-04 18:05 . 1111
#!/usr/local/bin/python3
# -*- coding: utf-8 -*-
"""
@File :鼠标事件.py
@Author :keyin
@Time :2021-02-03 16:52
"""
import numpy as np
import cv2
# x1, y1, x2, y2, x3, y3, x4, y4 = 0
def draw_circle(event, x, y, flags, param):
if event == cv2.EVENT_LBUTTONDOWN:
cv2.circle(img, (x, y), 10, (255, 0, 0), -1)
print('x=', x, '-------y=', y)
def draw_line():
pass
img = np.zeros((512, 512, 3), np.uint8)
cv2.namedWindow('image')
cv2.setMouseCallback('image', draw_circle)
while (1):
cv2.imshow('image', img)
if cv2.waitKey(20) & 0XFF == 27:
break
cv2.destroyAllWindows()
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/keyin/Stitching-ID-Card-master.git
git@gitee.com:keyin/Stitching-ID-Card-master.git
keyin
Stitching-ID-Card-master
Stitching-ID-Card-master
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891