2

I'm trying to count people in the video with opencv and python

I got an external xml file for HOG descriptor for it.

So I wanna set this file as a descriptor, but I don't know how to do it.

First I tried like below :

'cascade.xml' is customized file.

hog = cv2.HOGDescriptor('cascade.xml')
hog.setSVMDetector(cv2.HOGDescriptor_getDefaultPeopleDetector())

But it didn't work.

And then I tried another way like below referring to OpenCV HOGDescripter Python :

hog = cv2.HOGDescriptor()
hog.save("cascade.xml")

It didn't work neither.

program didn't emit error, nothing happened.

What should I do?

Community
  • 1
  • 1
furyhunter
  • 129
  • 13

0 Answers0