In an embodiment, the terminal may invoke a camera to activate a photograph scanning mode, scan a target object in the field of vision of the camera in real time, and generate an image frame in real time at a specific frame rate. The generated image frame may be cached locally in the terminal. The field of vision of a camera may be an area that can be scanned and shot by the camera and that is displayed on a display interface of the terminal. The terminal may detect whether a facial image exists in the generated image frames. If a facial image exists, the terminal obtains the generated image frame as a target image, and sends it to a server, so that the server obtains the target image. The target object may be a live face/person in a real scene, or an existing image that includes a human face.
In an embodiment, when an application that runs on the terminal interacts with a corresponding server and needs to be authenticated, a built-in camera of the terminal or an external camera related to the terminal may be invoked. In the current field of vision of the camera, the image frames in the real scene are acquired and obtained, and then the target image is obtained. The target image is sent to the corresponding server of the application. A scene in which authentication is required may be, for example, real-person real-name authentication in a social application, applying for unlocking a user ID, or bank account opening in a bank application, or the like.
In an embodiment, in an access control system, a facial acquisition camera may acquire image frames in a real scene in the current field of vision of the camera, and then send the acquired image frames to a computer device. After receiving the image frames, the computer device may detect whether a facial image exists in the image frames. If a facial image exists, the obtained image frame is used as a target image.