use default HOG people detector

minor cleaning
This commit is contained in:
Alexander Mordvintsev
2011-08-13 08:52:58 +00:00
parent 431daf59b6
commit 8c06a275f7
3 changed files with 4 additions and 811 deletions

View File

@@ -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, ' - ',