WO2018209967A1 - Virtual try-on method and device and service terminal - Google Patents

Virtual try-on method and device and service terminal Download PDF

Info

Publication number
WO2018209967A1
WO2018209967A1 PCT/CN2017/120315 CN2017120315W WO2018209967A1 WO 2018209967 A1 WO2018209967 A1 WO 2018209967A1 CN 2017120315 W CN2017120315 W CN 2017120315W WO 2018209967 A1 WO2018209967 A1 WO 2018209967A1
Authority
WO
WIPO (PCT)
Prior art keywords
model
glasses
preset
module
user
Prior art date
Application number
PCT/CN2017/120315
Other languages
French (fr)
Chinese (zh)
Inventor
徐一丹
汪洋
周剑
Original Assignee
成都通甲优博科技有限责任公司
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 成都通甲优博科技有限责任公司 filed Critical 成都通甲优博科技有限责任公司
Publication of WO2018209967A1 publication Critical patent/WO2018209967A1/en

Links

Images

Classifications

    • 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
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/20Editing of 3D images, e.g. changing shapes or colours, aligning objects or positioning parts
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2200/00Indexing scheme for image data processing or generation, in general
    • G06T2200/08Indexing scheme for image data processing or generation, in general involving all processing steps from image acquisition to 3D model generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2219/00Indexing scheme for manipulating 3D models or images for computer graphics
    • G06T2219/20Indexing scheme for editing of 3D models
    • G06T2219/2004Aligning objects, relative positioning of parts
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2219/00Indexing scheme for manipulating 3D models or images for computer graphics
    • G06T2219/20Indexing scheme for editing of 3D models
    • G06T2219/2008Assembling, disassembling

Definitions

  • the present invention relates to the field of virtual reality technologies, and in particular, to a virtual try-on method, apparatus, and service terminal.
  • the number of people wearing glasses has reached more than 65%.
  • the main brand optical shop has a small area, simple decoration, relatively few product varieties, less choice, but the price is more affordable; and the famous brand store, the store has a large area, the store is bright, the product style is rich, but the price is relatively high. Therefore, it is often inconvenient for people to choose glasses, and it is thus apparent that it is necessary to provide a method of wearing various styles of eyes anytime and anywhere.
  • the object of the present invention is to provide a virtual glasses fitting method, so as to realize that people can select their own glasses anytime and anywhere, and it is not necessary to go to a physical store for trial wear, thereby improving the user experience.
  • Another object of the present invention is to provide a virtual eyeglass fitting device for realizing that people can select their own glasses anytime and anywhere, without necessarily having to go to a physical store for trial wear, thereby improving the user experience.
  • Another object of the present invention is to provide a service terminal to enable people to select their own glasses anytime and anywhere, without having to go to a physical store for trial wear, thereby improving the user experience.
  • an embodiment of the present invention provides a virtual glasses fitting method, which is applied to a service terminal, and the method includes:
  • the preset eyeglass model is matched with the human head model to complete the trial wear.
  • the embodiment of the present invention further provides a virtual glasses fitting device, which is applied to a service terminal, and the device includes:
  • a first image acquisition module configured to collect image of a user's head in different orientations
  • a first model establishing module configured to establish a head model according to the collected image of the user head
  • a parameter adjustment module configured to adjust parameters of the selected preset glasses model
  • a matching module configured to match the preset glasses model with the human head model to complete the trial wear.
  • an embodiment of the present invention further provides a service terminal, where the service terminal includes:
  • the virtual glasses fitting device is installed in the memory and includes one or more software function modules executed by the processor, the virtual glasses fitting device comprising:
  • a first image acquisition module configured to collect image of a user's head in different orientations
  • a first model establishing module configured to establish a head model according to the collected image of the user head
  • a parameter adjustment module configured to adjust parameters of the selected preset glasses model
  • a matching module configured to match the preset glasses model with the human head model to complete the trial wear.
  • the virtual try-on method and device and the service terminal provided by the embodiments of the present invention are both applied to a service terminal, and the virtual glasses try-on method includes: collecting user head images of different orientations, according to the collected The user's head image establishes a human head model, and the parameters of the selected preset glasses model are adjusted such that the preset eye model matches the user's human head model to complete the trial wear.
  • the parameters of the selected preset glasses model are adjusted such that the preset eye model matches the user's human head model to complete the trial wear.
  • FIG. 1 is a schematic structural diagram of a service terminal according to an embodiment of the present invention.
  • FIG. 2 is a flowchart of a virtual glasses fitting method according to an embodiment of the present invention.
  • FIG. 3 is a flow chart showing another virtual glasses fitting method provided by an embodiment of the present invention.
  • FIG. 4 is a flow chart showing sub-steps of another virtual glasses fitting method provided by an embodiment of the present invention.
  • FIG. 5 is a flowchart of another virtual glasses fitting method provided by an embodiment of the present invention.
  • FIG. 6 is a schematic diagram of functional modules of a virtual glasses fitting device according to an embodiment of the present invention.
  • FIG. 7 is a schematic diagram of functional modules of another virtual glasses fitting device provided by an embodiment of the present invention.
  • FIG. 8 is a schematic diagram of functional modules of a sub-module of another virtual glasses fitting device according to an embodiment of the present invention.
  • FIG. 9 is a schematic diagram of functional modules of another virtual glasses fitting device provided by an embodiment of the present invention.
  • FIG. 1 is a schematic structural diagram of a service terminal 100 according to an embodiment of the present invention.
  • the service terminal 100 includes a virtual glasses fitting device 110, a memory 120, and a processor 130.
  • the components of the memory 120 and the processor 130 are electrically connected directly or indirectly to each other to implement data transmission or interaction.
  • the components can be electrically connected to one another via one or more communication buses or signal lines.
  • the virtual glasses fitting device 110 includes at least one software function module that can be stored in the memory 120 or in an operating system (OS) of the service terminal 100 in the form of software or firmware.
  • the processor 130 is configured to execute executable modules stored in the memory 120, such as software function modules, computer programs, and the like included in the virtual glasses try-on device 110.
  • the memory 120 can be, but not limited to, a random access memory (RAM), a read only memory (ROM), and a programmable read-only memory (PROM). Erasable Programmable Read-Only Memory (EPROM), Electric Erasable Programmable Read-Only Memory (EEPROM), and the like.
  • RAM random access memory
  • ROM read only memory
  • PROM programmable read-only memory
  • EPROM Erasable Programmable Read-Only Memory
  • EEPROM Electric Erasable Programmable Read-Only Memory
  • FIG. 2 is a schematic flowchart of a virtual glasses fitting method according to an embodiment of the present invention.
  • the virtual glasses fitting method is applied to the service terminal 100, and the virtual glasses fitting method includes:
  • Step S110 collecting user head images of different orientations.
  • the user image is captured by a camera or other mobile electronic device that includes not only the user's head image but also the background in which the user is located, from which the user's head image is captured. In other words, the background image in the user image is cleared, and the image of the user's head is retained. It is easy to understand that it is necessary to collect image of the user's head in different directions to obtain more image data for subsequent data processing.
  • Step S120 Establish a human head model according to the collected image of the user's head.
  • the head model is built using modeling software stored on the service terminal 100 based on the acquired plurality of user head images of different orientations.
  • Step S130 adjusting the selected preset glasses model parameters.
  • the service terminal 100 pre-stores a plurality of glasses models, and when the user performs the virtual glasses trial, the user can select one of the pair of glasses models according to his or her preference.
  • the service terminal 100 adjusts parameters of the glasses model selected by the user such that the selected glasses model of the user can be adapted to the human head model established according to the image of the user's head.
  • the parameters of the glasses model include, but are not limited to, the outer width of the eyeglass frame, the width of the frame surface, the frame size, the height of the frame, the height of the bridge of the nose, and the length of the corner of the temple from the bend of the eyeglass.
  • Step S140 matching the preset glasses model with the human head model to complete the trial wear.
  • the eyeglass model after adjusting the parameters is matched with the human head model so that the user can actually feel the wearing effect of the glasses.
  • the eyeglass model is placed at a suitable position of the human head model to fit the nose pad to the nose bridge of the human head model, and the center point of the frame and the central axis of the human head model are aligned to achieve the eyeglass model and the human head model.
  • Accurate fit Easy to understand, users can also choose a variety of different glasses models to try on according to their own preferences.
  • FIG. 3 it is a flowchart of another virtual glasses fitting method according to an embodiment of the present invention.
  • the virtual eye fitting method is applied to the service terminal 100, and the virtual glasses fitting method includes:
  • Step S210 collecting user head images of different orientations.
  • the user image is captured by a camera or other mobile electronic device that includes not only the user's head image but also the background in which the user is located, from which the user's head image is captured. In other words, the background image in the user image is cleared, and the image of the user's head is retained. It is easy to understand that it is necessary to collect image of the user's head in different directions to obtain more image data for subsequent data processing.
  • Step S220 establishing a head model according to the collected image of the user's head.
  • the head model is built using modeling software stored on the service terminal 100 based on the acquired plurality of user head images of different orientations.
  • Step S230 adjusting parameters of the selected preset glasses model.
  • a plurality of glasses models are pre-stored in the service terminal 100, and when the user performs the virtual glasses trial, one of the pair of glasses models can be selected according to his or her preference.
  • the service terminal 100 adjusts parameters of the glasses model selected by the user such that the selected glasses model of the user can be adapted to the human head model established according to the image of the user's head.
  • the parameters of the glasses model include, but are not limited to, the outer width of the eyeglass frame, the width of the frame surface, the frame size, the height of the frame, the height of the bridge of the nose, and the length of the corner of the temple from the bend of the eyeglass.
  • Step S240 establishing a shadow of the preset glasses model.
  • a shadow is created on the glasses model selected by the user, so that the effect is more vivid when the glasses model is worn to improve the user experience.
  • step S240 of another virtual glasses fitting method according to an embodiment of the present invention.
  • step S241 the simulated application scene performs light rendering on the preset glasses model, so that the preset glasses model conforms to the application scenario in which the user is located.
  • the indoor environment or the outdoor environment is selected separately, and then the glasses model is rendered.
  • the light is divided into a main light source and an auxiliary light source, and the main light source is respectively disposed in front of the glasses model and on the left and right sides, and the auxiliary light source is distributed around the glasses model, according to the actual environment of the user, that is, the indoor environment or the outdoor environment.
  • the user's application environment is simulated, the user's adaptability is enhanced, and the user's experience is improved.
  • Step S242 performing color setting on the preset glasses model, so that the preset glasses model exhibits a stereoscopic effect.
  • the glasses model selected by the user is colored, such as red, to make the glasses model more beautiful, and at the same time increase the stereoscopic effect of the glasses model to improve the user experience.
  • Step S250 Perform motion synchronization processing on the preset glasses model and the shadow of the preset glasses model to control the shadow motion of the preset glasses model and the preset glasses model.
  • the eyeglass model selected by the user and the shadow formed by the eyeglass model are subjected to motion synchronization processing.
  • the eyeglass model and the shadow corresponding to the eyeglass model are equally divided into three parts, and each part is subjected to motion synchronization processing.
  • the second part of the glasses model and the synchronized motion of the shadow corresponding to the glasses model are calculated
  • u O , u A , u B , u C are the abscissas of point O, point A, point B, and point C on the randomly selected glasses model.
  • the algorithm makes the second part of the glasses model and the corresponding shadow of the glasses model move synchronously.
  • the calculation of the synchronized motion of the glasses model of the third part and the shadow corresponding to the glasses model is calculated Processing is performed to implement the third-part glasses model and the synchronized motion of the shadow corresponding to the glasses model to improve the user experience.
  • Step S260 matching the preset glasses model with the human head model to complete the trial wear.
  • the adjusted glasses model is matched with the human head model so that the user can actually feel the wearing effect of the glasses.
  • the eyeglass model is placed at a suitable position of the human head model to fit the nose pad to the nose bridge of the human head model, and the center point of the frame and the central axis of the human head model are aligned to achieve the eyeglass model and the human head model. Accurate fit. Easy to understand, users can also choose a variety of different glasses models to try on according to their own preferences.
  • FIG. 5 another virtual glasses fitting method is provided in the embodiment of the present invention.
  • the virtual glasses fitting method is applied to the service terminal 100.
  • the virtual glasses fitting method includes:
  • Step S310 collecting glasses images of different orientations of the glasses.
  • a three-view of different types of solid glasses is taken by an electronic device such as a camera to acquire a large number of glasses images for subsequent data analysis.
  • Step S320 establishing the preset glasses model according to the glasses image.
  • the service terminal 100 stores modeling software, and the modeling software in the service terminal 100 creates a glasses model based on the collected a large number of glasses images. It is easy to understand that the service terminal 100 can establish a plurality of different types of glasses models according to actual needs, so that the user can have multiple choices and improve the user experience.
  • Step S330 naming each component of each of the plurality of preset glasses models.
  • each of the glasses models such as the frame, the lens, the temples and the nose pads, are respectively commanded to facilitate management on the one hand, and the service terminal 100 can perform new arrangement and combination according to various components of the glasses model.
  • a new glasses model is generated to enrich the style of the glasses model stored within the service terminal 100.
  • Step S340 selecting different materials and textures for each of the plurality of preset glasses models.
  • the glasses model established by the service terminal 100 using the modeling software is only a simple glasses model, so the glasses model needs to be modified to make the glasses model have an aesthetic effect to improve the user experience.
  • a suitable material and texture are selected for each of the glasses models, and the material may be, but not limited to, plastic or metal, and the texture may be, but not limited to, corrugations or straight lines.
  • Step S350 adjusting the preset glasses model from one or more combinations of contrast, metality, transparency, roughness, and three primary color ratio values.
  • the glasses model is adjusted from different dimensions such as contrast, metality, transparency, roughness, and three primary color ratios to make the glasses model more beautiful, so as to attract users.
  • Step S360 collecting user head images of different orientations.
  • the user image is captured by a camera or other mobile electronic device that includes not only the user's head image but also the background in which the user is located, from which the user's head image is captured. In other words, the background image in the user image is cleared, and the image of the user's head is retained. It is easy to understand that it is necessary to collect image of the user's head in different directions to obtain more image data for subsequent data processing.
  • Step S370 a human head model is established according to the collected image of the user's head.
  • the head model is built using modeling software stored on the service terminal 100 based on the acquired plurality of user head images of different orientations.
  • Step S380 adjusting parameters of the selected preset glasses model.
  • a plurality of glasses models are pre-stored in the service terminal 100, and when the user performs the virtual glasses trial, one of the pair of glasses models can be selected according to his or her preference.
  • the service terminal 100 adjusts the parameters of the glasses model selected by the user such that the selected glasses model of the user can be adapted to the human head model established from the image of the user's head.
  • the parameters of the glasses model include, but are not limited to, the outer width of the eyeglass frame, the width of the frame surface, the frame size, the height of the frame, the height of the bridge of the nose, and the length of the corner of the temple from the bend of the eyeglass.
  • Step S390 establishing a shadow of the preset glasses model.
  • a shadow is created on the glasses model selected by the user, so that the effect is more vivid when the glasses model is worn to improve the user experience.
  • the indoor environment or the outdoor environment is selected separately, and then the glasses model is rendered.
  • the light is divided into a main light source and an auxiliary light source, and the main light source is respectively disposed in front of the glasses model and on the left and right sides, and the auxiliary light source is distributed around the glasses model, according to the actual environment of the user, that is, the indoor environment or the outdoor environment.
  • the user's application environment is simulated, the user's adaptability is enhanced, and the user's experience is improved.
  • the glasses model selected by the user is colored, such as red, to make the glasses model more beautiful, and at the same time increase the stereoscopic effect of the glasses model to improve the user experience.
  • Step S400 Perform motion synchronization processing on the preset glasses model and the shadow of the preset glasses model to control the shadow motion of the preset glasses model and the preset glasses model.
  • the eyeglass model selected by the user and the shadow formed by the eyeglass model are subjected to motion synchronization processing.
  • the eyeglass model and the shadow corresponding to the eyeglass model are equally divided into three parts, and each part is subjected to motion synchronization processing.
  • u O , u A , u B , u C are the abscissas of point O, point A, point B, and point C on the randomly selected glasses model.
  • the algorithm makes the second part of the glasses model and the corresponding shadow of the glasses model move synchronously.
  • the calculation of the synchronized motion of the glasses model of the third part and the shadow corresponding to the glasses model is calculated
  • the method performs processing to implement the third-part glasses model and the synchronized motion of the shadow corresponding to the glasses model to improve the user experience.
  • Step S410 matching the preset glasses model with the human head model to complete the trial wear.
  • the adjusted glasses model is matched with the human head model so that the user can actually feel the wearing effect of the glasses.
  • the eyeglass model is placed at a suitable position of the human head model to fit the nose pad to the nose bridge of the human head model, and the center point of the frame and the central axis of the human head model are aligned to achieve the eyeglass model and the human head model. Accurate fit. Easy to understand, users can also choose a variety of different glasses models to try on according to their own preferences.
  • FIG. 6 is a schematic diagram of functional modules of a virtual glasses fitting device 110 according to an embodiment of the present invention.
  • the virtual glasses fitting device 110 is applied to the service terminal 100, and the virtual glasses fitting device 110 includes:
  • the first image acquisition module 111 is configured to collect image of the user's head in different orientations.
  • step S110 may be performed by the first image acquisition module 111.
  • the first model establishing module 112 is configured to establish a head model according to the collected image of the user's head.
  • step S120 may be performed by the first model establishing module 112.
  • the parameter adjustment module 113 is configured to adjust parameters of the selected preset glasses model.
  • step S130 can be performed by the parameter adjustment module 113.
  • the matching module 114 is configured to match the preset glasses model with the human head model to complete the trial wear.
  • step S140 may be performed by the matching module 114.
  • FIG. 7 is a functional block diagram of another virtual glasses fitting device 110 according to an embodiment of the present invention.
  • the virtual glasses fitting device 110 is applied to the service terminal 100, and the virtual glasses fitting device 110 includes:
  • the first image acquisition module 121 is configured to collect image of the user's head in different orientations.
  • step S210 may be performed by the first image acquisition module 121.
  • the first model establishing module 122 is configured to establish a head model according to the collected image of the user's head.
  • step S220 may be performed by the first model establishing module 122.
  • the parameter adjustment module 123 is configured to adjust parameters of the selected preset glasses model.
  • step S230 can be performed by the parameter adjustment module 123.
  • the shadow creation module 124 establishes a shadow of the preset glasses model.
  • step S240 may be performed by shadow creation module 124.
  • FIG. 8 is a schematic diagram of a sub-module of the shadow creation module 124 according to an embodiment of the present invention.
  • the shadow building module 124 further includes:
  • the light rendering module 1241 is configured to simulate the application scene to perform light rendering on the glasses model, so that the glasses model conforms to an application scenario in which the user is located.
  • step S241 can be performed by the light rendering module 1241.
  • the color setting module 1242 is configured to perform color setting on the preset glasses model to cause the preset glasses model to exhibit a stereoscopic effect.
  • step S242 may be performed by the color setting module 1242.
  • a motion processing module 125 configured to perform motion synchronization processing on the preset glasses model and the shadow of the preset glasses model to control synchronization of the preset glasses model with the shadow of the preset glasses model motion.
  • step S250 may be performed by motion processing module 125.
  • the matching module 126 is configured to match the preset glasses model with the human head model to complete the trial wear.
  • step S260 may be performed by the matching module 126.
  • FIG. 9 is a functional block diagram of another virtual glasses fitting device 110 according to an embodiment of the present invention.
  • the virtual glasses fitting device 110 is applied to the service terminal 100, and the virtual glasses fitting device 110 includes:
  • the second image acquisition module 131 is configured to collect glasses images of different orientations of the glasses.
  • step S310 can be performed by the second image acquisition module 131.
  • the second model establishing module 132 is configured to establish the preset glasses model according to the glasses image.
  • step S320 may be performed by the second model establishing module 132.
  • the naming module 133 is configured to name each component of each of the plurality of preset glasses models.
  • step S330 may be performed by the naming module 133.
  • the selecting module 134 is configured to select different materials and textures for each of the plurality of the preset glasses models.
  • step S340 may be performed by selection module 134.
  • the adjustment module 135 is configured to adjust the preset glasses model from a combination of one or more of contrast, metality, transparency, roughness, and three primary color ratio values.
  • step S350 can be performed by the adjustment module 135.
  • the first image acquisition module 136 is configured to collect image of the user's head in different orientations.
  • step S360 can be performed by the first image acquisition module 136.
  • the first model establishing module 137 is configured to establish a human head model according to the collected image of the user's head.
  • step S370 can be performed by the first model establishing module 137.
  • the parameter adjustment module 138 is configured to adjust parameters of the selected preset glasses model.
  • step S380 may be performed by the parameter adjustment module 138.
  • a shadow creation module 139 is used for the shadow of the preset glasses model.
  • step S390 may be performed by the shadow creation module 139.
  • a motion processing module 141 configured to perform motion synchronization processing on the preset glasses model and the shadow of the preset glasses model to control synchronization of the preset glasses model with the shadow of the preset glasses model motion.
  • step S400 may be performed by the motion processing module 141.
  • the matching module 142 is configured to match the preset glasses model with the human head model to complete the trial wear.
  • step S410 may be performed by the matching module 142.
  • the virtual glasses fitting device 110 has been described in detail in the virtual glasses fitting method, and details are not described herein again.
  • the virtual try-on method and device and the service terminal provided by the embodiments of the present invention are applied to a service terminal
  • the virtual glasses try-on method includes: collecting user heads in different orientations. The image is generated according to the collected image of the user's head, and the parameters of the selected preset glasses model are adjusted such that the preset eye model matches the user's head model to complete the trial.
  • the parameters of the selected preset glasses model are adjusted such that the preset eye model matches the user's head model to complete the trial.
  • each block of the flowchart or block diagram can represent a module, a program segment, or a portion of code that includes one or more of the Executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the blocks may also occur in a different order than those illustrated in the drawings.
  • each block of the block diagrams and/or flowcharts, and combinations of blocks in the block diagrams and/or flowcharts can be implemented in a dedicated hardware-based system that performs the specified function or function. Or it can be implemented by a combination of dedicated hardware and computer instructions.
  • each functional module in each embodiment of the present invention may be integrated to form a separate part, or each module may exist separately, or two or more modules may be integrated to form a separate part.
  • the functions, if implemented in the form of software functional modules and sold or used as separate products, may be stored in a computer readable storage medium.
  • the technical solution of the present invention which is essential or contributes to the prior art, or a part of the technical solution, may be embodied in the form of a software product, which is stored in a storage medium, including
  • the instructions are used to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .

Abstract

A method and device for virtually trying on glasses that are both applied to a service terminal, the method for virtually trying on glasses comprising: acquiring head images of a user at different positions; establishing a head model according to the acquired head images of the user; and adjusting parameters of a selected preset glasses model to ensure that the preset glasses model matches with the head model of the user so as to complete the trying on. By means of the present solution, users may select suitable glasses anytime and anywhere without needing to try on the real glasses in stores, thereby improving the user experience.

Description

虚拟试戴方法、装置及服务终端Virtual fitting method, device and service terminal
本申请要求于2017年05月17日提交的申请号为201710349233.6、名称为“虚拟眼镜试戴方法、装置及服务终端”的中国专利申请的优先权,并将其全部内容通过引用的方式结合在本申请中。The present application claims priority to Chinese Patent Application No. 201710349233.6, entitled "Virtual Eyewear Trimming Method, Apparatus and Service Terminal", which is filed on May 17, 2017, and the entire contents of which are incorporated herein by reference. In this application.
技术领域Technical field
本发明涉及虚拟现实技术领域,具体而言,涉及虚拟试戴方法、装置及服务终端。The present invention relates to the field of virtual reality technologies, and in particular, to a virtual try-on method, apparatus, and service terminal.
背景技术Background technique
随着经济的发展和文化教育的普及,人们在注重生活质量的同时,对眼睛的保健也越来越重视。眼镜,因其既能弥补视力不足,又能起到修饰心灵之窗、表达时尚个性和审美取向,已经成为与人们生活息息相关的“装备”,并越来越受到重视。With the development of the economy and the popularization of cultural education, people pay more and more attention to the health of the eyes while paying attention to the quality of life. Glasses, because they can not only make up for lack of vision, but also modify the window of the soul, express fashion personality and aesthetic orientation, have become "equipment" closely related to people's lives, and more and more attention.
同时,随着我国经济的快速发展、国民收入和消费水平的不断提高,近视低龄化、近视人口的增加,社会老龄化程度的提高以及国内消费者保健意识的增强,催生中国庞大眼镜市场且增长潜力巨大。At the same time, with the rapid development of China's economy, the continuous improvement of national income and consumption level, the younger age of myopia, the increase of myopia population, the increase of the aging of society and the awareness of domestic consumers' health care, China's huge glasses market is growing and growing. The potential is huge.
目前佩戴眼镜的人已高达65%以上,因人们对眼镜的需求的增加,眼镜市场的竞争也将越来越激烈。主品牌眼镜店内面积较小,装潢简陋,产品品种相对较少,选择余地少,但价格比较实惠;而知名品牌店,店内面积大,店内明亮,产品款式丰富,但价格相对较高。因此,人们选择眼镜的时候通常不便利,由此可见,提供一种随时随地佩戴各种款式的眼睛的方法是十分必要的。At present, the number of people wearing glasses has reached more than 65%. As people's demand for glasses increases, the competition in the glasses market will become more and more fierce. The main brand optical shop has a small area, simple decoration, relatively few product varieties, less choice, but the price is more affordable; and the famous brand store, the store has a large area, the store is bright, the product style is rich, but the price is relatively high. Therefore, it is often inconvenient for people to choose glasses, and it is thus apparent that it is necessary to provide a method of wearing various styles of eyes anytime and anywhere.
发明内容Summary of the invention
本发明的目的在于提供一种虚拟眼镜试戴方法,以实现人们随时随地选择合适自己的眼镜,不必一定要到实体店进行试戴,提高了用户体验感。The object of the present invention is to provide a virtual glasses fitting method, so as to realize that people can select their own glasses anytime and anywhere, and it is not necessary to go to a physical store for trial wear, thereby improving the user experience.
本发明的另一目的在于提供一种虚拟眼镜试戴装置,以实现人们随时随地选择合适自己的眼镜,不必一定要到实体店进行试戴,提高了用户体 验感。Another object of the present invention is to provide a virtual eyeglass fitting device for realizing that people can select their own glasses anytime and anywhere, without necessarily having to go to a physical store for trial wear, thereby improving the user experience.
本发明的另一目的在于提供一种服务终端,以实现人们随时随地选择合适自己的眼镜,不必一定要到实体店进行试戴,提高了用户体验感。Another object of the present invention is to provide a service terminal to enable people to select their own glasses anytime and anywhere, without having to go to a physical store for trial wear, thereby improving the user experience.
为了实现上述目的,本发明实施例采用的技术方案如下:In order to achieve the above object, the technical solution adopted by the embodiment of the present invention is as follows:
第一方面,本发明实施例提供了一种虚拟眼镜试戴方法,应用于服务终端,所述方法包括:In a first aspect, an embodiment of the present invention provides a virtual glasses fitting method, which is applied to a service terminal, and the method includes:
采集不同方位的用户头部图像;Collecting user head images in different orientations;
根据采集的所述用户头部图像建立人头模型;Establishing a head model according to the collected image of the user's head;
调整选中的预设的眼镜模型的参数;Adjusting parameters of the selected preset glasses model;
将所述预设的眼镜模型与所述人头模型匹配以完成试戴。The preset eyeglass model is matched with the human head model to complete the trial wear.
第二方面,本发明实施例还提供了一种虚拟眼镜试戴装置,应用于服务终端,所述装置包括:In a second aspect, the embodiment of the present invention further provides a virtual glasses fitting device, which is applied to a service terminal, and the device includes:
第一图像采集模块,用于采集不同方位的用户头部图像;a first image acquisition module, configured to collect image of a user's head in different orientations;
第一模型建立模块,用于根据采集的所述用户头部图像建立人头模型;a first model establishing module, configured to establish a head model according to the collected image of the user head;
参数调整模块,用于调整选中的预设的眼镜模型的参数;a parameter adjustment module, configured to adjust parameters of the selected preset glasses model;
匹配模块,用于将所述预设的眼镜模型与所述人头模型匹配以完成试戴。And a matching module, configured to match the preset glasses model with the human head model to complete the trial wear.
第三方面,本发明实施例还提供了一种服务终端,所述服务终端包括:In a third aspect, an embodiment of the present invention further provides a service terminal, where the service terminal includes:
存储器;Memory
处理器;以及Processor;
虚拟眼镜试戴装置,所述虚拟眼镜试戴装置安装于所述存储器中并包括一个或多个由所述处理器执行的软件功能模块,所述虚拟眼镜试戴装置包括:a virtual glasses fitting device, the virtual glasses fitting device is installed in the memory and includes one or more software function modules executed by the processor, the virtual glasses fitting device comprising:
第一图像采集模块,用于采集不同方位的用户头部图像;a first image acquisition module, configured to collect image of a user's head in different orientations;
第一模型建立模块,用于根据采集的所述用户头部图像建立人头模型;a first model establishing module, configured to establish a head model according to the collected image of the user head;
参数调整模块,用于调整选中的预设的眼镜模型的参数;a parameter adjustment module, configured to adjust parameters of the selected preset glasses model;
匹配模块,用于将所述预设的眼镜模型与所述人头模型匹配以完成试戴。And a matching module, configured to match the preset glasses model with the human head model to complete the trial wear.
本发明实施例提供的虚拟试戴方法、装置及服务终端,该虚拟眼镜试戴方法、装置均应用于服务终端,该虚拟眼镜试戴方法包括:采集不同方位的用户头部图像,根据采集的用户头部图像建立人头模型,调整选中的预设的眼镜模型的参数以使得该预设的眼睛模型与用户的人头模型匹配以完成试戴。通过本方案实现了人们随时随地选择合适自己的眼镜,不必一定要到实体店进行试戴,提高了用户体验感。The virtual try-on method and device and the service terminal provided by the embodiments of the present invention are both applied to a service terminal, and the virtual glasses try-on method includes: collecting user head images of different orientations, according to the collected The user's head image establishes a human head model, and the parameters of the selected preset glasses model are adjusted such that the preset eye model matches the user's human head model to complete the trial wear. Through this program, people can choose the glasses that are suitable for them at any time and place, and do not have to go to the physical store to try on them, which improves the user experience.
为使本发明的上述目的、特征和优点能更明显易懂,下文特举较佳实施例,并配合所附附图,作详细说明如下。The above described objects, features and advantages of the present invention will become more apparent from the aspects of the appended claims.
附图说明DRAWINGS
为了更清楚地说明本发明实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,应当理解,以下附图仅示出了本发明的某些实施例,因此不应被看作是对范围的限定,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the embodiments will be briefly described below. It should be understood that the following drawings show only certain embodiments of the present invention, and therefore It should be seen as a limitation on the scope, and those skilled in the art can obtain other related drawings according to these drawings without any creative work.
图1示出了本发明实施例提供的一种服务终端的结构示意图。FIG. 1 is a schematic structural diagram of a service terminal according to an embodiment of the present invention.
图2示出了本发明实施例提供的一种虚拟眼镜试戴方法的流程图。FIG. 2 is a flowchart of a virtual glasses fitting method according to an embodiment of the present invention.
图3示出了本发明实施例提供的另一种虚拟眼镜试戴方法的流程图。FIG. 3 is a flow chart showing another virtual glasses fitting method provided by an embodiment of the present invention.
图4示出了本发明实施例提供的另一种虚拟眼镜试戴方法的子步骤的流程图。FIG. 4 is a flow chart showing sub-steps of another virtual glasses fitting method provided by an embodiment of the present invention.
图5示出了本发明实施例提供的另一种虚拟眼镜试戴方法的流程图。FIG. 5 is a flowchart of another virtual glasses fitting method provided by an embodiment of the present invention.
图6示出了本发明实施例提供的一种虚拟眼镜试戴装置的功能模块示意图。FIG. 6 is a schematic diagram of functional modules of a virtual glasses fitting device according to an embodiment of the present invention.
图7示出了本发明实施例提供的另一种虚拟眼镜试戴装置的功能模块示意图。FIG. 7 is a schematic diagram of functional modules of another virtual glasses fitting device provided by an embodiment of the present invention.
图8示出了本发明实施例提供的另一种虚拟眼镜试戴装置的子模块的功能模块示意图。FIG. 8 is a schematic diagram of functional modules of a sub-module of another virtual glasses fitting device according to an embodiment of the present invention.
图9示出了本发明实施例提供的另一种虚拟眼镜试戴装置的功能模块示意图。FIG. 9 is a schematic diagram of functional modules of another virtual glasses fitting device provided by an embodiment of the present invention.
图示:100-服务终端;110-虚拟眼镜试戴装置;120-存储器;130- 处理器;111-第一图像采集模块;112-第一模型建立模块;113-参数调整模块;114-匹配模块;121-第一图像采集模块;122-第一模型建立模块;123-参数调整模块;124-阴影建立模块;125-运动处理模块;126-匹配模块;1241-灯光渲染模块;1242-颜色设置模块;131-第二图像采集模块;132-第二模型建立模块;133-命名模块;134-选择模块;135-调整模块;136-第一图像采集模块;137-第一模型建立模块;138-参数调整模块;139-阴影建立模块;141-运动处理模块;142-匹配模块。Illustration: 100-service terminal; 110-virtual glasses try-on device; 120-memory; 130-processor; 111-first image acquisition module; 112-first model building module; 113-parameter adjustment module; 114-match Module; 121-first image acquisition module; 122-first model establishment module; 123-parameter adjustment module; 124-shadow creation module; 125-motion processing module; 126-matching module; 1241-light rendering module; Setting module; 131-second image acquisition module; 132-second model building module; 133-naming module; 134-selecting module; 135-adjusting module; 136-first image collecting module; 137-first model building module; 138-parameter adjustment module; 139-shadow creation module; 141-motion processing module; 142-matching module.
具体实施方式detailed description
下面将结合本发明实施例中附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。通常在此处附图中描述和示出的本发明实施例的组件可以以各种不同的配置来布置和设计。因此,以下对在附图中提供的本发明的实施例的详细描述并非旨在限制要求保护的本发明的范围,而是仅仅表示本发明的选定实施例。基于本发明的实施例,本领域技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The components of the embodiments of the invention, which are generally described and illustrated in the figures herein, may be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the invention in the claims All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释。同时,在本发明的描述中,术语“第一”、“第二”等仅用于区分描述,而不能理解为指示或暗示相对重要性。It should be noted that similar reference numerals and letters indicate similar items in the following figures, and therefore, once an item is defined in a drawing, it is not necessary to further define and explain it in the subsequent drawings. Also, in the description of the present invention, the terms "first", "second", and the like are used merely to distinguish a description, and are not to be construed as indicating or implying a relative importance.
请参照图1,是本发明实施例提供的一种服务终端100的结构示意图。该服务终端100包括虚拟眼镜试戴装置110、存储器120以及处理器130。FIG. 1 is a schematic structural diagram of a service terminal 100 according to an embodiment of the present invention. The service terminal 100 includes a virtual glasses fitting device 110, a memory 120, and a processor 130.
该存储器120、处理器130各元件相互之间直接或间接地电性连接,以实现数据的传输或交互。例如,这些元件相互之间可通过一条或多条通讯总线或信号线实现电性连接。该虚拟眼镜试戴装置110包括至少一个可以软件或固件(firmware)的形式存储于存储器120中或固化在服务终端100的操作系统(operating system,OS)中的软件功能模块。处理器130 用于执行存储器120中存储的可执行模块,例如虚拟眼镜试戴装置110包括的软件功能模块及计算机程序等。The components of the memory 120 and the processor 130 are electrically connected directly or indirectly to each other to implement data transmission or interaction. For example, the components can be electrically connected to one another via one or more communication buses or signal lines. The virtual glasses fitting device 110 includes at least one software function module that can be stored in the memory 120 or in an operating system (OS) of the service terminal 100 in the form of software or firmware. The processor 130 is configured to execute executable modules stored in the memory 120, such as software function modules, computer programs, and the like included in the virtual glasses try-on device 110.
其中,存储器120可以是,但不限于,随机存取存储器(Random Access Memory,RAM),只读存储器(Read Only Memory,ROM),可编程只读存储器(Programmable Read-Only Memory,PROM),可擦除只读存储器(Erasable Programmable Read-Only Memory,EPROM),电可擦除只读存储器(Electric Erasable Programmable Read-Only Memory,EEPROM)等。其中,存储器120用于存储程序,处理器130在接收到执行指令后,执行所述程序。The memory 120 can be, but not limited to, a random access memory (RAM), a read only memory (ROM), and a programmable read-only memory (PROM). Erasable Programmable Read-Only Memory (EPROM), Electric Erasable Programmable Read-Only Memory (EEPROM), and the like. The memory 120 is used to store a program, and the processor 130 executes the program after receiving the execution instruction.
请参照图2,是本发明实施例提供的一种虚拟眼镜试戴方法的流程示意图,该虚拟眼镜试戴方法应用于服务终端100,该虚拟眼镜试戴方法包括:2 is a schematic flowchart of a virtual glasses fitting method according to an embodiment of the present invention. The virtual glasses fitting method is applied to the service terminal 100, and the virtual glasses fitting method includes:
步骤S110,采集不同方位的用户头部图像。Step S110, collecting user head images of different orientations.
通过照相机或其他移动电子设备采集用户图像,该用户图像中不仅包括用户头部图像,也包括了用户所在的背景,从该用户图像中采集用户头部图像。换句话说,清除用户图像中的背景图像,保留用户头部的图像。容易理解的,需采集不同方位的用户头部图像,以获得更多图像数据进行后续的数据处理。The user image is captured by a camera or other mobile electronic device that includes not only the user's head image but also the background in which the user is located, from which the user's head image is captured. In other words, the background image in the user image is cleared, and the image of the user's head is retained. It is easy to understand that it is necessary to collect image of the user's head in different directions to obtain more image data for subsequent data processing.
步骤S120,根据采集的所述用户头部图像建立人头模型。Step S120: Establish a human head model according to the collected image of the user's head.
根据采集的多张不同方位的用户头部图像,利用存储于服务终端100上的建模软件建立人头模型。The head model is built using modeling software stored on the service terminal 100 based on the acquired plurality of user head images of different orientations.
步骤S130,调整选中的预设的眼镜模型参数。Step S130, adjusting the selected preset glasses model parameters.
该服务终端100内预存储有多副眼镜模型,用户在进行虚拟眼镜试戴时,可根据自己的喜好选中其中一副眼镜模型。该服务终端100调整用户选中的眼镜模型的参数,以使得用户选中的眼镜模型能适配于依据用户头部图像建立的人头模型。该眼镜模型的参数包括,但不限于,眼镜框面外宽、框面内宽、镜框尺寸、镜框高度、鼻梁高度和镜腿起点距离眼镜弯折处的长度。The service terminal 100 pre-stores a plurality of glasses models, and when the user performs the virtual glasses trial, the user can select one of the pair of glasses models according to his or her preference. The service terminal 100 adjusts parameters of the glasses model selected by the user such that the selected glasses model of the user can be adapted to the human head model established according to the image of the user's head. The parameters of the glasses model include, but are not limited to, the outer width of the eyeglass frame, the width of the frame surface, the frame size, the height of the frame, the height of the bridge of the nose, and the length of the corner of the temple from the bend of the eyeglass.
步骤S140,将所述预设的眼镜模型与所述人头模型匹配以完成试戴。Step S140, matching the preset glasses model with the human head model to complete the trial wear.
将调整参数后的眼镜模型与人头模型进行匹配,以使得用户能实际感受到眼镜的佩戴效果。具体为,将眼镜模型放在人头模型的合适位置,以把鼻托能够和人头模型的鼻梁处贴合为准,保证镜框中心点和人头模型的中轴线对齐,以实现眼镜模型与人头模型的准确配合。容易理解的,用户还可以根据自己的喜好选择多种不同的眼镜模型进行试戴。The eyeglass model after adjusting the parameters is matched with the human head model so that the user can actually feel the wearing effect of the glasses. Specifically, the eyeglass model is placed at a suitable position of the human head model to fit the nose pad to the nose bridge of the human head model, and the center point of the frame and the central axis of the human head model are aligned to achieve the eyeglass model and the human head model. Accurate fit. Easy to understand, users can also choose a variety of different glasses models to try on according to their own preferences.
请参照图3,是本发明实施例提供的另一种虚拟眼镜试戴方法的流程图,该虚拟眼睛试戴方法应用于服务终端100,该虚拟眼镜试戴方法包括:Referring to FIG. 3, it is a flowchart of another virtual glasses fitting method according to an embodiment of the present invention. The virtual eye fitting method is applied to the service terminal 100, and the virtual glasses fitting method includes:
步骤S210,采集不同方位的用户头部图像。Step S210, collecting user head images of different orientations.
通过照相机或其他移动电子设备采集用户图像,该用户图像中不仅包括用户头部图像,也包括了用户所在的背景,从该用户图像中采集用户头部图像。换句话说,清除用户图像中的背景图像,保留用户头部的图像。容易理解的,需采集不同方位的用户头部图像,以获得更多图像数据进行后续的数据处理。The user image is captured by a camera or other mobile electronic device that includes not only the user's head image but also the background in which the user is located, from which the user's head image is captured. In other words, the background image in the user image is cleared, and the image of the user's head is retained. It is easy to understand that it is necessary to collect image of the user's head in different directions to obtain more image data for subsequent data processing.
步骤S220,根据采集的所述用户头部图像建立人头模型。Step S220, establishing a head model according to the collected image of the user's head.
根据采集的多张不同方位的用户头部图像,利用存储于服务终端100上的建模软件建立人头模型。The head model is built using modeling software stored on the service terminal 100 based on the acquired plurality of user head images of different orientations.
步骤S230,调整选中的预设的眼镜模型的参数。Step S230, adjusting parameters of the selected preset glasses model.
服务终端100内预存储有多副眼镜模型,用户在进行虚拟眼镜试戴时,可根据自己的喜好选中其中一副眼镜模型。该服务终端100调整用户选中的眼镜模型的参数,以使得用户选中的眼镜模型能适配于依据用户头部图像建立的人头模型。该眼镜模型的参数包括,但不限于,眼镜框面外宽、框面内宽、镜框尺寸、镜框高度、鼻梁高度和镜腿起点距离眼镜弯折处的长度。A plurality of glasses models are pre-stored in the service terminal 100, and when the user performs the virtual glasses trial, one of the pair of glasses models can be selected according to his or her preference. The service terminal 100 adjusts parameters of the glasses model selected by the user such that the selected glasses model of the user can be adapted to the human head model established according to the image of the user's head. The parameters of the glasses model include, but are not limited to, the outer width of the eyeglass frame, the width of the frame surface, the frame size, the height of the frame, the height of the bridge of the nose, and the length of the corner of the temple from the bend of the eyeglass.
步骤S240,建立所述预设的眼镜模型的阴影。Step S240, establishing a shadow of the preset glasses model.
通过对用户选中的眼镜模型建立阴影,以使得眼镜模型佩戴时效果更加形象以提高用户体验感。具体为:A shadow is created on the glasses model selected by the user, so that the effect is more vivid when the glasses model is worn to improve the user experience. Specifically:
请参照图4,是本发明实施例提供的另一种虚拟眼镜试戴方法的步骤 S240的子步骤的流程图。Referring to FIG. 4, it is a flowchart of sub-steps of step S240 of another virtual glasses fitting method according to an embodiment of the present invention.
步骤S241,模拟应用场景对所述预设的眼镜模型进行灯光渲染,以使所述预设的眼镜模型符合用户所处的应用场景。In step S241, the simulated application scene performs light rendering on the preset glasses model, so that the preset glasses model conforms to the application scenario in which the user is located.
根据用户所处环境分别选择模拟室内环境或室外环境,进而对眼镜模型进行灯光渲染。具体为,该灯光分为主光源和辅助光源,主光源分别布置在眼镜模型的正前方和左右两侧,辅助光源分布在眼镜模型的四周,通过根据用户实际环境,即室内环境或室外环境,调节主光源以及辅助光源的强度以实现灯光渲染的效果。进而模拟用户所在的应用环境,增强用户的适应性,提高用户的体验感。According to the environment in which the user is located, the indoor environment or the outdoor environment is selected separately, and then the glasses model is rendered. Specifically, the light is divided into a main light source and an auxiliary light source, and the main light source is respectively disposed in front of the glasses model and on the left and right sides, and the auxiliary light source is distributed around the glasses model, according to the actual environment of the user, that is, the indoor environment or the outdoor environment. Adjust the intensity of the primary and secondary sources to achieve the effect of light rendering. In turn, the user's application environment is simulated, the user's adaptability is enhanced, and the user's experience is improved.
步骤S242,对所述预设的眼镜模型进行颜色设置,以使所述预设的眼镜模型展现立体效果。Step S242, performing color setting on the preset glasses model, so that the preset glasses model exhibits a stereoscopic effect.
对用户选中的眼镜模型进行着色,如红色,以使眼镜模型更加美观,同时增加眼镜模型立体效果,以提高用户体验感。The glasses model selected by the user is colored, such as red, to make the glasses model more beautiful, and at the same time increase the stereoscopic effect of the glasses model to improve the user experience.
步骤S250,对所述预设的眼镜模型以及所述预设的眼镜模型的阴影进行运动同步处理,以控制所述预设的眼镜模型与所述预设的眼镜模型的阴影同步运动。Step S250: Perform motion synchronization processing on the preset glasses model and the shadow of the preset glasses model to control the shadow motion of the preset glasses model and the preset glasses model.
将用户选中的眼镜模型以及该眼镜模型形成的阴影进行运动同步处理,具体为:将该眼镜模型以及该眼镜模型对应的阴影等分为三部分,分别对每一部分进行运动同步处理。The eyeglass model selected by the user and the shadow formed by the eyeglass model are subjected to motion synchronization processing. Specifically, the eyeglass model and the shadow corresponding to the eyeglass model are equally divided into three parts, and each part is subjected to motion synchronization processing.
对第一部分的眼镜模型以及该眼镜模型对应的阴影的同步运动采用算法
Figure PCTCN2017120315-appb-000001
进行调整,其中,(u,v)表示阴影运动前的坐标,(u’,v’)表示阴影运动后的坐标。Set是眼镜模型运动对眼镜模型的阴影运动产生的影响因子,表征将眼镜模型在坐标系的移动量转换为眼镜模型的阴影在坐标系的移动量。进而将眼镜模型的运动与眼镜模型的阴影的运动进行关联,实现眼镜模型与眼镜模型的阴影同步运动。该影响因子Set通过算法vSet=w*s*V获取,其中w和s均为定值,一般地,w=0.04,s=0.4。
Algorithm for synchronizing the first part of the eyeglass model and the corresponding shadow of the eyeglass model
Figure PCTCN2017120315-appb-000001
Adjustment is made, where (u, v) represents the coordinates before the shadow motion, and (u', v') represents the coordinates after the shadow motion. Set is the influence factor of the movement of the glasses model on the shadow motion of the glasses model, and represents the amount of movement of the eyeglass model in the coordinate system to the amount of movement of the shadow of the glasses model in the coordinate system. Further, the motion of the glasses model is correlated with the motion of the shadow of the glasses model to realize the shadow synchronous motion of the glasses model and the glasses model. The set of influence factors is obtained by the algorithm vSet=w*s*V, where w and s are constant values, generally, w=0.04, s=0.4.
对第二部分的眼镜模型以及该眼镜模型对应的阴影的同步运动采用算The second part of the glasses model and the synchronized motion of the shadow corresponding to the glasses model are calculated
Figure PCTCN2017120315-appb-000002
Figure PCTCN2017120315-appb-000002
法{v′=(v+y)Set y=vSet-[|u-u O|-|u A-U O|]*tan n, The law {v'=(v+y)Set y=vSet-[|uu O |-|u A -U O |]*tan n,
进行调整,其中u O,u A,u B,u C为随机选取眼镜模型上的点O、点A、点B、点C的横坐标。通过该算法使得第二部分的眼镜模型以及该眼镜模型对应的阴影进行同步运动。 The adjustment is made, where u O , u A , u B , u C are the abscissas of point O, point A, point B, and point C on the randomly selected glasses model. The algorithm makes the second part of the glasses model and the corresponding shadow of the glasses model move synchronously.
对第三部分的眼镜模型以及该眼镜模型对应的阴影的同步运动采用算
Figure PCTCN2017120315-appb-000003
进行处理,以实现第三部分的眼镜模型以及该眼镜模型对应的阴影的同步运动,以提高用户体验感。
The calculation of the synchronized motion of the glasses model of the third part and the shadow corresponding to the glasses model is calculated
Figure PCTCN2017120315-appb-000003
Processing is performed to implement the third-part glasses model and the synchronized motion of the shadow corresponding to the glasses model to improve the user experience.
步骤S260,将所述预设的眼镜模型与所述人头模型匹配以完成试戴。Step S260, matching the preset glasses model with the human head model to complete the trial wear.
将调整后的眼镜模型与人头模型进行匹配,以使得用户能实际感受到眼镜的佩戴效果。具体为,将眼镜模型放在人头模型的合适位置,以把鼻托能够和人头模型的鼻梁处贴合为准,保证镜框中心点和人头模型的中轴线对齐,以实现眼镜模型与人头模型的准确配合。容易理解的,用户还可以根据自己的喜好选择多种不同的眼镜模型进行试戴。The adjusted glasses model is matched with the human head model so that the user can actually feel the wearing effect of the glasses. Specifically, the eyeglass model is placed at a suitable position of the human head model to fit the nose pad to the nose bridge of the human head model, and the center point of the frame and the central axis of the human head model are aligned to achieve the eyeglass model and the human head model. Accurate fit. Easy to understand, users can also choose a variety of different glasses models to try on according to their own preferences.
请参照图5,是本发明实施例提供的另一种虚拟眼镜试戴方法,该虚拟眼镜试戴方法应用于服务终端100,该虚拟眼镜试戴方法包括:Referring to FIG. 5, another virtual glasses fitting method is provided in the embodiment of the present invention. The virtual glasses fitting method is applied to the service terminal 100. The virtual glasses fitting method includes:
步骤S310,采集眼镜不同方位的眼镜图像。Step S310, collecting glasses images of different orientations of the glasses.
通过照相机等电子设备对不同类型的实体眼镜拍摄三视图,以获取大量眼镜图像,以待后续数据分析。A three-view of different types of solid glasses is taken by an electronic device such as a camera to acquire a large number of glasses images for subsequent data analysis.
步骤S320,根据所述眼镜图像建立所述预设的眼镜模型。Step S320, establishing the preset glasses model according to the glasses image.
该服务终端100存储有建模软件,该服务终端100内的建模软件根据采集的大量的眼镜图像建立眼镜模型。容易理解的,该服务终端100可以根据实际需要建立多种不同类型的眼镜模型,以使得用户能有多种选择,提高了用户体验感。The service terminal 100 stores modeling software, and the modeling software in the service terminal 100 creates a glasses model based on the collected a large number of glasses images. It is easy to understand that the service terminal 100 can establish a plurality of different types of glasses models according to actual needs, so that the user can have multiple choices and improve the user experience.
步骤S330,对多个所述预设的眼镜模型中的每一个眼镜模型的各个组成部分命名。Step S330, naming each component of each of the plurality of preset glasses models.
分别对每一个眼镜模型的组成部分,如框架、镜片、镜腿和鼻托进行 命令,一方面方便管理,另一方面服务终端100可根据多种该眼镜模型的组成部分进行新的排列组合以生成新的眼镜模型,以使得丰富该服务终端100内存储的眼镜模型的款式。The components of each of the glasses models, such as the frame, the lens, the temples and the nose pads, are respectively commanded to facilitate management on the one hand, and the service terminal 100 can perform new arrangement and combination according to various components of the glasses model. A new glasses model is generated to enrich the style of the glasses model stored within the service terminal 100.
步骤S340,为多个所述预设的眼镜模型中每一个眼镜模型选择不同的材质以及纹理。Step S340, selecting different materials and textures for each of the plurality of preset glasses models.
该服务终端100使用建模软件建立的眼镜模型只是简单的眼镜模型,因此需要对该眼镜模型进行修饰以使眼镜模型呈现美观的效果,以提高用户体验感。具体为,对每一个眼镜模型选择合适的材质及纹理,该材质可以是,但不限于,塑料或金属,该纹理可以是,但不限于,波纹或直线。通过对每一个眼镜模型选择合适的材质及纹理,以使得每一个眼镜模型更加美观。The glasses model established by the service terminal 100 using the modeling software is only a simple glasses model, so the glasses model needs to be modified to make the glasses model have an aesthetic effect to improve the user experience. Specifically, a suitable material and texture are selected for each of the glasses models, and the material may be, but not limited to, plastic or metal, and the texture may be, but not limited to, corrugations or straight lines. By selecting the appropriate material and texture for each eyeglass model, each eyeglass model is more aesthetically pleasing.
步骤S350,对所述预设的眼镜模型从对比度、金属度、透明度、粗糙度、三原色比例值中一个或多个组合进行调整。Step S350, adjusting the preset glasses model from one or more combinations of contrast, metality, transparency, roughness, and three primary color ratio values.
通过对各个眼镜模型从对比度、金属度、透明度、粗糙度、三原色比例值等不同维度进行调整,以使得眼镜模型更加美观,以达到吸引用户的目的。The glasses model is adjusted from different dimensions such as contrast, metality, transparency, roughness, and three primary color ratios to make the glasses model more beautiful, so as to attract users.
步骤S360,采集不同方位的用户头部图像。Step S360, collecting user head images of different orientations.
通过照相机或其他移动电子设备采集用户图像,该用户图像中不仅包括用户头部图像,也包括了用户所在的背景,从该用户图像中采集用户头部图像。换句话说,清除用户图像中的背景图像,保留用户头部的图像。容易理解的,需采集不同方位的用户头部图像,以获得更多图像数据进行后续的数据处理。The user image is captured by a camera or other mobile electronic device that includes not only the user's head image but also the background in which the user is located, from which the user's head image is captured. In other words, the background image in the user image is cleared, and the image of the user's head is retained. It is easy to understand that it is necessary to collect image of the user's head in different directions to obtain more image data for subsequent data processing.
步骤S370,根据采集的所述用户头部图像建立人头模型。Step S370, a human head model is established according to the collected image of the user's head.
根据采集的多张不同方位的用户头部图像,利用存储于服务终端100上的建模软件建立人头模型。The head model is built using modeling software stored on the service terminal 100 based on the acquired plurality of user head images of different orientations.
步骤S380,调整选中的预设的眼镜模型的参数。Step S380, adjusting parameters of the selected preset glasses model.
服务终端100内预存储有多副眼镜模型,用户在进行虚拟眼镜试戴时,可根据自己的喜好选中其中一副眼镜模型。该服务终端100调整用户选中 的眼镜模型的参数,以使得用户选中的眼镜模型能适配于依据用户头部图像建立的人头模型。该眼镜模型的参数包括,但不限于,眼镜框面外宽、框面内宽、镜框尺寸、镜框高度、鼻梁高度和镜腿起点距离眼镜弯折处的长度。A plurality of glasses models are pre-stored in the service terminal 100, and when the user performs the virtual glasses trial, one of the pair of glasses models can be selected according to his or her preference. The service terminal 100 adjusts the parameters of the glasses model selected by the user such that the selected glasses model of the user can be adapted to the human head model established from the image of the user's head. The parameters of the glasses model include, but are not limited to, the outer width of the eyeglass frame, the width of the frame surface, the frame size, the height of the frame, the height of the bridge of the nose, and the length of the corner of the temple from the bend of the eyeglass.
步骤S390,建立所述预设的眼镜模型的阴影。Step S390, establishing a shadow of the preset glasses model.
通过对用户选中的眼镜模型建立阴影,以使得眼镜模型佩戴时效果更加形象以提高用户体验感。具体为,A shadow is created on the glasses model selected by the user, so that the effect is more vivid when the glasses model is worn to improve the user experience. Specifically,
根据用户所处环境分别选择模拟室内环境或室外环境,进而对眼镜模型进行灯光渲染。具体为,该灯光分为主光源和辅助光源,主光源分别布置在眼镜模型的正前方和左右两侧,辅助光源分布在眼镜模型的四周,通过根据用户实际环境,即室内环境或室外环境,调节主光源以及辅助光源的强度以实现灯光渲染的效果。进而模拟用户所在的应用环境,增强用户的适应性,提高用户的体验感。According to the environment in which the user is located, the indoor environment or the outdoor environment is selected separately, and then the glasses model is rendered. Specifically, the light is divided into a main light source and an auxiliary light source, and the main light source is respectively disposed in front of the glasses model and on the left and right sides, and the auxiliary light source is distributed around the glasses model, according to the actual environment of the user, that is, the indoor environment or the outdoor environment. Adjust the intensity of the primary and secondary sources to achieve the effect of light rendering. In turn, the user's application environment is simulated, the user's adaptability is enhanced, and the user's experience is improved.
进一步对用户选中的眼镜模型进行着色,如红色,以使眼镜模型更加美观,同时增加眼镜模型立体效果,以提高用户体验感。Further, the glasses model selected by the user is colored, such as red, to make the glasses model more beautiful, and at the same time increase the stereoscopic effect of the glasses model to improve the user experience.
容易理解的,也可在建立眼镜模型时建立眼镜模型的阴影。It is easy to understand that the shadow of the glasses model can also be established when creating the glasses model.
步骤S400,对所述预设的眼镜模型以及所述预设的眼镜模型的阴影进行运动同步处理,以控制所述预设的眼镜模型与所述预设的眼镜模型的阴影同步运动。Step S400: Perform motion synchronization processing on the preset glasses model and the shadow of the preset glasses model to control the shadow motion of the preset glasses model and the preset glasses model.
将用户选中的眼镜模型以及该眼镜模型形成的阴影进行运动同步处理,具体为:将该眼镜模型以及该眼镜模型对应的阴影等分为三部分,分别对每一部分进行运动同步处理。The eyeglass model selected by the user and the shadow formed by the eyeglass model are subjected to motion synchronization processing. Specifically, the eyeglass model and the shadow corresponding to the eyeglass model are equally divided into three parts, and each part is subjected to motion synchronization processing.
对第一部分的眼镜模型以及该眼镜模型对应的阴影的同步运动采用算法
Figure PCTCN2017120315-appb-000004
进行调整,其中,(u,v)表示阴影运动前的坐标,(u’,v’)表示阴影运动后的坐标。Set是眼镜模型运动对眼镜模型的阴影运动产生的影响因子,表征将眼镜模型在坐标系的移动量转换为眼镜模型的阴影在坐标系的移动量。进而将眼镜模型的运动与眼镜模型的阴影的运动进行关联,
Algorithm for synchronizing the first part of the eyeglass model and the corresponding shadow of the eyeglass model
Figure PCTCN2017120315-appb-000004
Adjustment is made, where (u, v) represents the coordinates before the shadow motion, and (u', v') represents the coordinates after the shadow motion. Set is the influence factor of the movement of the glasses model on the shadow motion of the glasses model, and represents the amount of movement of the eyeglass model in the coordinate system to the amount of movement of the shadow of the glasses model in the coordinate system. Further correlating the motion of the eyeglass model with the motion of the shadow of the eyeglass model,
实现眼镜模型与眼镜模型的阴影同步运动。该影响因子Set通过算法vSet=w*s*V获取,其中w和s均为定值,一般地,w=0.04,s=0.4。Achieve the shadow motion of the glasses model and the glasses model. The set of influence factors is obtained by the algorithm vSet=w*s*V, where w and s are constant values, generally, w=0.04, s=0.4.
Figure PCTCN2017120315-appb-000005
进行调整,其中u O,u A,u B,u C为随机选取眼镜模型上的点O、点A、点B、点C的横坐标。通过该算法使得第二部分的眼镜模型以及该眼镜模型对应的阴影进行同步运动。
law
Figure PCTCN2017120315-appb-000005
The adjustment is made, where u O , u A , u B , u C are the abscissas of point O, point A, point B, and point C on the randomly selected glasses model. The algorithm makes the second part of the glasses model and the corresponding shadow of the glasses model move synchronously.
对第三部分的眼镜模型以及该眼镜模型对应的阴影的同步运动采用算
Figure PCTCN2017120315-appb-000006
法进行处理,以实现第三部分的眼镜模型以及该眼镜模型对应的阴影的同步运动,以提高用户体验感。
The calculation of the synchronized motion of the glasses model of the third part and the shadow corresponding to the glasses model is calculated
Figure PCTCN2017120315-appb-000006
The method performs processing to implement the third-part glasses model and the synchronized motion of the shadow corresponding to the glasses model to improve the user experience.
步骤S410,将所述预设的眼镜模型与所述人头模型匹配以完成试戴。Step S410, matching the preset glasses model with the human head model to complete the trial wear.
将调整后的眼镜模型与人头模型进行匹配,以使得用户能实际感受到眼镜的佩戴效果。具体为,将眼镜模型放在人头模型的合适位置,以把鼻托能够和人头模型的鼻梁处贴合为准,保证镜框中心点和人头模型的中轴线对齐,以实现眼镜模型与人头模型的准确配合。容易理解的,用户还可以根据自己的喜好选择多种不同的眼镜模型进行试戴。The adjusted glasses model is matched with the human head model so that the user can actually feel the wearing effect of the glasses. Specifically, the eyeglass model is placed at a suitable position of the human head model to fit the nose pad to the nose bridge of the human head model, and the center point of the frame and the central axis of the human head model are aligned to achieve the eyeglass model and the human head model. Accurate fit. Easy to understand, users can also choose a variety of different glasses models to try on according to their own preferences.
请参照图6,是本发明实施例提供的一种虚拟眼镜试戴装置110的功能模块示意图。该虚拟眼镜试戴装置110应用于服务终端100,该虚拟眼镜试戴装置110包括:Please refer to FIG. 6 , which is a schematic diagram of functional modules of a virtual glasses fitting device 110 according to an embodiment of the present invention. The virtual glasses fitting device 110 is applied to the service terminal 100, and the virtual glasses fitting device 110 includes:
第一图像采集模块111,用于采集不同方位的用户头部图像。The first image acquisition module 111 is configured to collect image of the user's head in different orientations.
在本发明实施例中,步骤S110可以由第一图像采集模块111执行。In the embodiment of the present invention, step S110 may be performed by the first image acquisition module 111.
第一模型建立模块112,用于根据采集的所述用户头部图像建立人头模型。The first model establishing module 112 is configured to establish a head model according to the collected image of the user's head.
在本发明实施例中,步骤S120可以由第一模型建立模块112执行。In the embodiment of the present invention, step S120 may be performed by the first model establishing module 112.
参数调整模块113,用于调整选中的预设的眼镜模型的参数。The parameter adjustment module 113 is configured to adjust parameters of the selected preset glasses model.
在本发明实施例中,步骤S130可以由参数调整模块113执行。In the embodiment of the present invention, step S130 can be performed by the parameter adjustment module 113.
匹配模块114,用于将所述预设的眼镜模型与所述人头模型匹配以完成试戴。The matching module 114 is configured to match the preset glasses model with the human head model to complete the trial wear.
在本发明实施例中,步骤S140可以由匹配模块114执行。In the embodiment of the present invention, step S140 may be performed by the matching module 114.
请参照图7,是是本发明实施例提供的另一种虚拟眼镜试戴装置110的功能模块示意图。该虚拟眼镜试戴装置110应用于服务终端100,该虚拟眼镜试戴装置110包括:Please refer to FIG. 7 , which is a functional block diagram of another virtual glasses fitting device 110 according to an embodiment of the present invention. The virtual glasses fitting device 110 is applied to the service terminal 100, and the virtual glasses fitting device 110 includes:
第一图像采集模块121,用于采集不同方位的用户头部图像。The first image acquisition module 121 is configured to collect image of the user's head in different orientations.
在本发明实施例中,步骤S210可以由第一图像采集模块121执行。In the embodiment of the present invention, step S210 may be performed by the first image acquisition module 121.
第一模型建立模块122,用于根据采集的所述用户头部图像建立人头模型。The first model establishing module 122 is configured to establish a head model according to the collected image of the user's head.
在本发明实施例中,步骤S220可以由第一模型建立模块122执行。In the embodiment of the present invention, step S220 may be performed by the first model establishing module 122.
参数调整模块123,用于调整选中的预设的眼镜模型的参数。The parameter adjustment module 123 is configured to adjust parameters of the selected preset glasses model.
在本发明实施例中,步骤S230可以由参数调整模块123执行。In the embodiment of the present invention, step S230 can be performed by the parameter adjustment module 123.
阴影建立模块124,建立所述预设的眼镜模型的阴影。The shadow creation module 124 establishes a shadow of the preset glasses model.
在本发明实施例中,步骤S240可以由阴影建立模块124执行。In an embodiment of the invention, step S240 may be performed by shadow creation module 124.
请参照图8,是本发明实施例提供的阴影建立模块124的子模块的示意图。Please refer to FIG. 8 , which is a schematic diagram of a sub-module of the shadow creation module 124 according to an embodiment of the present invention.
该阴影建立模块124还包括:The shadow building module 124 further includes:
灯光渲染模块1241,用于模拟应用场景对所述眼镜模型进行灯光渲染,以使所述眼镜模型符合用户所处的应用场景。The light rendering module 1241 is configured to simulate the application scene to perform light rendering on the glasses model, so that the glasses model conforms to an application scenario in which the user is located.
在本发明实施例中,步骤S241可以由灯光渲染模块1241执行。In the embodiment of the present invention, step S241 can be performed by the light rendering module 1241.
颜色设置模块1242,用于对所述预设的眼镜模型进行颜色设置,以使所述预设的眼镜模型展现立体效果。The color setting module 1242 is configured to perform color setting on the preset glasses model to cause the preset glasses model to exhibit a stereoscopic effect.
在本发明实施例中,步骤S242可以由颜色设置模块1242执行。In the embodiment of the present invention, step S242 may be performed by the color setting module 1242.
运动处理模块125,用于对所述预设的眼镜模型以及所述预设的眼镜模型的阴影进行运动同步处理,以控制所述预设的眼镜模型与所述预设的眼镜模型的阴影同步运动。a motion processing module 125, configured to perform motion synchronization processing on the preset glasses model and the shadow of the preset glasses model to control synchronization of the preset glasses model with the shadow of the preset glasses model motion.
在本发明实施例中,步骤S250可以由运动处理模块125执行。In an embodiment of the invention, step S250 may be performed by motion processing module 125.
匹配模块126,用于将所述预设的眼镜模型与所述人头模型匹配以完成试戴。The matching module 126 is configured to match the preset glasses model with the human head model to complete the trial wear.
在本发明实施例中,步骤S260可以由匹配模块126执行。In an embodiment of the present invention, step S260 may be performed by the matching module 126.
请参照图9,是是本发明实施例提供的另一种虚拟眼镜试戴装置110的功能模块示意图。该虚拟眼镜试戴装置110应用于服务终端100,该虚拟眼镜试戴装置110包括:Please refer to FIG. 9 , which is a functional block diagram of another virtual glasses fitting device 110 according to an embodiment of the present invention. The virtual glasses fitting device 110 is applied to the service terminal 100, and the virtual glasses fitting device 110 includes:
第二图像采集模块131,用于采集眼镜不同方位的眼镜图像。The second image acquisition module 131 is configured to collect glasses images of different orientations of the glasses.
在本发明实施例中,步骤S310可以由第二图像采集模块131执行。In the embodiment of the present invention, step S310 can be performed by the second image acquisition module 131.
第二模型建立模块132,用于据所述眼镜图像建立所述预设的眼镜模型。The second model establishing module 132 is configured to establish the preset glasses model according to the glasses image.
在本发明实施例中,步骤S320可以由第二模型建立模块132执行。In the embodiment of the present invention, step S320 may be performed by the second model establishing module 132.
命名模块133,用于对多个所述预设的眼镜模型中的每一个眼镜模型的各个组成部分命名。The naming module 133 is configured to name each component of each of the plurality of preset glasses models.
在本发明实施例中,步骤S330可以由命名模块133执行。In the embodiment of the present invention, step S330 may be performed by the naming module 133.
选择模块134,用于为多个所述预设的眼镜模型中每一个眼镜模型选择不同的材质以及纹理。The selecting module 134 is configured to select different materials and textures for each of the plurality of the preset glasses models.
在本发明实施例中,步骤S340可以由选择模块134执行。In an embodiment of the invention, step S340 may be performed by selection module 134.
调整模块135,用于对所述预设的眼镜模型从对比度、金属度、透明度、粗糙度、三原色比例值中一个或多个的组合进行调整。The adjustment module 135 is configured to adjust the preset glasses model from a combination of one or more of contrast, metality, transparency, roughness, and three primary color ratio values.
在本发明实施例中,步骤S350可以由调整模块135执行。In the embodiment of the present invention, step S350 can be performed by the adjustment module 135.
第一图像采集模块136,用于采集不同方位的用户头部图像。The first image acquisition module 136 is configured to collect image of the user's head in different orientations.
在本发明实施例中,步骤S360可以由第一图像采集模块136执行。In an embodiment of the invention, step S360 can be performed by the first image acquisition module 136.
第一模型建立模块137,用于根据采集的所述用户头部图像建立人头模型。The first model establishing module 137 is configured to establish a human head model according to the collected image of the user's head.
在本发明实施例中,步骤S370可以由第一模型建立模块137执行。In the embodiment of the present invention, step S370 can be performed by the first model establishing module 137.
参数调整模块138,用于调整选中的预设的眼镜模型的参数。The parameter adjustment module 138 is configured to adjust parameters of the selected preset glasses model.
在本发明实施例中,步骤S380可以由参数调整模块138执行。In the embodiment of the present invention, step S380 may be performed by the parameter adjustment module 138.
阴影建立模块139,用于所述预设的眼镜模型的阴影。A shadow creation module 139 is used for the shadow of the preset glasses model.
在本发明实施例中,步骤S390可以由阴影建立模块139执行。In an embodiment of the present invention, step S390 may be performed by the shadow creation module 139.
运动处理模块141,用于对所述预设的眼镜模型以及所述预设的眼镜模型的阴影进行运动同步处理,以控制所述预设的眼镜模型与所述预设的眼镜模型的阴影同步运动。a motion processing module 141, configured to perform motion synchronization processing on the preset glasses model and the shadow of the preset glasses model to control synchronization of the preset glasses model with the shadow of the preset glasses model motion.
在本发明实施例中,步骤S400可以由运动处理模块141执行。In the embodiment of the present invention, step S400 may be performed by the motion processing module 141.
匹配模块142,用于将所述预设的眼镜模型与所述人头模型匹配以完成试戴。The matching module 142 is configured to match the preset glasses model with the human head model to complete the trial wear.
在本发明实施例中,步骤S410可以由匹配模块142执行。In the embodiment of the present invention, step S410 may be performed by the matching module 142.
该虚拟眼镜试戴装置110已经在虚拟眼镜试戴方法部分详细描述,在此不再赘述。The virtual glasses fitting device 110 has been described in detail in the virtual glasses fitting method, and details are not described herein again.
综上所述,本发明实施例提供的虚拟试戴方法、装置及服务终端,该虚拟眼镜试戴方法、装置均应用于服务终端,该虚拟眼镜试戴方法包括:采集不同方位的用户头部图像,根据采集的用户头部图像建立人头模型,调整选中的预设的眼镜模型的参数以使得该预设的眼睛模型与用户的人头模型匹配以完成试戴。通过本方案实现了人们随时随地选择合适自己的眼镜,不必一定要到实体店进行试戴,提高了用户体验感。In summary, the virtual try-on method and device and the service terminal provided by the embodiments of the present invention are applied to a service terminal, and the virtual glasses try-on method includes: collecting user heads in different orientations. The image is generated according to the collected image of the user's head, and the parameters of the selected preset glasses model are adjusted such that the preset eye model matches the user's head model to complete the trial. Through this program, people can choose the glasses that are suitable for them at any time and place, and do not have to go to the physical store to try on them, which improves the user experience.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,也可以通过其它的方式实现。以上所描述的装置实施例仅仅是示意性的,例如,附图中的流程图和框图显示了根据本发明的多个实施例的装置、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或代码的一部分,所述模块、程序段或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现方式中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及 框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may also be implemented in other manners. The apparatus embodiments described above are merely illustrative, for example, the flowcharts and block diagrams in the figures illustrate the architecture, functionality, and functionality of possible implementations of apparatus, methods, and computer program products according to various embodiments of the invention. operating. In this regard, each block of the flowchart or block diagram can represent a module, a program segment, or a portion of code that includes one or more of the Executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the blocks may also occur in a different order than those illustrated in the drawings. For example, two consecutive blocks may be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending upon the functionality involved. It is also noted that each block of the block diagrams and/or flowcharts, and combinations of blocks in the block diagrams and/or flowcharts, can be implemented in a dedicated hardware-based system that performs the specified function or function. Or it can be implemented by a combination of dedicated hardware and computer instructions.
另外,在本发明各个实施例中的各功能模块可以集成在一起形成一个独立的部分,也可以是各个模块单独存在,也可以两个或两个以上模块集成形成一个独立的部分。In addition, each functional module in each embodiment of the present invention may be integrated to form a separate part, or each module may exist separately, or two or more modules may be integrated to form a separate part.
所述功能如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。The functions, if implemented in the form of software functional modules and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention, which is essential or contributes to the prior art, or a part of the technical solution, may be embodied in the form of a software product, which is stored in a storage medium, including The instructions are used to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. . It should be noted that, in this context, relational terms such as first and second are used merely to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply such entities or operations. There is any such actual relationship or order between them. Furthermore, the term "comprises" or "comprises" or "comprises" or any other variations thereof is intended to encompass a non-exclusive inclusion, such that a process, method, article, or device that comprises a plurality of elements includes not only those elements but also Other elements, or elements that are inherent to such a process, method, item, or device. An element that is defined by the phrase "comprising a ..." does not exclude the presence of additional equivalent elements in the process, method, item, or device that comprises the element.
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。应注意到:相似的标号和字母在下面的附图中表示类似 项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释。The above description is only the preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention. It should be noted that similar reference numerals and letters indicate similar items in the following figures, and therefore, once an item is defined in a drawing, it is not necessary to further define and explain it in the subsequent drawings.
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应所述以权利要求的保护范围为准。The above is only a specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily think of changes or substitutions within the technical scope of the present invention. It should be covered by the scope of the present invention. Therefore, the scope of the invention should be determined by the scope of the claims.

Claims (10)

  1. 虚拟试戴方法,应用于服务终端,其特征在于,所述方法包括:The virtual try-on method is applied to a service terminal, and the method includes:
    采集不同方位的用户头部图像;Collecting user head images in different orientations;
    根据采集的所述用户头部图像建立人头模型;Establishing a head model according to the collected image of the user's head;
    调整选中的预设的眼镜模型的参数;Adjusting parameters of the selected preset glasses model;
    将所述预设的眼镜模型与所述人头模型匹配以完成试戴。The preset eyeglass model is matched with the human head model to complete the trial wear.
  2. 如权利要求1所述的虚拟试戴方法,其特征在于,所述方法还包括建立所述预设的眼镜模型的阴影,其中包括:The virtual try-on method according to claim 1, wherein the method further comprises establishing a shadow of the preset glasses model, including:
    模拟应用场景对所述预设的眼镜模型进行灯光渲染,以使所述预设的眼镜模型符合用户所处的应用场景;和/或Simulating an application scene to perform light rendering on the preset glasses model, so that the preset glasses model conforms to an application scenario in which the user is located; and/or
    对所述预设的眼镜模型进行颜色设置,以使所述预设的眼镜模型展现立体效果。Color setting the preset glasses model to cause the preset glasses model to exhibit a stereoscopic effect.
  3. 如权利要求2所述的虚拟试戴方法,其特征在于,所述方法还包括:The virtual try-on method according to claim 2, wherein the method further comprises:
    对所述预设的眼镜模型以及所述预设的眼镜模型的阴影进行运动同步处理,以控制所述预设的眼镜模型与所述预设的眼镜模型的阴影同步运动。And performing motion synchronization processing on the preset glasses model and the shadow of the preset glasses model to control the shadow movement of the preset glasses model and the preset glasses model.
  4. 虚拟试戴装置,应用于服务终端,其特征在于,所述装置包括:The virtual try-on device is applied to a service terminal, and the device includes:
    第一图像采集模块,用于采集不同方位的用户头部图像;a first image acquisition module, configured to collect image of a user's head in different orientations;
    第一模型建立模块,用于根据采集的所述用户头部图像建立人头模型;a first model establishing module, configured to establish a head model according to the collected image of the user head;
    参数调整模块,用于调整选中的预设的眼镜模型的参数;a parameter adjustment module, configured to adjust parameters of the selected preset glasses model;
    匹配模块,用于将所述预设的眼镜模型与所述人头模型匹配以完成试戴。And a matching module, configured to match the preset glasses model with the human head model to complete the trial wear.
  5. 如权利要求4所述的虚拟试戴装置,其特征在于,所述装置还包括阴影建立模块,用于所述预设的眼镜模型的阴影,所述阴影建立模块包括:The virtual fitting device of claim 4, wherein the device further comprises a shadow building module for the shadow of the preset glasses model, the shadow building module comprising:
    灯光渲染模块,用于模拟应用场景对所述眼镜模型进行灯光渲染,以 使所述眼镜模型符合用户所处的应用场景;和/或a light rendering module, configured to simulate a application scene to perform light rendering on the glasses model, so that the glasses model conforms to an application scenario in which the user is located; and/or
    颜色设置模块,用于对所述预设的眼镜模型进行颜色设置,以使所述预设的眼镜模型展现立体效果。And a color setting module, configured to perform color setting on the preset glasses model, so that the preset glasses model exhibits a stereoscopic effect.
  6. 如权利要求5所述的虚拟试戴装置,其特征在于,所述装置还包括:The virtual fitting device of claim 5, wherein the device further comprises:
    运动处理模块,用于对所述预设的眼镜模型以及所述预设的眼镜模型的阴影进行运动同步处理,以控制所述预设的眼镜模型与所述预设的眼镜模型的阴影同步运动。a motion processing module, configured to perform motion synchronization processing on the preset glasses model and the shadow of the preset glasses model to control the shadow motion of the preset glasses model and the preset glasses model .
  7. 如权利要求4所述的虚拟试戴装置,其特征在于,所述装置还包括:The virtual fitting device of claim 4, wherein the device further comprises:
    第二图像采集模块,用于采集眼镜不同方位的眼镜图像;a second image acquisition module, configured to collect glasses images of different orientations of the glasses;
    第二模型建立模块,用于根据所述眼镜图像建立所述预设的眼镜模型。And a second model establishing module, configured to establish the preset glasses model according to the glasses image.
  8. 如权利要求7所述的虚拟试戴装置,其特征在于,所述装置还包括:The virtual fitting device of claim 7, wherein the device further comprises:
    命名模块,用于对多个所述预设的眼镜模型中的每一个眼镜模型的各个组成部分命名;a naming module, configured to name each component of each of the plurality of preset glasses models;
    选择模块,用于为多个所述预设的眼镜模型中每一个眼镜模型选择不同的材质以及纹理。And a selection module, configured to select different materials and textures for each of the plurality of the preset glasses models.
  9. 如权利要求7所述的虚拟试戴装置,其特征在于,所述装置包括:The virtual fitting device of claim 7, wherein the device comprises:
    调整模块,用于对所述预设的眼镜模型从对比度、金属度、透明度、粗糙度、三原色比例值中一个或多个的组合进行调整。And an adjustment module, configured to adjust the preset glasses model from a combination of one or more of contrast, metality, transparency, roughness, and three primary color ratio values.
  10. 服务终端,其特征在于,所述服务终端包括:The service terminal is characterized in that: the service terminal includes:
    存储器;Memory
    处理器;以及Processor;
    虚拟眼镜试戴装置,所述虚拟眼镜试戴装置安装于所述存储器中并包括一个或多个由所述处理器执行的软件功能模块,所述虚拟眼镜试戴装置包括:a virtual glasses fitting device, the virtual glasses fitting device is installed in the memory and includes one or more software function modules executed by the processor, the virtual glasses fitting device comprising:
    第一图像采集模块,用于采集不同方位的用户头部图像;a first image acquisition module, configured to collect image of a user's head in different orientations;
    第一模型建立模块,用于根据采集的所述用户头部图像建立人头模型;a first model establishing module, configured to establish a head model according to the collected image of the user head;
    参数调整模块,用于调整选中的预设的眼镜模型的参数;a parameter adjustment module, configured to adjust parameters of the selected preset glasses model;
    匹配模块,用于将所述预设的眼镜模型与所述人头模型匹配以完成试戴。And a matching module, configured to match the preset glasses model with the human head model to complete the trial wear.
PCT/CN2017/120315 2017-05-17 2017-12-29 Virtual try-on method and device and service terminal WO2018209967A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710349233.6A CN107492001B (en) 2017-05-17 2017-05-17 Virtual glasses try-on method and device and service terminal
CN201710349233.6 2017-05-17

Publications (1)

Publication Number Publication Date
WO2018209967A1 true WO2018209967A1 (en) 2018-11-22

Family

ID=60642463

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/120315 WO2018209967A1 (en) 2017-05-17 2017-12-29 Virtual try-on method and device and service terminal

Country Status (2)

Country Link
CN (1) CN107492001B (en)
WO (1) WO2018209967A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10685457B2 (en) 2018-11-15 2020-06-16 Vision Service Plan Systems and methods for visualizing eyewear on a user

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107492001B (en) * 2017-05-17 2020-03-27 成都通甲优博科技有限责任公司 Virtual glasses try-on method and device and service terminal
CN109035375B (en) * 2018-06-22 2023-11-10 广州久邦世纪科技有限公司 OpenGL-based 3D glasses rendering method and system
CN113892902A (en) * 2021-10-12 2022-01-07 河北超视立科技股份有限公司 Lens matching method and lens matching device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101344971A (en) * 2008-08-26 2009-01-14 陈玮 Internet three-dimensional human body head portrait spectacles try-in method
CN103456008A (en) * 2013-08-26 2013-12-18 刘晓英 Method for matching face and glasses
US20160035133A1 (en) * 2014-07-31 2016-02-04 Ulsee Inc. 2d image-based 3d glasses virtual try-on system
CN106910240A (en) * 2017-01-24 2017-06-30 成都通甲优博科技有限责任公司 The generation method and device of a kind of real-time shadow
CN107492001A (en) * 2017-05-17 2017-12-19 成都通甲优博科技有限责任公司 Virtual glasses try-on method, device and service terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101344971A (en) * 2008-08-26 2009-01-14 陈玮 Internet three-dimensional human body head portrait spectacles try-in method
CN103456008A (en) * 2013-08-26 2013-12-18 刘晓英 Method for matching face and glasses
US20160035133A1 (en) * 2014-07-31 2016-02-04 Ulsee Inc. 2d image-based 3d glasses virtual try-on system
CN106910240A (en) * 2017-01-24 2017-06-30 成都通甲优博科技有限责任公司 The generation method and device of a kind of real-time shadow
CN107492001A (en) * 2017-05-17 2017-12-19 成都通甲优博科技有限责任公司 Virtual glasses try-on method, device and service terminal

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10685457B2 (en) 2018-11-15 2020-06-16 Vision Service Plan Systems and methods for visualizing eyewear on a user

Also Published As

Publication number Publication date
CN107492001A (en) 2017-12-19
CN107492001B (en) 2020-03-27

Similar Documents

Publication Publication Date Title
WO2018209967A1 (en) Virtual try-on method and device and service terminal
US10403036B2 (en) Rendering glasses shadows
AU2014308590B2 (en) Method and system to create custom products
US10607372B2 (en) Cosmetic information providing system, cosmetic information providing apparatus, cosmetic information providing method, and program
TWI392462B (en) Morphological classification of the eye and morphological classification, as well as eye makeup method, eye shape classification and cosmetic equipment
CN110390632B (en) Image processing method and device based on dressing template, storage medium and terminal
JP3250184B2 (en) Eyewear simulation system
WO2022160701A1 (en) Special effect generation method and apparatus, device, and storage medium
CA3112222A1 (en) Virtual try-on systems and methods for spectacles
CN104408764A (en) Method, device and system for trying on glasses in virtual mode
CN105469072A (en) Method and system for evaluating matching degree of glasses wearer and the worn glasses
CN204576413U (en) A kind of internet intelligent mirror based on natural user interface
CN109426767A (en) Informer describes guidance device and its method
JP7342366B2 (en) Avatar generation system, avatar generation method, and program
CN104750933A (en) Eyeglass trying on method and system based on Internet
KR20170002100A (en) Method for providng smart learning education based on sensitivity avatar emoticon, and smart learning education device for the same
CN103995911A (en) Beauty matching method and system based on intelligent information terminal
CN103489107A (en) Method and device used for manufacturing virtual fit model image
JP2013168146A (en) Method, device and system for generating texture description of real object
Zhang et al. A virtual try-on system for prescription eyeglasses
KR101165017B1 (en) 3d avatar creating system and method of controlling the same
CN112348736A (en) Method, storage medium, device and system for removing black eye
CN109685911B (en) AR glasses capable of realizing virtual fitting and realization method thereof
FR3025044A1 (en) RECOMMENDATION SYSTEM, METHOD, COMPUTER PROGRAM, AND CORRESPONDING MEDIUM
CN105427280A (en) Shooting method and system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17910354

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17910354

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 17910354

Country of ref document: EP

Kind code of ref document: A1