An image generation method, an authentication method, an authentication device, and an authentication apparatus
Patent Information
- Application Number
- CN202210685998.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-16
- Publication Date
- 2026-11-03
- Estimated Expiration
- 2042-06-16
AI Technical Summary
In existing technologies, manually collecting images of biological objects from different shooting angles results in low image generation and authentication efficiency.
A predictive model is trained based on images of biological objects collected from multiple preset shooting angles to generate images of biological objects from any shooting angle. A multi-view virtual model is constructed using neural radiation fields for authentication.
It improves image generation and authentication efficiency, simplifies the process of generating images of biological objects from any shooting perspective, and enhances the efficiency of image generation and authentication.
Smart Images

Figure CN117294927B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to an image generation method, authentication method, apparatus, and authentication device. Background Technology
[0002] With the rapid development of image processing technology, biometrics are being used more and more widely in the field of identity authentication. In scenarios where biometrics are used for identity authentication, it is necessary to obtain images containing biological objects in advance.
[0003] For example, in scenarios where iris scanning is used for user authentication, to improve authentication reliability, it is necessary to pre-acquire images of the user's eyeballs from multiple different shooting angles, with each image corresponding to a shooting angle. In related technologies, images of the user's eyeballs from different shooting angles are manually collected, resulting in low image generation efficiency, and consequently, low authentication efficiency. Summary of the Invention
[0004] The purpose of this application is to provide an image generation method, authentication method, apparatus, and authentication device capable of generating images of biological objects from any shooting perspective, improving image generation efficiency, and consequently, improving the efficiency of image-based authentication. The specific technical solution is as follows:
[0005] Firstly, in order to achieve the above objectives, embodiments of this application disclose an image generation method, the method comprising:
[0006] For each first pixel position of the biological object imaged from the first shooting angle of the camera, multiple first three-dimensional spatial points in the optical path corresponding to the first pixel position are determined; wherein, the optical path corresponding to the first pixel position represents the propagation path of light rays pointing from the origin of the camera's viewpoint to the biological object, and whose backward extension passes through the first pixel position.
[0007] The three-dimensional coordinates of each first three-dimensional spatial point, and the first camera viewpoint relative to the origin of the camera at the first shooting viewpoint, are input into a pre-trained prediction model to obtain the predicted image parameter value of the first three-dimensional spatial point; wherein, the prediction model is trained based on images of the biological object collected at multiple preset shooting viewpoints; the predicted image parameter value includes the predicted pixel value.
[0008] Based on the predicted image parameter values of each first three-dimensional spatial point, the predicted pixel value of the first pixel position is obtained;
[0009] Based on the predicted pixel values at each first pixel position, an image of the biological object is obtained from the first shooting perspective.
[0010] Optionally, the predicted image parameter values may also include the predicted transparency of the first three-dimensional spatial point.
[0011] Optionally, determining the plurality of first three-dimensional spatial points in the optical path corresponding to the first pixel position includes:
[0012] Based on the relative position of the biological object and the camera, and the refractive index of the biological object, the external light path of the light rays pointing from the origin of the camera's viewpoint to the biological object, and whose backward extension passes through the first pixel position, is determined, as well as the internal light path inside the biological object.
[0013] Multiple three-dimensional spatial points are selected from each external optical path and internal optical path, respectively, as the first three-dimensional spatial point;
[0014] The process of obtaining the predicted pixel value at the first pixel location based on the predicted image parameter values of each first three-dimensional spatial point includes:
[0015] For each optical path in the external and internal optical paths, based on the neural radiation field, the predicted pixel values and predicted transparency of multiple first three-dimensional spatial points in the optical path are accumulated to obtain the predicted pixel value corresponding to the optical path.
[0016] The sum of the predicted pixel values corresponding to each optical path is calculated and used as the predicted pixel value for the first pixel position.
[0017] Optionally, determining the external optical path of light rays pointing from the camera's viewpoint origin to the biological object, with their backward extension passing through the first pixel position, and the internal optical path within the biological object, based on the relative position of the biological object and the refractive index of the biological object, includes:
[0018] Based on the relative position of the biological object and the camera, a first external light path is determined, which is the light rays that point from the origin of the camera's viewpoint to the biological object and whose backward extension passes through the first pixel position and are incident on the front of the biological object.
[0019] Based on the refractive index of the biological object and the position of the intersection point between the first external optical path and the outer surface of the biological object, the internal optical path of the light ray inside the biological object is determined;
[0020] Based on the refractive index of the biological object and the position of the intersection point between the internal optical path and the outer surface of the biological object, the second external optical path after the light rays are emitted from the biological object is determined.
[0021] Optionally, the training process of the prediction model includes the following steps:
[0022] Acquire a second image of the biological object captured from each preset shooting angle;
[0023] For each second pixel position corresponding to the biological object in each second image, a plurality of second three-dimensional spatial points in the optical path corresponding to the second pixel position are determined; wherein, the optical path corresponding to the second pixel position represents the propagation path of light rays pointing from the origin of the camera's viewpoint to the biological object, and whose backward extension line passes through the second pixel position;
[0024] The three-dimensional coordinates of each second three-dimensional spatial point, and the second camera viewpoint relative to the second three-dimensional spatial point under the preset shooting viewpoint corresponding to the second image, are input into the multilayer perceptron model of the initial structure to obtain the predicted pixel value and predicted transparency of the second three-dimensional spatial point.
[0025] The predicted pixel value and predicted transparency of each second three-dimensional spatial point are accumulated based on the neural radiation field to obtain the predicted pixel value of the second pixel position.
[0026] Based on the predicted pixel value at the second pixel location and the actual pixel value at the second pixel location in the second image, the loss function value corresponding to the second pixel location is determined;
[0027] Based on the loss function value corresponding to each second pixel position, the model parameters of the multilayer perceptron model of the initial structure are adjusted until the multilayer perceptron model of the initial structure converges, thus obtaining the prediction model.
[0028] Secondly, in order to achieve the above objectives, embodiments of this application disclose an authentication method, the method comprising:
[0029] Retrieve the image to be authenticated that contains biological objects;
[0030] The specified shooting angle corresponding to the image to be authenticated is input into a multi-view virtual model of a biological object pre-constructed based on a neural radiation field to obtain an image of the biological object under the specified shooting angle, which is used as the image to be matched; wherein, the multi-view virtual model is obtained based on images of the biological object collected under multiple preset shooting angles;
[0031] If the image to be matched does not match the image to be authenticated, then the authentication of the image to be authenticated is determined to have failed.
[0032] If the image to be matched matches the image to be authenticated, then the image to be authenticated is determined to have been successfully authenticated.
[0033] Optionally, the biological object is the iris;
[0034] The step of inputting the specified shooting angle corresponding to the image to be authenticated into a pre-constructed multi-view virtual model of a biological object based on a neural radiation field to obtain an image of the biological object under the specified shooting angle, which serves as the image to be matched, includes:
[0035] For each third pixel position of the iris imaged under the specified shooting angle, based on the position of the iris under the specified shooting angle and the refractive index of the iris, determine the external light path of the light rays pointing from the origin of the angle corresponding to the specified shooting angle to the iris, and whose backward extension passes through the third pixel position, and the internal light path of the light rays inside the iris.
[0036] For each of the external and internal optical paths, based on the neural radiation field and the predicted image parameter values of multiple third three-dimensional spatial points in that optical path, the predicted pixel value corresponding to that optical path is obtained; wherein, the predicted image parameter values include the predicted pixel value of the third three-dimensional spatial point;
[0037] Calculate the sum of the predicted pixel values corresponding to each optical path, and use it as the predicted pixel value at the third pixel position;
[0038] Based on the predicted pixel values at each third pixel position, the image of the iris to be matched under the specified shooting angle is obtained.
[0039] Thirdly, in order to achieve the above objectives, embodiments of this application disclose an image generation apparatus, the apparatus comprising:
[0040] The three-dimensional spatial point determination module is used to determine multiple first three-dimensional spatial points in the optical path corresponding to each first pixel position of the biological object imaged from the first shooting viewpoint of the camera; wherein, the optical path corresponding to the first pixel position represents the propagation path of light rays pointing from the origin of the camera's viewpoint to the biological object, and whose backward extension passes through the first pixel position.
[0041] The prediction module is used to input the three-dimensional coordinates of each first three-dimensional spatial point, and the first camera viewpoint relative to the origin of the camera viewpoint at the first shooting viewpoint, into a pre-trained prediction model to obtain the predicted image parameter value of the first three-dimensional spatial point; wherein, the prediction model is trained based on images of the biological object collected at multiple preset shooting viewpoints; the predicted image parameter value includes predicted pixel value.
[0042] The predicted pixel value acquisition module is used to obtain the predicted pixel value of the first pixel position based on the predicted image parameter values of each first three-dimensional spatial point.
[0043] The image generation module is used to obtain an image of the biological object from the first shooting perspective based on the predicted pixel values at each first pixel position.
[0044] Optionally, the predicted image parameter values may also include the predicted transparency of the first three-dimensional spatial point.
[0045] Optionally, the three-dimensional spatial point determination module includes:
[0046] The optical path determination submodule is used to determine, based on the relative position of the biological object and the camera, and the refractive index of the biological object, the external optical path of the light rays pointing from the origin of the camera's viewpoint to the biological object, and whose backward extension passes through the first pixel position, and the internal optical path of the light rays inside the biological object.
[0047] The three-dimensional spatial point determination submodule is used to select multiple three-dimensional spatial points from each external optical path and internal optical path, respectively, as the first three-dimensional spatial point;
[0048] The predicted pixel value acquisition module includes:
[0049] The first predicted pixel value acquisition submodule is used to accumulate the predicted pixel value and predicted transparency of multiple first three-dimensional spatial points in each of the external and internal optical paths based on the neural radiation field to obtain the predicted pixel value corresponding to the optical path.
[0050] The second predicted pixel value acquisition submodule is used to calculate the sum of the predicted pixel values corresponding to each optical path, and use it as the predicted pixel value of the first pixel position.
[0051] Optionally, the optical path determination submodule is specifically used to determine, based on the relative position of the biological object and the camera, a first external optical path in front of the biological object, from the origin of the camera's viewpoint pointing to the biological object, and whose backward extension passes through the first pixel position.
[0052] Based on the refractive index of the biological object and the position of the intersection point between the first external optical path and the outer surface of the biological object, the internal optical path of the light ray inside the biological object is determined;
[0053] Based on the refractive index of the biological object and the position of the intersection point between the internal optical path and the outer surface of the biological object, the second external optical path after the light rays are emitted from the biological object is determined.
[0054] Optionally, the device further includes:
[0055] The model training module is used to acquire a second image of the biological object captured from each preset shooting angle;
[0056] For each second pixel position corresponding to the biological object in each second image, a plurality of second three-dimensional spatial points in the optical path corresponding to the second pixel position are determined; wherein, the optical path corresponding to the second pixel position represents the propagation path of light rays pointing from the origin of the camera's viewpoint to the biological object, and whose backward extension line passes through the second pixel position;
[0057] The three-dimensional coordinates of each second three-dimensional spatial point, and the second camera viewpoint relative to the second three-dimensional spatial point under the preset shooting viewpoint corresponding to the second image, are input into the multilayer perceptron model of the initial structure to obtain the predicted pixel value and predicted transparency of the second three-dimensional spatial point.
[0058] The predicted pixel value and predicted transparency of each second three-dimensional spatial point are accumulated based on the neural radiation field to obtain the predicted pixel value of the second pixel position.
[0059] Based on the predicted pixel value at the second pixel location and the actual pixel value at the second pixel location in the second image, the loss function value corresponding to the second pixel location is determined;
[0060] Based on the loss function value corresponding to each second pixel position, the model parameters of the multilayer perceptron model of the initial structure are adjusted until the multilayer perceptron model of the initial structure converges, thus obtaining the prediction model.
[0061] Fourthly, in order to achieve the above objectives, embodiments of this application disclose an authentication device, the device comprising:
[0062] The image acquisition module is used to acquire images containing biological objects to be authenticated.
[0063] The image to be matched determination module is used to input the specified shooting angle corresponding to the image to be authenticated into a multi-view virtual model of a biological object pre-constructed based on a neural radiation field, and obtain an image of the biological object under the specified shooting angle as the image to be matched; wherein, the multi-view virtual model is obtained based on images of the biological object collected under multiple preset shooting angles;
[0064] The first processing module is used to determine that the authentication of the image to be authenticated fails if the image to be matched is inconsistent with the image to be authenticated.
[0065] The second processing module is used to determine that the image to be authenticated is successfully authenticated if the image to be matched is consistent with the image to be authenticated.
[0066] Optionally, the biological object is the iris;
[0067] The image to be matched determination module is specifically used to determine, for each third pixel position of the iris imaged under the specified shooting angle, based on the position of the iris under the specified shooting angle and the refractive index of the iris, the external light path of the light rays pointing from the origin of the viewpoint corresponding to the specified shooting angle to the iris, and whose backward extension passes through the third pixel position, and the internal light path of the light rays inside the iris.
[0068] For each of the external and internal optical paths, based on the neural radiation field and the predicted image parameter values of multiple third three-dimensional spatial points in that optical path, the predicted pixel value corresponding to that optical path is obtained; wherein, the predicted image parameter values include the predicted pixel value of the third three-dimensional spatial point;
[0069] Calculate the sum of the predicted pixel values corresponding to each optical path, and use it as the predicted pixel value at the third pixel position;
[0070] Based on the predicted pixel values at each third pixel position, the image of the iris to be matched under the specified shooting angle is obtained.
[0071] In another aspect of this application, in order to achieve the above objectives, an embodiment of this application also discloses an authentication device, characterized in that it includes a camera and a processor;
[0072] The camera is used to acquire images containing biological objects to be authenticated;
[0073] The processor is configured to input a specified shooting angle corresponding to the image to be authenticated into a pre-constructed multi-view virtual model of a biological object based on a neural radiation field, to obtain an image of the biological object under the specified shooting angle, which serves as the image to be matched; wherein, the multi-view virtual model is obtained based on images of the biological object collected under multiple preset shooting angles; if the image to be matched is inconsistent with the image to be authenticated, the authentication of the image to be authenticated is determined to have failed; if the image to be matched is consistent with the image to be authenticated, the authentication of the image to be authenticated is determined to have succeeded.
[0074] Optionally, the camera is also used to acquire a depth image corresponding to the image to be authenticated;
[0075] The processor is further configured to acquire the intrinsic parameters of the camera, and determine the specified shooting angle corresponding to the image to be authenticated based on the depth image, the image to be authenticated, and the intrinsic parameters of the camera.
[0076] In another aspect of this application, in order to achieve the above objectives, embodiments of this application also disclose an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;
[0077] The memory is used to store computer programs;
[0078] When the processor executes the program stored in the memory, it implements the image generation method or authentication method as described above.
[0079] In another aspect of this application, a computer-readable storage medium is provided, wherein a computer program is stored therein, and when executed by a processor, the computer program implements the image generation method or authentication method as described above.
[0080] This application also provides a computer program product containing instructions that, when run on a computer, cause the computer to execute any of the image generation methods or authentication methods described above.
[0081] Beneficial effects of the embodiments in this application:
[0082] The image generation method provided in this application, for each first pixel position of a biological object imaged from a first shooting viewpoint of a camera, determines multiple first three-dimensional spatial points in the optical path corresponding to the first pixel position; wherein, the optical path corresponding to the first pixel position represents the propagation path of light rays pointing from the origin of the camera's viewpoint to the biological object, and whose backward extension passes through the first pixel position; the three-dimensional coordinates of each first three-dimensional spatial point, and the first camera viewpoint of the origin of the camera's viewpoint relative to the first three-dimensional spatial point in the first shooting viewpoint, are input into a pre-trained prediction model to obtain the predicted image parameter value of the first three-dimensional spatial point; wherein, the prediction model is trained based on images of biological objects collected from multiple preset shooting viewpoints; the predicted image parameter value includes a predicted pixel value; based on the predicted image parameter value of each first three-dimensional spatial point, the predicted pixel value of the first pixel position is obtained; based on the predicted pixel value of each first pixel position, the image of the biological object in the first shooting viewpoint is obtained.
[0083] Based on the above processing, for any shooting angle (e.g., the first shooting angle), the electronic device can automatically generate an image of the biological object from that shooting angle. Compared with the prior art where images of biological objects are manually collected from that shooting angle, this can improve the efficiency of image generation and thus improve the efficiency of image-based authentication.
[0084] Of course, implementing any product or method of this application does not necessarily require achieving all of the advantages described above at the same time. Attached Figure Description
[0085] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other embodiments can be obtained based on these drawings.
[0086] Figure 1 A flowchart illustrating an image generation method provided in this application embodiment;
[0087] Figure 2 A schematic diagram of camera imaging provided for an embodiment of this application;
[0088] Figure 3 This application provides a schematic diagram illustrating the principle of determining points in three-dimensional space.
[0089] Figure 4 A flowchart illustrating another image generation method provided in this application embodiment;
[0090] Figure 5 A flowchart illustrating another image generation method provided in this application embodiment;
[0091] Figure 6 A schematic diagram illustrating the principle of determining an optical path, provided for an embodiment of this application;
[0092] Figure 7 A flowchart illustrating the training process of a prediction model provided in an embodiment of this application;
[0093] Figure 8 A schematic diagram illustrating the acquisition of a second image provided in an embodiment of this application;
[0094] Figure 9 This is a schematic diagram of a prediction model training process provided in an embodiment of this application;
[0095] Figure 10 A schematic diagram illustrating an image generation process provided in an embodiment of this application;
[0096] Figure 11 A flowchart illustrating an authentication method provided in this application embodiment;
[0097] Figure 12 This is a structural diagram of an image generation apparatus provided in an embodiment of this application;
[0098] Figure 13 A structural diagram of an authentication device provided in an embodiment of this application;
[0099] Figure 14 This is a structural diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0100] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art based on this application are within the scope of protection of this application.
[0101] In related technologies, manually collecting images of biological objects from different shooting angles results in low image generation efficiency, which in turn reduces the efficiency of authentication based on biological object images. To address this issue, this application provides an image generation method applicable to electronic devices. This electronic device can generate images of biological objects from any shooting angle based on the image generation method provided in this application. The biological objects mentioned in this application can include objects such as faces, eyeballs, and fingers.
[0102] In one implementation, the electronic device is used to generate a three-dimensional model of a biological object. For example, the electronic device can generate multiple images of the biological object from different shooting perspectives based on the image generation method provided in the embodiments of this application. Then, the electronic device can construct a three-dimensional model of the biological object based on the generated multiple images.
[0103] In one implementation, the electronic device can also perform authentication based on images of biological objects. For example, the electronic device can generate multiple images of sample biological objects from different shooting perspectives using the image generation method provided in the embodiments of this application. Then, after acquiring an image to be authenticated containing the biological object to be authenticated, the electronic device can authenticate the image based on the multiple pre-generated images to determine whether the biological object in the image to be authenticated is a sample biological object.
[0104] See Figure 1 , Figure 1 A flowchart of an image generation method provided in this application embodiment, the method may include the following steps:
[0105] S101: For each first pixel position of the biological object imaged under the first shooting view of the camera, determine multiple first three-dimensional spatial points in the optical path corresponding to the first pixel position.
[0106] Here, the light path corresponding to the first pixel position represents the propagation path of light rays pointing from the camera's viewpoint origin to the biological object, with the reverse extension line passing through the first pixel position.
[0107] S102: Input the three-dimensional coordinates of each first three-dimensional spatial point, and the first camera viewpoint relative to the first three-dimensional spatial point under the first shooting viewpoint, into the pre-trained prediction model to obtain the predicted image parameter value of the first three-dimensional spatial point.
[0108] The prediction model is trained based on images of biological objects collected from multiple preset shooting angles.
[0109] S103: Based on the predicted image parameter values of each first three-dimensional spatial point, obtain the predicted pixel value of the first pixel position.
[0110] S104: Based on the predicted pixel values at each first pixel position, obtain an image of the biological object from the first shooting perspective.
[0111] The image generation method provided in this application embodiment can automatically generate an image of a biological object from any shooting angle (e.g., a first shooting angle). Compared with the prior art where images of biological objects are manually collected from the shooting angle, this method can improve the efficiency of image generation and thus improve the efficiency of image-based authentication.
[0112] Furthermore, based on the above processing, an implicit 3D space can be constructed through the predictive model to realize the mapping between the 3D coordinates of 3D points, camera viewpoint, and image parameter values. Compared with the method of combining 3D modeling and UV mapping, there is no need to construct an explicit 3D model, which can simplify the process of generating images of biological objects from any shooting viewpoint.
[0113] Regarding step S101, the first shooting viewpoint refers to any shooting viewpoint, which can be determined according to the current business requirements. That is, the first shooting viewpoint represents the shooting viewpoint corresponding to the image containing the biological object that needs to be generated. It can be understood that the biological object is located within the field of view of the camera under the first shooting viewpoint.
[0114] In one implementation, the first shooting perspective can be represented by the angle of the camera relative to the biological object. Once the position of the camera relative to the biological object is determined, the angle of the camera relative to the biological object can be determined. For example, by modeling based on the relative position of the camera and the biological object, the coordinates of the biological object and the camera can be obtained, and the angle of the camera relative to the biological object can be determined.
[0115] Based on the imaging principle and camera parameters, for each pixel position (i.e., the first pixel position) of the biological object imaged in the camera, the electronic device determines the corresponding optical path. This optical path represents the propagation path of light rays pointing from the camera's viewpoint origin to the biological object, with the backward extension passing through the first pixel position. In other words, the object in the optical path corresponding to the first pixel position is imaged onto that first pixel position.
[0116] For example, see Figure 2 , Figure 2 This is a schematic diagram of camera imaging provided in an embodiment of this application.
[0117] Figure 2 In the diagram, S represents the camera's viewpoint origin, and the pixel position of point A on the object as imaged under this shooting viewpoint is point A1. That is, the light path corresponding to pixel position A1 represents the light path from the viewpoint origin S to point A, and point A represents a three-dimensional point in this light path. Similarly, the pixel position of point B on the object as imaged under this shooting viewpoint is point B1. The light path corresponding to pixel position B1 represents the light path from the viewpoint origin S to point B, and point B represents a three-dimensional point in this light path. Point C represents another three-dimensional point in this light path.
[0118] Regarding step S102, the camera viewpoint represents the viewpoint of the camera's viewpoint origin relative to a point in three-dimensional space. For example, it can be represented by (θ, φ), where θ represents the vertical deflection angle of the viewpoint origin relative to the three-dimensional space point, and φ represents the horizontal deflection angle of the viewpoint origin relative to the three-dimensional space point.
[0119] In other words, under the same shooting angle, the camera's origin point of view can be the same or different relative to different points in three-dimensional space. For example, Figure 2 In the shooting angle shown, the camera angle of the origin S relative to the three-dimensional space point A is different from the camera angle of the origin S relative to the three-dimensional space point B; the camera angle of the origin S relative to the three-dimensional space point B is the same as the camera angle of the origin S relative to the three-dimensional space point C.
[0120] The prediction model is trained on images of biological objects (i.e., the second image) collected from multiple preset shooting angles. That is, the prediction model can learn the mapping relationship between the three-dimensional coordinates of each three-dimensional spatial point, the camera angle of the origin of the viewpoint relative to the three-dimensional spatial point, and the pixel value of the three-dimensional spatial point based on the pixel value (i.e., RGB (Red, Green, and Blue) value) of each pixel position in the second image.
[0121] In one implementation, the electronic device can record the above mapping relationship. Then, after determining multiple first three-dimensional spatial points in the optical path corresponding to the first pixel position, it can calculate the pixel value corresponding to the three-dimensional coordinates of each first three-dimensional spatial point and the first camera viewpoint of the camera's viewpoint origin relative to the first three-dimensional spatial point based on the above mapping relationship. That is, the predicted pixel value of the first three-dimensional spatial point is obtained.
[0122] In one embodiment, the predicted image parameter values may further include the predicted transparency of the first three-dimensional spatial point. That is, the above mapping relationship can represent the relationship between the three-dimensional coordinates of each three-dimensional spatial point, the camera's viewpoint origin relative to that three-dimensional spatial point, and the pixel value and transparency of that three-dimensional spatial point. Accordingly, after determining multiple first three-dimensional spatial points in the optical path corresponding to the first pixel position, the pixel value and transparency corresponding to the three-dimensional coordinates of each first three-dimensional spatial point, the camera's viewpoint origin relative to that first three-dimensional spatial point in the first shooting viewpoint, can be calculated based on this mapping relationship; that is, the predicted pixel value and predicted transparency of the first three-dimensional spatial point can be obtained.
[0123] The transparency of a point in three-dimensional space can also be called voxel density, denoted by σ. The voxel density of a point in three-dimensional space represents the probability that a ray will be terminated when it passes through an infinitesimal particle at that point.
[0124] In one implementation, the prediction model may include a feature extraction layer and a fully connected layer. The feature extraction layer processes the 3D coordinates of a 3D point to obtain its predicted transparency and intermediate features. The fully connected layer then processes the intermediate features and the camera's viewpoint relative to the 3D point to obtain its predicted pixel value. In other words, the transparency of a 3D point is related to its spatial location, while its pixel value is related to both its spatial location and the camera's viewpoint relative to the 3D point.
[0125] For step S103, a pixel position in the image obtained by imaging based on the camera corresponds to all continuous spatial points (i.e., three-dimensional spatial points) on a ray emanating from the origin of the camera's viewpoint. Therefore, the final rendering color of this ray can be obtained based on all spatial points on this ray, which is the ray represented by the light path corresponding to the pixel position.
[0126] In one implementation, the average value of the predicted image parameter values for each first three-dimensional spatial point can be calculated to obtain the predicted pixel value at the first pixel location. Alternatively, the predicted image parameter values for each first three-dimensional spatial point can be accumulated to obtain the predicted pixel value at the first pixel location.
[0127] In one implementation, a finite number of three-dimensional spatial points can be selected from the optical path. Then, the predicted image parameter values of the selected three-dimensional spatial points are accumulated based on the Neural Radiance Field (NeRF) to obtain the pixel value (i.e., the predicted pixel value) at that pixel location. For example, the predicted pixel value and transparency of the selected three-dimensional spatial points can be accumulated based on the Neural Radiance Field to obtain the predicted pixel value at that pixel location.
[0128] For step S104, the image of the biological object under the first shooting perspective is a two-dimensional image, and the pixel value of each pixel position in the two-dimensional image is the calculated predicted pixel value of that pixel position.
[0129] In one embodiment, for each pixel location imaged within the camera's field of view (i.e., a scene containing biological objects), the electronic device can determine multiple three-dimensional spatial points in its corresponding optical path, and obtain a predicted pixel value for that pixel location based on the predicted pixel values and predicted transparency of these multiple three-dimensional spatial points. This allows the generated image to include not only biological objects but also the background and other objects in the aforementioned scene.
[0130] In one embodiment, if the refraction of light inside the biological object is not considered, for each first pixel position, the electronic device can determine a ray pointing from the origin of the camera's viewpoint to the biological object, and whose backward extension passes through the first pixel position, and select multiple three-dimensional spatial points from the ray as the first three-dimensional spatial points.
[0131] For example, electronic devices can sample uniformly in the ray to determine multiple three-dimensional spatial points, or they can sample non-uniformly to determine multiple three-dimensional spatial points.
[0132] For example, see Figure 3 , Figure 3 This is a schematic diagram illustrating the principle of determining a three-dimensional spatial point, as provided in an embodiment of this application.
[0133] Figure 3 In this context, the biological object represents the eyeball, and O represents the camera's origin of view. The ray OP emanating from the origin of view O does not refract within the biological object. The electronic device can directly select multiple three-dimensional points from the optical path of ray OP, i.e., points t1, ... t2. N There are N three-dimensional spatial points in total, and the pixel value of the corresponding pixel position is calculated based on the selected three-dimensional spatial points.
[0134] In one embodiment, biological objects such as faces, eyeballs, and fingers have a refractive index; that is, light is refracted when it enters the interior of such a biological object, causing a deflection of its propagation path, and is also refracted when it exits from the interior of such a biological object. The refractive index of such biological objects can be set empirically. The refractive index of an eyeball can be approximately determined based on the refractive index of objects that are similar to it, for example, it can be 1.33.
[0135] Therefore, in order to realistically simulate the imaging of biological objects and improve the accuracy of the generated images, see [reference needed]. Figure 4 ,exist Figure 1 Based on this, step S101 above may include the following steps:
[0136] S1011: For each first pixel position of the biological object imaged under the first shooting view of the camera, based on the relative position of the biological object and the camera, and the refractive index of the biological object, determine the external light path of the light rays pointing from the origin of the camera's view to the biological object, and whose backward extension passes through the first pixel position, both outside the biological object and inside the biological object.
[0137] S1012: Select multiple three-dimensional spatial points from each external optical path and internal optical path respectively, and use them as the first three-dimensional spatial points.
[0138] Accordingly, step S103 above may include the following steps:
[0139] S1031: For each optical path in the external and internal optical paths, based on the neural radiation field, the predicted pixel values and predicted transparency of multiple first three-dimensional spatial points in the optical path are accumulated to obtain the predicted pixel value corresponding to the optical path.
[0140] S1032: Calculate the sum of the predicted pixel values corresponding to each optical path, and use it as the predicted pixel value for the first pixel position.
[0141] In the embodiments of this application, the electronic device can determine the propagation path (i.e., external light path) of light emitted from the origin of the camera's viewpoint outside the biological object and the propagation path (i.e., internal light path) inside the biological object based on the relative position of the biological object and the refractive index of the biological object.
[0142] The determined external optical path can be one or more; the determined internal optical path can also be one or more. Specifically, the number of external and internal optical paths can be determined based on the structure of the biological object.
[0143] In one implementation, for each optical path (including external and internal optical paths), the electronic device can uniformly sample in the optical path to determine multiple three-dimensional spatial points, or it can non-uniformly sample to determine multiple three-dimensional spatial points.
[0144] For each determined optical path, the electronic device can individually accumulate the predicted pixel values and predicted transparency of multiple first three-dimensional spatial points in the optical path to obtain the predicted pixel value of the optical path. Then, by combining the predicted pixel values of each optical path, the predicted pixel value of the corresponding pixel position can be obtained.
[0145] In one embodiment, see Figure 5 ,exist Figure 4 Based on this, step S1011 above may include the following steps:
[0146] S10111: Based on the relative position of the biological object and the camera, determine the first external light path that is incident on the biological object from the origin of the camera's viewpoint, pointing in the opposite direction to the biological object, and whose backward extension passes through the first pixel position.
[0147] S10112: Determine the internal light path of the light inside the biological object based on the refractive index of the biological object and the position of the intersection point between the first external light path and the outer surface of the biological object.
[0148] S10113: Determine the second external light path after the light rays are emitted from the biological object, based on the refractive index of the biological object and the position of the intersection point between the internal light path and the outer surface of the biological object.
[0149] In this embodiment of the application, the electronic device can determine the intersection point (which can be called the first intersection point) between the light ray pointing from the camera's viewpoint origin to the biological object and the biological object based on the relative position of the biological object and the camera. The optical path between the first intersection point and the camera's viewpoint origin is the first external optical path.
[0150] Furthermore, based on the principle of light refraction and the position of the first intersection point, the electronic device determines the refracted ray formed inside the biological object, thus obtaining the internal light path. For example, the electronic device can determine the incident angle of the first external light path, and calculate the corresponding refraction angle based on the ratio of the sine of the incident angle to the sine of the refraction angle, and the refractive index of the biological object. Then, the direction of the internal light path can be determined based on this refraction angle.
[0151] Similarly, electronic devices can determine the light path (i.e., the second external light path) formed after the light rays exit from inside the biological object, based on the position of the intersection point (which can be called the second intersection point) between the internal light path and the outer surface of the biological object, combined with the principle of light refraction. For example, the electronic device can determine the incident angle of the internal light path, and calculate the corresponding refraction angle based on the ratio of the sine of the incident angle to the sine of the refraction angle, and the refractive index of the biological object. Then, the second external light path can be determined based on this refraction angle.
[0152] For example, see Figure 6 , Figure 6 This is a schematic diagram illustrating the principle of determining an optical path, provided in an embodiment of this application.
[0153] Figure 6 In this diagram, the biological object represents the eyeball, X represents the center point of the biological object, O represents the origin of the camera's viewpoint, and D1 represents the light path from the origin of the viewpoint O towards the biological object, i.e., the first external light path. The first intersection point is M, XM represents the normal at point M, and the angle of incidence of the first external light path D1 is L1. Based on the principle of refraction and the refractive index of the biological object, the corresponding angle of refraction L2 can be determined, thus determining the direction of the internal light path D2, and consequently, the second intersection point G between the internal light path D2 and the outer surface of the biological object. Similarly, XG represents the normal at point G, and the angle of incidence of the internal light path D2 is L3. Based on the principle of refraction and the refractive index of the biological object, the corresponding angle of refraction L4 can be determined, thus determining the second external light path D3.
[0154] Figure 6 This is merely an example provided in the embodiments of this application; the optical path determined in the actual processing is not limited to this. Figure 6 The three optical paths shown are illustrated.
[0155] In one embodiment, step S1031 above may include the following steps:
[0156] For each optical path in both external and internal optical paths, based on a preset formula, the predicted pixel values and predicted transparency of multiple first three-dimensional spatial points in that optical path are accumulated to obtain the predicted pixel value corresponding to that optical path; the preset formula is:
[0157]
[0158] Where C represents the predicted pixel value corresponding to the optical path; N represents the number of the first three-dimensional spatial points in the optical path; δ i σ represents the distance between the i-th first three-dimensional spatial point and the (i+1)-th first three-dimensional spatial point in the optical path; i c represents the predicted transparency of the i-th point in the first three-dimensional space in the optical path; iT represents the predicted pixel value of the i-th first three-dimensional spatial point in the optical path; i This represents the cumulative predicted transparency of the optical path portion from the first first three-dimensional spatial point to the (i-1)th first three-dimensional spatial point in the optical path.
[0159] In the embodiments of this application, for each optical path (including external and internal optical paths), the electronic device can calculate the predicted pixel value corresponding to that optical path according to the above formula. The order of the three-dimensional spatial points in an optical path can be determined according to the order of their distances from the origin of the viewing angle. For example, for... Figure 6 The order of the three-dimensional spatial points in the first external optical path D1 can be determined according to the order of the distance between the three-dimensional spatial points and the origin of the viewpoint O from smallest to largest.
[0160] In one implementation, T in the above formula i It can be represented as:
[0161] In one embodiment, see Figure 7 , Figure 7 A training flowchart for a prediction model provided in this application embodiment may include the following steps:
[0162] S701: Acquire a second image of the biological object captured under each preset shooting angle.
[0163] S702: For each second pixel position corresponding to the biological object in each second image, determine multiple second three-dimensional spatial points in the optical path corresponding to that second pixel position.
[0164] The light path corresponding to the second pixel position represents the propagation path of light rays pointing from the camera's viewpoint origin to the biological object, with the reverse extension line passing through the second pixel position.
[0165] S703: Input the three-dimensional coordinates of each second three-dimensional spatial point, and the second camera viewpoint relative to the second three-dimensional spatial point under the preset shooting viewpoint corresponding to the second image, into the multilayer perceptron model of the initial structure to obtain the predicted pixel value and predicted transparency of the second three-dimensional spatial point.
[0166] S704: Based on the neural radiation field, the predicted pixel value and predicted transparency of each second three-dimensional spatial point are accumulated to obtain the predicted pixel value of the second pixel position.
[0167] S705: Based on the predicted pixel value at the second pixel location and the actual pixel value at the second pixel location in the second image, determine the loss function value corresponding to the second pixel location.
[0168] S706: Based on the loss function values corresponding to each second pixel position, adjust the model parameters of the initial multilayer perceptron model until the initial multilayer perceptron model converges to obtain the prediction model.
[0169] In this embodiment of the application, images (i.e., second images) of biological objects can be acquired in advance based on multiple preset shooting angles. For example, see... Figure 8 , Figure 8 This is a schematic diagram of acquiring a second image according to an embodiment of this application. Figure 8 In this system, the biological object is an eyeball, which can be photographed from three different shooting angles to obtain images of it from the corresponding shooting angles.
[0170] The prediction model in this application embodiment can be obtained by training a multilayer perceptron (MLP) model.
[0171] The method for determining the second three-dimensional spatial point described above can be found in the detailed description of determining the first three-dimensional spatial point in the above embodiments. Similarly, the method for calculating the predicted pixel value of the second pixel position can be found in the detailed description of calculating the predicted pixel value of the first pixel position in the above embodiments.
[0172] The loss function value corresponding to the second pixel position can be calculated based on the L1 loss function or the L2 loss function, but is not limited to these.
[0173] See Figure 9 , Figure 9 This is a schematic diagram illustrating a prediction model training process provided in an embodiment of this application. In this embodiment, the biological object is the iris.
[0174] Figure 9 In this process, a series of iris images recording camera viewpoint parameters are acquired; that is, images of the biological object (i.e., the iris) are acquired from multiple different shooting angles. Then, an MLP-based prediction model is trained based on the acquired image sequences.
[0175] The above model is post-processed using NeRF (Neural Radiation Field). Specifically, for each pixel position in iris imaging, based on the neural radiation field, the predicted pixel values and predicted transparency in multiple three-dimensional spaces in the optical path corresponding to the pixel position are accumulated to obtain the predicted pixel value for that pixel position.
[0176] Then, the pixel difference between the post-processed output image and the corresponding input image is calculated using a loss function. That is, for each pixel location, the loss function value is calculated based on the predicted pixel value and the true pixel value of that pixel location in the acquired image. The model parameters are then updated based on the loss function value, and the training process is repeated until iteration stops, completing the prediction model learning and outputting the model.
[0177] See Figure 10 , Figure 10 This is a schematic diagram of an image generation process provided in an embodiment of this application.
[0178] Input 5D parameters into the MLP-based prediction model. That is, for each pixel position of the biological object imaged from the camera's shooting perspective, after determining multiple three-dimensional spatial points in the optical path corresponding to the pixel position, input the 5D parameters (including three-dimensional coordinates and the corresponding camera perspective) of each three-dimensional spatial point into the prediction model to obtain the predicted pixel value and predicted transparency of the three-dimensional spatial point.
[0179] Then, NeRF is used to calculate the two-dimensional image corresponding to the shooting viewpoint on the model output. That is, the predicted pixel value and predicted transparency of each three-dimensional spatial point are accumulated based on the neural radiation field to obtain the predicted pixel value at that pixel position. Then, a two-dimensional image can be output, that is, the image of the biological object under the shooting viewpoint.
[0180] Based on the same inventive concept, this application also provides an authentication method, see [link to relevant documentation]. Figure 11 , Figure 11 A flowchart of an authentication method provided in this application embodiment, the method may include the following steps:
[0181] S1101: Obtain the image to be authenticated containing biological objects.
[0182] S1102: Input the specified shooting angle corresponding to the image to be authenticated into the multi-view virtual model of the biological object pre-constructed based on the neural radiation field to obtain the image of the biological object under the specified shooting angle, which is used as the image to be matched.
[0183] Among them, the multi-view virtual model is obtained based on images of biological objects collected from multiple preset shooting perspectives.
[0184] S1103: If the image to be matched is inconsistent with the image to be authenticated, then the authentication of the image to be authenticated is determined to have failed.
[0185] S1104: If the image to be matched matches the image to be authenticated, then the image to be authenticated is confirmed to be successfully authenticated.
[0186] In this embodiment of the application, the similarity between the image to be matched and the image to be authenticated can be calculated. If the similarity is greater than a preset threshold, it indicates that the image to be matched and the image to be authenticated are consistent; otherwise, it indicates that the image to be matched and the image to be authenticated are inconsistent.
[0187] Determining that the image to be authenticated has failed means that the user to whom the biological object in the image belongs has failed to be authenticated; determining that the image to be authenticated has succeeded means that the user to whom the biological object in the image belongs has been successfully authenticated.
[0188] For example, the biological object is the iris, that is, the image to be authenticated represents the image of the iris of the user to be authenticated. Based on the above processing, the user to be authenticated can be authenticated according to the pre-generated image containing the user's iris.
[0189] A multi-view virtual model of a biological object, constructed based on neural radiation fields, can learn the correspondence between the shooting perspective of the biological object and the image containing the biological object. In other words, for any input shooting perspective, this multi-view virtual model can generate an image of the biological object from that shooting perspective.
[0190] Based on the authentication method of this application embodiment, for any shooting angle, the electronic device can automatically generate an image of the biological object from that shooting angle. Compared with the prior art where images of biological objects are manually collected from that shooting angle, this method can improve the efficiency of image generation and thus improve the efficiency of image-based authentication.
[0191] In one implementation, the multi-view virtual model may include the aforementioned prediction model. For each pixel position of the biological object imaged from any shooting viewpoint of the camera, multiple three-dimensional spatial points in the optical path corresponding to that pixel position can be determined. Then, the three-dimensional coordinates of each three-dimensional spatial point, and the camera's viewpoint relative to that three-dimensional spatial point from that shooting viewpoint, can be input into the aforementioned prediction model to obtain the predicted image parameter values for that three-dimensional spatial point. Finally, based on the predicted image parameter values of each three-dimensional spatial point, the predicted pixel value for that pixel position can be obtained, thus obtaining the image of the biological object from that shooting viewpoint.
[0192] In one embodiment, the biological object can be the iris, and accordingly, step S1102 may include the following steps:
[0193] Step 1: For each third pixel position of the iris image under the specified shooting angle, based on the position of the iris under the specified shooting angle and the refractive index of the iris, determine the external light path of the light rays pointing from the origin of the viewpoint corresponding to the specified shooting angle to the iris, and the internal light path of the light rays passing through the third pixel position, both outside the iris and inside the iris.
[0194] Step 2: For each optical path in the external and internal optical paths, based on the neural radiation field and the predicted image parameter values of multiple third-dimensional spatial points in that optical path, obtain the predicted pixel value corresponding to that optical path.
[0195] The predicted image parameter values include the predicted pixel values of the third three-dimensional spatial points.
[0196] Step 3: Calculate the sum of the predicted pixel values corresponding to each optical path, and use it as the predicted pixel value for the third pixel position.
[0197] Step 4: Based on the predicted pixel values at each third pixel position, obtain the image of the iris to be matched under the specified shooting angle.
[0198] The method for calculating the predicted image parameter values of the third three-dimensional spatial point can be found in the description of S102 in the above embodiments. The method for determining the external and internal optical paths in step one can be found in the description of S1011 in the above embodiments. The method for calculating the predicted pixel values corresponding to the optical path in step two can be found in the description of S1031 in the above embodiments.
[0199] Based on the same inventive concept, embodiments of this application also provide an authentication device, including a camera and a processor.
[0200] The camera is used to acquire an image containing a biological object to be authenticated; the processor is used to input the specified shooting angle corresponding to the image to be authenticated into a pre-constructed multi-view virtual model of the biological object based on a neural radiation field, to obtain an image of the biological object under the specified shooting angle, which is used as the image to be matched; wherein, the multi-view virtual model is obtained based on images of biological objects collected under multiple preset shooting angles; if the image to be matched is inconsistent with the image to be authenticated, the image to be authenticated is determined to have failed authentication; if the image to be matched is consistent with the image to be authenticated, the image to be authenticated is determined to have succeeded in authentication.
[0201] In one embodiment, the camera is further configured to acquire a depth image corresponding to the image to be authenticated. Correspondingly, the processor is further configured to acquire the camera's intrinsic parameters and, based on the depth image, the image to be authenticated, and the camera's intrinsic parameters, determine a specified shooting angle corresponding to the image to be authenticated.
[0202] In one implementation, the camera acquires an image to be authenticated and a corresponding depth image. The depth image then determines the three-dimensional spatial coordinates of the biological object. Next, based on the biological object's three-dimensional spatial coordinates, its pixel coordinates in the authentication image, and the camera's intrinsic parameters, a pre-defined calibration algorithm is used to calculate the spatial pose of the biological object relative to the camera when acquiring the image to be authenticated. This determines the specified shooting angle corresponding to the image to be authenticated. For example, the pre-defined calibration algorithm could be the PNP (Perspective-n-Point) algorithm.
[0203] Based on the same inventive concept, this application also provides an image generation apparatus, see [link to relevant documentation]. Figure 12 , Figure 12 This application provides a structural diagram of an image generation apparatus, which includes:
[0204] The three-dimensional spatial point determination module 1201 is used to determine multiple first three-dimensional spatial points in the optical path corresponding to each first pixel position of the biological object imaged from the first shooting view of the camera; wherein, the optical path corresponding to the first pixel position represents the propagation path of light rays pointing from the origin of the view of the camera to the biological object, and whose backward extension line passes through the first pixel position.
[0205] The prediction module 1202 is used to input the three-dimensional coordinates of each first three-dimensional spatial point and the first camera viewpoint relative to the first three-dimensional spatial point from the first shooting viewpoint into a pre-trained prediction model to obtain the predicted image parameter value of the first three-dimensional spatial point; wherein, the prediction model is trained based on images of the biological object collected from multiple preset shooting viewpoints; the predicted image parameter value includes the predicted pixel value.
[0206] The predicted pixel value acquisition module 1203 is used to obtain the predicted pixel value of the first pixel position based on the predicted image parameter values of each first three-dimensional spatial point.
[0207] The image generation module 1204 is used to obtain an image of the biological object from the first shooting angle based on the predicted pixel value of each first pixel position.
[0208] Optionally, the three-dimensional spatial point determination module 1201 includes:
[0209] The optical path determination submodule is used to determine, based on the relative position of the biological object and the camera, and the refractive index of the biological object, the external optical path of the light rays pointing from the origin of the camera's viewpoint to the biological object, and whose backward extension passes through the first pixel position, and the internal optical path of the light rays inside the biological object.
[0210] The three-dimensional spatial point determination submodule is used to select multiple three-dimensional spatial points from each external optical path and internal optical path, respectively, as the first three-dimensional spatial point;
[0211] The predicted pixel value acquisition module 1203 includes:
[0212] The first predicted pixel value acquisition submodule is used to accumulate the predicted pixel value and predicted transparency of multiple first three-dimensional spatial points in each of the external and internal optical paths based on the neural radiation field to obtain the predicted pixel value corresponding to the optical path.
[0213] The second predicted pixel value acquisition submodule is used to calculate the sum of the predicted pixel values corresponding to each optical path, and use it as the predicted pixel value of the first pixel position.
[0214] Optionally, the optical path determination submodule specifically determines, based on the relative position of the biological object and the camera, a first external optical path that is incident on the biological object from the origin of the camera's viewpoint, pointing to the biological object, and whose backward extension passes through the first pixel position.
[0215] Based on the refractive index of the biological object and the position of the intersection point between the first external optical path and the outer surface of the biological object, the internal optical path of the light ray inside the biological object is determined;
[0216] Based on the refractive index of the biological object and the position of the intersection point between the internal optical path and the outer surface of the biological object, the second external optical path after the light rays are emitted from the biological object is determined.
[0217] Optionally, the device further includes:
[0218] The model training module is used to acquire a second image of the biological object captured from each preset shooting angle;
[0219] For each second pixel position corresponding to the biological object in each second image, a plurality of second three-dimensional spatial points in the optical path corresponding to the second pixel position are determined; wherein, the optical path corresponding to the second pixel position represents the propagation path of light rays pointing from the origin of the camera's viewpoint to the biological object, and whose backward extension line passes through the second pixel position;
[0220] The three-dimensional coordinates of each second three-dimensional spatial point, and the second camera viewpoint relative to the second three-dimensional spatial point under the preset shooting viewpoint corresponding to the second image, are input into the multilayer perceptron model of the initial structure to obtain the predicted pixel value and predicted transparency of the second three-dimensional spatial point.
[0221] The predicted pixel value and predicted transparency of each second three-dimensional spatial point are accumulated based on the neural radiation field to obtain the predicted pixel value of the second pixel position.
[0222] Based on the predicted pixel value at the second pixel location and the actual pixel value at the second pixel location in the second image, the loss function value corresponding to the second pixel location is determined;
[0223] Based on the loss function value corresponding to each second pixel position, the model parameters of the multilayer perceptron model of the initial structure are adjusted until the multilayer perceptron model of the initial structure converges, thus obtaining the prediction model.
[0224] Based on the same inventive concept, this application also provides an authentication device, see [link to relevant documentation]. Figure 13 , Figure 13 A structural diagram of an authentication device provided in this application embodiment is shown. The device includes:
[0225] The image acquisition module 1301 is used to acquire an image to be authenticated that contains biological objects.
[0226] The image to be matched determination module 1302 is used to input the specified shooting angle corresponding to the image to be authenticated into a multi-view virtual model of a biological object pre-constructed based on a neural radiation field, and obtain an image of the biological object under the specified shooting angle as the image to be matched; wherein, the multi-view virtual model is obtained based on images of the biological object collected under multiple preset shooting angles;
[0227] The first processing module 1303 is used to determine that the authentication of the image to be authenticated fails if the image to be matched is inconsistent with the image to be authenticated.
[0228] The second processing module 1304 is used to determine that the image to be authenticated is successfully authenticated if the image to be matched is consistent with the image to be authenticated.
[0229] This application also provides an electronic device, such as... Figure 14 As shown, it includes a processor 1401, a communication interface 1402, a memory 1403, and a communication bus 1404, wherein the processor 1401, the communication interface 1402, and the memory 1403 communicate with each other through the communication bus 1404.
[0230] Memory 1403 is used to store computer programs;
[0231] The processor 1401, when executing the program stored in the memory 1403, implements any of the above-mentioned image generation methods or authentication methods.
[0232] The communication bus mentioned in the above electronic devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.
[0233] The communication interface is used for communication between the aforementioned electronic devices and other devices.
[0234] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0235] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0236] In another embodiment provided in this application, a computer-readable storage medium is also provided, which stores a computer program that, when executed by a processor, implements the steps of any of the above-described image generation methods or authentication methods.
[0237] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute any of the image generation methods or authentication methods described above.
[0238] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (SSD)).
[0239] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0240] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments of apparatus, electronic devices, computer-readable storage media, and computer program products are basically similar to the method embodiments, and therefore the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0241] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application are included within the scope of protection of this application.
Claims
1. An image generation method, characterized in that, The method includes: For each first pixel position of the biological object imaged from the first shooting angle of the camera, multiple first three-dimensional spatial points in the optical path corresponding to the first pixel position are determined; wherein, the optical path corresponding to the first pixel position represents the propagation path of light rays pointing from the origin of the camera's viewpoint to the biological object, and whose backward extension passes through the first pixel position. The three-dimensional coordinates of each first three-dimensional spatial point, and the first camera viewpoint relative to the origin of the camera at the first shooting viewpoint, are input into a pre-trained prediction model to obtain the predicted image parameter value of the first three-dimensional spatial point; wherein, the prediction model is trained based on images of the biological object collected at multiple preset shooting viewpoints; the predicted image parameter value includes the predicted pixel value. Based on the predicted image parameter values of each first three-dimensional spatial point, the predicted pixel value of the first pixel position is obtained; Based on the predicted pixel values at each first pixel position, an image of the biological object is obtained from the first shooting perspective. The predicted image parameter values also include the predicted transparency of the first three-dimensional spatial point; The determination of multiple first three-dimensional spatial points in the optical path corresponding to the position of the first pixel includes: Based on the relative position of the biological object and the camera, and the refractive index of the biological object, the external light path of the light rays pointing from the origin of the camera's viewpoint to the biological object, and whose backward extension passes through the first pixel position, is determined, as well as the internal light path inside the biological object. Multiple three-dimensional spatial points are selected from each external optical path and internal optical path, respectively, as the first three-dimensional spatial point; The process of obtaining the predicted pixel value at the first pixel location based on the predicted image parameter values of each first three-dimensional spatial point includes: For each optical path in the external and internal optical paths, based on the neural radiation field, the predicted pixel values and predicted transparency of multiple first three-dimensional spatial points in the optical path are accumulated to obtain the predicted pixel value corresponding to the optical path. The sum of the predicted pixel values corresponding to each optical path is calculated and used as the predicted pixel value for the first pixel position.
2. The method according to claim 1, characterized in that, The step of determining the external optical path of light rays pointing from the camera's viewpoint origin to the biological object, with their backward extension passing through the first pixel position, and the internal optical path within the biological object, based on the relative position of the biological object and the refractive index of the biological object, includes: Based on the relative position of the biological object and the camera, a first external light path is determined, which is the light rays that point from the origin of the camera's viewpoint to the biological object and whose backward extension passes through the first pixel position and are incident on the front of the biological object. Based on the refractive index of the biological object and the position of the intersection point between the first external optical path and the outer surface of the biological object, the internal optical path of the light ray inside the biological object is determined; Based on the refractive index of the biological object and the position of the intersection point between the internal optical path and the outer surface of the biological object, the second external optical path after the light rays are emitted from the biological object is determined.
3. The method according to claim 1, characterized in that, The training process of the prediction model includes the following steps: Acquire a second image of the biological object captured from each preset shooting angle; For each second pixel position corresponding to the biological object in each second image, a plurality of second three-dimensional spatial points in the optical path corresponding to the second pixel position are determined; wherein, the optical path corresponding to the second pixel position represents the propagation path of light rays pointing from the origin of the camera's viewpoint to the biological object, and whose backward extension line passes through the second pixel position; The three-dimensional coordinates of each second three-dimensional spatial point, and the second camera viewpoint relative to the second three-dimensional spatial point under the preset shooting viewpoint corresponding to the second image, are input into the multilayer perceptron model of the initial structure to obtain the predicted pixel value and predicted transparency of the second three-dimensional spatial point. The predicted pixel value and predicted transparency of each second three-dimensional spatial point are accumulated based on the neural radiation field to obtain the predicted pixel value of the second pixel position. Based on the predicted pixel value at the second pixel location and the actual pixel value at the second pixel location in the second image, the loss function value corresponding to the second pixel location is determined; Based on the loss function value corresponding to each second pixel position, the model parameters of the multilayer perceptron model of the initial structure are adjusted until the multilayer perceptron model of the initial structure converges, thus obtaining the prediction model.
4. An authentication method, characterized in that, The method includes: Retrieve the image to be authenticated that contains biological objects; The specified shooting angle corresponding to the image to be authenticated is input into a multi-view virtual model of a biological object pre-constructed based on a neural radiation field to obtain an image of the biological object under the specified shooting angle, which is used as the image to be matched; wherein, the multi-view virtual model is obtained based on images of the biological object collected under multiple preset shooting angles; If the image to be matched does not match the image to be authenticated, then the authentication of the image to be authenticated is determined to have failed. If the image to be matched matches the image to be authenticated, then the image to be authenticated is determined to have been successfully authenticated. The biological object is the iris; The step of inputting the specified shooting angle corresponding to the image to be authenticated into a pre-constructed multi-view virtual model of a biological object based on a neural radiation field to obtain an image of the biological object under the specified shooting angle, which serves as the image to be matched, includes: For each third pixel position of the iris imaged under the specified shooting angle, based on the position of the iris under the specified shooting angle and the refractive index of the iris, determine the external light path of the light rays pointing from the origin of the angle corresponding to the specified shooting angle to the iris, and whose backward extension passes through the third pixel position, and the internal light path of the light rays inside the iris. For each of the external and internal optical paths, based on the neural radiation field and the predicted image parameter values of multiple third three-dimensional spatial points in that optical path, the predicted pixel value corresponding to that optical path is obtained; wherein, the predicted image parameter values include the predicted pixel value of the third three-dimensional spatial point; Calculate the sum of the predicted pixel values corresponding to each optical path, and use it as the predicted pixel value at the third pixel position; Based on the predicted pixel values at each third pixel position, the image of the iris to be matched under the specified shooting angle is obtained.
5. An image generation apparatus, characterized in that, The device includes: The three-dimensional spatial point determination module is used to determine multiple first three-dimensional spatial points in the optical path corresponding to each first pixel position of the biological object imaged from the first shooting viewpoint of the camera; wherein, the optical path corresponding to the first pixel position represents the propagation path of light rays pointing from the origin of the camera's viewpoint to the biological object, and whose backward extension passes through the first pixel position. The prediction module is used to input the three-dimensional coordinates of each first three-dimensional spatial point, and the first camera viewpoint relative to the origin of the camera viewpoint at the first shooting viewpoint, into a pre-trained prediction model to obtain the predicted image parameter value of the first three-dimensional spatial point; wherein, the prediction model is trained based on images of the biological object collected at multiple preset shooting viewpoints; the predicted image parameter value includes predicted pixel value. The predicted pixel value acquisition module is used to obtain the predicted pixel value of the first pixel position based on the predicted image parameter values of each first three-dimensional spatial point. An image generation module is used to obtain an image of the biological object from the first shooting angle based on the predicted pixel values at each first pixel position. The predicted image parameter values also include the predicted transparency of the first three-dimensional spatial point; The three-dimensional spatial point determination module includes: The optical path determination submodule is used to determine, based on the relative position of the biological object and the camera, and the refractive index of the biological object, the external optical path of the light rays pointing from the origin of the camera's viewpoint to the biological object, and whose backward extension passes through the first pixel position, and the internal optical path of the light rays inside the biological object. The three-dimensional spatial point determination submodule is used to select multiple three-dimensional spatial points from each external optical path and internal optical path, respectively, as the first three-dimensional spatial point; The predicted pixel value acquisition module includes: The first predicted pixel value acquisition submodule is used to accumulate the predicted pixel value and predicted transparency of multiple first three-dimensional spatial points in each of the external and internal optical paths based on the neural radiation field to obtain the predicted pixel value corresponding to the optical path. The second predicted pixel value acquisition submodule is used to calculate the sum of the predicted pixel values corresponding to each optical path, and use it as the predicted pixel value of the first pixel position.
6. An authentication device, characterized in that, The device includes: The image acquisition module is used to acquire images containing biological objects to be authenticated. The image to be matched determination module is used to input the specified shooting angle corresponding to the image to be authenticated into a multi-view virtual model of a biological object pre-constructed based on a neural radiation field, and obtain an image of the biological object under the specified shooting angle as the image to be matched; wherein, the multi-view virtual model is obtained based on images of the biological object collected under multiple preset shooting angles; The first processing module is used to determine that the authentication of the image to be authenticated fails if the image to be matched is inconsistent with the image to be authenticated. The second processing module is used to determine that the image to be authenticated is successfully authenticated if the image to be matched is consistent with the image to be authenticated. The biological object is the iris; The image to be matched determination module is specifically used to determine, for each third pixel position of the iris imaged under the specified shooting angle, based on the position of the iris under the specified shooting angle and the refractive index of the iris, the external light path of the light rays pointing from the origin of the viewpoint corresponding to the specified shooting angle to the iris, and whose backward extension passes through the third pixel position, and the internal light path of the light rays inside the iris. For each of the external and internal optical paths, based on the neural radiation field and the predicted image parameter values of multiple third three-dimensional spatial points in that optical path, the predicted pixel value corresponding to that optical path is obtained; wherein, the predicted image parameter values include the predicted pixel value of the third three-dimensional spatial point; Calculate the sum of the predicted pixel values corresponding to each optical path, and use it as the predicted pixel value at the third pixel position; Based on the predicted pixel values at each third pixel position, the image of the iris to be matched under the specified shooting angle is obtained.
7. An authentication device, characterized in that, Including the camera and processor; The camera is used to acquire images containing biological objects to be authenticated; The processor is configured to input a specified shooting angle corresponding to the image to be authenticated into a pre-constructed multi-view virtual model of a biological object based on a neural radiation field, to obtain an image of the biological object under the specified shooting angle, which serves as the image to be matched; wherein, the multi-view virtual model is obtained based on images of the biological object collected under multiple preset shooting angles; if the image to be matched is inconsistent with the image to be authenticated, the authentication of the image to be authenticated is determined to have failed; if the image to be matched is consistent with the image to be authenticated, the authentication of the image to be authenticated is determined to have succeeded. The biological object is the iris; The step of inputting the specified shooting angle corresponding to the image to be authenticated into a pre-constructed multi-view virtual model of a biological object based on a neural radiation field to obtain an image of the biological object under the specified shooting angle, which serves as the image to be matched, includes: For each third pixel position of the iris imaged under the specified shooting angle, based on the position of the iris under the specified shooting angle and the refractive index of the iris, determine the external light path of the light rays pointing from the origin of the angle corresponding to the specified shooting angle to the iris, and whose backward extension passes through the third pixel position, and the internal light path of the light rays inside the iris. For each of the external and internal optical paths, based on the neural radiation field and the predicted image parameter values of multiple third three-dimensional spatial points in that optical path, the predicted pixel value corresponding to that optical path is obtained; wherein, the predicted image parameter values include the predicted pixel value of the third three-dimensional spatial point; Calculate the sum of the predicted pixel values corresponding to each optical path, and use it as the predicted pixel value at the third pixel position; Based on the predicted pixel values at each third pixel position, the image of the iris to be matched under the specified shooting angle is obtained.
8. The authentication device according to claim 7, characterized in that, The camera is also used to acquire a depth image corresponding to the image to be authenticated; The processor is further configured to acquire the intrinsic parameters of the camera, and determine the specified shooting angle corresponding to the image to be authenticated based on the depth image, the image to be authenticated, and the intrinsic parameters of the camera.
9. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; The memory is used to store computer programs; When the processor executes the program stored in the memory, it implements the steps of the method according to any one of claims 1-3 or 4.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method according to any one of claims 1-3 or 4.
Citation Information
Patent Citations
Iris recognition method and relevant product
CN107403148A
View angle image generation method and device, electronic equipment and storage medium
CN114549731A
