MCPcopy Create free account
hub / github.com/JimmyHHua/opencv_tutorials / process

Function process

python/code_082/opencv_082.py:5–19  ·  view source on GitHub ↗
(image, opt=1)

Source from the content-addressed store, hash-verified

3
4
5def process(image, opt=1):
6 # Detecting corners
7 gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
8 corners = cv2.goodFeaturesToTrack(gray, 35, 0.05, 10)
9 print(len(corners))
10 for pt in corners:
11 print(pt)
12 b = np.random.random_integers(0, 256)
13 g = np.random.random_integers(0, 256)
14 r = np.random.random_integers(0, 256)
15 x = np.int32(pt[0][0])
16 y = np.int32(pt[0][1])
17 cv2.circle(image, (x, y), 5, (int(b), int(g), int(r)), 2)
18 # output
19 return image
20
21
22src = cv2.imread("blox.jpg")

Callers 1

opencv_082.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected