fixes for latest changes in opencv3.0 api
fixes for latest changes in opencv3.0 api waitKey() normalization fixed mser bindings
This commit is contained in:
@@ -26,13 +26,13 @@ if __name__ == '__main__':
|
||||
video_src = 0
|
||||
|
||||
cam = video.create_capture(video_src)
|
||||
mser = cv2.MSER()
|
||||
mser = cv2.MSER_create()
|
||||
while True:
|
||||
ret, img = cam.read()
|
||||
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
|
||||
vis = img.copy()
|
||||
|
||||
regions = mser.detect(gray, None)
|
||||
regions = mser.detectRegions(gray, None)
|
||||
hulls = [cv2.convexHull(p.reshape(-1, 1, 2)) for p in regions]
|
||||
cv2.polylines(vis, hulls, 1, (0, 255, 0))
|
||||
|
||||
|
Reference in New Issue
Block a user