OpenCV+Python 文字识别(重点图像透视变换)
摘要:1 # Author:Winter Liu is coming! 2 import cv2 as cv 3 import numpy as np 4 import pytesseract 5 6 7 # 预处理,高斯滤波(用处不大),4次开操作 8 # 过滤轮廓唯一 9 def contour_de
阅读全文
opencv 找金币,按照金字塔缩小尝试匹配
摘要:1 # Author:Winter Liu is coming! 2 import cv2 as cv 3 import numpy as np 4 import matplotlib.pyplot as plt 5 6 7 def match_demo(src1, src2): 8 res = c
阅读全文
opencv中的图形查找统计米粒数量
摘要:1 # Author:Winter Liu is coming! 2 import cv2 as cv 3 import numpy as np 4 import matplotlib.pyplot as plt 5 6 7 src = cv.imread(r"C:\PycharmProjects\
阅读全文
OpenCV 面部识别代码
摘要:# Author:Winter Liu is coming! import cv2 as cv import numpy as np def face_dect(image): gray = cv.cvtColor(image, cv.COLOR_BGR2GRAY) # opencv在GitHub上
阅读全文
分水岭 代码
摘要:1 # Author:Winter Liu is coming! 2 import cv2 as cv 3 import numpy as np 4 5 6 def watershed_demo(image): 7 # 偏移均值滤波 8 blur = cv.pyrMeanShiftFiltering
阅读全文
OpenCV鼠标事件
摘要:1 # Author:Winter Liu is coming! 2 import cv2 as cv 3 import numpy as np 4 5 6 # 鼠标回调函数,当发生鼠标事件,调用此函数,传递5个参数 7 def draw_demo(event, x, y, flags, param
阅读全文