bikz05 / object-detector

Object Detection Framework using HOG as descriptor and Linear SVM as classifier.
MIT License
430 stars 221 forks source link

how to run test-classifier.py from direct camera stream #7

Open andro-galexy opened 7 years ago

andro-galexy commented 7 years ago

I modifed the test_classfier.py to get live frames from camera and detect object from live camera stream, but am getting this error: ValueError: The parameter image must be a 2-dimensional array at this line :+1: fd = hog(im_window, orientations, pixels_per_cell, cells_per_block, visualize, normalize)

here the complete Traceback:

File "../object-detector/cam-classifier.py", line 81, in fd = hog(im_window, orientations, pixels_per_cell, cells_per_block, visualize, normalize) File "/usr/lib/python2.7/site-packages/skimage/feature/_hog.py", line 79, in hog assert_nD(image, 2) File "/usr/lib/python2.7/site-packages/skimage/_shared/utils.py", line 166, in assert_nD raise ValueError(msg % (arg_name, '-or-'.join([str(n) for n in ndim]))) ValueError: The parameter image must be a 2-dimensional array

Thanks :)