本文共 717 字,大约阅读时间需要 2 分钟。
本文介绍如何使用OpenCV检测人脸,并且给出示例,本平台仍然采用的是 Jetson TK1。
为了能够从摄像头中实时检测出人脸,首先要做的就是判断你的摄像头是否可以工作,其基本方法如下:
sudo apt-get install luvcviewluvcview
参考网址:
mkdir ~/faceActivatedGPIOcd ~/faceActivatedGPIO
cp ~/opencv/samples/gpu/cascadeclassifier.cpp .g++ cascadeclassifier.cpp -lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_calib3d -lopencv_contrib -lopencv_features2d -lopencv_flann -lopencv_gpu -lopencv_legacy -lopencv_ml -lopencv_objdetect -lopencv_photo -lopencv_stitching -lopencv_superres -lopencv_video -lopencv_videostab -o cascadeclassifier
./cascadeclassifier --cascade ~/opencv-2.4.9/data/haarcascades/haarcascade_frontalface_alt.xml --camera 0