Disclosure of Invention
The invention aims to overcome the defects that in the prior art, a 3D camera is too expensive, the number of 2D images required for building a 3D model by utilizing a plurality of 2D images is large, so that the required computing resources are very high and the computing cost is also high.
The invention solves the technical problems by the following technical scheme:
the data processing method for generating the three-dimensional model based on the two-dimensional image is characterized by comprising the following steps of:
acquiring three two-dimensional images of a head target, namely a first image, a second image and a third image, wherein the value ranges of included angles of the first image, the third image and the second image in the shooting directions are respectively 75 and 105;
And obtaining a three-dimensional model of the head target by using the three two-dimensional images through an artificial intelligence algorithm.
Preferably, the data processing method further comprises:
Acquiring a three-dimensional model database, wherein the three-dimensional model database comprises an original three-dimensional image;
carrying out standardization processing on each original three-dimensional image to obtain a standard three-dimensional image;
making artificial intelligent learning by using all the standard three-dimensional models to obtain a training template;
And acquiring a three-dimensional model of the head target by using the three two-dimensional images through the training template.
Preferably, the training template is obtained by using all the standard three-dimensional models to perform artificial intelligent learning, and the training template comprises:
for each standard three-dimensional model, acquiring data characteristic expression of the standard three-dimensional model, and carrying out statistics on the data characteristic expression to obtain average data and mean square error data of the data characteristic expression;
and performing artificial intelligent learning by using the average data and the mean square error data of all the standard three-dimensional models to obtain training templates, wherein the training templates reconstruct different face models through control parameters.
Preferably, the obtaining, by the training template, the three-dimensional model of the head target by using the three two-dimensional images includes:
Identifying contour features of the first image, the second image and the third image;
And acquiring a three-dimensional model of the head target by utilizing the outline features through the training template.
Preferably, the obtaining, by the training template, the three-dimensional model of the head target using the contour features includes:
Acquiring a shooting direction of the two-dimensional image according to the outline characteristics;
searching a training template matched with the outline features according to the shooting direction;
and adjusting the shape of the training template according to the contour features to obtain a three-dimensional model of the head target.
Preferably, the data processing method includes a normalization model, the normalization model is a tensor model, and the normalizing process is performed on each original three-dimensional image to obtain a standard three-dimensional image, including:
For each original three-dimensional image, adjusting the standardized model according to the original three-dimensional model to obtain the standard three-dimensional image.
Preferably, said adjusting said standardized model according to said original three-dimensional model to obtain said standard three-dimensional image comprises:
identifying feature points of the five sense organs of the original three-dimensional image;
Adjusting the size of the standardized model according to the feature points of the five sense organs, and aligning the original three-dimensional image with the standardized model in space;
for each image point on the standardized model, acquiring an intersection point of a normal line at the image point and an original three-dimensional image;
and adjusting the standardized model according to a preset rule to obtain the standard three-dimensional image, wherein the preset rule is to adjust the length between each image point and the corresponding intersection point to be the same length.
The invention also provides a data processing component for generating a three-dimensional model based on the two-dimensional image, which is characterized in that the data processing component comprises an acquisition module and a calculation module,
The acquisition module is used for acquiring three two-dimensional images of a head target, namely a first image, a second image and a third image, wherein the value ranges of included angles of the first image, the third image and the second image in the shooting directions are all 75, 105;
The computing module is used for acquiring a three-dimensional model of the head target by utilizing the three two-dimensional images through an artificial intelligence algorithm.
Preferably, the data processing assembly further comprises a data module, a sorting module and a training module,
The data module is used for acquiring a three-dimensional model database, and the three-dimensional model database comprises an original three-dimensional image;
The arrangement module is used for carrying out standardized processing on each original three-dimensional image to obtain a standard three-dimensional image;
the training module is used for utilizing all the standard three-dimensional models to perform artificial intelligent learning to obtain a training template;
The calculation module is used for obtaining a three-dimensional model of the head target through the training template by utilizing the three two-dimensional images.
Preferably, the data processing assembly further comprises an identification module, a processing module and a matching module,
The identification module is used for identifying outline features of the first image, the second image and the third image;
the processing module is used for acquiring the shooting direction of the two-dimensional image according to the contour features;
The matching module is used for searching a training template matched with the contour features according to the shooting direction;
The calculation module is used for adjusting the shape of the training template according to the contour features so as to obtain a three-dimensional model of the head target.
On the basis of conforming to the common knowledge in the field, the above preferred conditions can be arbitrarily combined to obtain the preferred examples of the invention.
The invention has the positive progress effects that:
The data processing method and the data processing component for generating the three-dimensional model based on the two-dimensional images can generate the 3D model by utilizing three two-dimensional images, so that the 3D model with high image quality can be obtained. In addition, the face recognition system is combined with the existing face recognition system, the accuracy of face recognition in a large angle is greatly improved, the face recognition in a full face of up to 90 degrees can be supported, and the target can be still quickly locked when the camera is too high and the shooting target deflects the head.
Detailed Description
The invention is further illustrated by means of the following examples, which are not intended to limit the scope of the invention.
Example 1
The embodiment provides a data processing component for generating a three-dimensional model based on a two-dimensional image.
The data processing assembly comprises an acquisition module and a calculation module,
The acquisition module is used for acquiring three two-dimensional images of a head target, namely a first image, a second image and a third image, wherein the value ranges of included angles of the first image, the third image and the second image in the shooting directions are all 75, 105;
In this embodiment, the included angle has a value of [85, 95], and the included angle in the optimal shooting direction has a value of 90 degrees.
The computing module is used for acquiring a three-dimensional model of the head target by utilizing the three two-dimensional images through an artificial intelligence algorithm.
Specifically, the data processing assembly further comprises a data module, a sorting module and a training module, wherein the three modules are used for obtaining the three-dimensional model of the head target by utilizing the three two-dimensional images through an artificial intelligence algorithm.
The data module is used for acquiring a three-dimensional model database, and the three-dimensional model database comprises an original three-dimensional image;
The arrangement module is used for carrying out standardized processing on each original three-dimensional image to obtain a standard three-dimensional image;
the training module is used for utilizing all the standard three-dimensional models to perform artificial intelligent learning to obtain a training template;
The calculation module is used for obtaining a three-dimensional model of the head target through the training template by utilizing the three two-dimensional images.
The data processing component of this embodiment further includes an interception module.
For each standard three-dimensional model, the intercepting module is used for acquiring three two-dimensional screenshots of the standard three-dimensional model, namely a first screenshot, a second screenshot and a third screenshot, wherein the value ranges of included angles in the intercepting directions of the first screenshot, the third screenshot and the second screenshot are respectively 75 and 105;
In this embodiment, the capturing is performed by placing the standard three-dimensional model on one side of a target plane, where the target plane is perpendicular to the capturing direction, that is, the observing direction (the same as the photographing direction), and then vertically dropping the pixel points on the standard three-dimensional model on the target plane from near to far in sequence, so as to generate the two-dimensional screenshot.
The training module is used for utilizing all the standard three-dimensional models to perform artificial intelligent learning to obtain a training template, and the training template comprises three corresponding relations between two-dimensional screenshot and the standard three-dimensional models.
The data processing assembly also comprises an identification module, a processing module and a matching module,
The identification module is used for identifying outline features of the first image, the second image and the third image;
the processing module is used for acquiring the shooting direction of the two-dimensional image according to the contour features;
The matching module is used for searching a training template matched with the contour features according to the shooting direction;
The calculation module is used for adjusting the shape of the training template according to the contour features so as to obtain a three-dimensional model of the head target.
Further, the three-dimensional model of the head target in this embodiment includes a structural layer and a pixel layer, and the computing module is configured to adjust the shape of the training template according to the contour feature to obtain the structural layer of the three-dimensional model, and after the structural layer is obtained, three two-dimensional images of the head target are attached to the structural layer along the shooting direction of the contour feature to obtain the three-dimensional model.
The data processing method comprises a normalization component, wherein the normalization component is a tensor model.
The tensor model may be a functional formula set on a pre-stored image and representing a relationship between image points, and the generating module is configured to set the functional formula between the image points on the 3D image by using the functional formula on the pre-stored image through an artificial intelligence deep learning algorithm.
For each original three-dimensional image, the arrangement module is used for adjusting the standardized model according to the original three-dimensional model to obtain the standard three-dimensional image.
Specifically, the arrangement module is used for:
identifying feature points of the five sense organs of the original three-dimensional image;
Adjusting the size of the standardized model according to the feature points of the five sense organs, and aligning the original three-dimensional image with the standardized model in space;
for each image point on the standardized model, acquiring an intersection point of a normal line at the image point and an original three-dimensional image;
and adjusting the standardized model according to a preset rule to obtain the standard three-dimensional image, wherein the preset rule is to adjust the length between each image point and the corresponding intersection point to be the same length.
Referring to fig. 1, with the above data processing component, this embodiment further provides a data processing method, including:
Step 101, three two-dimensional images of a head target are obtained, namely a first image, a second image and a third image, wherein the value ranges of included angles of the first image, the third image and the second image in the shooting directions are respectively 75 and 105;
In this embodiment, the included angle has a value of [85, 95], and the included angle in the optimal shooting direction has a value of 90 degrees.
Step 102, acquiring a three-dimensional model of the head target by using the three two-dimensional images through an artificial intelligence algorithm.
Prior to step 101, the data processing method further comprises:
step 1001, obtaining a three-dimensional model database, wherein the three-dimensional model database comprises an original three-dimensional image;
step 1002, performing standardization processing on each original three-dimensional image to obtain a standard three-dimensional image;
Step 1003, using all the standard three-dimensional models to perform artificial intelligent learning to obtain a training template;
Step 102 is: and acquiring a three-dimensional model of the head target by using the three two-dimensional images through the training template. That is, step 102 is specifically: and obtaining a three-dimensional model of the head target by using the three two-dimensional images through an artificial intelligence algorithm and the training template.
Referring to fig. 2, step 1003 includes:
Step 10031, for each standard three-dimensional model, obtaining a data characteristic expression of the standard three-dimensional model, and counting the data characteristic expressions to obtain average data and mean square error data of the data characteristic expressions;
And 10032, performing artificial intelligent learning by using the average data and the mean square error data of all the standard three-dimensional models to obtain training templates, wherein the training templates are used for reconstructing different face models through control parameters.
Referring to fig. 3, step 102 includes:
Step 1021, identifying contour features of the first image, the second image and the third image;
step 1022, acquiring a shooting direction of the two-dimensional image according to the contour feature;
Step 1023, searching a training template matched with the contour features according to the shooting direction;
step 1024, adjusting the shape of the training template according to the contour feature to obtain the three-dimensional model of the head target.
The data processing method includes a standardized model, the standardized model is a tensor model, and step 1002 includes:
For each original three-dimensional image, adjusting the standardized model according to the original three-dimensional model to obtain the standard three-dimensional image.
Referring to fig. 4, specifically, step 1002 includes:
10021. Identifying feature points of the five sense organs of the original three-dimensional image;
10022. Adjusting the size of the standardized model according to the feature points of the five sense organs, and aligning the original three-dimensional image with the standardized model in space;
10023. For each image point on the standardized model, acquiring an intersection point of a normal line at the image point and an original three-dimensional image;
Further, in step 10023, an included angle between the normal line at the image point and the normal line of the adjacent image point is obtained in a predetermined area (such as a face, a forehead, etc.), if the included angle is smaller than a predetermined value, an intersection point of the normal line at the image point and the original three-dimensional image is obtained, if the included angle is larger than another predetermined value, the image point is used as a noise point, and flattening is performed, wherein the processing mode may be to obtain an average value of the included angles of the normal lines in a designated area around the noise point image point, and then set the noise point image point according to the average value.
10024. And adjusting the standardized model according to a preset rule to obtain the standard three-dimensional image, wherein the preset rule is to adjust the length between each image point and the corresponding intersection point to be the same length.
According to the data processing method and the data processing component based on the two-dimensional image generation three-dimensional model, the three-dimensional image can be used for generating the 3D model, the accuracy of face recognition is improved, the 3D model with high image quality can be obtained, the face recognition when the product supports the face recognition when the face is completely sideways at 90 degrees, and the target can be locked rapidly when the camera is too high and the shooting target deflects the head.
While specific embodiments of the invention have been described above, it will be appreciated by those skilled in the art that these are by way of example only, and the scope of the invention is defined by the appended claims. Various changes and modifications to these embodiments may be made by those skilled in the art without departing from the principles and spirit of the invention, but such changes and modifications fall within the scope of the invention.