1 Star 0 Fork 0

念古/opencv

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
test8.py 564 Bytes
一键复制 编辑 原始数据 按行查看 历史
念古 提交于 2019-12-30 17:05 . Add files via upload
from imutils.perspective import four_point_transform
from imutils import contours
import cv2 as cv
ANSWER_KEY_SCORE = {0: 1, 1: 4, 2: 0, 3: 3, 4: 1}
ANSWER_KEY = {0: "A", 1: "B", 2: "C", 3: "D", 4: "E"}
img = cv.imread('/home/niangu/桌面/answer_sheet_scan-master/imgs/example01/t1.png')
gray = cv.cvtColor(img, cv.COLOR_BGR2GRAY)
gaussian_bulr = cv.GaussianBlur(gray, (5, 5), 0)
cv.imshow("gaussian", gaussian_bulr)
edged = cv.Canny(gaussian_bulr, 75, 200)
cv.imshow("edged", edged)
cv.imshow("原图", img)
cv.imshow("灰度图", gray)
cv.waitKey(0)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/niangu/opencv.git
[email protected]:niangu/opencv.git
niangu
opencv
opencv
master

搜索帮助