Disclosure of Invention
In order to overcome the problems in the related art, the invention provides a glasses customization method, a glasses customization device and a glasses customization terminal based on a 3D face model, which can realize accurate matching of glasses in real time.
According to a first aspect of the embodiments of the present disclosure, there is provided a glasses customization method based on a 3D face model, including:
acquiring 3D model data of the face of a user, wherein the 3D model data of the face of the user at least comprises characteristic data of pupils, face width and ears; matching a proper glasses list in a glasses database according to the characteristic data of the pupils, the face width and the ears of the user, and determining the installation parameters of each type of glasses; selecting the glasses to be tried in the successfully matched glasses list according to the user, and constructing a glasses model of the glasses to be tried; and installing the glasses model of the try-on glasses to the 3D model of the face of the user according to the corresponding installation parameters of the try-on glasses.
Preferably, after the glasses to be tried are selected from the list of successfully matched glasses by the user and the glasses model of the glasses to be tried is constructed, the method further includes:
and rendering the glasses model of the try-on glasses according to the appearance characteristics of the try-on glasses.
Preferably, the matching of the appropriate glasses list in the glasses database according to the feature data of the pupils, the face width and the ears of the user includes:
matching the appropriate glasses list in the glasses database according to the following rules:
the horizontal distance between two pupil characteristic points of the face of the user is equal to the pupil distance of the picture frame;
the horizontal separation of the two face-wide feature points of the user's face is less than the overall width of the frame, or less than the lens size multiplied by 2 plus the frame nose bridge width.
Preferably, the method further comprises: aligning an eyewear positioning plane determined from lens and frame data of the eyewear and a user face positioning plane determined from pupil and ear characteristic data of the user when installed.
Preferably, the method further comprises: performing collision detection on the glasses model of the try-on glasses and the 3D model of the face of the user, and judging whether the glasses model of the try-on glasses collides with the skin or the five sense organs of the user after being worn;
and determining the glasses model of the try-on glasses with the collision invasion distance smaller than the set range as glasses suitable for the 3D model of the face of the user.
Preferably, the method further comprises: labeling pupil, face width and ear characteristic data in the face 3D model data of the user;
and if the characteristic data of the pupils, the face width and the ears in the 3D model data of the face of the user are wrong, re-labeling the characteristic data of the pupils, the face width and the ears.
According to a second aspect of the embodiments of the present disclosure, there is provided an eyeglass customizing apparatus based on a 3D face model, including:
the human face model importing module is used for acquiring 3D model data of the face of a user, wherein the 3D model data of the face of the user at least comprises characteristic data of pupils, face width and ears;
the automatic glasses matching module is used for matching a proper glasses list in the glasses database according to the pupil, the face width and the ear feature number of the user and determining the installation parameters of each type of glasses;
and the installation module is used for selecting the glasses to be tried on according to the glasses to be tried on in the successfully matched glasses list by the user, constructing a glasses model of the glasses to be tried on, and installing the glasses model of the glasses to be tried on to the 3D model of the face of the user according to the corresponding installation parameters of the glasses to be tried on.
Preferably, the apparatus further comprises: a rendering module and/or a labeling module; wherein the content of the first and second substances,
a rendering module for rendering the glasses model of the try-on glasses according to the appearance characteristics of the try-on glasses;
and the labeling module is used for labeling the characteristic data of the pupils, the face width and the ears in the face 3D model data of the user, and if the characteristic data of the pupils, the face width and the ears in the face 3D model data of the user is wrong, re-labeling the characteristic data of the pupils, the face width and the ears.
Preferably, the device further comprises a glasses data storage module, configured to store the imported face model, the feature data of the feature points, all glasses models, and size/texture/material/style data of glasses.
According to a third aspect of the embodiments of the present disclosure, there is provided a 3D face model-based glasses customization terminal, the terminal includes a processor and a memory, where the memory stores at least one instruction, at least one program, a code set, or a set of instructions, and the instruction, the program, the code set, or the set of instructions is loaded and executed by the processor to implement the operations performed in the 3D face model-based glasses customization method.
According to a fourth aspect of embodiments of the present disclosure, there is provided a non-transitory machine-readable storage medium having stored thereon executable code, which when executed by a processor of an electronic device, causes the processor to perform the above-mentioned method.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
the embodiment of the disclosure provides a glasses customization method based on a 3D face model, which includes the steps of obtaining 3D model data of a face of a user, wherein the 3D model data of the face of the user at least includes characteristic data of pupils, face width and ears; matching a proper glasses list in a glasses database according to the characteristic data of the pupils, the face width and the ears of the user, and determining the installation parameters of each type of glasses; selecting the glasses to be tried in the successfully matched glasses list according to the user, and constructing a glasses model of the glasses to be tried; (ii) a And installing the glasses model of the try-on glasses to the 3D model of the face of the user according to the corresponding installation parameters of the try-on glasses. The method can meet the consumption requirement of a consumer on the personalized customization of the glasses, automatically matches the glasses with proper size and comfortable wearing for the consumer according to the three-dimensional model and the size of the face of the consumer, automatically tries on the glasses on the face model, and realizes the accurate wearing of the glasses in real time.
The embodiment of the disclosure can also be according to the appearance characteristic of try-on glasses renders the glasses model of try-on glasses for the user can automatically render the image of wearing the glasses on the face model according to corresponding texture and material when changing the parameters such as texture color, material and the like of each type of glasses, the user can preview the try-on effect, and the user can observe the glasses wearing effect under different illumination conditions and different surrounding environments by adjusting the illumination and environment material of the whole 3D scene.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Detailed Description
Preferred embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While the preferred embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
The terminology used in the present disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used in this disclosure and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present disclosure. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
The invention provides a glasses customizing method based on a 3D face model, which can realize accurate matching of glasses in real time.
The technical scheme of the disclosure is described in detail in the following with reference to the accompanying drawings.
Fig. 1 is a flowchart illustrating a 3D face model-based glasses customization method according to an exemplary embodiment of the present disclosure.
As shown in fig. 1, the steps of the method may be applied to a server side or a client side, or may be implemented by a cooperation between the client side and the server side, or by a web program or a combination of software and hardware, and the method includes the following steps:
in step 110, 3D model data of the user's face is obtained, wherein the 3D model data of the user's face includes at least feature data of pupils, face width and ears.
In this embodiment, the face of the user may be scanned by a 3D scanner or a portable 3D face scanning device to obtain a 3D model of the face. In the preferred embodiment of the present disclosure, the facial 3D model contains the entire facial penta-facial regions, the lateral cheek regions, and the ears, etc.
In this embodiment, the acquired 3D model data of the user's face at least includes feature data of pupil, face width, and ear feature points, and as shown in fig. 3, includes at least 6 feature points, that is, two pupil center points (hereinafter, pupil feature points), two feature points expressing face width (hereinafter, face width feature points), and two feature points expressing mounting points of temples on ears (hereinafter, ear feature points). The correct positions of these feature points, for example, the feature points in the left half, as shown in fig. 4 to 6, are such that the corresponding feature points in the right face are in the same anatomical meaning as the corresponding feature points in the left face, and in short, the left and right feature points of the same name are generally symmetrical. As shown in fig. 4, the Pupil feature point is the center of the Pupil when the user views things with a common line of sight, which is usually the center of the Pupil when the line of sight is looking straight ahead, and Left Pupil is labeled in fig. 4. As shown in fig. 5, the Face Width feature point is about 1 cm outside the eye socket and is used to express the Width of the Face of the user in the horizontal direction where the two temples are located, and Left Face Width is labeled in fig. 5. As shown in fig. 6, the Ear feature point is the junction between the outer contour of the Ear and the face, and is usually the mounting point of the temple on the Ear, where Left Ear is labeled in fig. 6.
In step 120, a list of suitable glasses is matched in the glasses database according to the feature numbers of the pupils, face width and ears of the user, and the installation parameters of each type of glasses are determined.
The eyeglass models stored in the database of the present disclosure are all provided with the dimensional parameters described in the boxed system, such as Frame Pupil Distance (Frame Pupil Distance), Lens Size (Lens Size), Frame bridge width DBL, temple length, and the like. The Box System, an international measurement System for the design of spectacle frames, is defined by the national standard based on the measurement and definition of a rectangle formed by a horizontal tangent and a vertical tangent to the outer edge of a lens or lens blank
In this embodiment, based on the above 6 feature points, according to a box method system commonly used in the eyeglass industry, box method parameters suitable for the face shape of the user are automatically calculated, according to the calculated box method parameters, a list of suitable eyeglass models is matched from a series of 3D eyeglass models in a database, and configurations such as textures and materials of each pair of eyeglasses are obtained. The frames and the temples in the database can be screened according to the following rules:
1) the horizontal separation of the two Pupil feature points of the face is approximately equal to the Frame's interpupillary Distance (Frame Pupil Distance).
2) The horizontal separation of the two face-wide feature points on the face is slightly less than the overall width of the frame (143 mm in fig. 7), or slightly less than the lens size multiplied by 2 plus the frame DBL.
Wherein the descriptions of "approximately equal to", "slightly less than", etc. refer to the specification of an appropriate fault tolerance range for each rule, for example, in rule 1, "approximately equal to" can be defined as being in the range of plus or minus 3mm, that is, when the horizontal distance between two pupil feature points of the face is 3mm less than the interpupillary distance of the frame, the glasses are still considered to be in accordance with rule 1; conversely, if less than 4mm, the lens is considered to be out of the 1 st rule. Where "slightly less than" may be defined as: a is slightly smaller than B, namely B-5mm < A < B.
In step 130, a glasses model of the trial glasses is constructed according to the glasses selected by the user for trial wearing in the successfully matched glasses list.
In step 140, a glasses model of the try-on glasses is rendered according to the appearance characteristics of the try-on glasses.
In this embodiment, in the matched glasses list, each component of each type of glasses may further provide a customization function for attributes such as texture, material, style, and the like. When a user selects to try on a pair of glasses, the system can automatically acquire a texture list, a material list, a style list and the like suitable for the glasses for the user to select, and then the glasses model of the glasses can be rendered according to the appearance characteristics of the glasses.
It should be noted that step 140 may not be required in this flow step.
In step 150, the glasses model of the try-on glasses is mounted to the 3D model of the user's face according to the corresponding mounting parameters of the try-on glasses.
In the embodiment, the fitting effect is rendered in real time according to the installation parameters of the fitting glasses selected by the user.
In a preferred embodiment, step 141 may also be included.
In step 141, it is determined whether the user reselects glasses from the successfully matched glasses list, if yes, the process returns to step 130, and the user reselects glasses from the successfully matched glasses list, so that the system can re-render the try-on effect of the glasses, and if not, the process ends.
In a preferred embodiment of the present disclosure, the present disclosure further comprises aligning an eyewear positioning plane determined from lens and frame data of the eyewear and a user face positioning plane determined from pupil and ear feature data of the user when installed.
One implementation way of automatically wearing the glasses model in the present disclosure is to align and make the positioning plane (as shown in fig. 8) on the glasses model and the positioning plane (as shown in fig. 9) on the face model, and make the two aligned and coplanar, and make the corner point of the temple be mounted on the ear feature point of the face model, so that the glasses can be automatically worn on the face model. Specifically, after the glasses model is assembled, when the glasses legs are completely opened, four points C1, C2, T1 and T2 in fig. 8 can fit a plane, which is called a glasses positioning plane; meanwhile, four points of pupil characteristic points P1 and P2 and ear characteristic points E1 and E2 on the face model of FIG. 9 can be fitted to another plane, which is called a face location plane. To properly fit the eyeglasses in the eye area, the two planes must be as coplanar as possible, which can be accomplished by aligning the normal vectors of the two planes. Assuming that the face model remains stationary and the normal vectors of the two planes are calculated by knowing 8 points as in fig. 8 and 9, then a three-dimensional rotation matrix is calculated which, after transformation of the normal vector of the glasses orientation plane, is in the same direction as the normal vector of the face orientation plane.
After the above steps, the glasses model and the eyes of the human face model can be aligned in direction and orientation, that is, it is ensured that the glasses are not excessively tilted or tilted relative to the eyes, but a translation vector can be determined to align the glasses model and the human face model in distance and position. This result can be achieved in many ways, and a simple method is to solve a translation vector to move the midpoint of the line E1 or E2 to the midpoint of the line T1 or T2. Because the corner points of the temples on the model of the glasses (T1 and T2) just fit on the ear feature points (E1 and E2) of the face model when the glasses are worn correctly.
Thus, the obtained rotation matrix and translation vector are installation parameters required for correctly wearing the glasses model on the face model.
In a preferred implementation of the present disclosure, the method of the present disclosure further includes performing collision detection on the glasses model of the try-on glasses and the 3D model of the face of the user, determining whether the glasses model of the try-on glasses collides with the skin or five sense organs of the user after being worn, for example, a severe collision occurs, and determining the glasses model of the try-on glasses with a collision intrusion distance smaller than a set range as glasses suitable for the 3D model of the face of the user.
In order to be compatible with the software-calculated error, a preferred embodiment of the present disclosure may allow configuring a certain threshold value of the collision intrusion distance, for example 0.2 mm, below which the actual collision intrusion distance is also considered comfortable to wear, which may be adjusted according to the actual situation, and may be negative.
According to the method, the collision detection is carried out on the glasses model of the try-on glasses and the 3D model of the face of the user, so that the try-on glasses can be effectively prevented from being inserted or invading into the skin and the surfaces of five sense organs of the face, and the serious collision between the areas around the eye sockets, the nose bridge and the like and the try-on glasses can be avoided.
In a preferred embodiment, the present disclosure further comprises labeling pupil, face width and ear feature data in the user's facial 3D model data; and if the pupil, face width and ear feature data in the user face 3D model data are wrong, re-labeling the pupil, face width and ear feature data.
That is, if the imported face 3D model already includes the above feature points, the user does not need to re-label the feature points, or if the positions of the feature points are significantly displaced, fine adjustment may be performed to correct positions with reference to the schematic diagrams of fig. 3-6; if these feature points do not exist, the corresponding feature points may be manually marked by the user with reference to the schematic diagrams of fig. 3 to 6. Generally, the operation mode of adjusting the feature points can be achieved by pressing a certain feature point with a mouse or a finger, dragging the certain feature point to the correct position on the face model along the surface of the face model, and then releasing the finger or the mouse. The ray casting algorithm can automatically ensure that the position of the released finger or mouse corresponds to a certain 3D point on the surface of the face model, and the point is a new 3D feature point.
In the glasses customizing method based on the 3D face model, first, 3D model data of the face of a user is obtained, where the 3D model data of the face of the user at least includes characteristic data of pupils, face width, and ears; matching a proper glasses list in a glasses database according to the pupil, the face width and the ear feature number of the user, and determining the installation parameters of each type of glasses; selecting the glasses to be tried in the successfully matched glasses list according to the user, and constructing a glasses model of the glasses to be tried; and finally, installing the glasses model of the try-on glasses to the 3D model of the face of the user according to the corresponding installation parameters of the try-on glasses. The method of the embodiment can meet the consumption requirement of a consumer on the personalized customization of the glasses, automatically matches the glasses with proper size and comfortable wearing for the consumer according to the three-dimensional face model and the size of the consumer, automatically tries on the glasses on the face model, and accurately wears the glasses in real time.
The method of the embodiment can also enable the user to automatically render the image of the glasses worn on the face model according to the corresponding texture and material when the parameters such as the texture color and the material of each type of glasses are changed, so that the user can preview the try-on effect, and meanwhile, the user can observe the glasses wearing effect under different illumination conditions and different surrounding environments by adjusting the illumination and the environment material of the whole 3D scene.
Corresponding to the embodiment of the application function implementation method, the invention further provides a glasses customization device based on the 3D face model, a terminal and a corresponding embodiment.
Fig. 2 is a schematic block diagram illustrating a 3D face model-based glasses customization apparatus according to an exemplary embodiment of the present disclosure.
The device can be a server module, a client program or a web program, or a combination of software and hardware. The modules can be split or combined.
Referring to fig. 2, in a glasses customizing apparatus based on a 3D face model, there may be included: the system comprises a human face model importing module 21, an automatic glasses matching module 22, an installing module 23, a rendering module 24, a labeling module 25 and a glasses data storage module 26.
In this embodiment, the human face model importing module 21 is configured to obtain 3D model data of a user's face, where the 3D model data of the user's face at least includes feature data of pupils, face width, and ears.
In this embodiment, the face of the user may be scanned by a 3D scanner or a portable 3D face scanning device to obtain a 3D model of the face. In a preferred embodiment of the present disclosure, the facial 3D model contains the full facial penta-facial regions, the lateral cheek regions, and the ears.
In this embodiment, the acquired 3D model data of the face of the user at least includes feature data of pupils, face width, and ears, and as shown in fig. 3, the data at least includes 6 feature points, that is, two pupil center points (hereinafter, referred to as pupil feature points), two feature points expressing face width (hereinafter, referred to as face width feature points), and two feature points expressing mounting points of temples on ears (hereinafter, referred to as ear feature points). The correct positions of these feature points, for example, the feature points in the left half, are shown in fig. 4 to 6, and the corresponding feature points in the right face are located at the same anatomical positions as the corresponding feature points in the left face, and in short, the left and right feature points with the same name are generally symmetrical. As shown in fig. 4, the pupil feature point is the center of the pupil when the user views things with a common line of sight, and is usually the center of the pupil when the user looks straight ahead. As shown in fig. 5, the face width feature point is about 1 cm outside the eye orbit and expresses the width of the user's face in the horizontal direction where the two temples are located. Referring to fig. 6, the ear feature point is the junction between the outer contour of the ear and the face, and is usually the mounting point of the temple on the ear.
And the automatic glasses matching module 22 is used for matching a proper glasses list in the glasses database according to the pupil, the face width and the ear characteristic number of the user and determining the installation parameters of each type of glasses.
The eyeglass model stored in the eyeglass data storage module 26 is provided with the Size parameters described in the box method system, such as Frame Pupil Distance (Frame Pupil Distance), Lens Size (Lens Size), Frame bridge width DBL, temple length, and the like.
In this embodiment, the automatic glasses matching module 22 may automatically calculate, based on the aforementioned 6 feature points, a box parameter suitable for the shape of the face of the user according to a box system commonly used in the glasses industry, match a list of suitable glasses models from a series of 3D glasses models in the glasses data storage module 26 according to the calculated box parameter, and obtain configurations such as texture, material, and the like of each type of glasses. The frames and temples in the eyewear data storage module 26 may be filtered according to the following rules:
1) the horizontal Distance between two Pupil characteristic points of the face is approximately equal to the Pupil Distance of the picture Frame (Frame Pupil Distance)
2) The horizontal separation of the two face-wide feature points on the face is slightly less than the overall width of the frame (143 mm in fig. 7), or slightly less than the lens size multiplied by 2 plus the frame DBL.
Wherein the descriptions of "approximately equal to", "slightly less than", etc. refer to the specification of an appropriate fault tolerance range for each rule, for example, in rule 1, "approximately equal to" can be defined as being in the range of plus or minus 3mm, that is, when the horizontal distance between two pupil feature points of the face is 3mm less than the interpupillary distance of the frame, the glasses are still considered to be in accordance with rule 1; conversely, if less than 4mm, the lens is considered to be out of the 1 st rule. Wherein "slightly less than" may be defined as: a is slightly smaller than B, namely B-5mm < A < B.
The installation module 23 is configured to select glasses to be tried on from the successfully matched glasses list according to the user, and construct a glasses model of the glasses to be tried on; and installing the glasses model of the try-on glasses to the 3D model of the face of the user according to the corresponding installation parameters of the try-on glasses.
In a preferred embodiment of the present disclosure, the present disclosure further comprises aligning an eyewear positioning plane determined by the lens and frame data of the eyewear with a user face positioning plane determined by the user pupil and ear feature data, enabling the mounting of the eyewear.
One implementation manner of automatically wearing the glasses model in the present disclosure is to align and make the positioning plane (as shown in fig. 8) on the glasses model and the positioning plane (as shown in fig. 9) on the face model, and make the two aligned and coplanar, and make the corner point of the temple be mounted on the ear feature point of the face model, so that the glasses can be automatically worn on the face model. Specifically, after the glasses model is assembled, under the condition that the glasses legs are completely opened, a plane can be fitted by four points of C1, C2, T1 and T2, and the plane is called a glasses positioning plane; meanwhile, four points of pupil characteristic points P1 and P2 and ear characteristic points E1 and E2 on the face model can be fitted to form another plane, which is called a face positioning plane. To properly fit the eyeglasses in the eye region, the two planes are made as coplanar as possible, which can be achieved by aligning the normal vectors of the two planes. Assuming that the face model remains stationary and the normal vectors of the two planes are calculated by knowing 8 points as in fig. 8 and 9, then a three-dimensional rotation matrix is calculated which, after transformation of the normal vector of the glasses orientation plane, is in the same direction as the normal vector of the face orientation plane.
After the above steps, the glasses model and the eyes of the face model can be aligned in direction and orientation, that is, it is ensured that the glasses are not excessively tilted or tilted relative to the eyes, but a translation vector is determined to align the glasses model and the face model in distance and position. This result can be achieved in many ways, and a simple method is to solve a translation vector to move the midpoint of the line E1 or E2 to the midpoint of the line T1 or T2. Because the corner points of the temples on the model of the glasses (T1 and T2) just fit on the ear feature points (E1 and E2) of the face model when the glasses are worn correctly.
Thus, the obtained rotation matrix and translation vector are installation parameters required for correctly wearing the glasses model on the face model.
In a preferred implementation of the present disclosure, the method of the present disclosure further includes performing collision detection on the glasses model of the try-on glasses and the 3D model of the face of the user, determining whether the glasses model of the try-on glasses collides with the skin or five sense organs of the user after being worn, for example, a severe collision occurs, and determining the glasses model of the try-on glasses with a collision intrusion distance smaller than a set range as glasses suitable for the 3D model of the face of the user.
In order to be compatible with the software-calculated error, a preferred embodiment of the present disclosure may allow configuring a certain threshold value of the collision intrusion distance, for example 0.2 mm, below which the actual collision intrusion distance is also considered comfortable to wear, which may be adjusted according to the actual situation, and may be negative.
And the rendering module 24 is configured to render the glasses model of the try-on glasses according to the appearance characteristics of the try-on glasses.
In this embodiment, in the matched glasses list, each component of each type of glasses may further provide a customization function for attributes such as texture, material, style, and the like. When the user selects to try on a pair of glasses, the rendering module 24 may automatically obtain a texture list, a material list, a style list, and the like suitable for the pair of glasses, for the user to select. After the user selection is completed, the rendering module 24 renders the glasses model of the try-on glasses according to the appearance characteristics of the try-on glasses.
In a preferred embodiment, a judging module (not shown in the figure) may be further included for judging whether the user selects glasses again in the matching successfully-matched glasses list, and if the user selects glasses again in the matching successfully-matched glasses list, the rendering module 24 may render the try-on effect of the glasses again in real time.
And the labeling module 25 is used for labeling the characteristic data of pupils, face width and ears in the 3D face model data of the user.
In a preferred embodiment, if the pupil, face width and ear feature data in the user's facial 3D model data are erroneous, the pupil, face width and ear feature data are re-labeled.
And the glasses data storage module 26 is used for storing the imported face model, the feature data of the feature points, all glasses models and the size/texture/material/style data of the glasses.
In the glasses customizing device based on the 3D face model of the embodiment, the 3D face model of the user is first imported, and the 3D model includes at least 6 important feature points; then, the customizing device of this embodiment automatically calculates the box method parameters suitable for the face shape of the user based on the 6 feature points according to a box method system commonly used in the eyeglass industry, matches a list of suitable eyeglass models from a series of 3D eyeglass models in a database according to the calculated box method parameters, and obtains configurations of textures, materials and the like of each eyeglass. The customizing device of this embodiment will return the good glasses list of matching, the user can choose a glasses in this glasses list, the customizing device of this embodiment installs the 3D model of this glasses on the 3D face model of the user automatically, the user can fine tune the position of the glasses at this moment, can change the parameter such as texture color, material of every glasses too, the customizing device of this embodiment will render the picture that this glasses wear on the face model according to corresponding texture and material automatically, for the user preview try-on effect; the user can also observe the glasses wearing effect of the user under different illumination conditions and different surrounding environments by adjusting the illumination and environment materials of the whole 3D scene.
Fig. 10 is a schematic structural diagram illustrating a terminal that may be used to implement the above-described glasses customization method based on the 3D face model according to an exemplary embodiment.
Referring to FIG. 10, terminal 1000 can include memory 1010 and processor 1020.
The processor 1020 may be a multi-core processor or may include multiple processors. In some embodiments, processor 1020 may include a general-purpose host processor and one or more special purpose coprocessors such as a Graphics Processor (GPU), Digital Signal Processor (DSP), or the like. In some embodiments, processor 1020 may be implemented using custom circuits, such as an Application Specific Integrated Circuit (ASIC) or a Field Programmable Gate Array (FPGA).
The memory 1010 may include various types of storage units, such as system memory, Read Only Memory (ROM), and permanent storage. Wherein the ROM may store static data or instructions that are needed by the processor 1020 or other modules of the computer. The persistent storage device may be a read-write storage device. The persistent storage may be a non-volatile storage device that does not lose stored instructions and data even after the computer is powered off. In some embodiments, the persistent storage device employs a mass storage device (e.g., magnetic or optical disk, flash memory) as the persistent storage device. In other embodiments, the permanent storage may be a removable storage device (e.g., floppy disk, optical drive). The system memory may be a read-write memory device or a volatile read-write memory device, such as a dynamic random access memory. The system memory may store instructions and data that some or all of the processors require at runtime. Further, the memory 1010 may include any combination of computer-readable storage media, including various types of semiconductor memory chips (DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), magnetic and/or optical disks, among others. In some embodiments, memory 1010 may include a removable storage device that is readable and/or writable, such as a Compact Disc (CD), a read-only digital versatile disc (e.g., DVD-ROM, dual layer DVD-ROM), a read-only Blu-ray disc, an ultra-density optical disc, a flash memory card (e.g., SD card, min SD card, Micro-SD card, etc.), a magnetic floppy disc, or the like. Computer-readable storage media do not contain carrier waves or transitory electronic signals transmitted by wireless or wired means.
The memory 1010 has executable code stored thereon, which when processed by the processor 1020, causes the processor 1020 to perform the above-mentioned 3D face model-based glasses customization method.
The present disclosure provides a 3D face model based glasses customization terminal, the terminal comprising a processor and a memory, the memory having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, the instruction, the program, the set of codes, or the set of instructions being loaded and executed by the processor to implement the operations performed in the above 3D face model based glasses customization method.
The above-described method according to the present disclosure has been described in detail hereinabove with reference to the accompanying drawings.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Furthermore, the method according to the present disclosure may also be implemented as a computer program or computer program product comprising computer program code instructions for performing the above-mentioned steps defined in the above-mentioned method of the present disclosure.
Alternatively, the present disclosure may also be embodied as a non-transitory machine-readable storage medium (or computer-readable storage medium, or machine-readable storage medium) having stored thereon executable code (or a computer program, or computer instruction code) which, when executed by a processor of an electronic device (or computing device, server, etc.), causes the processor to perform the various steps of the above-described method according to the present disclosure.
The present disclosure provides a non-transitory machine-readable storage medium having stored thereon executable code which, when executed by a processor of an electronic device, causes the processor to perform the above-described method.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems and methods according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Having described embodiments of the present disclosure, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen in order to best explain the principles of the embodiments, the practical application, or improvements made to the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.