A method, device, equipment and storage medium for determining key eye information
By constructing the mapping relationship between the three-dimensional eyeball and the two-dimensional eyeball, and using ellipse fitting and envelope matching, the problem of determining the position of the designated part of the eyeball in the three-dimensional space is solved, and precise positioning in applications such as line of sight estimation is achieved.
Patent Information
- Application Number
- CN202110297147.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-19
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2041-03-19
AI Technical Summary
In some application scenarios, it is difficult to determine the position of the designated part of the eyeball in the three-dimensional space based on the eye information of the designated object, especially in applications such as line of sight estimation. Existing technologies have not been able to effectively solve this problem.
By acquiring 3D eye information and 2D eye images, the mapping relationship between the 3D eyeball and the 2D eyeball is constructed. The ellipse fitting method is used to fit the shape and center point of the eyeball, and the candidate mapping relationship is generated by combining the 3D and 2D envelopes. And select the optimal mapping relationship to determine the position of the designated part of the eyeball in the three-dimensional space.
It achieves the accurate determination of the position of the designated part of the eyeball in three-dimensional space based on eye information. It is suitable for applications such as gaze direction calculation, and improves the accuracy and reliability of position determination.
Smart Images

Figure CN112949551B
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a method, device, equipment and storage medium for determining key eye information. Background Art
[0002] In some application scenarios, it is necessary to determine the position of a specified part of the eyeball (such as the pupil, cornea, etc.) in three-dimensional space based on the eye information of a specified object. For example, in some application scenarios that require line of sight estimation, it is often necessary to determine the position of the pupil in three-dimensional space based on the eye information of a specified object, and then calculate the line of sight direction based on the position of the pupil in three-dimensional space. How to determine the position of a specified part of the eyeball in three-dimensional space based on the eye information of a specified object is a problem that urgently needs to be solved. Summary of the invention
[0003] In view of this, the present application provides a method, device, equipment and storage medium for determining key eye information, which are used to determine the position of a specified part of an eyeball in a three-dimensional space according to the specified corresponding eye information. The technical solution is as follows:
[0004] A method for determining key eye information, comprising:
[0005] Acquire three-dimensional eye information and a two-dimensional eye image corresponding to the three-dimensional eye information;
[0006] Constructing a mapping relationship between a three-dimensional eyeball and a two-dimensional eyeball according to the three-dimensional eye information and a two-dimensional eye image corresponding to the three-dimensional eye information;
[0007] According to the mapping relationship between the three-dimensional eyeball and the two-dimensional eyeball, the key points of the designated part of the eyeball in the two-dimensional eye image are mapped to the three-dimensional space to obtain a mapping result that can characterize the position of the designated part of the eyeball in the three-dimensional space.
[0008] Optionally, constructing a mapping relationship between a three-dimensional eyeball and a two-dimensional eyeball according to the three-dimensional eye information and a two-dimensional eye image corresponding to the three-dimensional eye information includes:
[0009] Constructing a three-dimensional eyeball model according to the three-dimensional eye information;
[0010] A mapping relationship between a three-dimensional eyeball and a two-dimensional eyeball is determined according to the three-dimensional eye information, the two-dimensional eye image and the three-dimensional eyeball model.
[0011] Optionally, constructing a three-dimensional eyeball model according to the three-dimensional eye information includes:
[0012] According to the three-dimensional eye information, an ellipse fitting method is adopted to fit the three-dimensional shape of the eyeball and the center point of the eyeball to obtain a three-dimensional eyeball model.
[0013] Optionally, determining a mapping relationship between a three-dimensional eyeball and a two-dimensional eyeball according to the three-dimensional eye information, the two-dimensional eye image and the three-dimensional eyeball model includes:
[0014] Acquire a three-dimensional envelope according to the three-dimensional eye information and the three-dimensional eyeball model, wherein the three-dimensional envelope can represent the eye socket in the three-dimensional space;
[0015] Acquire a two-dimensional envelope according to the two-dimensional eye image, wherein the two-dimensional envelope can represent the eye socket in the two-dimensional space;
[0016] A mapping relationship between a three-dimensional eyeball and a two-dimensional eyeball is determined according to the three-dimensional envelope and the two-dimensional envelope.
[0017] Optionally, determining a mapping relationship between a three-dimensional eyeball and a two-dimensional eyeball according to the three-dimensional envelope and the two-dimensional envelope includes:
[0018] Obtain an initial mapping relationship as the target mapping relationship;
[0019] Generate multiple candidate mapping relationships according to the target mapping relationship;
[0020] Selecting an optimal candidate mapping relationship from the multiple candidate mapping relationships based on the three-dimensional envelope and the two-dimensional envelope;
[0021] If the optimal candidate mapping relationship meets a preset condition, the optimal candidate mapping relationship is determined as the mapping relationship between the three-dimensional eyeball and the two-dimensional eyeball;
[0022] If the optimal candidate mapping relationship does not meet the preset condition, the optimal candidate mapping relationship is used as a new target mapping relationship, and then the step of generating multiple candidate mapping relationships according to the target mapping relationship is performed.
[0023] Optionally, generating multiple candidate mapping relationships according to the target mapping relationship includes:
[0024] Determining a mapping relationship optimization range according to the target mapping relationship and preset optimization parameters;
[0025] According to the mapping relationship optimization range, a plurality of candidate mapping relationships are generated.
[0026] Optionally, the acquiring of three-dimensional eye information and a two-dimensional eye image corresponding to the three-dimensional eye information includes:
[0027] Acquire three-dimensional face information and a two-dimensional face image corresponding to the three-dimensional face information;
[0028] Extracting eye information from the three-dimensional face information as three-dimensional eye information;
[0029] Extracting an eye image from the two-dimensional face image corresponding to the three-dimensional face information as the two-dimensional eye image corresponding to the three-dimensional eye information;
[0030] The obtaining of the initial mapping relationship includes:
[0031] A mapping relationship between a three-dimensional face and a two-dimensional face is determined according to the three-dimensional face information and the two-dimensional face image as the initial mapping relationship.
[0032] Optionally, the obtaining of the initial mapping relationship includes:
[0033] A mapping relationship is randomly generated as the initial mapping relationship.
[0034] or,
[0035] randomly generating a plurality of mapping relationships, and determining an optimal mapping relationship from the plurality of randomly generated mapping relationships based on the three-dimensional envelope and the two-dimensional envelope as the initial mapping relationship;
[0036] Optionally, the selecting an optimal candidate mapping relationship from the multiple candidate mapping relationships based on the three-dimensional envelope and the two-dimensional envelope includes:
[0037] For each candidate mapping:
[0038] The three-dimensional envelope is mapped to a two-dimensional space using the candidate mapping relationship to obtain a mapped envelope;
[0039] Determining the overlap between the mapped envelope and the two-dimensional envelope to obtain the overlap corresponding to the candidate mapping relationship;
[0040] After obtaining the coincidence degrees corresponding to each candidate mapping relationship, the candidate mapping relationship corresponding to the highest coincidence degree is determined as the optimal candidate mapping relationship.
[0041] Optionally, determining the degree of overlap between the mapped envelope and the two-dimensional envelope includes:
[0042] According to a preset sampling rule, a number of points are sampled from the mapped envelope;
[0043] Calculate the distance between each sampled point and the corresponding point on the two-dimensional envelope line;
[0044] All calculated distances are summed up, and the summed distance is used to represent the degree of overlap between the mapped envelope and the two-dimensional envelope.
[0045] An eye key information determination device comprises: an eye information acquisition module, a mapping relationship construction module and an eye key information determination module;
[0046] The eye information acquisition module is used to acquire three-dimensional eye information and a two-dimensional eye image corresponding to the three-dimensional eye information;
[0047] The mapping relationship building module is used to build a mapping relationship between a three-dimensional eyeball and a two-dimensional eyeball according to the three-dimensional eye information and the two-dimensional eye image corresponding to the three-dimensional eye information;
[0048] The eye key information determination module is used to map the key points of the designated part of the eyeball in the two-dimensional eye image to the three-dimensional space according to the mapping relationship between the three-dimensional eyeball and the two-dimensional eyeball, so as to obtain a mapping result that can characterize the position of the designated part of the eyeball in the three-dimensional space.
[0049] A device for determining key eye information, comprising: a memory and a processor;
[0050] The memory is used to store programs;
[0051] The processor is used to execute the program to implement each step of the method for determining key eye information described in any one of the above items.
[0052] A readable storage medium stores a computer program, which, when executed by a processor, implements each step of any of the above methods for determining key eye information.
[0053] Through the above scheme, it can be known that the eye key information determination method, device, equipment and storage medium provided by the present application first obtains three-dimensional eye information and a two-dimensional eye image corresponding to the three-dimensional eye information, and then constructs a mapping relationship between a three-dimensional eyeball and a two-dimensional eyeball based on the three-dimensional eye information and the two-dimensional eye image corresponding to the three-dimensional eye information. Finally, according to the mapping relationship between the three-dimensional eyeball and the two-dimensional eyeball, the key points of the designated part of the eyeball in the two-dimensional eye image are mapped to the three-dimensional space, thereby obtaining a mapping result that can characterize the position of the designated part of the eyeball in the three-dimensional space. The eye key information determination method provided by the present application can determine the position of the designated part of the eyeball in the three-dimensional space based on the three-dimensional eye information and the two-dimensional eye image corresponding to the three-dimensional eye information. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0055] Figure 1 A schematic diagram of a flow chart of a method for determining key eye information provided in an embodiment of the present application;
[0056] Figure 2 A schematic diagram of a process for constructing a mapping relationship between a three-dimensional eyeball and a two-dimensional eyeball according to three-dimensional eye information and a two-dimensional eye image corresponding to the three-dimensional eye information provided in an embodiment of the present application;
[0057] Figure 3 A schematic diagram of a process for determining a mapping relationship between a three-dimensional eyeball and a two-dimensional eyeball according to three-dimensional eye information, a two-dimensional eye image and a three-dimensional eyeball model provided in an embodiment of the present application;
[0058] Figure 4 A schematic diagram of a process for determining a mapping relationship between a three-dimensional eyeball and a two-dimensional eyeball according to a three-dimensional envelope and a two-dimensional envelope provided in an embodiment of the present application;
[0059] Figure 5 A schematic diagram of the structure of a device for determining key eye information provided in an embodiment of the present application;
[0060] Figure 6 A schematic diagram of the structure of a device for determining key eye information provided in an embodiment of the present application. DETAILED DESCRIPTION
[0061] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0062] In order to determine the position of the designated part of the eyeball in three-dimensional space, the inventor of this case conducted in-depth research, and finally proposed a method for determining key eye information through research. This method can determine the position of the designated part of the eyeball in three-dimensional space based on three-dimensional eye information and a two-dimensional eye image corresponding to the three-dimensional eye information. The method for determining key eye information can be applied to electronic devices with processing capabilities, which can be servers on the network side or terminals used on the user side, such as PCs, notebooks, smart phones, car terminals, smart home devices, etc. The server on the network side or the terminal used on the user side can determine the position of the designated part of the eyeball in three-dimensional space according to the method for determining key eye information provided in this application. Next, the method for determining key eye information provided in this application is introduced through the following embodiments.
[0063] First embodiment
[0064] See also Figure 1 , shows a schematic flow chart of a method for determining key eye information provided by an embodiment of the present application, the method may include:
[0065] Step S101: Acquire three-dimensional eye information and a two-dimensional eye image corresponding to the three-dimensional eye information.
[0066] There are many ways to obtain three-dimensional eye information and a two-dimensional eye image corresponding to the three-dimensional eye information. This embodiment provides the following two optional implementations:
[0067] The first implementation method is to obtain data collected by a three-dimensional information acquisition device and a two-dimensional image acquisition device simultaneously on the eyes of a designated object to obtain three-dimensional eye information.
[0068] The second implementation method: first obtain the data collected by the three-dimensional information acquisition device and the two-dimensional image acquisition device simultaneously for the face of the specified object to obtain three-dimensional face information and a two-dimensional face image corresponding to the three-dimensional face information, then obtain eye information from the three-dimensional face information to obtain three-dimensional eye information, and obtain the eye area from the two-dimensional face image corresponding to the three-dimensional face information to obtain a two-dimensional eye image corresponding to the three-dimensional eye information.
[0069] Step S102: constructing a mapping relationship between a three-dimensional eyeball and a two-dimensional eyeball according to the three-dimensional eye information and the two-dimensional eye image corresponding to the three-dimensional eye information.
[0070] The mapping relationship between the three-dimensional eyeball and the two-dimensional eyeball is a mapping relationship from the three-dimensional eyeball to the two-dimensional eyeball, that is, the mapping relationship constructed in step S102 is a mapping relationship from the three-dimensional space to the two-dimensional space.
[0071] The mapping relationship in this embodiment can be represented by a spatial rotation projection matrix and an alignment translation projection matrix. Assume that the mapping relationship between the three-dimensional eyeball and the two-dimensional eyeball is represented by F eye Indicates that the spatial rotation projection matrix is represented by R eye Indicates that the aligned translation projection matrix is T eye Represented as: The mapping relationship between the three-dimensional eyeball and the two-dimensional eyeball can be expressed as:
[0072] F eye = {R eye , T eye}
[0073] Step S103: According to the mapping relationship between the three-dimensional eyeball and the two-dimensional eyeball, the key points of the designated part of the eyeball in the two-dimensional eye image are mapped to the three-dimensional space to obtain a mapping result that can characterize the position of the designated part of the eyeball in the three-dimensional space.
[0074] The designated part of the eyeball may be but is not limited to the pupil, cornea, etc. The key points of the designated part of the eyeball in the two-dimensional eye image may be obtained by performing key point detection on the two-dimensional eye image using an existing key point detection scheme.
[0075] Since the mapping relationship between the three-dimensional eyeball and the two-dimensional eyeball is the mapping relationship from the three-dimensional space to the two-dimensional space, after constructing the mapping relationship between the three-dimensional eyeball and the two-dimensional eyeball, it is necessary to perform a reverse mapping from the two-dimensional space to the three-dimensional space on the key points of the specified part of the eyeball in the two-dimensional eye image based on the mapping relationship to obtain the key points of the specified part of the eyeball in the three-dimensional space.
[0076] The method for determining key eye information provided in the embodiment of the present application first obtains three-dimensional eye information and a two-dimensional eye image corresponding to the three-dimensional eye information, then constructs a mapping relationship between a three-dimensional eyeball and a two-dimensional eyeball based on the three-dimensional eye information and the two-dimensional eye image corresponding to the three-dimensional eye information, and finally maps the key points of the designated part of the eyeball in the two-dimensional eye image to the three-dimensional space based on the mapping relationship between the three-dimensional eyeball and the two-dimensional eyeball, thereby obtaining a mapping result that can characterize the position of the designated part of the eyeball in the three-dimensional space. The method for determining key eye information provided in the embodiment of the present application can determine the position of the designated part of the eyeball in the three-dimensional space based on the three-dimensional eye information and the two-dimensional eye image corresponding to the three-dimensional eye information.
[0077] Second embodiment
[0078] This embodiment focuses on the specific implementation process of "step S102: constructing a mapping relationship between a three-dimensional eyeball and a two-dimensional eyeball according to the three-dimensional eye information and the two-dimensional eye image corresponding to the three-dimensional eye information" in the above embodiment.
[0079] See also Figure 2, shows a schematic diagram of a process of constructing a mapping relationship between a three-dimensional eyeball and a two-dimensional eyeball according to three-dimensional eye information and a two-dimensional eye image corresponding to the three-dimensional eye information, which may include:
[0080] Step S201: constructing a three-dimensional eyeball model according to the three-dimensional eye information.
[0081] The shape of a real eyeball in three-dimensional space can be approximately equivalent to a sphere or an ellipsoid. Taking the ellipsoid as an example, its coordinate equation can be expressed as Among them, a, b and c are the radii under the x, y and z axes of the coordinate system, respectively, which determine the shape of the ellipsoid. The three-dimensional eye information is the spatial point cloud P 3xD , D is the number of points, each point contains (x, y, z) three-dimensional coordinate information. In view of this, this embodiment can use an ellipse fitting method to fit the three-dimensional shape of the eyeball and the center point of the eyeball according to the three-dimensional eye information to obtain a three-dimensional eyeball model.
[0082] Step S202: determining a mapping relationship between a three-dimensional eyeball and a two-dimensional eyeball according to the three-dimensional eye information, the two-dimensional eye image and the three-dimensional eyeball model.
[0083] See also Figure 3 , shows a flow chart of determining a mapping relationship between a three-dimensional eyeball and a two-dimensional eyeball according to three-dimensional eye information, a two-dimensional eye image and a three-dimensional eyeball model, which may include:
[0084] Step S301: obtaining a three-dimensional envelope according to the three-dimensional eye information and the three-dimensional eyeball model.
[0085] Among them, the three-dimensional envelope line can represent the eye socket in the three-dimensional space. It should be noted that the three-dimensional envelope line essentially represents the visible area of the eyeball in the three-dimensional space.
[0086] Specifically, the process of obtaining the three-dimensional envelope according to the three-dimensional eye information and the three-dimensional eyeball model may include: obtaining the space points corresponding to the eye sockets from the three-dimensional eyeball model according to the three-dimensional eye information to obtain the point set B 3D , the point set B 3D As a three-dimensional envelope.
[0087] Step S302: obtaining a two-dimensional envelope according to the two-dimensional eye image.
[0088] Among them, the two-dimensional envelope line can represent the eye socket in the two-dimensional space. It should be noted that the two-dimensional envelope line essentially represents the visible area of the eyeball in the two-dimensional space.
[0089] Specifically, the process of obtaining the two-dimensional envelope curve according to the two-dimensional eye image may include: using the edge key point detection method of the two-dimensional image to determine the key points around the eye socket from the two-dimensional eye image to obtain the point set B 2D, the point set B 2D as a 2D envelope.
[0090] Step S303: Determine the mapping relationship between the three-dimensional eyeball and the two-dimensional eyeball according to the three-dimensional envelope line and the two-dimensional envelope line.
[0091] See also Figure 4 , showing a schematic diagram of a process of determining a mapping relationship between a three-dimensional eyeball and a two-dimensional eyeball according to a three-dimensional envelope and a two-dimensional envelope, which may include:
[0092] Step S401: Acquire an initial mapping relationship as a target mapping relationship.
[0093] There are many ways to obtain the initial mapping relationship. This embodiment provides the following three optional implementations:
[0094] The first implementation method is to randomly generate a mapping relationship (ie, randomly generate a space rotation projection matrix and randomly generate an alignment translation projection matrix) as the initial mapping relationship.
[0095] The second implementation method is to randomly generate multiple mapping relationships, determine the optimal mapping relationship from the multiple randomly generated mapping relationships based on the three-dimensional envelope and the two-dimensional envelope, and use the optimal mapping relationship from the multiple randomly generated mapping relationships as the initial mapping relationship.
[0096] The third implementation method: based on the three-dimensional face information I 3D And 3D face information I 3D The corresponding two-dimensional face image I 2D , determine the mapping relationship between the three-dimensional face and the two-dimensional face as the initial mapping relationship. It should be noted that the three-dimensional face information I 3D And 3D face information I 3D The corresponding two-dimensional face image I 2D The data is collected from the face of a designated object using a three-dimensional information collection device and a two-dimensional image collection device at the same time.
[0097] Considering that the mapping relationship between a three-dimensional face and a two-dimensional face is used as the initial mapping relationship, the mapping relationship between a three-dimensional eyeball and a two-dimensional eyeball can be determined more quickly, the present application preferably adopts the third implementation method mentioned above to obtain the initial mapping relationship.
[0098] Step S402: Generate multiple candidate mapping relationships according to the target mapping relationship.
[0099] Specifically, generating multiple candidate mapping relationships according to the target mapping relationship includes: determining an optimization range of the mapping relationship according to a preset range parameter and the target mapping relationship, and generating multiple candidate mapping relationships according to the determined optimization range. It should be noted that the multiple candidate mapping relationships are within the determined optimization range.
[0100] The above embodiment mentioned that the mapping relationship can be represented by the spatial rotation projection matrix R and the alignment translation projection matrix T. Assuming that the target mapping relationship is: 目标 = {R 目标 , T 目标}, the range parameters a and b can be preset, where a and R 目标 Correspondingly, b and T 目标 Correspondingly, based on the range parameters a and b, the following optimization range can be determined [R 目标 -a, R 目标 +a]、[T 目标 -b,T 目标 +b], after determining the optimal search range, in [R 目标 -a, R 目标 +a], a candidate space rotation projection matrix is generated within the range of [T 目标 -b,T 目标 +b] generates a candidate alignment translation projection matrix, and the candidate mapping relationship is composed of the generated candidate space rotation projection matrix and the candidate alignment translation projection matrix.
[0101] Optionally, the range parameter a may be set to 15°, and the range parameter b may be set to dist(R eye ,L eye ) is the distance between the left eye and the right eye of the specified object. The above values of a and b are only examples, and the present application is not limited thereto.
[0102] Step S403: based on the three-dimensional envelope and the two-dimensional envelope, select an optimal candidate mapping relationship from multiple candidate mapping relationships.
[0103] Specifically, based on the three-dimensional envelope and the two-dimensional envelope, the process of selecting the optimal candidate mapping relationship from multiple candidate mapping relationships may include:
[0104] Step S4031: For each candidate mapping relationship, execute:
[0105] Step S4031-1: using the candidate mapping relationship to map the three-dimensional envelope to a two-dimensional space, to obtain a mapped envelope.
[0106] Step S4031 - 2 : Determine the degree of overlap between the mapped envelope and the two-dimensional envelope to obtain the degree of overlap corresponding to the candidate mapping relationship.
[0107] There are many ways to determine the overlap between the mapped envelope and the two-dimensional envelope. This embodiment provides the following two ways:
[0108] The first implementation method is to calculate the distance between each point on the mapped envelope and the corresponding point on the two-dimensional envelope, sum all the calculated distances, and use the summed distance to represent the overlap between the mapped envelope and the two-dimensional envelope. For example, the mapped envelope includes 100 points, which are x1 to x100, and the two-dimensional envelope also includes 100 points, which are y1 to y100. Then, the distance d1 between x1 and y1, the distance d2 between x2 and y2, ..., the distance d100 between x100 and y100 are calculated, and then d1 to d100 are summed, and the summed distance d is used to represent the overlap between the mapped envelope and the two-dimensional envelope.
[0109] The second implementation method is: sample a number of points on the mapped envelope, calculate the distance between each sampled point and the corresponding point on the two-dimensional envelope, and use the summed distance to characterize the overlap between the mapped envelope and the two-dimensional envelope. Exemplarily, the mapped envelope includes 100 points, x1 to x100, and the two-dimensional envelope also includes 100 points, y1 to y100, then sample 50 points from the mapped envelope, for example, x1, x3, x5, ..., calculate the distance d1 between x1 and y1, the distance d3 between x3 and y3, ..., and finally get 50 distances, sum the 50 distances, and use the summed distance as the overlap between the mapped envelope and the two-dimensional envelope.
[0110] Since the second implementation method only calculates some points, compared with the first implementation method, the amount of calculation is smaller and the efficiency of determining the overlap degree is higher.
[0111] Through step S4031, the overlap degree corresponding to each candidate mapping relationship can be obtained.
[0112] It should be noted that the implementation process of "determining the optimal mapping relationship from multiple randomly generated mapping relationships based on the three-dimensional envelope line and the two-dimensional envelope line" in the second implementation method of the above-mentioned step S401 is similar to the implementation process of "selecting the optimal candidate mapping relationship from multiple candidate mapping relationships based on the three-dimensional envelope line and the two-dimensional envelope line".
[0113] Step S4032: Determine the candidate mapping relationship corresponding to the highest overlap as the optimal candidate mapping relationship.
[0114] Step S404: Determine whether the optimal candidate mapping relationship meets the preset conditions. If so, execute step S405a; otherwise, execute step S405b.
[0115] Specifically, the process of determining whether the optimal candidate mapping relationship satisfies a preset condition may include: determining whether the overlap corresponding to the optimal candidate mapping relationship is greater than a preset overlap threshold.
[0116] Step S405a: determining the optimal candidate mapping relationship as the mapping relationship between the three-dimensional eyeball and the two-dimensional eyeball.
[0117] Step S405b: taking the best candidate mapping relationship as a new target mapping relationship, and then executing step S402 and subsequent steps.
[0118] Through the above process, the mapping relationship between the three-dimensional eyeball and the two-dimensional eyeball can be determined. After the mapping relationship between the three-dimensional eyeball and the two-dimensional eyeball is determined, the key points of the designated part of the eyeball in the two-dimensional eye image can be mapped to the three-dimensional space according to the mapping relationship, thereby obtaining the key points of the designated part of the eyeball in the three-dimensional space, and then the area where the designated part of the eye is located can be determined from the above-mentioned three-dimensional eyeball model according to the key points of the designated part of the eyeball in the three-dimensional space.
[0119] Third embodiment
[0120] An embodiment of the present application further provides an eye information determination device. The eye information determination device provided in the embodiment of the present application is described below. The eye information determination device described below and the eye information determination method described above can refer to each other.
[0121] See also Figure 5 , shows a schematic diagram of the structure of the eye information determination device provided in an embodiment of the present application, which may include: an eye information acquisition module 501, a mapping relationship construction module 502 and an eye key information determination module 503.
[0122] The eye information acquisition module 501 is used to acquire three-dimensional eye information and a two-dimensional eye image corresponding to the three-dimensional eye information.
[0123] The mapping relationship building module 502 is used to build a mapping relationship between a three-dimensional eyeball and a two-dimensional eyeball according to the three-dimensional eye information and the two-dimensional eye image corresponding to the three-dimensional eye information.
[0124] The eye key information determination module 503 is used to map the key points of the designated part of the eye in the two-dimensional eye image to the three-dimensional space according to the mapping relationship between the three-dimensional eye and the two-dimensional eye, so as to obtain a mapping result that can characterize the position of the designated part of the eye in the three-dimensional space.
[0125] Optionally, the mapping relationship building module 502 may include: a three-dimensional eyeball model building module and a mapping relationship determining module.
[0126] The three-dimensional eyeball model construction module is used to construct a three-dimensional eyeball model according to the three-dimensional eye information;
[0127] The mapping relationship determination module is used to determine the mapping relationship between the three-dimensional eyeball and the two-dimensional eyeball according to the three-dimensional eye information, the two-dimensional eye image and the three-dimensional eyeball model.
[0128] Optionally, a three-dimensional eyeball model building module is used to fit the three-dimensional shape of the eyeball and the center point of the eyeball using an ellipse fitting method according to the three-dimensional eye information to obtain a three-dimensional eyeball model.
[0129] Optionally, the mapping relationship determination module includes: a three-dimensional envelope acquisition submodule, a two-dimensional envelope acquisition submodule and a mapping relationship determination submodule.
[0130] The three-dimensional envelope acquisition submodule is used to acquire a three-dimensional envelope according to the three-dimensional eye information and the three-dimensional eyeball model, wherein the three-dimensional envelope can represent the eye socket in the three-dimensional space.
[0131] The two-dimensional envelope acquisition submodule is used to acquire a two-dimensional envelope according to the two-dimensional eye image, wherein the two-dimensional envelope can represent the eye socket in the two-dimensional space.
[0132] The mapping relationship determination submodule is used to determine the mapping relationship between the three-dimensional eyeball and the two-dimensional eyeball according to the three-dimensional envelope line and the two-dimensional envelope line.
[0133] Optionally, a mapping relationship determination submodule is specifically used to obtain an initial mapping relationship as a target mapping relationship, generate multiple candidate mapping relationships based on the target mapping relationship, and select an optimal candidate mapping relationship from the multiple candidate mapping relationships based on the three-dimensional envelope line and the two-dimensional envelope line. If the optimal candidate mapping relationship meets a preset condition, the optimal candidate mapping relationship is determined as the mapping relationship between the three-dimensional eyeball and the two-dimensional eyeball. If the optimal candidate mapping relationship does not meet the preset condition, the optimal candidate mapping relationship is used as a new target mapping relationship, and then the generation of multiple candidate mapping relationships based on the target mapping relationship is executed.
[0134] Optionally, when generating multiple candidate mapping relationships according to the target mapping relationship, the mapping relationship determination submodule is specifically used to determine a mapping relationship optimization range according to the target mapping relationship and preset optimization parameters, and generate multiple candidate mapping relationships according to the mapping relationship optimization range.
[0135] Optionally, the eye information acquisition module 501 is specifically used to extract eye information from the three-dimensional face information as three-dimensional eye information, and to extract an eye image from a two-dimensional face image corresponding to the three-dimensional face information as a two-dimensional eye image corresponding to the three-dimensional eye information.
[0136] Optionally, when acquiring the initial mapping relationship, the mapping relationship determination submodule is specifically used to determine the mapping relationship between the three-dimensional face and the two-dimensional face according to the three-dimensional face information and the two-dimensional face image as the initial mapping relationship.
[0137] Optionally, when acquiring the initial mapping relationship, the mapping relationship determination submodule is specifically configured to randomly generate a mapping relationship as the initial mapping relationship.
[0138] Optionally, when acquiring the initial mapping relationship, the mapping relationship determination submodule is specifically used to randomly generate multiple mapping relationships, and determine the optimal mapping relationship from the multiple randomly generated mapping relationships based on the three-dimensional envelope and the two-dimensional envelope as the initial mapping relationship.
[0139] Optionally, when the mapping relationship determination submodule selects the optimal candidate mapping relationship from the multiple candidate mapping relationships based on the three-dimensional envelope line and the two-dimensional envelope line, it is specifically used to, for each candidate mapping relationship, use the candidate mapping relationship to map the three-dimensional envelope line to the two-dimensional space to obtain the mapped envelope line, determine the degree of overlap between the mapped envelope line and the two-dimensional envelope line to obtain the overlap corresponding to the candidate mapping relationship, and after obtaining the overlap corresponding to each candidate mapping relationship, determine the candidate mapping relationship corresponding to the highest overlap as the optimal candidate mapping relationship.
[0140] Optionally, when determining the overlap between the mapped envelope and the two-dimensional envelope, the mapping relationship determination submodule is specifically configured to sample a number of points from the mapped envelope according to a preset sampling rule;
[0141] The distance between each sampled point and the corresponding point on the two-dimensional envelope is calculated, all calculated distances are summed, and the summed distance is used to characterize the overlap between the mapped envelope and the two-dimensional envelope.
[0142] The eye key information determination device provided in the embodiment of the present application first obtains three-dimensional eye information and a two-dimensional eye image corresponding to the three-dimensional eye information, then constructs a mapping relationship between a three-dimensional eyeball and a two-dimensional eyeball based on the three-dimensional eye information and the two-dimensional eye image corresponding to the three-dimensional eye information, and finally maps the key points of the designated part of the eyeball in the two-dimensional eye image to the three-dimensional space based on the mapping relationship between the three-dimensional eyeball and the two-dimensional eyeball, thereby obtaining a mapping result that can characterize the position of the designated part of the eyeball in the three-dimensional space. The eye key information determination device provided in the embodiment of the present application can determine the position of the designated part of the eyeball in the three-dimensional space based on the three-dimensional eye information and the two-dimensional eye image corresponding to the three-dimensional eye information.
[0143] Fourth embodiment
[0144] The present application also provides a device for determining key eye information. Figure 6 , shows a schematic diagram of the structure of the eye key information determination device, the eye key information determination device may include: at least one processor 601, at least one communication interface 602, at least one memory 603 and at least one communication bus 604;
[0145] In the embodiment of the present application, the number of the processor 601, the communication interface 602, the memory 603, and the communication bus 604 is at least one, and the processor 601, the communication interface 602, and the memory 603 communicate with each other through the communication bus 604;
[0146] The processor 601 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention;
[0147] The memory 603 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory;
[0148] The memory stores a program, and the processor can call the program stored in the memory, wherein the program is used to:
[0149] Acquire three-dimensional eye information and a two-dimensional eye image corresponding to the three-dimensional eye information;
[0150] Constructing a mapping relationship between a three-dimensional eyeball and a two-dimensional eyeball according to the three-dimensional eye information and a two-dimensional eye image corresponding to the three-dimensional eye information;
[0151] According to the mapping relationship between the three-dimensional eyeball and the two-dimensional eyeball, the key points of the designated part of the eyeball in the two-dimensional eye image are mapped to the three-dimensional space to obtain a mapping result that can characterize the position of the designated part of the eyeball in the three-dimensional space.
[0152] Optionally, the detailed functions and extended functions of the program may refer to the above description.
[0153] Fifth embodiment
[0154] The embodiment of the present application further provides a readable storage medium, which may store a program suitable for execution by a processor, wherein the program is used to:
[0155] Acquire three-dimensional eye information and a two-dimensional eye image corresponding to the three-dimensional eye information;
[0156] Constructing a mapping relationship between a three-dimensional eyeball and a two-dimensional eyeball according to the three-dimensional eye information and a two-dimensional eye image corresponding to the three-dimensional eye information;
[0157] According to the mapping relationship between the three-dimensional eyeball and the two-dimensional eyeball, the key points of the designated part of the eyeball in the two-dimensional eye image are mapped to the three-dimensional space to obtain a mapping result that can characterize the position of the designated part of the eyeball in the three-dimensional space.
[0158] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0159] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0160] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for determining key eye information, characterized in that: include: Acquire three-dimensional eye information and a two-dimensional eye image corresponding to the three-dimensional eye information; Constructing a mapping relationship between a three-dimensional eyeball and a two-dimensional eyeball according to the three-dimensional eye information and a two-dimensional eye image corresponding to the three-dimensional eye information; According to the mapping relationship between the three-dimensional eyeball and the two-dimensional eyeball, the key points of the designated part of the eyeball in the two-dimensional eye image are mapped to the three-dimensional space to obtain a mapping result that can characterize the position of the designated part of the eyeball in the three-dimensional space; The constructing a mapping relationship between a three-dimensional eyeball and a two-dimensional eyeball according to the three-dimensional eye information and a two-dimensional eye image corresponding to the three-dimensional eye information includes: Constructing a three-dimensional eyeball model according to the three-dimensional eye information; Obtain an initial mapping relationship as the target mapping relationship; Generate multiple candidate mapping relationships according to the target mapping relationship; Based on the three-dimensional envelope and the two-dimensional envelope, selecting the best candidate mapping relationship from the multiple candidate mapping relationships; the three-dimensional envelope can represent the eye socket in the three-dimensional space; the two-dimensional envelope can represent the eye socket in the two-dimensional space; If the optimal candidate mapping relationship meets a preset condition, the optimal candidate mapping relationship is determined as the mapping relationship between the three-dimensional eyeball and the two-dimensional eyeball; If the optimal candidate mapping relationship does not meet the preset condition, the optimal candidate mapping relationship is used as a new target mapping relationship, and then the method of generating multiple candidate mapping relationships according to the target mapping relationship is executed; The three-dimensional envelope line and the two-dimensional envelope line acquisition process include: Acquire the three-dimensional envelope according to the three-dimensional eye information and the three-dimensional eyeball model; The two-dimensional envelope is acquired according to the two-dimensional eye image.
2. The method for determining key eye information according to claim 1, characterized in that: The step of constructing a three-dimensional eyeball model according to the three-dimensional eye information comprises: According to the three-dimensional eye information, an ellipse fitting method is adopted to fit the three-dimensional shape of the eyeball and the center point of the eyeball to obtain a three-dimensional eyeball model.
3. The method for determining key eye information according to claim 1, characterized in that: The generating a plurality of candidate mapping relationships according to the target mapping relationship comprises: Determining a mapping relationship optimization range according to the target mapping relationship and preset optimization parameters; According to the mapping relationship optimization range, a plurality of candidate mapping relationships are generated.
4. The method for determining key eye information according to claim 1, characterized in that: The acquiring of three-dimensional eye information and a two-dimensional eye image corresponding to the three-dimensional eye information includes: Acquire three-dimensional face information and a two-dimensional face image corresponding to the three-dimensional face information; Extracting eye information from the three-dimensional face information as three-dimensional eye information; Extracting an eye image from the two-dimensional face image corresponding to the three-dimensional face information as the two-dimensional eye image corresponding to the three-dimensional eye information; The obtaining of the initial mapping relationship includes: A mapping relationship between a three-dimensional face and a two-dimensional face is determined according to the three-dimensional face information and the two-dimensional face image as the initial mapping relationship.
5. The method for determining key eye information according to claim 1, characterized in that: The obtaining of the initial mapping relationship includes: Randomly generate a mapping relationship as the initial mapping relationship; or, A plurality of mapping relationships are randomly generated, and an optimal mapping relationship is determined from the plurality of randomly generated mapping relationships based on the three-dimensional envelope and the two-dimensional envelope as the initial mapping relationship.
6. The method for determining key eye information according to claim 1, characterized in that: The selecting an optimal candidate mapping relationship from the plurality of candidate mapping relationships based on the three-dimensional envelope and the two-dimensional envelope includes: For each candidate mapping: The three-dimensional envelope is mapped to a two-dimensional space using the candidate mapping relationship to obtain a mapped envelope; Determining the overlap between the mapped envelope and the two-dimensional envelope to obtain the overlap corresponding to the candidate mapping relationship; After obtaining the coincidence degrees corresponding to each candidate mapping relationship, the candidate mapping relationship corresponding to the highest coincidence degree is determined as the optimal candidate mapping relationship.
7. The method for determining key eye information according to claim 6, characterized in that: Determining the degree of overlap between the mapped envelope and the two-dimensional envelope includes: According to a preset sampling rule, a number of points are sampled from the mapped envelope; Calculate the distance between each sampled point and the corresponding point on the two-dimensional envelope line; All calculated distances are summed up, and the summed distance is used to represent the degree of overlap between the mapped envelope and the two-dimensional envelope.
8. A device for determining key eye information, characterized in that: include: Eye information acquisition module, mapping relationship construction module and eye key information determination module; The eye information acquisition module is used to acquire three-dimensional eye information and a two-dimensional eye image corresponding to the three-dimensional eye information; The mapping relationship building module is used to build a mapping relationship between a three-dimensional eyeball and a two-dimensional eyeball according to the three-dimensional eye information and the two-dimensional eye image corresponding to the three-dimensional eye information; The eye key information determination module is used to map the key points of the designated part of the eyeball in the two-dimensional eye image to the three-dimensional space according to the mapping relationship between the three-dimensional eyeball and the two-dimensional eyeball, so as to obtain a mapping result that can characterize the position of the designated part of the eyeball in the three-dimensional space; The mapping relationship building module is specifically used for: Constructing a three-dimensional eyeball model according to the three-dimensional eye information; Obtain an initial mapping relationship as the target mapping relationship; Generate multiple candidate mapping relationships according to the target mapping relationship; Selecting an optimal candidate mapping relationship from the plurality of candidate mapping relationships based on the three-dimensional envelope and the two-dimensional envelope; The three-dimensional envelope can represent the eye socket in three-dimensional space; The two-dimensional envelope can represent the eye socket in the two-dimensional space; If the optimal candidate mapping relationship meets a preset condition, the optimal candidate mapping relationship is determined as the mapping relationship between the three-dimensional eyeball and the two-dimensional eyeball; If the optimal candidate mapping relationship does not meet the preset condition, the optimal candidate mapping relationship is used as a new target mapping relationship, and then the method of generating multiple candidate mapping relationships according to the target mapping relationship is executed; The three-dimensional envelope line and the two-dimensional envelope line acquisition process include: Acquire the three-dimensional envelope according to the three-dimensional eye information and the three-dimensional eyeball model; The two-dimensional envelope is acquired according to the two-dimensional eye image.
9. A device for determining key eye information, characterized in that: include: Memory and processor; The memory is used to store programs; The processor is used to execute the program to implement each step of the method for determining key eye information as described in any one of claims 1 to 7.
10. A readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, each step of the method for determining key eye information as described in any one of claims 1 to 7 is implemented.
