A method and system for automatically matching a scene according to product information
By combining deep convolutional neural networks and CycleGAN models, the universality problem of product image recognition and scene matching in existing technologies is solved, achieving efficient automatic matching and style coordination between product images and scene images, which is applicable to multiple types of sales platforms.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-17
- Publication Date
- 2026-03-31
AI Technical Summary
Existing technologies cannot identify image information of non-home furnishing products, and the matching model has poor scalability, resulting in a limited range of applicability and insufficient universality of the products across various sales platforms.
A deep convolutional neural network model is used to extract product image features. Combined with a scene generation model and a CycleGAN model, product image style transfer and scene image matching are achieved. The scene category is predicted by a classifier and the CycleGAN model is used for image style transfer. Finally, the image is synthesized in the scene synthesis model.
It achieves efficient recognition and automatic scene matching of all product images, improving universality and scalability, making the combination of product images and scene images harmonious and natural, and applicable to major online sales platforms.
Smart Images

Figure CN120707701B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer data processing. More specifically, this invention relates to a method and system for automatically matching scenarios based on product information. Background Technology
[0002] Product images refer to visual materials used to showcase, promote, and sell specific goods (products). They are core visual elements in e-commerce, retail, and advertising used to convey product information, attract consumers, and promote transactions. After uploading products to an online sales platform, merchants need to configure a background image that matches the product's attributes to enhance its promotional effect. This configuration process usually requires manual operation by merchants, which is inefficient.
[0003] To overcome the aforementioned problems, Chinese patent application CN114418665A discloses a method, device, equipment, and medium for virtual display of online store products in a home setting. This technology can automatically configure application scene images for home furnishing products uploaded by merchants, enabling a realistic display of online store products in actual home environments and reducing negative shopping experiences caused by product mismatch with the home environment. While this method improves the efficiency of scene image configuration for home furnishing products, it has the following drawbacks:
[0004] (1) It cannot recognize product image information other than home furnishing products. It is only applicable to the scene adaptation of home furnishing products. In multi-type product sales platforms, its application scope is too small and its universality is poor.
[0005] (2) The matching model used is a black box model, which is not conducive to expanding the scene image matching function of new products. Summary of the Invention
[0006] To address the aforementioned technical problems of poor universality and limited scalability, this invention provides a method and system for automatically matching scenarios based on product information.
[0007] In a first aspect, the present invention discloses a method for automatically matching scenarios based on product information, comprising:
[0008] In response to the user inputting a product image into a preset deep convolutional neural network model, the image features of the product image are extracted;
[0009] Image features are input into a preset scene generation model for scene matching to obtain a scene image that matches the product image, and the image style of the product image is converted according to the image style of the scene image.
[0010] The product image and scene image after image style conversion are input into a preset scene compositing model for image compositing to obtain the display image.
[0011] Beneficial Effects: After the user inputs a product image, a deep convolutional neural network model extracts key image features that facilitate category differentiation. These features are then input into a scene generation model for scene matching to obtain the corresponding scene image. The product image style is then converted. Finally, relying on a scene synthesis model, the style-converted product image and scene image are fused, achieving a fast and efficient display image. Compared to existing technologies, this invention, relying on a deep convolutional neural network model and a scene generation model, can identify almost all product image types (including new products) and automatically adapts and fuses them with corresponding scene images based on the product image type, exhibiting high universality and scalability.
[0012] Preferably, the scene generation model includes a classifier and a CycleGAN model; image features are input into the preset scene generation model for scene matching to obtain a scene image that matches the product image, and the image style of the product image is converted according to the image style of the scene image, specifically:
[0013] Image features are input into a classifier to predict the scene category of a product image, and a scene image library corresponding to the scene category is generated based on the scene category.
[0014] Extract scene images from the scene image library;
[0015] The CycleGAN model is used to perform adversarial loss calculations on the scene image and the product image until the image style of the product image is converted to match that of the scene image. Figure 1 To.
[0016] Beneficial effects: The classifier is used to output the predicted scene category based on image features. The CycleGAN model is an unsupervised learning model used to perform style transfer of product images between two image domains. Compared with existing technologies, the method of this invention uses a classifier to predict the scene image corresponding to the product image to adapt to scene matching of different types of product images, and then uses the CycleGAN model to transfer the image style of the product image to a scene of the same category. Figure 1 This ensures that the scene images and product images are paired harmoniously and naturally.
[0017] Preferably, the classifier expression is:
[0018] scene_class=argmax(W·feature_vector+b)
[0019] In the formula, scene_class represents the scene category, W represents the weight matrix of the classifier, feature_vector represents the feature vector of the image features, b represents the bias term, and arg max represents the maximum value index function.
[0020] Preferably, the adversarial loss expression for the CycleGAN model is:
[0021]
[0022] In the formula, L GAN This represents the loss function of a GAN, used to calculate the adversarial effect between the generator and the discriminator; G represents the generator, used to transform the source domain image into the target domain image; D Y X represents the discriminator, used to determine whether the target domain image is real or generated; X represents image features, and Y represents the scene graph. Let y represent the expected value calculation function, p. data (y) represents the image y sampled from the real data distribution of the target domain, x ~ p data (x) represents the image x sampled from the true data distribution of the source domain, log represents the logarithmic function, and D Y (y) represents the discriminator's output on image y, D Y (G(x)) represents the discriminator's output image G(x) to the generator.
[0023] Beneficial effects: The method of this invention designs a CycleGAN model with two generators and two discriminators. This model can achieve image style transformation of product images and generation of product images after image style transformation through adversarial training and cycle consistency constraints.
[0024] Preferably, the generator's output image expression is:
[0025] G(x) = Decoder(Encoder(x))
[0026] In the formula, G(x) represents the output image obtained by the generator after transforming image x, Encoder represents the encoder, and Decoder represents the decoder.
[0027] Preferably, the scene compositing model includes a foreground segmentation unit, an image fusion unit, a lighting adjustment unit, and a post-processing unit; the product image and scene image after image style conversion are input into the preset scene compositing model for image compositing to obtain the display image, specifically:
[0028] The product image after image style conversion is input into the foreground segmentation unit for image segmentation, and the foreground mask of the product image is extracted;
[0029] The foreground mask and the product image after image style conversion are input into the image fusion unit for image overlay to obtain the fused image;
[0030] The fused image is input into the lighting and shadow adjustment unit for foreground brightness adjustment to obtain the adjusted image;
[0031] The adjusted image is input into the post-processing unit for smoothing adjustments to obtain the display image.
[0032] Beneficial effects: The above method can achieve the fusion of foreground and background images, and achieve the coordination and unity of light and shadow relationship between the foreground and background, thereby improving the realism of the illustrations of this invention.
[0033] Preferably, the product image after image style conversion is input into the foreground segmentation unit for image segmentation, and the calculation expression for extracting the foreground mask of the product image is:
[0034] M(i,j)=σ(Decoder(Encoder(I)))
[0035] In the formula, M(i,j) represents the foreground mask with coordinates (i,j) in the product image I, Encoder represents the U-Net encoder, Decoder represents the U-Net decoder, and σ represents the Sigmoid activation function.
[0036] Preferably, the calculation expression for inputting the foreground mask and the image style-transformed product image into the image fusion unit for image overlay is as follows:
[0037] I blend (i,j)=α(i,j)·I fg (i,j)+(1-α(i,j))·I bg (i,j)
[0038] In the formula, I blend (i, j) represents the pixel value of the fused image at coordinates (i, j), I fg Represents the foreground image, I bg This represents the background image, and α represents the transparency.
[0039] Preferably, the calculation expression for adjusting the foreground brightness in the input lighting and shadow adjustment unit of the fused image is as follows:
[0040]
[0041] In the formula, I′ fg (i, j) represents the pixel value of the foreground image at coordinates (i, j) after brightness adjustment. fg (i, j) represents the pixel value of the original foreground image at coordinates (i, j), L bg (i, j) represents the illumination intensity of the background image at coordinates (i, j), L avg This represents the average illumination intensity of the background image.
[0042] Secondly, the present invention also provides a system for automatically matching scenarios based on product information, including a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the method for automatically matching scenarios based on product information as described in the first aspect is implemented.
[0043] The beneficial effects of this invention are as follows:
[0044] (1) Compared with the prior art, the method of the present invention can identify almost all types of product images (including new products) and automatically adapt the corresponding scene image for fusion according to the type of product image, which has high universality and scalability.
[0045] (2) Compared with the prior art, the method of the present invention uses a classifier to predict the scene image corresponding to the product image in order to adapt to scene matching of different types of product images, and then uses the CycleGAN model to transfer the image style of the product image to the scene of the same category. Figure 1 This ensures that the scene images and product images are paired harmoniously and naturally.
[0046] (3) Compared with the prior art, the method of the present invention designs a CycleGAN model, which can realize the image style transformation of the product image and the generation of the product image after the image style transformation through adversarial training and cycle consistency constraints. Attached Figure Description
[0047] Figure 1 This is a flowchart of the method for automatically matching scenarios based on product information in Embodiment 1 of the present invention;
[0048] Figure 2 This is a schematic diagram of the system for automatically matching scenarios based on product information in Embodiment 2 of the present invention. Detailed Implementation
[0049] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments.
[0050] This embodiment discloses a method and system for automatically matching scenarios based on product information, which addresses the technical problems of poor universality and weak scalability. The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0051] Example 1
[0052] like Figure 1 As shown, this embodiment discloses a method for automatically matching scenarios based on product information, including:
[0053] S10: In response to the user inputting a product image into a preset deep convolutional neural network model, extract the image features of the product image.
[0054] In this embodiment, when a user (merchant) uploads a product image via a computer system or API, step S10 is triggered, automatically employing a deep convolutional neural network model to extract image features from the product image. The input product image format can be JPEG or PNG, and the computer system will automatically adjust the image to a uniform resolution (e.g., 224x224 pixels) to adapt to subsequent model input. The product image type can be any of clothing, furniture, electronic products, cosmetics, or food.
[0055] S20: Input the image features into the preset scene generation model for scene matching to obtain a scene image that matches the product image, and convert the image style of the product image according to the image style of the scene image.
[0056] In this embodiment, the scene generation model is an AI model that can select and optimize the matching background scene from a preset scene image library, and realize the style conversion of the product image (such as lighting, tone or filter, etc.), so that the product image and the scene image can be style aligned.
[0057] S30: Input the product image and scene image after image style conversion into the preset scene synthesis model for image synthesis to obtain the display image.
[0058] Through the above steps S10-S30, the method of the present invention relies on a deep convolutional neural network model and a scene generation model, which can identify all types of product images. After obtaining a scene image that matches the product image, the image style of the product is converted to align the image styles of the product image and the scene image. Then, the style-converted product image and the corresponding scene image are fused together, which has higher universality and scalability, and the output display image is more harmonious and natural.
[0059] Furthermore, in step S10 above, the deep convolutional neural network model uses the ResNet-50 model. ResNet-50 is a deep convolutional neural network containing 50 layers (convolutional layers, pooling layers, and fully connected layers). It addresses the gradient vanishing and degradation problems in deep network training by introducing residual connections. It can extract multi-level features from images, such as edges, textures, and shapes, and is suitable for recognizing information such as product type, color, and style.
[0060] Specifically, step S10 above includes:
[0061] S11: Scale the product image to a uniform resolution (224×2244) and normalize the pixels of the scaled product image;
[0062] S12: Use a 7×7 convolution kernel to extract low-level features from the normalized product image;
[0063] S13: Extract high-level features of the normalized product image through multiple residual blocks;
[0064] S14: Perform global average pooling on low-level and high-level features to compress them into a fixed-length feature vector.
[0065] S15: A fully connected layer is used to map the feature vectors and classification labels to obtain image features.
[0066] Furthermore, the expression for the convolutional layer of a deep convolutional neural network model is:
[0067]
[0068] In the formula, I represents the input image (product image), with dimensions H×W×C, where H is the height, W is the width, and C is the number of channels (e.g., C=3 for RGB images); K represents the convolution kernel, with dimensions M×N, used to extract image features; (i,j) represents the pixel position of the output feature map; m represents the row index of the convolution kernel, n represents the column index of the convolution kernel; M represents the height of the convolution kernel; and N represents the width of the convolution kernel.
[0069] Furthermore, the expression for the activation function of the aforementioned deep convolutional neural network model is as follows:
[0070] f(x) = max(0,x)
[0071] In the formula, f(x) represents the output of the ReLU activation function, with a value of x (if x>0) or 0 (if x≤0), x represents the input value, and max represents the maximum value function, which is used to introduce nonlinear calculations.
[0072] Furthermore, the expression for the residual block of the above deep convolutional neural network model is as follows:
[0073]
[0074] In the formula, This represents the residual function, which consists of multiple convolutional layers; θ represents the input feature; θ represents the output feature, W i This represents the weight parameter matrix.
[0075] If the input and output dimensions are different, adjust them using a 1×1 convolution. Given the dimension, the above algorithm can be transformed into:
[0076]
[0077] In the formula, W s This represents a dimension adjustment matrix, which is changed through a 1×1 convolution. The number of channels is matched to the output dimension of the transformation function F.
[0078] Furthermore, the pooling layer expression for the above deep convolutional neural network model is as follows:
[0079]
[0080] In the formula, P(i,j) represents the value of the feature map at position (i,j) after pooling; I represents the input feature map; R represents the pooling window region, which is used to define the local range of the pooling operation; m represents the horizontal coordinate of the relative position within the window, and n represents the vertical coordinate of the relative position within the window.
[0081] More specifically, the features extracted in steps S11-S15 above include type, color, size, and style. Assuming the product image is a "shirt," the product category is identified as "shirt" using a ResNet-50 classification layer; color histogram analysis is used to extract the dominant color tone (e.g., "white"); if the product image contains a reference object, U-Net segmentation is used and the size is estimated by calculating the proportions; if there is no reference object, user-provided metadata is relied upon. For style classification, a VGG-19 model can be used for classification, such as "formal" or "casual." The final image features output in step S15 above are structured feature data, output in JSON format, with an example code as follows:
[0082] {
[0083] "type":"shirt",
[0084] "color":"white",
[0085] "size":"Shoulder width 40cm",
[0086] "style":"formal"
[0087] }
[0088] Furthermore, the scene generation model in step S20 above includes a classifier and a CycleGAN model.
[0089] The classifier is used to predict the scene category based on image features. More specifically, the classifier's expression is:
[0090] scene_class=argmax(W·feature_vector+b)
[0091] In the formula, scene_class represents the scene category (e.g., "office"); W represents the weight matrix of the classifier, used to map the feature vector to the category score; feature_vector represents the feature vector of the image features, such as the 2048-dimensional vector extracted by ResNet-50; b represents the bias term, which is the offset that adjusts the classification score; arg max represents the maximum value index function, used to return the category with the highest score.
[0092] Furthermore, step S20 above specifically includes:
[0093] S21: Input image features into the classifier to predict the scene category of the product image, and generate a scene image library corresponding to the scene category.
[0094] S22: Extract scene graphs from the scene image library.
[0095] S23: Use the CycleGAN model to perform adversarial loss calculations on the scene image and the product image until the image style of the product image is converted to match that of the scene image. Figure 1 To.
[0096] Through the above technical solution, the method of the present invention uses a classifier to predict the scene image corresponding to the product image to adapt to scene matching of different types of product images, and then uses the CycleGAN model to transfer the image style of the product image to the scene of the same category. Figure 1 This ensures that the scene images and product images are paired harmoniously and naturally.
[0097] More specifically, the adversarial loss expression for the CycleGAN model described above is:
[0098]
[0099] In the formula, L GAN This represents the loss function of a GAN, used to calculate the adversarial effect between the generator and the discriminator; G represents the generator, used to transform the source domain image into the target domain image; D Y X represents the discriminator, used to determine whether the target domain image is real or generated; X represents image features, and Y represents the scene graph. Let y represent the expected value calculation function, p. data (y) represents the image y sampled from the real data distribution of the target domain, x ~ p data (x) represents the image x sampled from the true data distribution of the source domain, log represents the logarithmic function, and D Y (y) represents the discriminator's output on image y, D Y (G(x)) represents the discriminator's output image G(x) to the generator. Where, if D Y If (y) is close to 1, then it is judged as true. If DY If (G(x)) is close to 0, it is considered false.
[0100] It should be explained that the adversarial loss operation is the process by which the generator G attempts to deceive the discriminator, so as to encourage the two to continuously optimize and compete with each other during the training process, ultimately enabling the generator to generate high-quality data that is difficult to distinguish from real data.
[0101] Furthermore, this invention designs a cycle consistency loss function based on the aforementioned generator G. This is a key component in models such as CycleGAN, and is mainly used for unsupervised or weakly supervised cross-domain image / data conversion tasks. Its core function is to constrain the conversion process and ensure that the conversion results maintain consistency in semantics and structure.
[0102] Where generator G and generator F are inverse mappings of each other, the expression for the cycle consistency loss function is:
[0103]
[0104] In the formula, Let G(x) represent the cycle consistency loss function, used to ensure that generator G and generator F are inverse mappings of each other; G represents the generator from the source domain to the target domain, and F represents the generator from the target domain to the source domain; x represents the source domain input image; y represents the ground truth input image; F(G(x)) represents the result of converting x to y and then back to x; G(F(y)) represents the result of converting y to x and then back to y; ||·||1 represents the L1 norm, used to calculate the sum of the absolute values between two images; This represents the function for calculating the expected value.
[0105] To balance the generative power of the generator with the discriminative power of the discriminator, and to constrain the realism, semantic consistency, and diversity of the generated results, the total loss function of the CycleGAN model above is defined as:
[0106]
[0107] In the formula, L(G, F, D) X D Y ) represents the total loss function. Represents the generator G and the discriminator D Y Adversarial loss function Represents the generator F and the source domain discriminator D. X The adversarial loss function (used to determine the authenticity of source domain images), where λ represents the weight hyperparameters (used to balance adversarial loss and recurrent loss). Let G represent the cycle consistency loss function for generators G and F.
[0108] Furthermore, the output image expression of the generator G is as follows:
[0109] G(x) = Decoder(Encoder(x))
[0110] In the formula, G(x) represents the output image obtained by the generator after transforming the source domain input image X, Encoder represents the encoder, and Decoder represents the decoder.
[0111] Through the design of the CycleGAN model described above, this invention is able to achieve image style conversion of product images and generation of product images after image style conversion through adversarial training and cycle consistency constraints.
[0112] Furthermore, the scene synthesis model in step S30 above includes a foreground segmentation unit, an image fusion unit, a lighting adjustment unit, and a post-processing unit. Step S30 specifically includes:
[0113] S31: Input the product image after image style conversion into the foreground segmentation unit for image segmentation and extract the foreground mask of the product image.
[0114] S32: Input the foreground mask and the product image after image style conversion into the image fusion unit for image overlay to obtain the fused image.
[0115] S33: Input the fused image into the lighting adjustment unit to adjust the foreground brightness and obtain the adjusted image.
[0116] S34: The adjusted image is input into the post-processing unit for smoothing adjustment to obtain the display image.
[0117] Specifically, the calculation expression for step S31 above is:
[0118] M(i,j)=o(Decoder(Encoder(I)))
[0119] In the formula, M(i,j) represents the foreground mask with coordinates (i,j) in the product image I, Encoder represents the U-Net encoder, Decoder represents the U-Net decoder, and σ represents the Sigmoid activation function.
[0120] Specifically, the calculation expression for step S32 above is:
[0121] I blend (i,j)=α(i,j)·I fg (i,j)+(1-α(i,j))·I bg (i,j)
[0122] In the formula, I blend(i, j) represents the pixel value of the fused image at coordinates (i, j), I fg Represents the foreground image, I bg This represents the background image, and α represents the transparency.
[0123] It should be noted that the transparency α is usually determined by the foreground mask mentioned above, but it can also be preset according to the actual situation.
[0124] Specifically, the calculation expression for step S33 above is:
[0125]
[0126] In the formula, I′ fg (i, j) represents the pixel value of the foreground image at coordinates (i, j) after brightness adjustment. fg (i, j) represents the pixel value of the original foreground image at coordinates (i, j), L bg (i, j) represents the illumination intensity of the background image at coordinates (i, j), L avg This represents the average illumination intensity of the background image.
[0127] Through the above steps S31-S34, the method of the present invention optimizes and adjusts the light and shadow relationship between the foreground and background before generating the display image, making the overall light and shadow and perspective relationship of the display image more realistic, and overcoming the problem of unnatural and uncoordinated traditional AI images.
[0128] For example, the following is a data conversion table for different types of product images according to the method of the present invention:
[0129]
[0130]
[0131] Compared to existing technologies, the method of this invention can identify almost all types of product images (including new products) and automatically adapt and merge them with corresponding scene images according to the type of product image. It has higher universality and scalability and can be applied to major online sales platforms.
[0132] Example 2
[0133] like Figure 2 As shown, based on Embodiment 1, this embodiment discloses an automatic scene matching system based on product information. This system, as a computer system for the method described in Embodiment 1, includes a processor and a memory. The memory stores computer program instructions. When the computer program instructions are executed by the processor, the method for automatically matching scenes based on product information described in Embodiment 1 is implemented.
[0134] While various embodiments of the invention have been shown and described in this specification, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Many modifications, alterations, and alternatives will occur to those skilled in the art without departing from the spirit and essence of the invention.
Claims
1. A method for automatically matching a scene from product information, characterized in that, The method comprises the following steps: in response to a user inputting a product image into a preset deep convolutional neural network model, extracting image features of the product image; inputting the image features into a preset scene generation model for scene matching to obtain a scene image matched with the product image, and converting the image style of the product image according to the image style of the scene image; inputting the product image after image style conversion and the scene image into a preset scene synthesis model for image synthesis to obtain a display image. The scene generation model comprises a classifier and a CycleGAN model; inputting the image features into the preset scene generation model for scene matching to obtain a scene image matched with the product image, and converting the image style of the product image according to the image style of the scene image, specifically: inputting the image features into the classifier to predict the scene category of the product image, and generating a scene image library of the corresponding category based on the scene category; extracting a scene image from the scene image library; using the CycleGAN model to perform adversarial loss operation on the scene image and the product image until the image style of the product image is converted to be consistent with the scene image.
2. The method of claim 1, wherein, The expression of the classifier is: wherein, denotes a scene category, denotes a weight matrix of the classifier, denotes a feature vector of the image features, denotes a bias term, denotes a max index function.
3. The method of claim 1, wherein, The adversarial loss expression of the CycleGAN model is: In the formula, represents a loss function of GAN, used to calculate the adversarial effect of the generator and the discriminator; represents a generator, used to convert a source domain image into a target domain image; represents a discriminator, used to judge whether a target domain image is real or generated; represents the image features, represents a scene graph, represents an expected value calculation function, represents an image sampled from a target domain real data distribution , represents an image sampled from a source domain real data distribution , represents a logarithmic function, represents the output of the discriminator to the image , represents the output of the discriminator to the output image of the generator .
4. The method of claim 3, wherein, The output image expression of the generator is: In the formula, denotes an output image obtained by the generator converting the image denotes an output image obtained by the generator converting the image denotes an encoder, denotes a decoder.
5. The method of claim 1, wherein, The scene synthesis model comprises a foreground segmentation unit, an image fusion unit, a light and shadow adjustment unit, and a post-processing unit; inputting the product image after image style conversion and the scene image into the preset scene synthesis model for image synthesis to obtain a display image, specifically: inputting the product image after image style conversion into the foreground segmentation unit for image segmentation to extract a foreground mask of the product image; inputting the foreground mask and the product image after image style conversion into the image fusion unit for image superposition to obtain a fusion image; inputting the fusion image into the light and shadow adjustment unit for foreground brightness adjustment to obtain an adjustment image; inputting the adjustment image into the post-processing unit for smoothing adjustment to obtain a display image.
6. The method of claim 5, wherein, The calculation expression for inputting the product image after image style conversion into the foreground segmentation unit for image segmentation to extract a foreground mask of the product image is: wherein indicates a foreground mask with coordinates in a product image , indicates an encoder of the U-Net, indicates a decoder of the U-Net, indicates a Sigmoid activation function.
7. The method of claim 5, wherein, The calculation expression for inputting the foreground mask and the product image after image style conversion into the image fusion unit for image superposition is: wherein represents a pixel value of the fused image at coordinates represents a pixel value of the fused image at coordinates represents the foreground image, represents the background image, represents the transparency.
8. The method of claim 5, wherein, The calculation expression for inputting the fusion image into the light and shadow adjustment unit for foreground brightness adjustment is: wherein, represents a pixel value of the luminance-adjusted foreground image at coordinates , represents a pixel value of the original foreground image at coordinates , represents an illumination intensity of the background image at coordinates , represents an average illumination intensity of the background image.
9. A system for automatically matching scenarios based on product information, characterized in that, The method comprises a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the method for automatically matching a scene according to product information in any one of claims 1-8 is realized.
Citation Information
Patent Citations
Virtual display method and device for shopping mall products in home scene, equipment and medium
CN114418665A
Method and device for automatically replacing background of commodity photo
CN116862943A