import cv2 import numpy as np cap=cv2.VideoCapture('dog.mp4') while True: ret,img=cap.read() img=cv2.resize(img,None,fx=0.2,fy=0.2) if ret: img_gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) #gray color img_gray = cv2.medianBlur(img_gray, 7) #remove noise edges = cv2.Laplacian(img_gray, cv2.CV_8U, ksize=5) ret, mask = cv2.threshold(edges, 100, 255, cv2.THRESH_BINARY_INV) #binary_inv 흰 바탕에 검은 선 ske..