Method and system of virtual footwear try-on with improved occlusion
10943365 ยท 2021-03-09
Assignee
Inventors
Cpc classification
International classification
Abstract
A method and system of virtual footwear try-on with improved occlusion processing are disclosed. The method comprises: capturing a foot image of a user; defining an ankle joint point in the foot image and defining at least one reference point according to the ankle joint point; capturing depth point data within a spatial range around the reference point and constructing an occlusion model according to the depth point data; positioning the occlusion model to a position corresponding to the foot image to obtain an occlusion processed image; positioning the footwear model on the occlusion processed image to produce a matching image of the footwear model and the foot; and hiding the occlusion model.
Claims
1. A method of virtual footwear try-on with improved occlusion processing, which is applied to augmented reality, comprising steps of: capturing a foot image of a user; defining an ankle joint point in the foot image and defining at least a reference point of the foot of the user by extending from the ankle joint point toward a direction with at least a distance within a range from 4 cm to 5 cm, wherein the direction is an extension direction from the ankle joint point to a calf of the user; capturing depth point data within a spatial range around the reference point and constructing an occlusion model according to the depth point data, wherein the depth point data includes a plurality of depth data points captured by a depth camera, and the spatial range is a sphere with a radius greater than or equal to the distance; positioning the occlusion model to a position corresponding to the foot image to obtain an occlusion processed image comprising the foot of the user; positioning a footwear model on the occlusion processed image to produce a matching image of the footwear model and the foot of the user; and hiding the occlusion model according to a relative position, wherein the reference point comprises an upper reference point being a center of an upper sphere and a lower reference point being a center of a lower sphere, and the step of constructing the occlusion model comprises steps of: obtaining upper depth point data and lower depth point data from the upper sphere and the lower sphere, respectively; retrieving a part of the upper depth point data and a part of the lower depth point data having a distance away from the upper reference point and the lower reference point, respectively, less than or equal to a threshold value to obtain upper reference point depth data and lower reference point depth data; obtaining an upper center point and a lower center point according to the upper reference point depth data and the lower reference point depth data, respectively; defining axes of rotation coordinates of the calf of the user according to the upper center point and the lower center point; and calculating a rotation matrix of a current calf axis of the user and constructing the occlusion model for the user according to the rotation matrix and a translation matrix for tracking a foot position of the user.
2. The method according to claim 1, wherein the step of defining the ankle joint point in the foot image comprises: matching a virtual foot model onto the foot image to obtain a virtual foot model translation matrix and a virtual foot model rotation matrix of the virtual foot model corresponding to the foot image, thereby obtaining a position of a foot of the user in a spatial coordinate system; and defining a coordinate point of an ankle joint of the virtual foot model in the spatial coordinate system, wherein the coordinate point corresponds to the ankle joint point of the user.
3. The method according to claim 1, wherein a radius of the upper sphere is greater than or equal to a distance between the upper reference point and the lower reference point, and a radius of the lower sphere is greater than or equal to a distance between the upper reference point and the lower reference point.
4. The method according to claim 1, wherein the axes of the rotation coordinates comprise an X axis, a Y axis and a Z axis, a line from the upper center point to the lower center point is defined as the Y axis, a forward direction of the foot of the user is defined as the Z axis, and the X axis is defined as a direction perpendicular to the Y axis and the Z axis.
5. The method according to claim 1, wherein the step of positioning the occlusion model to the position corresponding to the foot image is performed according to an equation of:
A.sub.fter=T.sub.foot*R.sub.foot*R.sub.calf*P.sub.before, wherein, P.sub.ater is an occlusion model of the current calf axis of the user, P.sub.before is an occlusion model of an initial calf axis of the user, R.sub.calf is a rotation matrix as a calf axis of the user rotates from an initial standing position to a current position, R.sub.foot is a rotation matrix of the foot direction of the user, and T.sub.foot is a translation matrix of the foot position of the user.
6. The method according to claim 1, wherein the occlusion model comprises a first partial occlusion model and a second partial occlusion model, the first partial occlusion model is a geometric model of the ankle joint of the user, and the second partial occlusion model is a geometric model of a calf portion above the angle joint of the user.
7. A system of virtual footwear try-on with improved occlusion processing, which is applied to augmented reality, comprising: an image capturing device; and an electronic device comprising one or more processing units and a memory unit, wherein the one or more processing units are electrically connected with the image capturing device and the memory unit, the memory unit stores one or more program instructions, and when the one or more processing units execute the one or more program instructions, the one or more processing units perform: capturing a foot image of a user; defining an ankle joint point in the foot image and defining at least a reference point of the foot of the user by extending from the ankle joint point toward a direction with at least a distance within a range from 4 cm to 5 cm, wherein the direction is an extension direction from the ankle joint point to a calf of the user; capturing depth point data within a spatial range around the reference point and constructing an occlusion model according to the depth point data, wherein the depth point data includes a plurality of depth data points captured by a depth camera, and the spatial range is a sphere with a radius greater than or equal to the distance; positioning the occlusion model to a position corresponding to the foot image to obtain an occlusion processed image comprising the foot of the user; positioning a footwear model on the occlusion processed image to produce a matching image of the footwear model and the foot of the user; and hiding the occlusion model according to a relative position, wherein the reference point comprises an upper reference point being a center of an upper sphere and a lower reference point being a center of a lower sphere, and in the step of constructing the occlusion model, the one or more processing units are configured to perform: obtaining upper depth point data and lower depth point data from the upper sphere and the lower sphere, respectively; retrieving a part of the upper depth point data and a part of the lower depth point data having a distance away from the upper reference point and the lower reference point, respectively, less than or equal to a threshold value to obtain upper reference point depth data and lower reference point depth data; obtaining an upper center point and a lower center point according to the upper reference point depth data and the lower reference point depth data, respectively; defining axes of rotation coordinates of the calf of the user according to the upper center point and the lower center point; and calculating a rotation matrix of a current calf axis of the user and constructing the occlusion model for the user according to the rotation matrix and a translation matrix for tracking a foot position of the user.
8. The system according to claim 7, wherein the step of defining the ankle joint point in the foot image comprises: matching a virtual foot model onto the foot image to obtain a virtual foot model translation matrix and a virtual foot model rotation matrix of the virtual foot model corresponding to the foot image, thereby obtaining a position of a foot of the user in a spatial coordinate system; and defining a coordinate point of an ankle joint of the virtual foot model in the spatial coordinate system, wherein the coordinate point corresponds to the ankle joint point of the user.
9. The system according to claim 7, wherein a radius of the upper sphere is greater than or equal to a distance between the upper reference point and the lower reference point, and a radius of the lower sphere is greater than or equal to a distance between the upper reference point and the lower reference point.
10. The system according to claim 7, wherein the axes of the rotation coordinates comprise an X axis, a Y axis and a Z axis, a line from the upper center point to the lower center point is defined as the Y axis, a forward direction of the foot of the user is defined as the Z axis, and the X axis is defined as a direction perpendicular to the Y axis and the Z axis.
11. The system according to claim 7, wherein the step of positioning the occlusion model to the position corresponding to the foot image is performed according to an equation of:
P.sub.after=T.sub.foot*R.sub.foot*R.sub.calf*P.sub.before, wherein, P.sub.after is an occlusion model of the current calf axis of the user, P.sub.before is an occlusion model of an initial calf axis of the user, R.sub.calf is a rotation matrix as a calf axis of the user rotates from an initial standing position to a current position, R.sub.foot is a rotation matrix of the foot direction of the user, and T.sub.foot is a translation matrix of the foot position of the user.
12. The method according to claim 7, wherein the occlusion model comprises a first partial occlusion model and a second partial occlusion model, the first partial occlusion model is a geometric model of the ankle joint of the user, and the second partial occlusion model is a geometric model of a calf portion above the angle joint of the user.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1) The disclosure will become more fully understood from the detailed descriptions and associated drawings, which are given for illustration only, and thus are not limitative of the present disclosure, and wherein:
(2)
(3)
(4)
(5)
(6)
(7)
DETAILED DESCRIPTION OF THE DISCLOSURE
(8) The present disclosure will be apparent from the following detailed description, which proceeds with reference to the associated drawings, wherein the same references relate to the same elements.
(9)
(10) The method and system of the virtual footwear try-on with improved occlusion processing of this disclosure are applied to footwear try-on function in augmented reality (AR), which can improve the fit between the occlusion model and human foot, and enhance the accuracy of the merge between the virtual object and the real human body. By using the method and system of the disclosure, the boundaries of the occlusion of the virtual and real objects can be correctly displayed, thereby improving the mutual occlusion effect between the ankle joint part and the try-on footwear model in 3D computer graphics, increasing the natural interaction between the virtual footwear and the ankle joint, enhancing the visual quality of the virtual footwear try-on experience, and improving the user experience of the virtual try-on.
(11) As shown in
(12) Referring to
(13) The electronic device 3 can be, for example but not limited to, a mobile electronic device (e.g. a mobile phone, a tablet or a notebook computer) or a stationary electronic device (e.g. a desktop computer or a server), and this disclosure is not limited. The electronic device 3 includes one or more processing units 31 and a memory unit 32. In addition, the electronic device 3 further includes a display unit 33. The one or more processing units 31 can be electrically connected to the memory unit 32 and the display unit 33 through, for example, a Bus. For example,
(14) The processing unit 31 can access the data stored by the memory unit 32 for performing an operation or a control, and control the display unit 33 to display the corresponding image. The processing unit 31 may include a core control assembly of the electronic device 3, which for example includes at least one CPU and a memory, or includes other control hardware, software, or firmware. In addition, the memory unit 32 stores at least one application software, which is for example but not limited to an APP software or a computer executable application software including one or more program instructions. When the program instructions of the one or more application software are executed by the one or more processing units 31, the one or more processing units 31 may at least perform the operations of the above-mentioned steps S01 to S06.
(15) In this embodiment, the memory unit 32 can be a non-transitory computer readable storage medium, such as at least one memory, a memory card, a CD, a video tape, a computer tape, or any combination thereof. The memory may include read only memory (ROM), flash memory, or a field-programmable gate array (FPGA), or other kinds of memory, or a combination thereof. In this case, the memory unit 32 is exemplified by an internal memory of a mobile electronic device or a stationary electronic device. However, in different embodiments, the memory unit 32 can also be a cloud memory and stored in the cloud device. In other words, the application software can also be stored in the cloud device, and the user can download the application software into the electronic device 3 from the cloud device. In addition, the display unit 33 can be a display panel or display of a mobile electronic device or a stationary electronic device, which is, for example but not limited to, an LCD, an OLED display, an LED display, or other displays capable of displaying images. The display unit 33 can be configured to display the try-on image, so that the user can view the effect of the virtual footwear try-on.
(16) The method and the system 1 of virtual footwear try-on with improved occlusion will be further described in the following different embodiments.
(17)
(18) Referring to
(19) Next, the ankle joint point P.sub.A of the user is defined in the foot image F, and at least a reference point P.sub.1 of the foot of the user is defined at a position extending from the ankle joint point P.sub.A toward a direction by at least a distance d, wherein the direction is an extension direction from the ankle joint point P.sub.A to a calf of the user (step S02). In this embodiment, in step S02 of defining the ankle joint point P.sub.A of the user, as shown in
(20) Then, the depth point data A.sub.d within a spatial range around the at least one reference point P.sub.1 (taking at least one reference point P.sub.1 as the center of the spatial range), and an occlusion model F.sub.C of the user can be established according to the depth point data A.sub.d (step S03). As shown in
(21) Referring to
(22) Afterwards, the occlusion model F.sub.C is positioned to the corresponding position of the user's foot image F to obtain an occlusion processed image including the foot of the user (step S04), and a footwear model is positioned to the occlusion processed image to generate the matching image F.sub.P of the footwear model and the user's foot (step S05). Herein, if the user's new foot position and angle are different from the initial foot position and angle during the try-on motion, the aforementioned markerless foot tracking technique can also be used to obtain the virtual foot model translation matrix and the virtual foot model rotation matrix of a new foot position corresponding to the original foot position. Then, the depth points of the new foot position can be obtained so as to reconstruct the occlusion model F.sub.C at the new foot position. As shown in
(23) To be noted, the footwear model can be pre-stored in the database 4 of
(24) Finally, the occlusion model F.sub.C is hidden according to a relative position (step S06). Only the merge result of the user's foot and the footwear model is displayed, and the result after the occlusion processing is presented as shown in FIG. 3G It can be seen from
(25)
(26) In the second embodiment, the first step is to capture a foot image F of a user by the image capturing device 2 (step S01). Then, similar to the first embodiment, the step S02 is performed to define the ankle joint point P.sub.A of the user, and define an upper reference point P.sub.T of the foot of the user at a position extending from the ankle joint point P.sub.A toward the calf of the user by about 4-5 cm and a lower reference point P.sub.B of the foot of the user at a position extending from the ankle joint point P.sub.A toward the calf of the user by about 3 cm. As shown in
(27) Then, the upper reference point P.sub.T and the lower reference point P.sub.B are defined as the center of the upper sphere S.sub.2 (
(28) Next, in the step S03 of constructing the occlusion model, the image capturing device 2 may respectively capture the upper depth point data A.sub.T and the lower depth point data A.sub.B located in the upper sphere S.sub.2 and the lower sphere S.sub.3, respectively. Herein, the image capturing device 2 captures the depth data as shown in the blocks (A.sub.T and A.sub.B) shown in
(29) Afterwards, an upper center point C.sub.T and a lower center point C.sub.B are obtained according to the upper reference point depth data A.sub.T and the lower reference point depth data A.sub.B (
(30)
(31) To be noted, the image capturing device 2 of this embodiment is a Kinect depth camera for capturing depth data points. Since the Kinect depth camera has limitations in its hardware functionality, the depth data points at the edge of the object may have noises and jitters, so that it is necessary to reduce the noise of the retrieved depth data points in the process of calculating the upper center point C.sub.T and the lower center point C.sub.B. In some embodiments, the depth information is unstable at the edge region of the foot, and the noises will reduce the precision of the depth data of the object's edge, decrease the accuracy of calculating the center point of the cross-section of the calf, and thus cause the inaccuracy of the calculated calf axis. Therefore, for example, the depth point data of every 10 frames are averaged, and the extreme depth points far from the average value will be eliminated to reduce the noises and jitters of the depth data points.
(32) After obtaining the upper center point C.sub.T and the lower center point C.sub.B, the rotation coordinate axis of the calf portion above the ankle joint of the user's foot can be obtained by calculating according to the upper center point C.sub.T and the lower center point C.sub.B. In this embodiment, the axes of the rotation coordinates of the calf portion comprise an X axis, a Y axis and a Z axis. As shown in
(33) Finally, a rotation matrix R.sub.calf of the current calf axis of the user is calculated, and an occlusion model of the user is established according to the rotation matrix R.sub.calf and a translation matrix T.sub.foot tracking the position of the user's foot. After obtaining the rotation coordinate axis of the calf portion (
P.sub.after=T.sub.foot*R.sub.foot*R.sub.calf*P.sub.before
(34) Wherein, P.sub.after is an occlusion model of the current calf axis of the user, P.sub.before is an occlusion model of an initial calf axis of the user, R.sub.calf is a rotation matrix as a calf axis of the user rotates from an initial standing position to a current position, R.sub.foot is a rotation matrix of the foot direction of the user, and T.sub.foot is a translation matrix of the foot position of the user.
(35) The occlusion model used in this method is a pre-established virtual model, which can be stored in the database 4 of
(36) Finally, the occlusion model is hidden according to the calculation of the relative position so as to obtain the result of vertical footwear try-on with occlusion process.
(37)
(38) Comparing the first and second embodiments with the conventional occlusion processing method, it can be found that the conventional occlusion method does not consider whether the occlusion model is similar to the geometry of the user's ankle and calf portion, and the movement of the calf portion may cause the failure of calculating a partial occlusion. However, the occlusion processes provided in the first embodiment and the second embodiment of the present disclosure can significantly improve the occlusion quality of the contact portion between the ankle and the footwear model, thereby improving the visual quality of the virtual footwear try-on experience.
(39) In summary, the method and system of virtual footwear try-on with improved occlusion processing of this disclosure can define an ankle joint point of the user in the foot image, define at least one reference point of the foot of the user according to the ankle joint point, capture depth point data within a spatial range around the reference point, and construct an occlusion model according to the depth point data. Afterwards, the method and system of virtual footwear try-on with improved occlusion of this disclosure further positions the occlusion model to a position corresponding to the foot image, positions the footwear model on the occlusion processed image to produce a matching image of the footwear model and the foot, and hides the occlusion model. Accordingly, the method and system of this disclosure can correctly show the occlusion boundaries of the virtual and real objects, thereby improving the mutual occlusion processing between the virtual footwear model and the ankle joint, increasing the natural interaction between the virtual footwear and the ankle joint, enhancing the visual quality of the virtual footwear try-on experience.
(40) Although the disclosure has been described with reference to specific embodiments, this description is not meant to be construed in a limiting sense. Various modifications of the disclosed embodiments, as well as alternative embodiments, will be apparent to persons skilled in the art. It is, therefore, contemplated that the appended claims will cover all modifications that fall within the true scope of the disclosure.