Commit 8c06a275 authored by Alexander Mordvintsev's avatar Alexander Mordvintsev

use default HOG people detector

minor cleaning
parent 431daf59
......@@ -34,5 +34,5 @@ def onmouse(event, x, y, flags, param):
cv2.imshow('zoom', zoom)
cv2.imshow('preview', small)
cv2.setMouseCallback('preview', onmouse, None)
cv2.setMouseCallback('preview', onmouse)
cv2.waitKey()
This diff is collapsed.
......@@ -27,11 +27,10 @@ if __name__ == '__main__':
print help_message
# TODO should use built-in detector data
text = "".join(open('people_hog.txt').readlines()[1:])
data = np.fromstring(text, sep=',')
hog = cv2.HOGDescriptor()
hog.setSVMDetector(data)
data = cv2.HOGDescriptor_getDefaultPeopleDetector()
data = np.float64(data.ravel()) # BUG
hog.setSVMDetector( data )
for fn in it.chain(*map(glob, sys.argv[1:])):
print fn, ' - ',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment