python test_grader.py Traceback (most recent call last): File "test_grader.py", line 1, in <module> from imutils.perspective import four_point_transform ImportError: No module named imutils.perspective ~/py:pip install imtools Requirement already satisfied: imtools in /usr/local/lib/python2.7/...
four_point_transform(orig, screenCnt.reshape(4, 2)) # 灰度转换 warped = cv.cvtColor(warped, cv.COLOR_BGR2GRAY) # 阈值分割 T = threshold_local(warped, 11, offset=10, method='gaussian') warped = (warped > T).astype('uint8') * 255 plt.subplot(1, 3, 3) plt.imshow(imutils.opencv...
Mat notecard = imread("notecard.png"); vector pts; pts.push_back(Point2f(73, 239)); pts.push_back(Point2f(356, 117)); pts.push_back(Point2f(475, 265)); pts.push_back(Point2f(187, 443)); Mat res = imutils::four_point_transform(notecard, pts); imshow("four_point_transform"...