基于GPU加速的OpenCV人体检测（Full Body Detection）
2、Simply build the OpenCV HOG (Hough Of Gradients) sample person detector program
cd opencv-2.4.9/samples/gpu g++ hog.cpp -lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_calib3d -lopencv_contrib -lopencv_features2d -lopencv_flann -lopencv_gpu -lopencv_legacy -lopencv_ml -lopencv_nonfree -lopencv_objdetect -lopencv_photo -lopencv_stitching -lopencv_superres -lopencv_video -lopencv_videostab -o hog
3、run the HOG demo
./hog --video 768x576.avi
注意：You can run the HOG demo such as on a pre-recorded video of people walking around. The HOG demo displays a graphical output, hence you should plug a HDMI monitor in or use a remote viewer such as X Tunneling or VNC or TeamViewer on your desktop in order
to see the output.
./hog --camera 0
注意：Note: This looks for whole bodies and assumes they are small, so you need to stand atleast 5m away from the camera if you want it to detect you!
You can toggle between CPU vs GPU by pressing 'm', where you will see that the GPU is typically 5x faster at HOG than the CPU!