Overview
This project implements automated face recognition by using Baidu Cloud face recognition APIs. It captures images from a camera, sends them to the cloud service for analysis, and displays recognition results in a Qt interface.
Features
- Image processing and face recognition: Use Baidu Cloud face recognition APIs to detect and identify faces in images.
- Camera capture and saving: A Qt interface controls a USB camera to open, close, display the live video stream, and save frames as images.
Environment
- Development OS: Ubuntu 18.04 64-bit
- Cross compiler toolchain: arm-poky-linux-gnueabi-gcc 5.3.0
- Bootloader: u-boot-2016.03
- Kernel: linux-4.1.15
- Qt version ported to the board: qt5.6.2
Image Processing and Face Recognition
The face recognition workflow uses Baidu Cloud. On the Baidu Cloud site, go to Face and Body > Face Recognition and consult the technical documentation for API usage.
1. Create a face database
- Click Application List, then View Face Database.
- Click Create Group.
- Select the user group scenario, enter a group ID, and confirm.
- Click the newly created group ID.
- Click Create User, enter a user ID, add images, and confirm.
2. Online face recognition
Before implementing locally, you can validate using the platform's online test. Provide a base64 string of a face image or upload an image, enter the group ID, and run the online recognition test.
3. Recognize local images
To run recognition locally, copy the sample code to your development environment and implement a function to convert images to base64. You must supply your access_token following the documentation.
#include <iostream>#include <fstream>#include <string>// Other code omitted
The face recognition application requires the following libraries: Curl, OpenSSL, OpenCV, and JsonCPP. For detailed installation steps, see the following reference:
- Dependency installation steps
Project Testing
The application saves recognized face information to a text file. A camera-based application reads that file and displays recognized faces in the Qt interface.
Ensure the development board is connected to a USB camera and display, configure Wi-Fi, and run the application.

ALLPCB
