March 2018
Beginner to intermediate
306 pages
9h 54m
English
You need to complete the following steps:
import cv2import numpy as npimport random
img = cv2.imread('../data/scenetext01.jpg', cv2.IMREAD_COLOR)fast = cv2.FastFeatureDetector_create(160, True, cv2.FAST_FEATURE_DETECTOR_TYPE_9_16)keyPoints = fast.detect(img)for kp in keyPoints: kp.size = 100*random.random() kp.angle = 360*random.random()matches = []for i in range(len(keyPoints)): matches.append(cv2.DMatch(i, i, 1))
show_img = cv2.drawKeypoints(img, keyPoints, None, (255, 0, 255))cv2.imshow('Keypoints', show_img)cv2.waitKey()cv2.destroyAllWindows()
Read now
Unlock full access