Picture synthesis method and system applied to e-commerce and related equipment
Through the intelligent layer distortion and deformation processing of PSD files and the mixed mode information, the problems of high complexity and cost of rendering template production in the existing technology are solved, and the low-cost and simple operation of renderings are achieved, which improves the product. The attraction of online stores.
Patent Information
- Application Number
- CN202411098848.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2024-12-06
AI Technical Summary
The existing on-demand printing platform has problems such as high technical requirements, poor results and high labor costs in the production process of product rendering templates, which makes it difficult to popularize in China.
Using PSD files as product rendering templates, the product renderings are generated by analyzing the distorted deformation data and blending mode information of the smart layer, which simplifies the template production process and reduces costs.
It realizes the low-cost and simple operation of product rendering templates, and the generated renderings are more vivid and realistic, attracting customers and reducing their dependence on professional and technical personnel.
Smart Images

Figure CN119090707A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of picture synthesis in e-commerce, and more particularly to a picture synthesis method, system and related equipment applied to e-commerce. Background Art
[0002] S2B, Supply chain platform To Business, is a new business model, where S refers to a large supply chain platform, and B refers to the enterprise side of the large platform corresponding to 10,000, 100,000 or even higher 10,000 levels (including large, medium and small enterprises of various sizes). The relationship between the two is not a simple franchising, but "empowerment". The process is that the B side understands the needs and pain points of customers through communication with end consumers, and then meets the customized needs of users through the integration capabilities of the entire supply chain provided by the S side. As a result, an on-demand printing online design platform has emerged, allowing users to customize designs according to their specific needs and print them out in real time. Enable them to create personalized items or products according to their needs and preferences.
[0003] The main users of the print-on-demand online design platform are small and medium-sized e-commerce sellers. The platform provides online product design services for B-end sellers, and uploads the product renderings and basic information designed by them to their personal online stores with one click. Sellers can sell products first, and after receiving orders, they can directly place orders on the platform, and the platform will arrange production and delivery.
[0004] For example, when using the platform's online product design service, sellers select a product and upload the design pattern in the specified design area. The platform uses image processing technology to synthesize the pre-prepared product rendering template and the design pattern to generate a product rendering with a new design pattern, such as Figure 1 shown.
[0005] However, the product rendering templates provided by existing on-demand printing platforms are all produced by platform technicians, usually based on 3D modeling technology, and the design patterns uploaded by users are texture mapped to generate renderings. The above method has two main pain points: 1) The background of 3D modeling is not a natural scene, and the degree of coordination with the product itself is low, and it is stiff and lacks aesthetics. The generated renderings do not have the basis for attracting customers' attention in online stores, such as Figure 2 2) The labor cost is high, and it requires professional technicians on the platform to make it. If manufacturers want to sell products on the platform, they usually need a basic entry fee of 20,000 to 30,000 yuan. Because of the above reasons, on-demand printing platforms are difficult to popularize in China.
[0006] Therefore, it is particularly important to design a set of low-cost, practical and easy-to-operate methods for producing, analyzing and synthesizing product renderings. Summary of the invention
[0007] In view of this, the present invention provides a method, system and related products for image synthesis applied to e-commerce, which can solve the problem that the production process of the above-mentioned product renderings has high technical requirements and poor effects.
[0008] In order to achieve the above object, the present invention adopts the following technical solution:
[0009] In a first aspect, an embodiment of the present invention provides a method for synthesizing an image applied to e-commerce, comprising the following steps:
[0010] S10, obtaining a template for making a product rendering; the template for making a product rendering is a PSD file; the PSD file includes a design area of a smart layer;
[0011] S20, parsing the PSD file to obtain the pre-synthesized image of the non-intelligent layer, the blending mode information of the intelligent layer, and the distortion and deformation data of the intelligent layer;
[0012] S30, performing distortion and deformation processing on the received design pattern according to the distortion and deformation data of the intelligent layer; and then synthesizing the image pre-synthesized with the non-intelligent layer according to the mixing mode information to generate a product rendering.
[0013] Furthermore, the process of making the PSD file in step S10 includes:
[0014] (1) Use the clean version of the product scene image as the background image, set the background image to a normal layer, and beautify it according to your own needs;
[0015] (2) Select the rectangle tool, draw a rectangle, and set its position and size as the area where the user can edit the design pattern;
[0016] (3) Selecting the rectangle and setting it as a smart layer; and distorting the rectangle according to the wrinkles and deformation of the background product;
[0017] (4) Set the blending mode to obtain the product rendering template of the PSD file.
[0018] Furthermore, the step S20 includes:
[0019] S201, parsing the PSD file to obtain basic information of the template for making product renderings, including: background image size information of a common layer, design area size information of a smart layer, and translation information and rotation information of the design area relative to the background image;
[0020] S202, obtaining the number of rows and columns of the distorted mesh vertices stored in the PSD file, and calculating a set of all vertex coordinates of the distorted mesh before deformation;
[0021] S203: Obtain the mixed mode information of the design area and the background image.
[0022] Furthermore, the step S202 includes:
[0023] Obtain the number of rows R and columns C of the distorted mesh vertices stored in the PSD file;
[0024] If there is no split deformation, obtain the coordinate information set p'(x, y) of all vertices of the distorted mesh stored in the PSD after the distortion deformation:
[0025]
[0026] Among them, x' c is the horizontal coordinate of the vertex after distortion in the cth column, c∈[1,C]; y' r is the ordinate of the vertex in the rth row after distortion, r∈[1,R];
[0027] If there is a split deformation, obtain the coordinate information set p'(x, y) of all vertices of the distorted mesh after the deformation and the coordinate information set of the slice vertices before the deformation of the distorted mesh stored in the PSD
[0028]
[0029] In the formula, x s_x is the horizontal coordinate of the slice vertex before distortion in the s_xth column; s_x∈[1,M c ],M c is the number of slice vertex columns; y s_y is the vertical coordinate of the slice vertex before distortion in the s_yth row; s_y∈[1,M r ],M r The number of slice vertex rows; the slice vertex is the key vertex that produces a difference in the distorted mesh distance. One slice vertex information is stored every two equidistant mesh points.
[0030] The coordinate set p(x,y) of all vertices of the distorted mesh before deformation is calculated as follows:
[0031]
[0032] Wherein, X, Y are the horizontal displacement and vertical displacement of the design area relative to the background image, respectively; W, H are the width and length of the design area, respectively; s_c, s_r are the column index and row index of the slice vertex after distortion, respectively.
[0033] Furthermore, the step S30 includes:
[0034] S301, adjusting the size of the received design pattern I to be consistent with the size of the intelligent layer design area, obtaining the pattern Right now:
[0035]
[0036] In the formula, is the horizontal axis position, is the vertical coordinate position, After resizing pattern I to W×H, the resulting pattern exist Pixel information at the location;
[0037] S302: Adjust the pattern Do translation and rotation to get the pattern
[0038]
[0039] In the formula, The original coordinates The new coordinate position after translation and rotation; θ is the rotation angle of the design area relative to the background image;
[0040] S303, according to the coordinate information set p(x, y) of all vertices before deformation and the coordinate information set p'(x, y) of all vertices after deformation of the distorted mesh, To distort an image:
[0041]
[0042] In the formula, The Catmull-Rom algorithm is used, and Ξ is the relevant parameter;
[0043] S304, the distorted design area and the background image area C to be mixed b To mix, the process is as follows:
[0044]
[0045] The calculated C new The area C to be mixed corresponding to the original background image b , get the product renderings.
[0046] In a second aspect, an embodiment of the present invention further provides a picture synthesis system applied to e-commerce, including:
[0047] A PSD file acquisition module is used to acquire a template for making a product rendering; the template for making a product rendering is a PSD file; the PSD file contains a design area of a smart layer;
[0048] A PSD file parsing module is used to parse the PSD file to obtain the pre-synthesized image of the non-intelligent layer, the blending mode information of the intelligent layer, and the distortion and deformation data of the intelligent layer;
[0049] The synthesis module is used to perform distortion and deformation processing on the received design pattern according to the distortion and deformation data of the intelligent layer; and then synthesize it with the image pre-synthesized by the non-intelligent layer according to the mixing mode information to generate a product rendering.
[0050] In a third aspect, an embodiment of the present invention further provides a computer device, characterized in that it includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus;
[0051] Memory, used to store computer programs;
[0052] The processor, when used to execute the program stored in the memory, can implement a picture synthesis method applied to e-commerce as described in any one of the first aspects.
[0053] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes a picture synthesis method applied to e-commerce as described in any one of the first aspects.
[0054] The descriptions of the second to fourth aspects of the present invention can refer to the detailed description of the first aspect; and the beneficial effects of the descriptions of the second to fourth aspects can refer to the analysis of the beneficial effects of the first aspect, which will not be repeated here.
[0055] It can be seen from the above technical solution that compared with the prior art, it has the following technical advantages:
[0056] 1) The production process of product rendering templates is simple and low-cost. Supply-side manufacturers do not need to hire professional technicians. They can make templates through simple video instructions and popular image processing software, and upload them to the platform for users to use.
[0057] 2) Product image templates based on natural scenes are more vivid and realistic, and more attractive to customers than product renderings generated by 3D modeling.
[0058] 3) The algorithms for synthesizing the effect graphs in the invention can all be implemented on the front end of the website, ensuring the program running speed and a good user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0060] Figure 1 A schematic diagram for synthesizing a seller's design pattern with a product rendering template to generate a new rendering.
[0061] Figure 2 It is a product rendering of the existing technology based on 3D modeling technology and a technical rendering of the method of the present invention.
[0062] Figure 3 This is a flow chart of the image synthesis method applied to e-commerce provided by the present invention.
[0063] Figure 4 A flow chart for making, parsing and synthesizing product rendering templates of the PSD file provided by the present invention.
[0064] Figure 5 A schematic diagram of the distortion grid setting of the intelligent layer pattern design area provided by the present invention.
[0065] Figure 6 A schematic diagram of the data before and after distortion of a PSD file storing split grid data provided by the present invention.
[0066] Figure 7 This is a schematic diagram of an example of making and synthesizing a product rendering template provided by the present invention.
[0067] Figure 8 This is a PSD file parsing flow chart provided by the present invention.
[0068] Fig. 9 This is a diagram of the synthesis process of the product effect diagram provided by the present invention.
[0069] Fig.10 This is a block diagram of the picture synthesis system applied to e-commerce provided by the present invention. DETAILED DESCRIPTION
[0070] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0071] The present invention serves the on-demand printing online design platform, and aims to provide manufacturers at the S end of the supply chain with a low-cost access platform and an image processing technology solution for publishing editable product rendering templates. Among them, the supply-side manufacturers (S end): have basic styles of products, and can produce and ship on demand according to the customer's design patterns. The B-end sellers: that is, the main users of the platform, upload patterns and design products online through the platform, and then connect the designed product renderings and parameters to their own online stores for sale.
[0072] Embodiment 1:
[0073] The embodiment of the present invention discloses a method for synthesizing pictures applied to e-commerce, which is based on the production, analysis and synthesis of product rendering templates of PSD files, and provides a low-cost access to the on-demand printing platform for manufacturers on the product supply side. When it is applied to the on-demand printing online design platform, the manufacturer can use the image processing software Photoshop to produce product rendering templates according to the teaching video provided by the platform. The platform analyzes and reconstructs the PSD file of the rendering template through image processing technology, and synthesizes a new rendering when the user calls it.
[0074] The embodiment of the present invention discloses a method for synthesizing pictures applied to e-commerce. Figure 3 As shown, the following steps are included:
[0075] S10, obtaining a template for making a product rendering; the template for making a product rendering is a PSD file; the PSD file includes a design area of a smart layer;
[0076] S20, parsing the PSD file to obtain the pre-synthesized image of the non-intelligent layer, the blending mode information of the intelligent layer, and the distortion and deformation data of the intelligent layer;
[0077] S30, performing distortion and deformation processing on the received design pattern according to the distortion and deformation data of the intelligent layer; and then synthesizing the image pre-synthesized with the non-intelligent layer according to the mixing mode information to generate a product rendering.
[0078] In this embodiment, the method uses a PSD file as a template, and avoids the high cost and complexity of traditional 3D modeling by parsing the pre-synthesized images of the smart layer and the non-intelligent layer, thereby reducing the production cost. Its operation process is relatively simple, and does not require complex 3D modeling technology or advanced image processing skills, so that sellers on the platform can easily use online design services, improving the user's operational convenience. In addition, the method can generate product renderings with new design patterns in real time based on the design patterns uploaded by the B-end sellers, meet the customization needs of small and medium-sized e-commerce sellers, and quickly respond to market changes. In addition, the present invention uses the mixed mode information and distortion deformation processing of the intelligent layer to generate product renderings that are more visually coordinated and beautiful, which enhances the attractiveness and competitiveness of the product in the online store.
[0079] The technical solution of the present invention is described in detail below by giving examples:
[0080] Based on the synthesis method of the present invention, it can be applied to the on-demand printing online design platform. The product manufacturers on the supply side do not need to pay extra fees to the professional technicians of the platform to make patterns and patterns. For example, they only need to follow the 10-minute teaching video of the platform to use the more popular Photoshop software to easily make the rendering template of their own products. After the manufacturer uploads the rendering template, the platform parses the PSD file, reconstructs the layer, and stores the processed data in the background database. When the platform user designs a pattern for the product, the platform calls the background data and synthesizes the product rendering as the product display picture of the user's online store.
[0081] Reference Figure 4 As shown, the three steps of making, parsing and synthesizing the product rendering template of the PSD file are explained:
[0082] The first step is to create a product rendering template. The supply-side (S-side) manufacturer uses Photoshop software to create a product rendering template according to the simple tutorial provided by the platform, edits the design area into a smart layer, and uploads the generated PSD file to the platform.
[0083] The second point is to parse the template file. The platform parses the PSD file of the product rendering template, pre-processes the data, and stores the pre-synthesized images of the non-intelligent layer, the blending mode information of the intelligent layer, and the distortion and deformation data of the intelligent layer in the background database.
[0084] The third point is graphic transformation and synthesis. When the user uploads the design pattern to the platform, the platform calls the background data, distorts the design pattern according to the pre-stored intelligent layer distortion data, and then synthesizes it with other pre-stored layer images according to the blending mode information to generate a product rendering.
[0085] In the technical solution description, the first point, the process of making product rendering templates, will be briefly described, and the second point, the technical solution of parsing template files and the third point, graphic transformation and synthesis, will be introduced in detail.
[0086] 1. Make a product rendering template:
[0087] In this step, the supply-side manufacturer uses Photoshop image processing software to create product rendering templates.
[0088] The first step is to use the clean version of the product scene picture as the background picture, set the background picture as a normal layer, and beautify it according to your own needs.
[0089] In the second step, select the rectangle tool, draw a rectangle, and set its position and size. This area is the area where users can edit the design pattern.
[0090] Step 3: Select the rectangle and set it as a smart layer. Select Edit > Transform > Distort in the toolbar, and perform appropriate distortion on the pattern design area according to the wrinkles and deformation of the background product. You can set the grid size to determine the number of distortion grid grids. You can also use horizontal split distortion, vertical split distortion, or cross split distortion at a certain position to set the distortion grid vertices in a targeted manner. Figure 5 shown.
[0091] The fourth step is to set the blending mode, which means to synthesize the design pattern area and the background to produce a realistic effect.
[0092] 2. Parsing template files
[0093] In this step, the platform parses the product rendering template PSD file, obtains the key data of the layer, and pre-stores it in the background database.
[0094] The first step is to parse the PSD file and obtain the basic information of the product rendering template.
[0095] A) Read the basic information of the background image of the normal layer and convert the background image I B Stored in the backend database, for example, the image size is usually 2048×2048.
[0096] B) Read the basic information of the pattern design area of the smart layer, including the size of the design area W is the width, H is the length; Translation information compared to the background image X is the horizontal displacement, Y is the vertical displacement; the original rectangle Rotation information of the smart layer design area is θ, where θ is the rotation angle.
[0097] The above information is stored in the background database.
[0098] The second step is to read the distortion and deformation information of the smart layer.
[0099] The information stored in the known PSD files includes:
[0100] 1) The number of rows and columns of the distorted mesh vertices, R, and C.
[0101] 2) If the deformation data is not split, the file only stores the coordinate information set of all the vertices of the distorted mesh after the distortion:
[0102]
[0103] x' c is the horizontal coordinate of the vertices in the cth column after distortion, c∈[1,C], and the total number is equal to the number of columns C;
[0104] y' r is the ordinate of the vertex after distortion in the rth row, r∈[1,R], and the total number is equal to the number of rows R.
[0105] 3) If there is split deformation data, all vertex coordinate information after distortion and deformation
[0106] In addition to p'(x,y), it also stores the coordinate information set of the slice vertices before the distorted mesh is deformed.
[0107]
[0108] In the formula, x s_x is the horizontal coordinate of the slice vertex before distortion in the s_xth column, s_x∈[1,M c ], the total number is equal to the number of slice vertex columns M c ;y s_y The ordinate of the slice vertex before distortion in the s_yth row, the total number is equal to the number of slice vertex rows M r The slice vertex is the key vertex that produces the difference in the distorted mesh distance. Every two equidistant mesh points, a slice vertex information is stored, such as Figure 6 shown.
[0109] According to the information stored in the PSD file above, it is necessary to calculate the coordinate set of all vertices of the distorted mesh before deformation. Here’s how:
[0110]
[0111] In the formula, X, Y are the horizontal displacement and vertical displacement of the design area relative to the background image, respectively; W, H are the width and length of the design area, respectively; s_c, s_r are the column index and row index of the slice vertex after distortion, respectively. The 3 in the formula represents the three slice vertices separated by two equidistant grid points.
[0112] The third step is to obtain the blending mode information. For product renderings, the Normal mode or Multiply mode is usually used.
[0113] 3. Use pre-stored data and uploaded design patterns to perform graphic transformation and synthesis;
[0114] In this step, the user uploads the design pattern I in the editable area, and the platform calls the background data, distorts and deforms the design pattern according to the pre-stored intelligent layer distortion data, and then synthesizes it with other pre-stored layer images to generate a product rendering.
[0115] The first step is to resize the design pattern I to the same size as the smart layer design area to obtain the pattern Right now
[0116]
[0117] In the formula, is the horizontal axis position, is the ordinate position, After resizing pattern I to W×H, the resulting pattern exist Pixel information at the location.
[0118] After adjusting the pattern Do translation and rotation to get a new pattern
[0119]
[0120] In the formula, The original coordinates The new coordinate position after translation and rotation; θ is the rotation angle of the design area relative to the background image.
[0121] The second step is to distort the pattern according to the pre-deformation coordinates p(x, y) and post-deformation coordinates p'(x, y) of the distorted grid stored in the platform. The image is distorted by a warping algorithm.
[0122]
[0123] In the formula, The Catmull-Rom algorithm is used, and Ξ is the relevant parameter.
[0124] Step 3: Combine the smart layer with the background image of the normal layer. The background image area to be mixed is C b , and the design area after distortion Mix as follows:
[0125]
[0126] The calculated C new Corresponding to the original background image I B The area to be mixed C b , you can get the product effect diagram of the new design pattern, such as Figure 7 shown.
[0127] The above technical solution mainly describes the analysis and synthesis process of the background image and uploaded pattern of the product rendering. The actual product template may have multiple layers according to the needs. It is only necessary to synthesize the ordinary layers layer by layer, distort the smart layers, and then synthesize them. Figure 8 As shown, the PSD file is parsed to obtain the pre-synthesized image of the non-intelligent layer, the blending mode information of the intelligent layer, and the distortion data of the intelligent layer, which are stored in the background database; and the product effect picture synthesis process is as follows Fig. 9 As shown, it is determined whether it is an intelligent layer, and then the received design pattern is distorted and deformed according to the intelligent layer distortion and deformation data stored in the background database; then it is synthesized with the image pre-synthesized with the non-intelligent layer according to the blending mode information to generate a product rendering.
[0128] Embodiment 2:
[0129] Based on the same inventive concept, Fig.10 As shown, the present invention also provides a picture synthesis system applied to e-commerce, including:
[0130] A PSD file acquisition module is used to acquire a template for making a product rendering; the template for making a product rendering is a PSD file; the PSD file contains a design area of a smart layer;
[0131] A PSD file parsing module is used to parse the PSD file to obtain the pre-synthesized image of the non-intelligent layer, the blending mode information of the intelligent layer, and the distortion and deformation data of the intelligent layer;
[0132] The synthesis module is used to perform distortion and deformation processing on the received design pattern according to the distortion and deformation data of the intelligent layer; and then synthesize it with the image pre-synthesized by the non-intelligent layer according to the mixing mode information to generate a product rendering.
[0133] In this embodiment, the system can automatically parse the PSD file and extract the necessary layer information, and then automatically complete the distortion and deformation of the design pattern and the generation of renderings through the synthesis module, avoiding the high cost and complexity of traditional 3D modeling, thereby reducing production costs. In addition, by accurately parsing the intelligent layer information of the PSD file (such as blending mode and distortion data), the system can generate high-precision renderings that are more coordinated with the product design, improving the visual effect and user experience. The system's automation and intelligent processing reduces dependence on professional technicians and reduces overall operating costs, especially for small and medium-sized e-commerce sellers, with a high cost-effectiveness.
[0134] Embodiment 3:
[0135] Based on the same inventive concept, the present invention also provides a computer device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0136] Memory, used to store computer programs;
[0137] The processor, when used to execute the program stored in the memory, can implement a method for synthesizing pictures applied to e-commerce as described in any one of Embodiment 1. The electronic device may include: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus. The processor may call the logic instructions in the memory to execute a method for synthesizing pictures applied to e-commerce, the method comprising:
[0138] S10, obtaining a template for making a product rendering; the template for making a product rendering is a PSD file; the PSD file includes a design area of a smart layer;
[0139] S20, parsing the PSD file to obtain the pre-synthesized image of the non-intelligent layer, the blending mode information of the intelligent layer, and the distortion and deformation data of the intelligent layer;
[0140] S30, performing distortion and deformation processing on the received design pattern according to the distortion and deformation data of the intelligent layer; and then synthesizing the image pre-synthesized with the non-intelligent layer according to the mixing mode information to generate a product rendering.
[0141] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0142] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0143] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for image synthesis applied to e-commerce, It is characterized in that The following steps are involved: S10, obtaining a template for making a product rendering; the template for making a product rendering is a PSD file; The PSD file contains the design area of the smart layer; S20, parsing the PSD file to obtain the pre-synthesized image of the non-intelligent layer, the blending mode information of the intelligent layer, and the distortion and deformation data of the intelligent layer; S30, performing distortion and deformation processing on the received design pattern according to the distortion and deformation data of the intelligent layer; Then, the image pre-synthesized with the non-intelligent layer is synthesized according to the blending mode information to generate a product rendering.
2. According to claim 1, a method for synthesizing pictures applied to e-commerce, It is characterized in that The process of making the PSD file in step S10 includes: (1) Use the clean version of the product scene image as the background image, set the background image to a normal layer, and beautify it according to your own needs; (2) Select the rectangle tool, draw a rectangle, and set its position and size as the area where the user can edit the design pattern; (3) Selecting the rectangle and setting it as a smart layer; and distorting the rectangle according to the wrinkles and deformation of the background product; (4) Set the blending mode to obtain the product rendering template of the PSD file.
3. According to claim 2, a method for synthesizing pictures applied to e-commerce, It is characterized in that The step S20 comprises: S201, parsing the PSD file to obtain basic information of the template for making product renderings, including: background image size information of a common layer, design area size information of a smart layer, and translation information and rotation information of the design area relative to the background image; S202, obtaining the number of rows and columns of the distorted mesh vertices stored in the PSD file, and calculating a set of all vertex coordinates of the distorted mesh before deformation; S203: Obtain the mixed mode information of the design area and the background image.
4. According to claim 3, a method for synthesizing pictures applied to e-commerce, It is characterized in that The step S202 includes: Obtain the number of rows R and columns C of the distorted mesh vertices stored in the PSD file; If there is no split deformation, obtain the coordinate information set p'(x, y) of all vertices of the distorted mesh stored in the PSD after the distortion deformation: Among them, x' c is the horizontal coordinate of the vertex after distortion in the cth column, c∈[1,C]; y' r is the ordinate of the vertex in the rth row after distortion, r∈[1,R]; If there is a split deformation, obtain the coordinate information set p'(xz, y) of all vertices of the distorted mesh after the deformation and the coordinate information set p(xz, y) of the slice vertices before the deformation of the distorted mesh stored in the PSD. s ,y s ); In the formula, x s_x is the horizontal coordinate of the slice vertex before distortion in the s_xth column; s_x∈[1,M c ],M c is the number of slice vertex columns; y s_y is the vertical coordinate of the slice vertex before distortion in the s_yth row; s_y∈[1,M r ],M r The number of slice vertex rows; the slice vertex is the key vertex that produces a difference in the distorted mesh distance. One slice vertex information is stored every two equidistant mesh points. The coordinate set p(x,y) of all vertices of the distorted mesh before deformation is calculated as follows: Wherein, X, Y are the horizontal displacement and vertical displacement of the design area relative to the background image, respectively; W, H are the width and length of the design area, respectively; s_c, s_r are the column index and row index of the slice vertex after distortion, respectively.
5. According to claim 4, a method for synthesizing pictures applied to e-commerce, It is characterized in that The step S30 comprises: S301, adjusting the size of the received design pattern I to be consistent with the size of the intelligent layer design area, obtaining the pattern Right now: In the formula, is the horizontal axis position, is the ordinate position, After resizing pattern I to W×H, the resulting pattern exist Pixel information at the location; S302: Adjust the pattern Do translation and rotation to get the pattern In the formula, The original coordinates The new coordinate position after translation and rotation; θ is the rotation angle of the design area relative to the background image; S303, according to the coordinate information set p(x, y) of all vertices before deformation and the coordinate information set p'(x, y) of all vertices after deformation of the distorted mesh, To distort an image: In the formula, The Catmull-Rom algorithm is used, and Ξ is the relevant parameter; S304, the distorted design area and the background image area C to be mixed b To mix, the process is as follows: The calculated C new The area C to be mixed corresponding to the original background image b , get the product renderings.
6. An image synthesis system for e-commerce, It is characterized in that include: A PSD file acquisition module is used to acquire a template for making a product rendering; the template for making a product rendering is a PSD file; The PSD file contains the design area of the smart layer; A PSD file parsing module is used to parse the PSD file to obtain the pre-synthesized image of the non-intelligent layer, the blending mode information of the intelligent layer, and the distortion and deformation data of the intelligent layer; A synthesis module, used for performing distortion and deformation processing on the received design pattern according to the distortion and deformation data of the intelligent layer; Then, the image pre-synthesized with the non-intelligent layer is synthesized according to the blending mode information to generate a product rendering.
7. A computer device, It is characterized in that It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; Memory, used to store computer programs; The processor, when used to execute the program stored in the memory, can implement a picture synthesis method applied to e-commerce as described in any one of claims 1-5.
8. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by the processor, the processor executes a picture synthesis method applied to e-commerce according to any one of claims 1 to 5.
