-
[Image Processing] - Finding a person.- Data Analyzing For Asset. 2021. 1. 14. 23:32
1. This program will find people in this photo.
2. Importing cv2 package, we can find people in this photo. just read the source code below.
12345678910111213141516import cv2#ready#hog = cv2.HOGDescriptor()hog.setSVMDetector(cv2.HOGDescriptor_getDefaultPeopleDetector())hogParams = {'winStride':(8,8), 'padding':(32,32), 'scale':1.05, 'hitThreshold':0, 'finalThreshold':5}#detection#img = cv2.imread("img01.jpg")gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)human, r = hog.detectMultiScale(gray, **hogParams)if(len(human) > 0):for(x,y,w,h) in human:cv2.rectangle(img, (x,y), (x+w, y+h), (255,255,255), 3)cv2.imshow("img", img)cv2.waitKey(0)cs 3. Look at the detected people.
'- Data Analyzing For Asset.' 카테고리의 다른 글
[Data Science] Machine Learning (0) 2021.02.01 [Data Science] Analyzing Data (2) 2021.01.18 [Data Processing] - 각 지역별 인구구조 분석(그래프 별) (0) 2021.01.07 RSA Algorithm (0) 2020.12.27 - AES : 대칭키 암호 절차 Sample (0) 2020.12.25