MCPcopy Create free account
hub / github.com/ndleah/python-mini-project / roi

Function roi

Finding_Lanes/lanes.py:58–66  ·  view source on GitHub ↗
(image)

Source from the content-addressed store, hash-verified

56
57
58def roi(image):
59 height = image.shape[0]
60 polygons = np.array([
61 [(200, height), (1100, height), (550, 250)]
62 ])
63 mask = np.zeros_like(image)
64 cv2.fillPoly(mask, polygons, 255)
65 masked_image = cv2.bitwise_and(image, mask)
66 return masked_image
67
68
69cap = cv2.VideoCapture("Finding_Lanes/video.mp4")

Callers 1

lanes.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected