CN-122023576-A - Image fold rapid simulation method based on mixed geometric transformation and texture fusion, electronic equipment and storage medium
Abstract
The invention provides an image fold rapid simulation method based on mixed geometric transformation and texture fusion, electronic equipment and a storage medium, aiming at solving the problem that a planar pattern lacks real physical fold feeling and light shadow texture when being attached to clothes; and finally, carrying out micro texture fusion, and adopting a Poisson hybrid cloning technology to 'bake' original fold textures, high lights, shadows and other light and shadow features of the clothes on the deformed patterns, thereby enabling the printed patterns to perfectly inherit the texture of the clothes materials and realizing vivid seamless fusion.
Inventors
- LIN JIEXING
- LIN HANQUAN
- DONG CHONGYANG
Assignees
- 厦门灵图科技有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20251230
Claims (7)
- 1. An image folding quick simulation method based on mixed geometric transformation and texture fusion, which is used for processing a first image serving as a target pattern and a second image with target clothes, and is characterized by comprising the following steps of: Step 1, extracting dominant colors of the first image, and filling extended edges of the dominant colors around the first image; step 2, performing nonlinear bending transformation on the filled first image by using a cylindrical projection algorithm, and superposing affine transformation and rotation of random parameters to obtain a geometrically transformed first image; Step 3, simulating the smooth sagging sense of a large area of target clothes of the second image by utilizing a sine function, and simulating the stacking folds of the fine cloth of the target clothes by utilizing Berlin noise to obtain a displacement field of mixed noise; Step 4, extracting an edge texture map or a fold highlight map of the target clothes as a texture source, calculating a gradient field of the texture source by utilizing a mixed cloning mode in Poisson fusion, and fusing the gradient field with a resampled first image; and 5, superposing the effect pattern back to the corresponding coordinate area of the target clothes in the second image.
- 2. The method for rapid simulation of image wrinkles based on mixed geometric transformation and texture fusion according to claim 1, wherein in the step 2, the coordinate transformation formula of the cylindrical projection is as follows: ; Wherein, the 、 Respectively representing the abscissa before and after transformation, 、 Respectively representing the ordinate before and after the transformation, Representing the radius of the cylinder.
- 3. The method for quickly simulating image wrinkles based on mixed geometric transformation and texture fusion according to claim 1, wherein the method comprises the following steps of: In the step 2, the angle for random rotation is set between-45 DEG and 45 deg.
- 4. The method for rapid simulation of image folding based on mixed geometric transformation and texture fusion according to claim 1, wherein in the step 3, random coordinate disturbance of the sine function is expressed as: ; Wherein, the Representing random coordinates; a maximum pixel representing a coordinate shift; Representing the frequency of the sine wave; representing coordinates A distance in a certain straight direction between-45 deg. and 45 deg. randomly generated.
- 5. The method for quickly simulating image wrinkles based on mixed geometric transformation and texture fusion according to claim 1, wherein the method comprises the following steps of: in the step 4, the high frequency of the extracted clothes texture is calculated through a Sobel or Canny gradient operator.
- 6. An electronic device comprising a processor, a memory, and an application program, wherein the application program is stored in the memory and configured to perform the hybrid geometry transform and texture fusion based image wrinkle rapid simulation method according to any one of claims 1 to 5 by the processor.
- 7. A computer readable storage medium, characterized in that the storage medium stores a computer program which, when executed in the computer, causes the computer to perform the hybrid geometry transformation and texture fusion based image wrinkle rapid simulation method according to any one of claims 1 to 5.
Description
Image fold rapid simulation method based on mixed geometric transformation and texture fusion, electronic equipment and storage medium Technical Field The invention belongs to the technical field of computer vision, and particularly relates to a hybrid geometric transformation and texture fusion-based image fold rapid simulation method, electronic equipment and a storage medium. Background In a personalized apparel (POD) or electronic commerce virtual fitting scenario, it is often necessary to synthesize a planar pattern (such as Logo, decal, text, etc.) uploaded by a user into a clothing area on a model. With respect to such techniques, existing solutions have mainly the following drawbacks: (1) The floating paste has serious sense The traditional image superposition only carries out simple perspective transformation, the pattern looks like 'floating' on the surface of the clothes, and corresponding bending and deformation cannot be generated along with the folds on the surface of the clothes. (2) Shadow texture miss The plane pattern covers the original texture (such as fabric texture) and ambient light (such as shadow generated by folds) of the clothes, so that the synthetic effect is very unnatural and the sense of reality is lacking. (3) High calculation cost Although the 3D physical simulation-based method has good effect, a complex cloth calculation model needs to be constructed, the calculated amount is large, and real-time batch generation is difficult to realize at a webpage end or a mobile end. Therefore, there is an urgent need for a fusion method that can quickly attach a planar image to a surface of a garment in a "natural" manner, and automatically simulate curling and fabric wrinkling shadows conforming to the morphology of the human body. Disclosure of Invention The invention mainly aims to provide an image fold rapid simulation method, electronic equipment and storage medium based on mixed geometric transformation and texture fusion, which solve the problems in the prior art, can rapidly attach a planar image to the surface of clothes in a natural way, and automatically simulate curl and cloth fold light and shadow which accord with the human body shape. In order to achieve the above object, one of the solutions of the present invention is: an image wrinkle rapid simulation method based on mixed geometric transformation and texture fusion is used for processing a first image serving as a target pattern and a second image with target clothes, and comprises the following steps: Step 1, extracting dominant colors of the first image, and filling extended edges of the dominant colors around the first image; step 2, performing nonlinear bending transformation on the filled first image by using a cylindrical projection algorithm, and superposing affine transformation and rotation of random parameters to obtain a geometrically transformed first image; Step 3, simulating the smooth sagging sense of a large area of target clothes of the second image by utilizing a sine function, and simulating the stacking folds of the fine cloth of the target clothes by utilizing Berlin noise to obtain a displacement field of mixed noise; Step 4, extracting an edge texture map or a fold highlight map of the target clothes as a texture source, calculating a gradient field of the texture source by utilizing a mixed cloning mode in Poisson fusion, and fusing the gradient field with a resampled first image; and 5, superposing the effect pattern back to the corresponding coordinate area of the target clothes in the second image. In the step 2, the coordinate transformation formula of the cylindrical projection is as follows: ; Wherein, the 、Respectively representing the abscissa before and after transformation,、Respectively representing the ordinate before and after the transformation,Representing the radius of the cylinder. In the step 2, the angle for random rotation is set between-45 DEG and 45 deg. In the step 3, the random coordinate disturbance of the sine function is expressed as: ; Wherein, the Representing random coordinates; a maximum pixel representing a coordinate shift; Representing the frequency of the sine wave; representing coordinates A distance in a certain straight direction between-45 deg. and 45 deg. randomly generated. In the step 4, the high frequency of the extracted clothes texture is calculated through a Sobel or Canny gradient operator. The second solution of the present invention is: an electronic device comprises a processor, a memory and an application program, wherein the application program is stored in the memory and is configured to execute the image folding rapid simulation method based on mixed geometric transformation and texture fusion by the processor. The third solution of the present invention is: A computer readable storage medium storing a computer program which, when executed in the computer, causes the computer to perform the hybrid geometry transformation and texture fus