TECHNICAL FIELD

The present specification relates to acquisition of a target image, and in particular to a system and method for obtaining a target image.

BACKGROUND

Consumer depth cameras have brought changes in various fields such as 3D modeling, gesture interaction, and facial recognition. Different application scenarios have different performance requirements on a depth camera. For example, in 3D modeling, facial recognition, and the like, a depth camera usually needs to output a high resolution depth image to improve precision of modeling and a facial recognition algorithm. In gesture interaction, a depth camera needs to have a high output frame rate. A delay is reduced when a depth image has a high frame rate, thereby providing better user experience.

Currently, consumer depth cameras, especially depth cameras based on structured light technology, are faced with a number of problems, and one of which is a contradiction between a depth image resolution and an output frame rate. As a depth image resolution of a depth camera increases, an output frame rate of the depth camera decreases greatly due to an increased amount of depth computation. As a result, both a high resolution and a high frame rate cannot be implemented.

SUMMARY

The present specification provides a system and method for obtaining a target image for solving the problem in the existing technology that not both of a high resolution and a high frame rate can be implemented.

To solve the foregoing problem, the technical solutions adopted in the present specification are as follows.

In an aspect, a system for obtaining a target image includes: a floodlight illumination source, configured to provide illumination of a first wavelength for a target area; a first acquisition camera, configured to acquire a target floodlight image of the first wavelength of the target area; a structured light projector, configured to project a structured light image of a second wavelength to the target area; a second acquisition camera, configured to acquire the structured light image of the target area; and a processor, connected to the floodlight illumination source, the first acquisition camera, the structured light projector, and the second acquisition camera, and configured to: control the first acquisition camera to acquire the target floodlight image under the illumination of the floodlight illumination source; control the second acquisition camera to acquire the structured light image under the projection of the structured light projector; recognize a foreground target in the target floodlight image; and extract, based on a relative position relationship between the first acquisition camera and the second acquisition camera, a target structured light image on pixels of the structured light image, wherein the pixels correspond to the foreground target.

In an embodiment, the floodlight illumination source is a floodlight illuminator or an illumination source independent of the system for obtaining a target image.

In an embodiment, the first acquisition camera is a red-green-blue (RGB) camera, and the target floodlight image is an RGB image. The second acquisition camera is an infrared (IR) camera, and the structured light image is an IR structured light image.

In an embodiment, the first acquisition camera acquires the target floodlight image and the second acquisition camera acquires the structured light image synchronously or asynchronously.

In an embodiment, the target floodlight image is acquired by the first acquisition camera in a low resolution mode.

In an embodiment, the processor is further configured to compute a target depth image based on the target structured light image.

In another aspect, a system for obtaining a target image includes: an acquisition camera having first pixels and second pixels and being configured to respectively acquire a first wavelength image and a second wavelength image of a target area; a floodlight illumination source configured to provide illumination of a first wavelength for the target area; a structured light projector configured to project a structured light image of a second wavelength to the target area; and a processor connected to the acquisition camera, the floodlight illumination source, and the structured light projector, and configured to: control the acquisition camera to acquire a target floodlight image under the illumination of the floodlight illumination source and the structured light image under projection of the structured light projector, synchronously; recognize a foreground target in the target floodlight image; and extracting a pixel area of the structured light image that corresponds to the foreground target for obtaining a target structured light.

In another aspect, a system for obtaining a target image includes: an acquisition camera configured to acquire an image of a target area; a floodlight illumination source configured to provide illumination for the target area; a structured light projector configured to project a structured light image to the target area; and a processor connected to the acquisition camera, the floodlight illumination source, and the structured light projector, and configured to: control the acquisition camera to acquire a target floodlight image under illumination of the floodlight illumination source; recognize a foreground target in the target floodlight image; and control the acquisition camera to acquire a target structured light image on pixels corresponding to the foreground target and under projection of the structured light projector.

The present specification provides a method for obtaining a target image. The method includes: P1, synchronously or asynchronously obtaining, by a first acquisition camera and a second acquisition camera, a target floodlight image of a first wavelength and a structured light image of a second wavelength; P2, recognizing a foreground target in the target floodlight image; and P3, extracting a pixel area that is in the structured light image and corresponds to the foreground target to obtain a target structured light image. The target floodlight image is an RGB image, and the structured light image is an IR structured light image. Step P3 further includes determining a relative position relationship between the first acquisition camera obtaining the target floodlight image and the second acquisition camera obtaining the structured light image, and extracting the target structured light image based on the relative position relationship.

The method for obtaining a target image further includes the following step P4, computing a target depth image by using the target structured light image.

The beneficial effects of the system and method for obtaining a target image in present specification are as follows. The target floodlight image and the structured light image are respectively acquired by the first acquisition camera and the second acquisition camera. Then the foreground target of the target floodlight image is obtained, and the pixel area in the structured light image and corresponding to the foreground target is extracted to obtain the target structured light image. At this time, depth computation is performed on the target structured light image to obtain the target depth image. The data volume in this method is smaller than that in the case of a full resolution, and therefore an operation speed of a depth algorithm is faster, so that a high frame rate output of a depth image can be ensured.

