CN107025628B - Virtual try-on method and device for 2.5D glasses - Google Patents

Virtual try-on method and device for 2.5D glasses Download PDF

Info

Publication number
CN107025628B
CN107025628B CN201710283759.9A CN201710283759A CN107025628B CN 107025628 B CN107025628 B CN 107025628B CN 201710283759 A CN201710283759 A CN 201710283759A CN 107025628 B CN107025628 B CN 107025628B
Authority
CN
China
Prior art keywords
glasses
coordinate
calculating
point
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710283759.9A
Other languages
Chinese (zh)
Other versions
CN107025628A (en
Inventor
张晓民
张旭欣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Panx Software Development Co ltd
Original Assignee
Guangzhou Panx Software Development Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Panx Software Development Co ltd filed Critical Guangzhou Panx Software Development Co ltd
Priority to CN201710283759.9A priority Critical patent/CN107025628B/en
Publication of CN107025628A publication Critical patent/CN107025628A/en
Application granted granted Critical
Publication of CN107025628B publication Critical patent/CN107025628B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/04Context-preserving transformations, e.g. by using an importance map
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0641Shopping interfaces
    • G06Q30/0643Graphical representation of items or shoppers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/18Eye characteristics, e.g. of the iris
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20221Image fusion; Image merging

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Finance (AREA)
  • Accounting & Taxation (AREA)
  • Computer Hardware Design (AREA)
  • Health & Medical Sciences (AREA)
  • Computer Graphics (AREA)
  • Human Computer Interaction (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Ophthalmology & Optometry (AREA)
  • Multimedia (AREA)
  • General Health & Medical Sciences (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a virtual try-on method and a virtual try-on device for 2.5D glasses, wherein the method comprises the following steps: collecting image information and marking coordinate points in the image information; fixing the glasses frame composite image and the glasses leg composite image according to the marked coordinate points; and combining the glasses frame composite image and the glasses leg composite image with the image information to obtain a 2.5D glasses virtual try-on image. The beneficial effects of the invention are as follows: through the virtual try-on of 2.5D glasses, the try-on effect is more real, and material cost of manufacture is cheaper, and the cost of custom glasses collocation is lower, and 2.5D calculates the consumption littleer, and the platform of using is more extensive, supplies the user to carry out the contrast of trying on of glasses through many platforms.

Description

Virtual try-on method and device for 2.5D glasses
Technical Field
The technology relates to a network information technology, a computer vision technology, a man-machine interaction technology and a computer graphics technology, in particular to a virtual try-on method and a virtual try-on device for 2.5D glasses.
Background
The glasses shop on the market is traditional entity glasses shop mostly, and people can't try on a large amount of products in the short time when selecting glasses product, can't real-time acquire the product that is fit for oneself to the try on effect of a plurality of glasses product of contrast.
Disclosure of Invention
The invention aims to solve the problems that in the prior art, when people select glasses products, a large number of products cannot be tried on in a short time, products suitable for the people cannot be obtained in real time, and the trying-on effects of a plurality of glasses products are compared, and provides a 2.5D glasses virtual trying-on method and device.
The technical scheme adopted by the invention for solving the technical problems is as follows:
in one aspect, a virtual fitting method for 2.5D glasses is provided, including:
collecting image information and marking coordinate points in the image information;
fixing the glasses frame composite image and the glasses leg composite image according to the marked coordinate points;
and combining the glasses frame composite image and the glasses leg composite image with the image information to obtain a 2.5D glasses virtual try-on image.
In the virtual fitting method of 2.5D glasses according to the present invention, the acquiring image information and marking a coordinate point in the image information includes:
acquiring image information and acquiring a depth map of the image information;
and marking a coordinate point of a left eye pupil, a coordinate point of a right eye pupil and a coordinate point of an upper edge of an ear in the image information according to the depth map.
In the virtual fitting method of 2.5D glasses according to the present invention, the fixing of the frame composite drawing and the temple composite drawing according to the marked coordinate points includes:
calculating the interpupillary distance, the inclination angle and the central position according to the coordinate points of the left eye pupil and the coordinate points of the right eye pupil;
calculating the size of the picture frame synthetic image according to the preset interpupillary distance and the picture frame proportion;
determining the position and the rotation angle of the mirror frame composite image according to the inclination angle and the central position;
connecting the coordinate points of the upper edges of the ears with preset coordinate points on the picture frame synthetic graph, calculating the central point and the length of the connected line, and calculating the inclined shift angle according to the position and the rotation angle of the picture frame;
and determining the positions of the temples composite drawing according to the central points and the lengths of the connected lines, and determining the rotation angles of the temples according to the skewing angles.
In the virtual fitting method of 2.5D glasses according to the present invention, the step of connecting the coordinate points of the upper edge of the ear with the preset coordinate points on the frame synthesis map, calculating the center point and the length of the connected line, and calculating the tilt angle by using the position and the rotation angle of the frame includes:
trisecting the length of the picture frame composite picture;
connecting the coordinate point of the upper edge of the left ear with the left trisection point, and calculating the left central point and the left length of the connected line;
connecting the coordinate point of the upper edge of the right ear with the right trisection point, and calculating the right central point and the right length of the connected line;
and calculating according to the position and the rotation angle of the mirror frame and a preset matrix function to obtain the skew angle.
The virtual try-on method of the 2.5D glasses further comprises the following steps:
synthesizing the upper frame material image and the lower frame material image into a frame composite image;
and synthesizing the upper glasses leg material graph and the lower glasses leg material graph into a glasses leg composite graph.
In another aspect, there is provided a 2.5D glasses virtual try-on device, comprising:
the depth acquisition module is used for acquiring image information and marking coordinate points in the image information;
the coordinate fixing module is used for fixing the glasses frame composite image and the glasses leg composite image according to the marked coordinate points;
and the trial wearing synthesis module is used for combining the glasses frame synthesis image and the glasses leg synthesis image with the image information to obtain a 2.5D glasses virtual trial wearing image.
In the virtual try-on device for 2.5D glasses according to the present invention, the depth acquisition module includes:
the depth acquisition submodule is used for acquiring image information and acquiring a depth map of the image information;
and the coordinate marking submodule is used for marking the coordinate point of the left eye pupil, the coordinate point of the right eye pupil and the coordinate point of the upper edge of the ear in the image information according to the depth map.
In the virtual fitting device for 2.5D glasses according to the present invention, the coordinate fixing module includes:
the eye pupil calculating submodule is used for calculating the interpupillary distance, the inclination angle and the central position according to the coordinate point of the left eye pupil and the coordinate point of the right eye pupil;
the size determining submodule is used for calculating the size of the picture frame synthetic image according to the preset interpupillary distance and the picture frame proportion;
the picture frame determining submodule is used for determining the picture frame position and the picture frame rotating angle of the picture frame synthetic graph according to the inclination angle and the central position;
the line connecting sub-module is used for connecting a coordinate point on the upper edge of the ear with a preset coordinate point on the picture frame synthetic graph, calculating the central point and the length of the connected line, and calculating the skew angle according to the position and the rotation angle of the picture frame;
and the temple determining submodule is used for determining the position of the temple composite drawing according to the center point and the length of the connected line and determining the rotation angle of the temple according to the skew angle.
In the 2.5D virtual glasses try-on device according to the present invention, the connection sub-module includes:
the trisection submodule is used for trisecting the length of the picture frame composite picture;
the left connecting sub-module is used for connecting the coordinate point of the upper edge of the left ear with the left trisection point and calculating the left central point and the left length of the connected line;
the right connecting line submodule is used for connecting the coordinate point of the upper edge of the right ear with the right trisection point and calculating the right central point and the right length of the connected line;
and the angle calculation submodule is used for calculating to obtain the skew angle according to the position and the rotation angle of the mirror frame and a preset matrix function.
The 2.5D glasses virtual try-on device according to the present invention further includes:
the picture frame synthesis module is used for synthesizing the upper picture frame material map and the lower picture frame material map into a picture frame synthesis map;
and the temple synthesis module is used for synthesizing the upper temple material graph and the lower temple material graph into a temple synthesis graph.
The virtual try-on method and device for the 2.5D glasses disclosed above have the following beneficial effects: through the virtual try-on of 2.5D glasses, the try-on effect is more real, and material cost of manufacture is cheaper, and the cost of custom glasses collocation is lower, and 2.5D calculates the consumption littleer, and the platform of using is more extensive, supplies the user to carry out the contrast of trying on of glasses through many platforms.
Drawings
Fig. 1 is a flowchart of a virtual fitting method for 2.5D glasses according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a combination of trial eyeglasses according to an embodiment of the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The invention provides a virtual try-on method and device for 2.5D glasses, and aims to achieve the advantages that the virtual try-on method and device for the 2.5D glasses are realized, the try-on effect is more real, the material manufacturing cost is lower, the cost of self-defined glasses matching is lower, the 2.5D calculation consumption is lower, the applied platforms are wider, and the glasses are used for a user to perform the glasses try-on comparison through multiple platforms. The entity store in the market will slowly tend to the development of the virtual store, and the problems of occupied area and the like are solved greatly. According to the portrait photo obtained by the camera, pupil coordinate points of two eyes of the face and upper edge coordinate points of the ears are obtained through a data measurement scheme, the pupil distance, the rotation angle and the center point can be calculated according to the pupil coordinate points to confirm the position and the rotation angle of the picture frame, the center position of the line connecting the upper edge of the ears and the edge of the picture frame confirms the size and the position of the glasses legs, the synthesized portrait and the glasses are synthesized with the portrait photo and the glasses materials to obtain a photo of the synthesized portrait and the glasses, and the glasses try-on function is realized virtually. And calculating the real size of the glasses material in the actual pupil distance ratio and the favorite style of the user to manufacture the glasses which are consistent with the virtual glasses. The design scheme has the advantages that a large number of measurement schemes in actual operation are solved, complicated processes such as selecting the glasses and the like are achieved, and the glasses suitable for the size of the user can be customized.
Referring to fig. 1, fig. 1 is a flowchart of a virtual fitting method for 2.5D glasses according to an embodiment of the present invention, where the virtual fitting method for 2.5D glasses includes steps S1-S3:
s1, collecting image information and marking coordinate points in the image information; step S1 includes sub-steps S11-S12:
s11, collecting image information and acquiring a depth map of the image information; image information including a depth map is captured by a depth camera, a photograph read from the camera. The size of the pixel values in the depth map reflects the depth of field: the larger the pixel value in the depth map, the closer the depth of field is represented; the smaller the pixel value in the depth map, the farther the depth of field is represented.
And S12, marking the coordinate point of the left eye pupil, the coordinate point of the right eye pupil and the coordinate point of the upper edge of the ear in the image information according to the depth map. Coordinates of each pixel in the image can be obtained through the depth map, and coordinate points of the left eye pupil and the right eye pupil of the human face and coordinate points of the upper edge of the ear are marked according to the size of the image
S2, fixing the glasses frame composite drawing and the glasses leg composite drawing according to the marked coordinate points; step S2 includes sub-steps S21-S25:
s21, calculating the interpupillary distance, the inclination angle and the central position according to the coordinate points of the left eye pupil and the coordinate points of the right eye pupil; the distance, the inclination angle and the central position of the pupils of the two eyes are calculated by utilizing the trigonometric pythagorean theorem.
S22, calculating the size of the picture frame synthetic image according to the preset interpupillary distance and the picture frame proportion; the proportion of the interpupillary distance to the picture frame material is calculated by a large number of tests at 1: 1.8-2.3, thereby calculating the size of the picture frame material picture.
S23, determining the position and the rotation angle of the mirror frame composite picture according to the inclination angle and the central position; and confirming the position and the rotation angle of the picture frame composite picture according to the condition that the central positions and the inclination angles of the pupils of the two eyes are the same.
S24, connecting the coordinate points of the upper edge of the ear with the preset coordinate points on the picture frame synthetic graph, calculating the central point and the length of the connected line, and calculating the skew angle according to the position and the rotation angle of the picture frame; step S24 includes sub-steps S241-S244:
s241, dividing the length of the picture frame composite picture into three equal parts;
s242, connecting the coordinate point of the upper edge of the left ear with the left trisection point, and calculating the left central point and the left length of the connected line;
s243, connecting the coordinate point of the upper edge of the right ear with the right trisection point, and calculating the right central point and the right length of the connected line;
that is, the central point and length of the connecting line are calculated by using the connecting line of the coordinate point on the ear and the 1/3 coordinate points on the left and right edges of the frame material.
And S244, calculating according to the positions and the rotation angles of the mirror frames and a preset matrix function to obtain the inclined moving angle. The skew angle is obtained from a matrix conversion (a preset 2.5D conversion matrix).
And S25, determining the positions of the temples composite drawing according to the central points and the lengths of the connected lines, and determining the rotation angles of the temples according to the skew angles. The glasses leg composite picture is combined with the principle that the center points and the lengths of the connecting lines are the same and the inclination angles are the same.
And S3, combining the glasses frame composite image and the glasses leg composite image with the image information to obtain a 2.5D glasses virtual try-on image.
Referring to fig. 2, fig. 2 is a schematic diagram of a synthesis of try-on glasses according to an embodiment of the present invention. Preferably, the virtual fitting method of 2.5D glasses further includes steps S4-S5:
s4, combining the upper frame material picture 11 and the lower frame material picture 12 into a picture frame composite picture 13; the upper frame and the lower frame are overlapped to obtain a frame composite figure 13.
S5, the upper leg material image 21 and the lower leg material image 22 are combined into the temple combination image 23. The temple is synthesized in fig. 23 by overlapping the upper temple and the lower temple. And finally combining the glasses frame composite image, the glasses leg composite image and the face image to obtain a 2.5D glasses fitting composite image 3.
The user opens the application, clicks the clear face image of camera shooting, selects the glasses commodity of a pair oneself heart appearance again, obtains glasses material picture and user's characteristic point through network access and data measurement, according to coordinate point conversion, zooms and rotates glasses material picture, with the virtual picture of trying to wear of the synthetic 2.5D glasses of face image, show to APP on, supply the user to carry out the contrast of trying to wear of glasses.
In another aspect, a 2.5D glasses virtual try-on device is provided, which is implemented by a corresponding software program, and the 2.5D glasses virtual try-on device includes:
the depth acquisition module is used for acquiring image information and marking coordinate points in the image information;
the coordinate fixing module is used for fixing the glasses frame composite image and the glasses leg composite image according to the marked coordinate points;
and the trial wearing synthesis module is used for combining the glasses frame synthesis image and the glasses leg synthesis image with the image information to obtain a 2.5D glasses virtual trial wearing image.
In the virtual try-on device for 2.5D glasses according to the present invention, the depth acquisition module includes:
the depth acquisition submodule is used for acquiring image information and acquiring a depth map of the image information;
and the coordinate marking submodule is used for marking the coordinate point of the left eye pupil, the coordinate point of the right eye pupil and the coordinate point of the upper edge of the ear in the image information according to the depth map.
In the virtual fitting device for 2.5D glasses according to the present invention, the coordinate fixing module includes:
the eye pupil calculating submodule is used for calculating the interpupillary distance, the inclination angle and the central position according to the coordinate point of the left eye pupil and the coordinate point of the right eye pupil;
the size determining submodule is used for calculating the size of the picture frame synthetic image according to the preset interpupillary distance and the picture frame proportion;
the picture frame determining submodule is used for determining the picture frame position and the picture frame rotating angle of the picture frame synthetic graph according to the inclination angle and the central position;
the line connecting sub-module is used for connecting a coordinate point on the upper edge of the ear with a preset coordinate point on the picture frame synthetic graph, calculating the central point and the length of the connected line, and calculating the skew angle according to the position and the rotation angle of the picture frame;
and the temple determining submodule is used for determining the position of the temple composite drawing according to the center point and the length of the connected line and determining the rotation angle of the temple according to the skew angle.
In the 2.5D virtual glasses try-on device according to the present invention, the connection sub-module includes:
the trisection submodule is used for trisecting the length of the picture frame composite picture;
the left connecting sub-module is used for connecting the coordinate point of the upper edge of the left ear with the left trisection point and calculating the left central point and the left length of the connected line;
the right connecting line submodule is used for connecting the coordinate point of the upper edge of the right ear with the right trisection point and calculating the right central point and the right length of the connected line;
and the angle calculation submodule is used for calculating to obtain the skew angle according to the position and the rotation angle of the mirror frame and a preset matrix function.
The 2.5D glasses virtual try-on device according to the present invention further includes:
the picture frame synthesis module is used for synthesizing the upper picture frame material map and the lower picture frame material map into a picture frame synthesis map;
and the temple synthesis module is used for synthesizing the upper temple material graph and the lower temple material graph into a temple synthesis graph.
Compare 3D glasses and try on, 2.5D glasses try on and have following beneficial effect:
1. the real pictures are used for trying, so that the trying effect is more real.
2. Compared with 3D try-on, the material manufacturing cost is lower, and the cost of self-defined glasses matching is lower.
3. The amount of calculation is smaller than that of 3D try-on, and the calculation consumption is smaller.
4. The platform is wider than a 3D trial application platform, can be applied to an iOS, Android and Windows platform, and can also be operated in a webpage of a device capable of being networked.
Various operations of embodiments are provided herein. In one embodiment, the one or more operations described may constitute computer readable instructions stored on one or more computer readable media, which when executed by an electronic device, will cause the computing device to perform the operations described. The order in which some or all of the operations are described should not be construed as to imply that these operations are necessarily order dependent. Those skilled in the art will appreciate alternative orderings having the benefit of this description. Moreover, it should be understood that not all operations are necessarily present in each embodiment provided herein.
Also, as used herein, the word "preferred" is intended to serve as an example, instance, or illustration. Any aspect or design described herein as "preferred" is not necessarily to be construed as advantageous over other aspects or designs. Rather, use of the word "preferred" is intended to present concepts in a concrete fashion. The term "or" as used in this application is intended to mean an inclusive "or" rather than an exclusive "or". That is, unless specified otherwise or clear from context, "X employs A or B" is intended to include either of the permutations as a matter of course. That is, if X employs A; b is used as X; or X employs both A and B, then "X employs A or B" is satisfied in any of the foregoing examples.
Also, although the disclosure has been shown and described with respect to one or an implementation, equivalent alterations and modifications will occur to others skilled in the art based upon a reading and understanding of this specification and the annexed drawings. The present disclosure includes all such modifications and alterations, and is limited only by the scope of the appended claims. In particular regard to the various functions performed by the above described components (e.g., elements, etc.), the terms used to describe such components are intended to correspond, unless otherwise indicated, to any component which performs the specified function of the described component (e.g., that is functionally equivalent), even though not structurally equivalent to the disclosed structure which performs the function in the herein illustrated exemplary implementations of the disclosure. In addition, while a particular feature of the disclosure may have been disclosed with respect to only one of several implementations, such feature may be combined with one or other features of the other implementations as may be desired and advantageous for a given or particular application. Furthermore, to the extent that the terms "includes," has, "" contains, "or variants thereof are used in either the detailed description or the claims, such terms are intended to be inclusive in a manner similar to the term" comprising.
Each functional unit in the embodiments of the present invention may be integrated into one processing module, or each unit may exist alone physically, or a plurality of or more than one unit are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium. The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. Each apparatus or system described above may execute the storage method in the corresponding method embodiment.
In summary, although the present invention has been described with reference to the preferred embodiments, the above-described preferred embodiments are not intended to limit the present invention, and those skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention, therefore, the scope of the present invention shall be determined by the appended claims.

Claims (6)

1. A virtual try-on method for 2.5D glasses is characterized by comprising the following steps:
collecting image information and marking coordinate points in the image information; the coordinate points comprise coordinate points of left eye pupils, coordinate points of right eye pupils and coordinate points of upper edges of ears;
fixing the glasses frame composite image and the glasses leg composite image according to the marked coordinate points;
combining the glasses frame composite image and the glasses leg composite image with the image information to obtain a 2.5D glasses virtual try-on image;
wherein, the collecting image information and marking coordinate points in the image information comprises:
acquiring image information and acquiring a depth map of the image information;
marking a coordinate point of a left eye pupil, a coordinate point of a right eye pupil and a coordinate point of an upper edge of an ear in the image information according to the depth map;
the fixed glasses frame composite map and the glasses leg composite map according to the marked coordinate points comprise:
calculating the interpupillary distance, the inclination angle and the central position according to the coordinate points of the left eye pupil and the coordinate points of the right eye pupil;
calculating the size of the picture frame synthetic image according to the preset interpupillary distance and the picture frame proportion;
determining the position and the rotation angle of the mirror frame composite image according to the inclination angle and the central position;
connecting the coordinate points of the upper edges of the ears with preset coordinate points on the picture frame synthetic graph, calculating the central point and the length of the connected line, and calculating the inclined shift angle according to the position and the rotation angle of the picture frame;
and determining the positions of the temples composite drawing according to the central points and the lengths of the connected lines, and determining the rotation angles of the temples according to the skewing angles.
2. The virtual fitting method of 2.5D glasses according to claim 1, wherein the step of connecting the coordinate points of the upper edge of the ear with the preset coordinate points on the frame synthesis map, calculating the center point and the length of the connected line, and calculating the tilt angle according to the position and the rotation angle of the frame comprises:
trisecting the length of the picture frame composite picture;
connecting the coordinate point of the upper edge of the left ear with the left trisection point, and calculating the left central point and the left length of the connected line;
connecting the coordinate point of the upper edge of the right ear with the right trisection point, and calculating the right central point and the right length of the connected line;
and calculating according to the position and the rotation angle of the mirror frame and a preset matrix function to obtain the skew angle.
3. The virtual fitting method of 2.5D glasses according to claim 1, further comprising:
synthesizing the upper frame material image and the lower frame material image into a frame composite image;
and synthesizing the upper glasses leg material graph and the lower glasses leg material graph into a glasses leg composite graph.
4. A virtual try-on device of 2.5D glasses, comprising:
the depth acquisition module is used for acquiring image information and marking coordinate points in the image information; the coordinate points comprise coordinate points of left eye pupils, coordinate points of right eye pupils and coordinate points of upper edges of ears;
the coordinate fixing module is used for fixing the glasses frame composite image and the glasses leg composite image according to the marked coordinate points;
the trial wearing synthesis module is used for combining the glasses frame synthesis image and the glasses leg synthesis image with the image information to obtain a 2.5D glasses virtual trial wearing image;
wherein, the depth acquisition module includes:
the depth acquisition submodule is used for acquiring image information and acquiring a depth map of the image information;
the coordinate marking submodule is used for marking a coordinate point of a left eye pupil, a coordinate point of a right eye pupil and a coordinate point of an upper edge of an ear in the image information according to the depth map;
the coordinate fixing module includes:
the eye pupil calculating submodule is used for calculating the interpupillary distance, the inclination angle and the central position according to the coordinate point of the left eye pupil and the coordinate point of the right eye pupil;
the size determining submodule is used for calculating the size of the picture frame synthetic image according to the preset interpupillary distance and the picture frame proportion;
the picture frame determining submodule is used for determining the picture frame position and the picture frame rotating angle of the picture frame synthetic graph according to the inclination angle and the central position;
the line connecting sub-module is used for connecting a coordinate point on the upper edge of the ear with a preset coordinate point on the picture frame synthetic graph, calculating the central point and the length of the connected line, and calculating the skew angle according to the position and the rotation angle of the picture frame;
and the temple determining submodule is used for determining the position of the temple composite drawing according to the center point and the length of the connected line and determining the rotation angle of the temple according to the skew angle.
5. The 2.5D glasses virtual try-on device of claim 4, wherein the wiring sub-module comprises:
the trisection submodule is used for trisecting the length of the picture frame composite picture;
the left connecting sub-module is used for connecting the coordinate point of the upper edge of the left ear with the left trisection point and calculating the left central point and the left length of the connected line;
the right connecting line submodule is used for connecting the coordinate point of the upper edge of the right ear with the right trisection point and calculating the right central point and the right length of the connected line;
and the angle calculation submodule is used for calculating to obtain the skew angle according to the position and the rotation angle of the mirror frame and a preset matrix function.
6. The 2.5D glasses virtual try-on device of claim 4, further comprising:
the picture frame synthesis module is used for synthesizing the upper picture frame material map and the lower picture frame material map into a picture frame synthesis map;
and the temple synthesis module is used for synthesizing the upper temple material graph and the lower temple material graph into a temple synthesis graph.
CN201710283759.9A 2017-04-26 2017-04-26 Virtual try-on method and device for 2.5D glasses Active CN107025628B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710283759.9A CN107025628B (en) 2017-04-26 2017-04-26 Virtual try-on method and device for 2.5D glasses

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710283759.9A CN107025628B (en) 2017-04-26 2017-04-26 Virtual try-on method and device for 2.5D glasses

Publications (2)

Publication Number Publication Date
CN107025628A CN107025628A (en) 2017-08-08
CN107025628B true CN107025628B (en) 2021-03-23

Family

ID=59527744

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710283759.9A Active CN107025628B (en) 2017-04-26 2017-04-26 Virtual try-on method and device for 2.5D glasses

Country Status (1)

Country Link
CN (1) CN107025628B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107945126B (en) * 2017-11-20 2022-02-18 杭州登虹科技有限公司 Method, device and medium for eliminating spectacle frame in image

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1971607B (en) * 2006-12-04 2012-08-22 谢亦玲 Picture database processing method for computerized glasses fitting system and glasses fitting device
TWI507916B (en) * 2010-12-24 2015-11-11 Nat Univ Tsing Hua Try-on method and system of utilizing augmented reality
CN103413118B (en) * 2013-07-18 2019-02-22 毕胜 Online glasses try-on method
FR3016050B1 (en) * 2014-01-02 2017-12-08 Essilor Int METHOD OF ADJUSTING A PREDETERMINED GLASS MOUNT FOR USE BY A DONOR
CN104820498B (en) * 2015-05-14 2018-05-08 周谆 The man-machine interaction method and system that the virtual ornaments of hand are tried on
EP3298586B1 (en) * 2015-05-18 2022-03-23 EMBL Retail Inc Method and system for recommending fitting footwear
CN105809507A (en) * 2016-02-29 2016-07-27 北京酷配科技有限公司 Virtualized wearing method and virtualized wearing apparatus
CN106203364B (en) * 2016-07-14 2019-05-24 广州帕克西软件开发有限公司 System and method is tried in a kind of interaction of 3D glasses on

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
A mixed reality system for virtual glasses try-on;Miaolong Yuan 等;《Proceedings of the 10th International Conference on Virtual Reality Continuum and Its Applications in Industry》;20111212;第363-366页 *
单幅图像真实感虚拟试戴技术;杜瑶 等;《计算机系统应用》;20150415;第24卷(第4期);第19-25页 *

Also Published As

Publication number Publication date
CN107025628A (en) 2017-08-08

Similar Documents

Publication Publication Date Title
TWI755671B (en) Virtual try-on systems and methods for spectacles
AU2018214005B2 (en) Systems and methods for generating a 3-D model of a virtual try-on product
US20180096537A1 (en) Using computed facial feature points to position a product model relative to a model of a face
US9842246B2 (en) Fitting glasses frames to a user
CN104408764B (en) Method, device and system for trying on glasses in virtual mode
US9817248B2 (en) Method of virtually trying on eyeglasses
US20160035133A1 (en) 2d image-based 3d glasses virtual try-on system
US9342877B2 (en) Scaling a three dimensional model using a reflection of a mobile device
CN107103513B (en) Virtual try-on method for glasses
CN109801380A (en) A kind of method, apparatus of virtual fitting, storage medium and computer equipment
WO2003081536A1 (en) System and method for 3-dimension simulation of glasses
CN111163303B (en) Image display method, device, terminal and storage medium
JP2023515517A (en) Fitting eyeglass frames including live fitting
WO2018086399A1 (en) Image rendering method and apparatus, and vr device
CN106570747A (en) Glasses online adaption method and system combining hand gesture recognition
CN104299143A (en) Virtual try-in method and device
KR101977519B1 (en) Generating and displaying an actual sized interactive object
TW201241781A (en) Interactive service methods and systems for virtual glasses wearing
CN107025628B (en) Virtual try-on method and device for 2.5D glasses
CN106023068A (en) Glasses frame try-on method, apparatus and system
CN110349269A (en) A kind of target wear try-in method and system
Han visualizing Spatial Gaze data in the perception of 3d objects
CN113744411A (en) Image processing method and device, equipment and storage medium
CN117130163A (en) Method and device for obtaining user pupil distance calibration parameters
CN105303619B (en) A kind of sequence image generation method and mobile terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant