CN-115588075-B - Face 3D modeling method, device, equipment and storage medium
Abstract
The invention relates to the technical field of 3D modeling, in particular to a face 3D modeling method, a device, equipment and a storage medium. The invention firstly establishes the preset track of the image acquisition device, and because the preset track is set around the sampled user, the image acquisition device can be controlled to move around the sampled user along the preset track, so that the face images of all angles of the image acquisition device are acquired, and the 3D face model of the sampled user can be completely restored only when the face images of all angles are acquired. From the above analysis, the present invention is that the image capturing device moves around the sampled user instead of the sampled user rotating to cause the image capturing device to capture images of various angles thereof. The invention adopts the former, on one hand, the face images of all angles can be accurately acquired by controlling the image acquisition device, and on the other hand, the moving frequency of the sampled user can be reduced, so that the experience sense of the sampled user is improved.
Inventors
- WANG JINHUI
- ZENG MING
- YANG ZEHUANG
Assignees
- 深圳康佳电子科技有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20220922
Claims (6)
- 1. A face 3D modeling method, the modeling method comprising: planning a preset track of an image acquisition device, wherein the preset track surrounds a sampled user; Controlling the image acquisition device to movably acquire a plurality of face images of each angle of the sampled user along the preset track; constructing a 3D face model according to a plurality of face images; The preset track surrounds the sampled user, and comprises: Determining an estimated track around the sampled user, wherein the estimated track is annular taking the sampled user as a center; Marking a first point on the estimated track, wherein the first point points to the midpoint of the sampled user along the radial direction of the estimated track; marking a second point and a third point on two sides of the first point, wherein the included angle between the connecting line of the second point and the sampled user and the connecting line of the third point and the sampled user is larger than ninety degrees; Drawing a ring shape according to the first point, the second point and the third point, and planning a preset track of an image acquisition device; the controlling the image acquisition device to movably acquire a plurality of face images of each angle of the sampled user along the preset track comprises the following steps: monitoring the real-time position of the sampled user; Calculating the real-time distance between the real-time position and the initial image acquisition device, wherein the initial image acquisition device is positioned at a first point of the preset track; When the real-time distance is smaller than a preset distance, controlling the image acquisition device to move from the first point of the preset track to the second point, the first point and the third point repeatedly in sequence when the real-time distance is smaller than the focusing distance of the image acquisition device in the preset distance; controlling the image acquisition device in repeated movement to acquire face images of the sampled user at the position of the first point, the position of the second point and the position of the third point respectively, so as to obtain a plurality of face images of each angle of the sampled user; the constructing a 3D face model according to a plurality of face images includes: removing overlapping face images acquired by the image acquisition device at the same position on the preset track to obtain the face images after preprocessing; obtaining images acquired by the image acquisition device at the first point, the second point and the third point according to the preprocessed face image, and respectively recording the images as a first image, a second image and a third image; Counting gray values of all pixel points of the second image and the third image; Removing pixel points with gray values larger than a gray threshold value to respectively obtain a second segmentation image corresponding to the second image and a third segmentation image corresponding to the third image; and constructing a 3D face model according to the first image, the second segmentation image and the third segmentation image.
- 2. The face 3D modeling method of claim 1, wherein planning the preset trajectory of the image acquisition device, the preset trajectory surrounding the sampled user, comprises: collecting a historical movement track of the sampled user before being sampled; obtaining a predicted movement track of the sampled user according to the historical movement track; And planning a preset track of the image acquisition device according to the predicted moving track of the sampled user.
- 3. The face 3D modeling method of claim 1, wherein, the modeling method further comprises modeling equipment, wherein the modeling equipment comprises the following components: the distance sensor is arranged on the image acquisition device; the input end of the main control unit is electrically connected with the output end of the distance sensor; And the input end of the driving unit is electrically connected with the output end of the main control unit and is mechanically connected with the image acquisition device.
- 4. A face 3D modeling apparatus, the apparatus comprising: The track planning module is used for planning a preset track of the image acquisition device, and the preset track surrounds a sampled user; The control module is used for controlling the image acquisition device to move along the preset track to acquire the object A plurality of face images of each angle of the sampled user; The modeling module is used for constructing a 3D face model according to a plurality of face images; The preset track surrounds the sampled user, and comprises: Determining an estimated track around the sampled user, wherein the estimated track is annular taking the sampled user as a center; Marking a first point on the estimated track, wherein the first point points to the midpoint of the sampled user along the radial direction of the estimated track; marking a second point and a third point on two sides of the first point, wherein the included angle between the connecting line of the second point and the sampled user and the connecting line of the third point and the sampled user is larger than ninety degrees; Drawing a ring shape according to the first point, the second point and the third point, and planning a preset track of an image acquisition device; the controlling the image acquisition device to movably acquire a plurality of face images of each angle of the sampled user along the preset track comprises the following steps: monitoring the real-time position of the sampled user; Calculating the real-time distance between the real-time position and the initial image acquisition device, wherein the initial image acquisition device is positioned at a first point of the preset track; When the real-time distance is smaller than a preset distance, controlling the image acquisition device to move from the first point of the preset track to the second point, the first point and the third point repeatedly in sequence when the real-time distance is smaller than the focusing distance of the image acquisition device in the preset distance; controlling the image acquisition device in repeated movement to acquire face images of the sampled user at the position of the first point, the position of the second point and the position of the third point respectively, so as to obtain a plurality of face images of each angle of the sampled user; the constructing a 3D face model according to a plurality of face images includes: removing overlapping face images acquired by the image acquisition device at the same position on the preset track to obtain the face images after preprocessing; obtaining images acquired by the image acquisition device at the first point, the second point and the third point according to the preprocessed face image, and respectively recording the images as a first image, a second image and a third image; Counting gray values of all pixel points of the second image and the third image; Removing pixel points with gray values larger than a gray threshold value to respectively obtain a second segmentation image corresponding to the second image and a third segmentation image corresponding to the third image; and constructing a 3D face model according to the first image, the second segmentation image and the third segmentation image.
- 5. A terminal device, characterized in that the terminal device comprises a memory, a processor and a face 3D modeling program stored in the memory and executable on the processor, the processor implementing the steps of the face 3D modeling method according to any of claims 1-3 when executing the face 3D modeling program.
- 6. A computer readable storage medium, wherein a face 3D modeling program is stored on the computer readable storage medium, and the face 3D modeling program, when executed by a processor, implements the steps of the face 3D modeling method according to any of claims 1-3.
Description
Face 3D modeling method, device, equipment and storage medium Technical Field The invention relates to the technical field of 3D modeling, in particular to a face 3D modeling method, a device, equipment and a storage medium. Background The equipment scheme of the 3D face modeling can be divided into 2D analog simulation, 3D structured light/TOF+2D camera collocation and the like to realize the 3D face modeling. The device of the pure 2D camera scheme can perform 2D model conversion through priori knowledge, but has serious defects of poor precision. The existing 3D structured light/TOF+2D camera scheme equipment has two extreme problems, one is equipment enlargement, the face image data are synchronously captured through a plurality of cameras distributed around the face, the precision is high, the cost is high, the modeling time is long, and mass production cannot be realized. One is low-cost, but because the camera is fixed, in order to grab complete data, people are required to rotate left and right according to the instruction, namely the complete data grabbing is realized by rotating the camera, the camera is limited by various uncontrollable factors in the face rotation process, high-precision face 3D data restoration cannot be realized, and the acceptance of customers is not high. In summary, the reduction degree of the face 3D modeling in the prior art is low. Accordingly, there is a need for improvement and advancement in the art. Disclosure of Invention In order to solve the technical problems, the invention provides a face 3D modeling method, a device, equipment and a storage medium, which solve the problem of low reduction degree of face 3D modeling in the prior art. In order to achieve the above purpose, the present invention adopts the following technical scheme: in a first aspect, the present invention provides a face 3D modeling method, where the modeling method includes: planning a preset track of an image acquisition device, wherein the preset track surrounds a sampled user; Controlling the image acquisition device to movably acquire a plurality of face images of each angle of the sampled user along the preset track; and constructing a 3D face model according to a plurality of face images. In one implementation, the planning image acquisition device includes a preset trajectory surrounding a sampled user, including: collecting a historical movement track of the sampled user before being sampled; obtaining a predicted movement track of the sampled user according to the historical movement track; And planning a preset track of the image acquisition device according to the predicted moving track of the sampled user. In one implementation, the planning image acquisition device includes a preset trajectory surrounding a sampled user, including: Determining an estimated track around the sampled user, wherein the estimated track is annular taking the sampled user as a center; Marking a first point on the estimated track, wherein the first point points to the midpoint of the sampled user along the radial direction of the estimated track; marking a second point and a third point on two sides of the first point, wherein the included angle between the connecting line of the second point and the sampled user and the connecting line of the third point and the sampled user is larger than ninety degrees; and drawing a ring shape according to the first point, the second point and the third point, and planning a preset track of the image acquisition device. In one implementation manner, the controlling the image capturing device to movably capture a plurality of face images of each angle of the sampled user along the preset track includes: monitoring the real-time position of the sampled user; Calculating the real-time distance between the real-time position and the initial image acquisition device, wherein the initial image acquisition device is positioned at a first point of the preset track; and when the real-time distance is smaller than a preset distance, controlling the image acquisition device to movably acquire a plurality of face images of each angle of the sampled user along the preset track. In one implementation manner, when the real-time distance is smaller than a preset distance, the image acquisition device is controlled to move along the preset track to acquire a plurality of face images of each angle of the sampled user, including: when the real-time distance is smaller than the focusing distance of the image acquisition device in the preset distance, controlling the image acquisition device to move from the first point of the preset track to the second point, the first point and the third point repeatedly in sequence; and controlling the image acquisition device in repeated movement to acquire face images of the sampled user at the position of the first point, the position of the second point and the position of the third point respectively, so as to obtain a plurality of face images of e