摘要: scan.py: # 导入工具包 import numpy as np import argparse import cv2 # 设置参数 ap = argparse.ArgumentParser() ap.add_argument("-i", "--image", required = True, 阅读全文
posted @ 2020-02-11 20:44 搞点薯条 阅读(2104) 评论(0) 推荐(2) 编辑
摘要: myutils.py: import cv2 def sort_contours(cnts, method="left-to-right"): reverse = False i = 0 if method == "right-to-left" or method == "bottom-to-top 阅读全文
posted @ 2020-02-11 19:15 搞点薯条 阅读(913) 评论(0) 推荐(3) 编辑
摘要: 傅里叶变换 我们生活在时间的世界中,早上7:00起来吃早饭,8:00去挤地铁,9:00开始上班。。。以时间为参照就是时域分析。 但是在频域中一切都是静止的! https://zhuanlan.zhihu.com/p/19763358 傅里叶变换的作用 - 高频:变化剧烈的灰度分量,例如边界 - 低频 阅读全文
posted @ 2020-02-11 17:19 搞点薯条 阅读(389) 评论(0) 推荐(1) 编辑
摘要: 直方图 cv2.calcHist(images,channels,mask,histSize,ranges) - images: 原图像图像格式为 uint8 或 float32。当传入函数时应 用中括号 [] 括来例如[img] - channels: 同样用中括号括起来,它会告诉函数我们统幅图像的 阅读全文
posted @ 2020-02-11 16:15 搞点薯条 阅读(388) 评论(0) 推荐(0) 编辑