파이썬 OpenCV HOG : 보행자 검출하기
HOG(Hostogram of Oriented Gradient) 보행자 검출을 목적으로 만들어진 Descriptor 이다. 필요한 정보를 추출하고 관계없는 정본는 버림으로써 이미지를 단순화한다. 예제 HOG 는 다음과 같이 보행자를 식별하기 위한 디스크립터입니다. 전체 코드입니다. import os import cv2 path = os.path.join('video', 'sample.avi') hog = cv2.HOGDescriptor() hog.setSVMDetector(cv2.HOGDescriptor_getDefaultPeopleDetector()) cap = cv2.VideoCapture(path) while True: ret, frame = cap.read() if not ret: break de..