Image processing system
Patent Information
- Application Number
- CN202610194545.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-11
- Publication Date
- 2026-08-21
- Estimated Expiration
- 2046-02-11
AI Technical Summary
[0002]随着线上销售方式的普及,商品销售方通过录播或直播的方式在不同平台向观众提供拟销售商品的销售视频已成为目前主要销售方式,但是,当商品销售方需要销售不同商品时,则对应需要拍摄手持不同商品的图像作为素材,随着商品品类的繁多,逐一对商品进行拍摄无疑会影响用户体验;
[0019] The image processing system provided by the embodiments of this application includes an image segmentation module and an image fusion module. The image segmentation module is configured to segment the acquired first product image to obtain an image mask. The image fusion module is configured to perform image fusion based on a second product image, the image mask, and the first product image to obtain a target product image, thereby improving the quality of image fusion, increasing image generation efficiency, and enhancing the flexibility of application scenarios.
Smart Images

Figure CN121685570B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing, and more particularly to an image processing system. Background Technology
[0002] With the popularization of online sales, it has become the main sales method for sellers to provide sales videos of the products to be sold to the audience on different platforms through pre-recorded or live broadcasts. However, when sellers need to sell different products, they need to shoot images of holding different products as material. With the wide variety of product categories, shooting each product one by one will undoubtedly affect the user experience.
[0003] With the development of technology, the rise of image processing technology has made it feasible to automatically generate target product images. For example, in e-commerce displays and virtual try-on scenarios, it is often necessary to merge multiple product images to generate a target display image. The core of this process is to accurately segment the product area in the first product image to obtain an image mask and avoid background interference during fusion. However, in traditional solutions, manual labeling of product areas is inefficient, and simple segmentation methods lack precision and are difficult to handle scenarios where the product and background are similar and have complex outlines. Fusion without precise mask constraints is prone to abrupt transitions and feature interference, which cannot meet the requirements of image realism for display. Therefore, it is urgent to achieve automatic and accurate segmentation of product areas to support efficient and reliable image fusion. Summary of the Invention
[0004] This application provides an image processing system that can improve the quality of image fusion, increase image generation efficiency, and enhance the flexibility of application scenarios.
[0005] In one embodiment of this application, an image processing system is provided, the system comprising: an image segmentation module and an image fusion module; the image segmentation module is configured to segment an acquired first product image to obtain an image mask; wherein the first product image includes a preset person and a first product, and the hand of the preset person and the first product at least partially overlap; the image fusion module is configured to perform image fusion based on a second product image, the image mask, and the first product image to obtain a target product image; wherein the second product image includes a second product, and the target product image includes the preset person and the second product, and the hand of the preset person and the second product at least partially overlap.
[0006] In another possible implementation, the image segmentation module includes:
[0007] A key point extraction unit is configured to extract key points based on a preset person in the first product image to obtain key points of the preset person's hand; a first image segmentation unit is configured to perform image segmentation on the first product image to obtain a first image mask containing the product and the preset person's hand; wherein, in the first image mask, the first product and the preset person's hand at least partially overlap; a second image segmentation unit is configured to perform secondary image segmentation on the first product image based on product hints, the preset person's hand key points, and the first image mask to obtain a second image mask; wherein, the product hints are used to characterize the reference type of the first product, and the second image mask is used to characterize the product mask obtained by completing the partially overlapping area according to the product hints; a mask fusion unit is configured to perform mask fusion on the first image mask and the second image mask to obtain the image mask.
[0008] In another possible implementation, the mask fusion unit is configured as follows: a state recognition subunit is configured to perform state recognition on the hand of the preset person in the first image mask to obtain the hand state; a region division subunit is configured to divide the first image mask into regions according to the hand state to obtain multiple hand regions; the hand regions include occlusion edge regions, occlusion inner regions, pressing edge regions and / or pressing inner regions; and a mask fusion subunit is configured to perform mask fusion on the first image mask and the second image mask based on the multiple hand regions and the partially overlapping regions to obtain the image mask.
[0009] In another possible implementation, the state recognition subunit is configured to: detect the edge distance between the hand of the preset person in the first image mask and the edge of the product; if the edge distance is greater than or equal to a preset threshold, determine that the hand is in an occluded state; and / or, if the edge distance is less than the preset threshold, determine that the hand is in a pressing state.
[0010] In another possible implementation, the region division subunit is configured to: for a hand in an occluded state, use the outer contour of the hand as an occluded edge region and the inside of the outer contour of the hand as an occluded inner region; or, for a hand in a pressing state, use the outer contour of the hand as a pressing edge region and the inside of the outer contour of the hand as a pressing inner region.
[0011] In another possible implementation, the image fusion module includes: an image adjustment unit configured to perform shape adjustment on the second product image based on hand key points and the image mask to obtain a deformed image; and a pixel fusion unit configured to perform image fusion based on the deformed image, the first product image, and the image mask to obtain the target product image.
[0012] In another possible implementation, the image adjustment unit includes: a control point extraction subunit configured to extract control points from the image mask based on the hand key points to obtain multiple target control points, and to extract control points from the second product image to obtain multiple source control points; wherein the target control points are used to characterize the outer contour of the first product, and the source control points are used to characterize the outer periphery of the second product image; and a pixel adjustment subunit configured to calculate pixel adjustment parameters based on the multiple target control points and the multiple source control points, and to perform morphological adjustment on the second product image based on the pixel adjustment parameters to obtain the deformed image.
[0013] In another possible implementation, the pixel adjustment subunit includes: a first pixel adjustment subunit configured to calculate a first adjustment parameter based on the target control point and the source control point, and to move the source control point in the second product image based on the first adjustment parameter to obtain an initial deformed image; and a second pixel adjustment subunit configured to calculate a second adjustment parameter and a second adjustment weight based on the distance between the source control point and other control points in the initial deformed image, and to move the source control point in the initial deformed image based on the second adjustment parameter and the second adjustment weight to obtain the deformed image.
[0014] In another possible implementation, the second pixel adjustment subunit is configured to: calculate a second adjustment parameter corresponding to each source control point of the pixel based on the distance between the pixel and each source control point in the initial deformed image, wherein the second adjustment parameter is used to characterize the deformation amplitude of the pixel corresponding to the source control points at different distances; calculate a second adjustment weight corresponding to each source control point of the pixel in the initial deformed image based on the second adjustment parameter, the coordinate values of the source control points, and the coordinate values of the target control point; wherein the second adjustment weight is used to characterize the constraint relationship of the pixel corresponding to the source control points at different distances; and move the source control points in the initial deformed image according to the second adjustment parameter and the second adjustment weight to obtain the deformed image.
[0015] In another possible implementation, the pixel fusion unit includes: an edge fusion subunit configured to perform image edge fusion with the deformed image and the first product image according to the image mask to obtain a first fused image; an illumination fusion subunit configured to perform image background fusion based on the first fused image and the background area of the person in the first product image excluding the first product to obtain a second fused image; and a shadow fusion subunit configured to perform image background fusion based on the second fused image and the background area of the first product image excluding the first product and the preset person to obtain the target product image.
[0016] In another possible implementation, the edge blending subunit is configured to: determine each region to be blended contained in the image mask; each region to be blended includes an occluded edge region, an occluded inner region, a pressed edge region, a pressed inner region, and / or a partially overlapping region; perform image edge blending on the deformed image and the first product image according to the blending strategy corresponding to each region marker to obtain the first blended image; wherein the blending strategy includes: performing edge protection processing on the occluded edge region, performing transparency processing on the pressed edge region, performing pixel retention processing on the occluded inner region and the pressed inner region, and performing pixel replacement processing on the partially overlapping region.
[0017] In another possible implementation, the illumination fusion subunit includes: performing image background fusion based on the first fused image and the background area of the person in the first product image excluding the first product, to obtain a second fused image.
[0018] In another possible implementation, the shadow blending subunit includes: performing image background blending based on the background areas of the second blended image and the first product image, excluding the first product and the preset person, to obtain the target product image.
[0019] The image processing system provided by the embodiments of this application includes an image segmentation module and an image fusion module. The image segmentation module is configured to segment the acquired first product image to obtain an image mask. The image fusion module is configured to perform image fusion based on a second product image, the image mask, and the first product image to obtain a target product image, thereby improving the quality of image fusion, increasing image generation efficiency, and enhancing the flexibility of application scenarios. Attached Figure Description
[0020] Figure 1 This is a schematic diagram of an image processing system provided in an embodiment of this application.
[0021] Figure 2 This is a schematic diagram of an image segmentation module provided in an embodiment of this application.
[0022] Figure 3 This is a schematic diagram of an image fusion module provided in an embodiment of this application.
[0023] Figure 4 This is a schematic diagram of an image adjustment unit provided in an embodiment of this application.
[0024] Figure 5 This is a schematic diagram of a pixel adjustment subunit provided in an embodiment of this application.
[0025] Figure 6 This is a schematic diagram of a pixel fusion unit provided in an embodiment of this application. Detailed Implementation
[0026] The technical solutions of the embodiments of this application will now be described with reference to the accompanying drawings. To facilitate a clear description of the technical solutions of the embodiments of this application, the use of terms such as "first," "second," etc., in the embodiments of this application is merely for illustration and to distinguish the objects being described. There is no particular order between them, nor does it indicate a specific limitation on the number of devices in the embodiments of this application, and they cannot constitute any limitation on the embodiments of this application.
[0027] To address the issues of unnatural transitions between products and people, low segmentation accuracy, and poor scene adaptability in image fusion, this application provides an image processing system comprising an image segmentation module and an image fusion module. The image segmentation module is configured to segment an acquired first product image to obtain an image mask. The image fusion module is configured to perform image fusion based on a second product image, the image mask, and the first product image to obtain a target product image. By obtaining an accurate image mask through image segmentation and combining the image mask constraints, a natural fusion of products and people is achieved. This solves the problems of unnatural transitions between products and people, low segmentation accuracy, and poor scene adaptability in image fusion, achieving the technical effects of improving the quality of fused images, increasing generation efficiency, and enhancing scene flexibility.
[0028] Based on the above problems, this application provides the following implementation method.
[0029] Figure 1 This is a schematic diagram of an image processing system provided in an embodiment of this application. The system includes an image segmentation module 10 and an image fusion module 20.
[0030] The image segmentation module 10 is configured to perform image segmentation on the acquired first product image to obtain an image mask.
[0031] For example, the first product image includes a first product and a preset person, wherein the preset person may be holding the first product. The first product image can be obtained from a user terminal, for example, by obtaining a photo uploaded by the user and using it as the first product image, or by obtaining a sales video uploaded by the user and extracting any frame from the sales video as the first product image. The preset person can be a seller, a third party selling the product, or a virtual person (digital human). The first product image includes the preset person and the first product, and the preset person's hand and the first product at least partially overlap.
[0032] The first product can be a replacement product. By replacing the first product in the first product image with the second product, image utilization efficiency can be improved. When selling the second product, there is no need to repeatedly invest in shooting resources, thus reducing the cost for the seller. For example, the first product can be a mobile phone, and the second product can be a beverage. By replacing the mobile phone held by the preset person in the first product image with a beverage, the sale can be completed while reducing shooting costs.
[0033] It should be noted that all preset characters (including but not limited to real person portraits, virtual character images, digital human images, etc.) involved in this embodiment and the accompanying drawings have been authorized or permitted by the user.
[0034] For example, image segmentation refers to splitting an image into multiple non-overlapping, semantically independent sets of pixels according to its semantic categories (such as objects, backgrounds, region functions, etc.). In this embodiment, image segmentation can be performed using an image segmentation model. For instance, the prompt word and a first product image are input into the image segmentation model, which then segments the first product image based on the prompt word to obtain an image mask.
[0035] An image mask maps pixel-level classification results of an image, meaning each pixel uniquely corresponds to a label (such as background, product, hand, etc.), essentially assigning a classification label to each pixel in the image. An image mask can be a binary mask, which distinguishes only between the target and the background. Target pixels are labeled with 1 (or 255, white), and background pixels are labeled with 0 (black). For example, the target could be the first product and a preset person in a first product image. To segment out the first product and the preset person in the image, the white area in the mask represents the first product and the preset person, and the black area represents the background. In this embodiment, the image mask can be the image region corresponding to the first product.
[0036] The image fusion module 20 is configured to perform image fusion based on the second product image, the image mask, and the first product image to obtain the target product image.
[0037] For example, the second product image includes a second product, and the target product image includes a preset person and the second product, with the preset person's hand and the second product at least partially overlapping.
[0038] The second product image includes an image of a second product that will be used for display or sale. For example, an initial second product image may be obtained by pre-shooting the second product against a preset background (e.g., a green screen background or other natural background), and the background of the initial second product image may be removed to obtain a second product image of the second product.
[0039] For example, the first product to be replaced in the first product image corresponding to the image mask is replaced with the second product in the second product image, and edge, lighting and shadow fusion is performed to generate the target product image.
[0040] See Figure 2 It can be seen that, further, in some examples, the image segmentation module 10 includes: a key point extraction unit 101, a first image segmentation unit 102, a second image segmentation unit 103, and a mask fusion unit 104.
[0041] The key point extraction unit 101 is configured to extract key points based on a preset person in the first product image to obtain the key points of the preset person's hands.
[0042] The key points of a person's hand refer to the two-dimensional (2D) or three-dimensional (3D) coordinates of the bones, joints, and key parts of the hand obtained by extracting key points from the first product image using a model. These coordinates completely cover the core motion nodes of the palm and fingers, and are the basic data for reconstructing hand posture and judging gestures. For example, the key points of the hand can be obtained by performing key point recognition on the first product image using a gesture recognition model (such as MediaPipe Hands).
[0043] For example, key points of the hand may include: the base of the palm (wrist) numbered 0, which includes the center of the wrist joint; the thumbs numbered 1-4, which include the metacarpophalangeal joint, proximal interphalangeal joint, distal interphalangeal joint, and thumb tip; the index fingers numbered 5-8, which include the metacarpophalangeal joint, proximal interphalangeal joint, distal interphalangeal joint, and index finger tip; the middle fingers numbered 9-12, which include the metacarpophalangeal joint, proximal interphalangeal joint, distal interphalangeal joint, and middle finger tip; the ring fingers numbered 13-16, which include the metacarpophalangeal joint, proximal interphalangeal joint, distal interphalangeal joint, and ring finger tip; and the little fingers numbered 17-20, which include the metacarpophalangeal joint, proximal interphalangeal joint, distal interphalangeal joint, and little finger tip.
[0044] These hand key points can reconstruct hand postures. For example, by changing the coordinates of 21 points, it is possible to capture hand movements such as bending, extending, and rotating (e.g., clenching a fist, extending fingers, and wrist rotation) in real time, accurately reconstructing the hand's posture in space. In addition, it can support gesture recognition. For example, based on the relative position, distance, and angle relationship of hand key points, specific gestures can be defined (e.g., "OK gesture" corresponds to the thumb and index finger tips being close together and other fingers being extended; "thumbs up" corresponds to the thumb being extended and other fingers being bent). Alternatively, it can enable human-computer interaction: the coordinates of key points can be directly used as control signals and applied to gesture control scenarios (e.g., controlling screen scrolling by sliding fingers across key points, switching functions by clenching fists / extending fingers through key points). Furthermore, it can provide 3D information: some models (e.g., the 3D mode of MediaPipe Hands) can output the depth coordinates (Z-axis) of key points, which can distinguish the overlapping of hands and their distance, adapting to more complex spatial interaction scenarios (e.g., virtual button clicks, 3D modeling gesture control).
[0045] The first image segmentation unit 102 is configured to perform image segmentation on the first product image to obtain a first image mask containing the product and the hand of a preset person.
[0046] In this embodiment, image segmentation can be performed using a first product image segmentation model (e.g., U²-Net). For example, the first image mask may include the first product and the hand of a preset person. The hand is a whole region including the hand outline and the internal area of the hand. Since U²-Net performs saliency detection based on pre-training, it cannot effectively distinguish between the hand and the arm; therefore, the hands of the first product and the preset person are used together as the first image mask. For example, the first image mask contains at least a partially overlapping area between the hands of the first product and the preset person.
[0047] The second image segmentation unit 103 is configured to perform image segmentation on the first product image based on product prompts, preset key points of a person's hand, and a first image mask, to obtain a second image mask corresponding to the first product.
[0048] In this embodiment, the definition of the second image mask is the same as described above, and will not be repeated here. The second image mask includes removing the hand and other pixels that do not belong to the first product (e.g., other items that may accidentally appear in the frame when the digital human is holding the product for display) based on the first image mask.
[0049] For example, a product prompt refers to descriptive text about the first product, or it can be a reference image of the first product. The product prompt is used to determine the similarity of product regions. Specifically, the product prompt is encoded into a conditional vector using the FiLM mechanism to guide the image segmentation process. After the product prompt is input into the image segmentation model, the model can perform more accurate image segmentation of the first product in the first product image based on the product prompt, obtaining a second image mask corresponding to the first product.
[0050] For example, if the first item is a red coffee cup, the corresponding product description could be "red coffee cup" or a similar wording, or an image of the first item could be used as a reference image. Generally speaking, for items with simple shapes and patterns, text descriptions are preferred, while for items with complex shapes and patterns, reference images are preferred.
[0051] It should be noted that in this embodiment, the user can choose to input product prompts separately during the product replacement process, or the text description of the first product can be used as part of the image tag during the initial upload of the original display image, or a separate image of the first product can be uploaded as a reference image. In this way, the system can automatically obtain product prompts for the first product when the user selects the original display image. Similarly, during the subsequent generation of the target display image, the description of the second product can be used as part of the image tag, or the target product image of the second product can be directly used as a reference image. In this way, when replacing products based on the target display image (for example, replacing the second product with a third product), the system can automatically obtain product prompts for the second product.
[0052] In some examples, after performing image segmentation on the first product image using U²-Net to obtain the first image mask corresponding to the first product and the hand of the preset person, on the one hand, the first image mask may cause problems such as excessive computation and long response time because the range covered by the first image mask is too large. On the other hand, U²-Net can accurately identify the edge position of the hand and the product during image segmentation, but it cannot process the part of the product that is occluded by the hand. Therefore, based on the first image mask, a second image segmentation is performed using a second product image segmentation model to obtain a second image mask that corresponds only to the first product.
[0053] For example, the second product image segmentation model can be a cross-modal cue segmentation model (CLIPSegmentation, CLIPSeg), which performs image segmentation by inputting the first product image, product cue, hand key points and the first image mask into CLIPSeg to obtain the second image mask corresponding to the first product.
[0054] The second product image segmentation model locates the image within the region corresponding to the first image mask. Based on product prompts, it removes the hand and other pixels that do not belong to the first product (such as other items that may accidentally appear in the frame when the digital human is holding the product). At the same time, the second product image segmentation model can complete the parts of the hand that are obscured by the product prompts. Therefore, the cooperation between the first and second product image segmentation models can completely separate the first product from the preset person and accurately preserve the image mask of the preset person's hand, especially the edge shape.
[0055] If the second product image segmentation model is not used to perform secondary segmentation on the first product (i.e., segmentation only on the visible part of the first product), geometric discontinuity problems will occur between the first and second products during the subsequent image fusion process, such as missing or floating parts, misaligned patterns, and jagged edges. Therefore, the secondary segmentation operation of the second product image segmentation model is necessary.
[0056] The mask fusion unit 104 is configured to perform mask fusion on the first image mask and the second image mask to obtain an image mask.
[0057] For example, the image mask is a four-channel mask that uses different colors to mark different areas. For instance, red is used to mark the edge area of the hand occlusion of the preset person in the first image mask, yellow is used to mark the edge area of the hand pressing the preset person in the first image mask, the internal area of the hand occlusion of the preset person in the first image mask is not marked, and blue is used to mark the completion area of the first product in the second image mask. In this way, during subsequent image fusion, the image fusion can be performed according to the image fusion strategy corresponding to the different area markings.
[0058] In some examples, the mask fusion unit includes: a state recognition subunit configured to perform state recognition on the hand of a preset person in the first image mask to obtain the hand state; a region division subunit configured to divide the first image mask into regions according to the hand state to obtain multiple hand regions; the hand regions include occlusion edge regions, occlusion interior regions, pressing edge regions and / or pressing interior regions; and a mask fusion subunit configured to perform mask fusion on the first image mask and the second image mask based on the multiple hand regions and partially overlapping regions to obtain an image mask.
[0059] For example, the state recognition subunit is configured to: detect the distance between the hand of a preset person in the first image mask and the edge of the product; if the edge distance is greater than or equal to a preset threshold, determine that the hand is in an occluded state; and / or, if the edge distance is less than the preset threshold, determine that the hand is in a pressing state.
[0060] For example, the state recognition subunit can also be configured to: detect whether the hand of the preset person in the first image mask has epidermal diffusion characteristics; if so, determine that the hand is in an occluded state; if not, determine that the hand is in a pressing state; or, detect whether the hand of the preset person in the first image mask has squeezing characteristics; if so, determine that the hand is in a pressing state; if not, determine that the hand is in an occluded state.
[0061] For example, the state recognition subunit can also be configured to: calculate the pressure confidence of the hand of a preset person in the first image mask; determine that the hand is in an occluded state if the pressure confidence is less than the first pressure confidence; and determine that the hand is in a pressing state if the pressure confidence is greater than the second pressure confidence.
[0062] For example, the detection of the occlusion state and the pressing state can be directly completed by image detection.
[0063] For example, it detects whether the distance between the finger and the edge of the first product is greater than or equal to a preset value (usually 2 pixels). If so, it determines that the hand area is in an occluded state; otherwise, it determines that the hand area is in a pressed state.
[0064] For example, if the surface of the fingers shows signs of epidermal diffusion, the hand area is determined to be in an occluded state if it is present, and in a pressed state if it is absent. Alternatively, if white squeezing features are detected on the surface of the fingers, the hand area is in a pressed state, and vice versa.
[0065] For example, when calculating the pressure confidence level, a value greater than 0.7 indicates pressing, while a value less than 0.3 indicates occlusion.
[0066] It should be noted that the method of dividing the area can be combined according to actual needs. For example, first detect whether the distance between the finger and the edge of the first product is greater than or equal to a preset value, then calculate the pressure confidence. If both are satisfied, determine whether the hand area is an occlusion area or a pressing area. This embodiment does not limit this.
[0067] The region division sub-unit is configured to: for a hand in an occluded state, use the outer contour of the hand as the occlusion edge area and the inside of the outer contour of the hand as the occlusion inner area; or for a hand in a pressing state, use the outer contour of the hand as the pressing edge area and the inside of the outer contour of the hand as the pressing inner area.
[0068] In some examples, after obtaining the first image mask and the second image mask, it is necessary to fuse the first image mask and the second image mask to obtain a high-quality image mask corresponding to the product. However, if the mask is directly fused, boundary conflicts, ghosting, or even the disappearance of some areas will occur. The reason for the above problems is that the hand area in the first image mask and the area occluded by the hand in the second image mask are treated as the same type of area. Therefore, this embodiment performs mask fusion on the first image mask and the second image mask based on region marking, thus avoiding the above problems.
[0069] For example, region marking is used to mark different hand areas of a preset character. Because the hand can be in two states during contact with a product: occlusion and pressing. Occlusion occurs when the hand merely covers the product without actual contact, or with minimal contact force, preventing deformation of the contact area. Conversely, pressing occurs when the hand makes actual contact with the product, causing deformation. Therefore, by distinguishing different hand areas—including occlusion edge areas, occlusion inner areas, pressing edge areas, and pressing inner areas—image fusion can be performed according to the corresponding image fusion strategy during subsequent image fusion. It should be noted that for the hand in the occlusion state, the outer contour of the hand is the occlusion edge area, and the area inside the outer contour is the occlusion inner area; similarly, for the hand in the pressing state, the outer contour of the hand is the pressing edge area, and the area inside the outer contour is the pressing inner area.
[0070] In some examples, based on the region markers, a mask fusion is performed on the first image mask and the second image mask to obtain an image mask; a mask fusion is performed on the first image mask and the second image mask to obtain an image mask containing the first region marker, the second region marker, the third region marker, and the fourth region marker.
[0071] Different processing approaches are then adopted for the above four types of markings. For example, taking a coffee cup held with one hand as an example, assuming that the thumb and index finger do not fully contact the cup during the holding process, and only the middle, ring, and little fingers are used to hold the cup, the marking rules for the first and second image masks obtained according to the aforementioned method are as follows: In the first image mask, the edges of the thumb, index finger, and palm are the occlusion edge areas, marked in red; the edges of the middle, ring, and little fingers are the pressing edge areas, marked in yellow; the inside of each finger and the inside of the palm are the occlusion interior areas, which are not marked; in the second image mask, the edges of the completed coffee cup, along with its interior, are uniformly marked in blue.
[0072] Based on the processing of the different markers mentioned above, the first product mask obtained by fusion is a four-channel image mask (red, yellow, blue, and no marker).
[0073] The image segmentation system provided in this application includes a key point extraction module and an image segmentation module. The key point extraction module is configured to extract key points based on a preset person in an acquired product image to obtain the hand key points of the preset person. The image segmentation module is configured to perform image segmentation on the product image to obtain a first image mask; perform secondary image segmentation on the product image based on product prompts, the hand key points of the preset person, and the first image mask to obtain a second image mask; and perform mask fusion on the first image mask and the second image mask to obtain the image mask corresponding to the product in the product image, thereby achieving accurate segmentation of the product area and generating a high-quality image mask.
[0074] Following this, based on the generated image mask, the product in the product image can be replaced with other products, improving image utilization efficiency. When selling other products, there's no need to repeatedly invest in shooting resources, reducing the seller's sales costs. For example, the product could be a mobile phone, and other products could be beverages. By replacing the mobile phone held by a pre-set person in the product image with a beverage, the sale can be completed while reducing shooting costs.
[0075] See Figure 3 Furthermore, in some examples, the image fusion module 20 includes an image adjustment unit 201 and a pixel fusion unit 202.
[0076] The image adjustment unit 201 is configured to perform shape adjustment on the second product image based on hand key points and image mask to obtain a deformed image.
[0077] For example, morphological adjustment of the second product image refers to geometrically deforming the second product image to adapt it to the hand of a preset person. The deformed image includes an image of the second product that matches the hand-holding posture of the preset person.
[0078] Because the second product may differ significantly in size from the first product—for example, the first product is a mobile phone and the second product is a tablet—directly replacing the first product with the second would result in a mismatch between the replaced hand and the product due to the size difference, leading to issues such as the product appearing to float or the hand clipping through the image. Therefore, by morphologically adjusting the image of the second product, a deformed image is obtained that matches the hand's gripping posture of the preset character.
[0079] The pixel fusion unit 202 is configured to perform image fusion based on the deformed image, the first product image, and the image mask to obtain the target product image.
[0080] In some examples, the pixel fusion unit 202 is used to fuse a preset person in the first product image with the distorted image based on an image mask to obtain an image of the preset person holding a second product.
[0081] See Figure 4 It is understood that, further, in some examples, the image adjustment unit 201 includes a control point extraction subunit 201-1 and a pixel adjustment subunit 201-2.
[0082] The control point extraction subunit 201-1 is configured to extract control points from an image mask based on hand key points to obtain multiple target control points, and to extract control points from a second product image to obtain multiple source control points.
[0083] The target control points are used to characterize the outer contour of the first product, and the source control points are used to characterize the outer contour of the second product image.
[0084] For example, target control points can be obtained by extracting control points from an image mask based on hand key points using a first extraction model. The first extraction model can be a contour processing model. By inputting the hand key points and the image mask into the contour processing model for control point extraction, the target control points are obtained. The target control points can represent the contour of the first product. During the feature point extraction process of the contour processing model, by incorporating hand control points, the extracted target control points can conform to the contour of the first product.
[0085] The first extraction model may include a contour processing layer and a convex hull processing layer. The contour processing layer is used to extract the contour point sequence of the image mask corresponding to the first product. The input of the contour processing layer includes the image mask corresponding to the first product, and the output is the contour point sequence.
[0086] The processing steps for the contour processing layer are as follows:
[0087] First, input an image mask and randomly preset a pixel matrix. Set the pixel value of the first pixel in the pixel matrix to 1, and set at least one pixel with a value of 0 in its adjacent pixels as the starting point. Use the starting point as the starting detection point for the contour extraction process.
[0088] Secondly, starting from the starting point, detect the surrounding 8 pixels in a fixed manner. Pixels that have a value of 1 and at least one of their adjacent pixels with a value of 0 are taken as the next pixel of the contour. This process is iterated until the starting point is included in the contour again. At this point, the contour point sequence of the image mask can be obtained based on the coordinates of the obtained multiple pixels.
[0089] The convex hull processing layer is used to further calculate the convex hull boundary points based on the contour point sequence of the first code. The convex hull represents the smallest convex polygon without any indentations that can completely enclose the contour of the first product; that is, the convex hull is the outermost contour of the first product, while some indented details are ignored, thus highlighting the overall geometry of the first product and providing a simpler data foundation for subsequent key points. The input to the convex hull processing layer is the contour point sequence, and the output is the convex hull boundary point sequence.
[0090] The processing steps for the convex hull layer are as follows:
[0091] First, sort the contour point sequence according to the x-coordinate (or y-coordinate if the x-coordinates are the same);
[0092] Secondly, construct the first convex hull: traverse the sorted contour points from left to right, and take the contour points that meet the requirements as the first convex hull points;
[0093] The above requirement means that, based on the currently detected contour point and the two previously adjacent contour points (a total of three points), two vectors are constructed, and the cross product of these two vectors is calculated. If it is positive, it means that the position of the three contour points is not concave, and the first two contour points can be directly used as the first convex hull point, and the last contour point is included in the next round of detection; if it is negative, it means that the position of the three contour points is concave, and the contour point in the middle of the three points is deleted, and the remaining two contour points are included in the next round of detection.
[0094] Next, construct the second convex hull: traverse the sorted contour points from right to left, and use the contour points that meet the requirements as the second convex hull points. The specific calculation is the same as for the first convex hull.
[0095] Finally, the first convex hull and the second convex hull are merged, and duplicate convex hull points are removed. The remaining first convex hull points and the second convex hull points together constitute the final sequence of convex hull boundary points.
[0096] In addition, the first extraction model may also include a contour simplification layer. The contour simplification layer simplifies the convex hull boundary point sequence to obtain a final target control point sequence that facilitates subsequent calculations. The input to the contour simplification layer is the aforementioned convex hull boundary point sequence, and the output is the final target control point sequence.
[0097] The processing steps for the contour simplification layer are as follows:
[0098] First, sort the sequence of convex hull boundary points, and connect the starting point A and the ending point B of the sequence with a straight line AB.
[0099] Next, calculate the perpendicular distance from other convex hull boundary points in the sequence to AB, and take the maximum value P1. Compare P1 with a preset tolerance value. If P1 is greater than the tolerance value, then the convex hull boundary point C corresponding to P1 is the core convex hull point. At this time, construct two straight lines AC and BC, and calculate the perpendicular distance between the convex hull boundary point between point A and point C and AC. Again, take the maximum value P2. Based on the comparison result of P2 and the tolerance value, if P2 is greater than the tolerance value, then the convex hull boundary point D corresponding to P2 is the core convex hull point, and then construct two straight lines AD and CD; otherwise, if P2 is less than the tolerance value, all convex hull boundary points in segment AC are redundant. The processing of segment BC is the same as above (it should be noted that the aforementioned P1 may also be less than the tolerance value, similar to the first product itself being an approximately straight object such as chopsticks or a pen). Iterate in this way until P in any segment is less than the tolerance value. At this time, all core convex hull points can be obtained, and this sequence of core convex hull points is the final target control point (i.e., target control point).
[0100] For example, control points can be extracted from the second product image using a second extraction model to obtain source control points. The second extraction model can be a feature detection model, such as the SuperPoint model or the MeshLab model. If the product is a regular object, the SuperPoint model can be used; if the product is an irregular object, the MeshLab model can be used.
[0101] The extraction rules followed by the second extraction model when extracting source control points can be determined according to the shape of the second product. For example, for rigid objects, the boundary corner points and edge midpoints are used as source control points (usually 8 to 12 points). For objects with handles, the source control points are sampled more densely in the handle area (usually 30 points) on the basis of the above. For flexible objects, the surface mesh vertices are used as source control points (usually 50 to 200 points).
[0102] It should be noted that if the first and second products are different types of products, such as the first product being a mobile phone and the second product being a water cup, then the extraction of source control points and target control points must be processed using different models (the first extraction model and the second extraction model) as described above. If the first and second products are of the same type of product, such as both being mobile phones, due to their similar structures, the same model can be used, such as the Siamese model, to extract source control points and target control points.
[0103] The pixel adjustment subunit 201-2 is configured to calculate pixel adjustment parameters based on the target control point and the source control point, and to perform morphological adjustment on the second product image based on the pixel adjustment parameters to obtain a deformed image.
[0104] In some examples, a deformed image can be obtained by adjusting the image based on a second product image, target control points, and source control points using an interpolation model (Thin Plate Spline, TPS). The input to the interpolation model is the target control points, source control points, and the second product image, and the output is the deformed image. For example, the deformed image is obtained by adjusting the second product image.
[0105] It should be noted that other methods such as triangular mesh deformation or spatial transformation network can also be used to adjust the image to obtain deformed images. The choice can be made according to the application. For example, affine transformation can be used directly for simple-shaped items such as books; STN model can be used for irregularly shaped products such as musical instruments and handicrafts.
[0106] The control point adjustment parameters include a first adjustment parameter, a second adjustment parameter, and / or a second adjustment weight. The first adjustment parameter may be an affine transformation coefficient of the source control point relative to the target control point, calculated based on the distance (or positional difference) between the source and target control points.
[0107] The second adjustment parameter can be the local influence intensity of the source control point on other pixels, calculated based on the source control point and other pixels. This local influence intensity characterizes the intensity or amplitude of the pixel during the deformation process, determined by the distance between each pixel and a certain source control point.
[0108] The second adjustment weight can be the local influence weight of the source control point on other pixels. This local influence weight represents the specific magnitude of deformation of each pixel caused by the simultaneous constraint process of multiple different source control points.
[0109] After determining the first adjustment parameter, the second adjustment parameter, and the second adjustment weight, the second product image is morphologically adjusted according to the first adjustment parameter, the second adjustment parameter, and the second adjustment weight to obtain a deformed image.
[0110] See Figure 5 It can be seen that, further, in some examples, the pixel adjustment subunit 201-2 includes a first pixel adjustment subunit 201-1a and a second pixel adjustment subunit 201-1b.
[0111] In some examples, a deformed image can be obtained by adjusting the image based on a second product image, target control points, and source control points using an interpolation model (Thin Plate Spline, TPS). The input to the interpolation model is the target control points, source control points, and the second product image, and the output is the deformed image. For example, the deformed image is obtained by adjusting the second product image.
[0112] It should be noted that other methods such as triangular mesh deformation or spatial transformation network can also be used to adjust the image to obtain deformed images. The choice can be made according to the application. For example, affine transformation can be used directly for simple-shaped items such as books; STN model can be used for irregularly shaped products such as musical instruments and handicrafts.
[0113] The control point adjustment parameters include a first adjustment parameter, a second adjustment parameter, and / or a second adjustment weight. The first adjustment parameter may be an affine transformation coefficient of the source control point relative to the target control point, calculated based on the distance (or positional difference) between the source and target control points.
[0114] The second adjustment parameter can be the local influence intensity of the source control point on other pixels, calculated based on the source control point and other pixels. This local influence intensity characterizes the intensity or amplitude of the pixel during the deformation process, determined by the distance between each pixel and a certain source control point.
[0115] The second adjustment weight can be the local influence weight of the source control point on other pixels. This local influence weight represents the specific magnitude of deformation of each pixel caused by the simultaneous constraint process of multiple different source control points.
[0116] The first pixel adjustment subunit 201-1a is configured to calculate a first adjustment parameter based on the target control point and the source control point, and move the source control point in the second product image based on the first adjustment parameter to obtain an initial deformed image.
[0117] For example, based on the positional difference between the target control point and the source control point, the affine transformation coefficients of the target control point relative to the source control point can be calculated. The source control point is then moved based on these affine transformation coefficients to obtain an initial deformed image. This initial deformed image can also be called a global deformed image. The affine transformation coefficients may include translation, rotation, and scaling factors. It should be noted that in this process, other pixels in the second product image are only adjusted according to the aforementioned affine transformation coefficients and do not participate in the calculation.
[0118] The second pixel adjustment subunit 201-1b is configured to calculate a second adjustment parameter and a second adjustment weight based on the distance between the source control point and other control points in the initial deformed image, and to move the source control point in the initial deformed image based on the second adjustment parameter and the second adjustment weight to obtain the deformed image.
[0119] In some examples, the second pixel adjustment subunit 201-1b is configured to calculate a second adjustment parameter corresponding to each source control point of the pixel based on the distance between the pixel and each source control point in the initial deformed image, wherein the second adjustment parameter is used to characterize the deformation amplitude of the pixel corresponding to source control points at different distances; calculate a second adjustment weight corresponding to each source control point of the pixel in the initial deformed image based on the second adjustment parameter, the coordinate values of the source control points and the coordinate values of the target control point; wherein the second adjustment weight is used to characterize the constraint relationship of the pixel corresponding to source control points at different distances; and move the source control points in the initial deformed image according to the second adjustment parameter and the second adjustment weight to obtain the deformed image.
[0120] Based on the initial deformed image, the local influence intensity of each source control point on other pixels (including source control points and non-source control points) in the initial deformed image is calculated according to the distance between the moved source control points in the initial deformed image and other pixels in the initial deformed image. The local influence intensity characterizes the intensity or magnitude of the deformation process of each pixel, determined by the distance between each pixel and a certain source control point.
[0121] Based on the calculated local influence intensity, and using the source control point and target control point, the local influence weight of each source control point on other pixels is calculated. The local influence weight characterizes the specific magnitude of deformation caused by the simultaneous constraint process of multiple different source control points on each pixel.
[0122] For example, the local influence weight can be calculated using the following formula:
[0123] Source control point coordinates + local influence intensity Local influence weight = coordinates of the target control point.
[0124] It should be noted that if the initial deformed image is used directly as the output, on the one hand, it cannot achieve a precise match between the source control points and the target control points, which may result in a certain deviation. On the other hand, since the non-source control points in the image often cannot be directly adjusted by linear transformation, distortion and other distortion phenomena will inevitably occur. This embodiment uses a combination of global deformation and local deformation to process the image, making the obtained deformed image more realistic.
[0125] For example, the second adjustment parameter (i.e., local influence intensity) and the second adjustment weight (i.e., local influence weight) together constitute the local deformation parameter of a certain pixel in the initial deformed image (i.e., global deformed image). Each pixel in the global deformed image is adjusted according to the local deformation parameter to obtain the output deformed image.
[0126] See Figure 6It is understood that, further, in some examples, the pixel blending unit 202 includes: edge blending subunit 202-1, illumination blending subunit 202-2 and / or shadow blending subunit 202-3.
[0127] For example, image edge blending includes performing Poisson blending on the image edges. The first blended image may be an image of a pre-defined person holding a second product, with the edges of the second product and the hand smoothly transitioning.
[0128] Edge fusion subunit 202-1 is configured to perform image edge fusion between the deformed image and the first product image based on the image mask to obtain a first fused image.
[0129] In some instances, the edge blending subunit 202-1 is configured to determine each region to be blended contained in the image mask; each region to be blended includes an occluded edge region, an occluded inner region, a pressed edge region, a pressed inner region, and / or a partially overlapping region; according to the blending strategy corresponding to each region marker, the deformed image and the first product image are image edge blended to obtain a first blended image; wherein the blending strategy includes: edge protection processing for the occluded edge region, transparency processing for the pressed edge region, pixel preservation processing for the occluded inner region and the pressed inner region, and pixel replacement processing for the partially overlapping region.
[0130] In some examples, the region markers contained in the image mask are determined; based on the fusion strategy corresponding to each region marker, the deformed image and the first product image are fused at the image edges to obtain the first fused image.
[0131] The region marking can be obtained in the following way: based on the hand state of the preset person in the image mask, the hand of the preset person in the first image mask is divided into regions to obtain multiple first hand regions, and the completion region of the first product in the second image mask is determined; the multiple first hand regions and the completion region are marked respectively to obtain each region marking.
[0132] For example, during the process of image edge fusion of the deformed image and the first product image based on the image mask, the image area to be replaced in the first product image can be determined based on the coordinates of each pixel in the image mask, and the image of the second product can be replaced within the image area.
[0133] In the image replacement process, a Poisson fusion model is used to process different regions to ensure a smooth transition between the second product and other areas. The purpose of Poisson fusion is to adjust the gradient of the image (the gradient refers to the rate of change of pixel values at a point in the image along the x and y axes, specifically reflecting the degree of abrupt changes in brightness, color, and contour of the corresponding area in the image) under preset constraints, so that the gradient changes between different parts of the image are continuous and smooth, resulting in a better edge connection between the second product and the preset person's finger.
[0134] Since the aforementioned image mask has already used different markers to distinguish different interactions between the finger and the product during the generation process, the image of the product can be gradient-processed according to the above different markers during the fusion process, and the corresponding rules are as follows:
[0135] For the fourth marker (corresponding to the product body part), it is necessary to ensure that the internal gradient information is completely consistent with the deformed product image, and only change in the area near the edge of the first and second markers.
[0136] For the first marker (corresponding to the edge of the occluded finger), it is necessary to strictly prevent the second product from intruding into the finger area. Therefore, in actual processing, the gradient information of the finger edge at the position corresponding to the first marker is used as a constraint, and the gradient information from the area corresponding to the second product to the finger edge is smoothly transitioned through the calculation of the Poisson fusion model.
[0137] For the second mark (corresponding to the edge of the pressing finger), this part needs to comprehensively consider the allocation of the product and the finger. In this invention, gradient weight allocation calculation is introduced for this area, as follows: the second product is spread out to both sides of the edge position of the corresponding area by a certain distance (usually 1 to 5 pixels) to form a second pressing buffer area; the second pressing buffer area and the first pressing buffer area in the first image mask mentioned above overlap at least partially. Thus, the first pressing buffer area and the second pressing buffer area together constitute three intervals: the product area completely located in the second product, the finger area completely located in the finger, and the overlapping area that overlaps with each other.
[0138] The gradient weights of the finger transparency and / or the second product are adjusted within the aforementioned range. Specifically, in the overlapping area, the gradient weight of the second product and the transparency of the finger gradually decrease as the finger extends towards the second product. This is reflected in the following ways: Closer to the second product, the higher the finger transparency, indicating that the finger becomes more transparent closer to the edge, resulting in lower finger realism. Simultaneously, the gradient weight of the second product is higher, indicating an increased visual proportion of the second product and better presentation of product details. Conversely, closer to the finger, the lower the finger transparency, indicating that the finger becomes more realistic closer to the inside, resulting in higher finger realism. Simultaneously, the gradient weight of the second product gradually decreases, indicating a reduced visual proportion of the second product, ensuring that the pressure sensation of the finger is preserved. The gradient weight of the second product in the product area and the finger transparency in the finger area still follow the above principle, i.e., increasing from the inside (finger) to the outside (product) and decreasing from the outside to the inside.
[0139] In actual processing, the gradient of the finger can be calculated from the original display image using preset gradient operators (such as the Sobel operator and the Prewitt operator), the gradient of the second product can be calculated from the distorted image, and different markers can be obtained from the image mask to complete the above calculations. Through these gradient changes, the harsh edges between the second product and the hand and background can be eliminated, making the pixel gradient of the second product and the gradient of the hand edge natural and continuous, thus solving the problem of the splicing effect in the contact area between the finger and the product.
[0140] The illumination fusion subunit 202-2 is configured to perform image background fusion based on the first fused image and the background area of the person in the first product image, excluding the first product, to obtain a second fused image.
[0141] In some examples, lighting models (such as the Retinex model, CycleGAN, etc.) can be used to ensure that the lighting effect of the second product matches that of the hand, based on the first blended image. The input to the lighting model includes the first blended image mentioned above, and the image of the person from the first product image after removing the background image of the first product. The output is the second blended image, which is an image in which the lighting style of the second product matches that of the hand.
[0142] The shadow blending subunit 202-3 is configured to perform image background blending based on the background areas of the second blended image and the first product image, excluding the first product and the preset person, to obtain the target product image.
[0143] In some examples, a shadow model (such as the CycleGAN model) can be used to ensure that the shadow effect of the second product matches the background, based on the second fused image. The input to the shadow model includes the aforementioned second fused image, and a pure background image from which the first product image is stripped of the first product and a preset figure (including hands) (to prevent shadows from overlapping the hands). The output is the final target display image (i.e., the target product image), in which the shadow brightness is uniform and the transition is natural.
[0144] It should be noted that the above embodiments of this application do not constitute a limitation on the scope of protection of this application. Those skilled in the art can combine, separate, or reorganize the embodiments provided in this application to obtain other embodiments, none of which exceed the scope of protection of this application.
[0145] The above detailed embodiments further illustrate the purpose, technical solution, and beneficial effects of the embodiments of this application. It should be understood that the above are merely specific embodiments of the embodiments of this application and are not intended to limit the protection scope of the embodiments of this application. Any modifications, equivalent substitutions, improvements, etc., made on the basis of the technical solutions of the embodiments of this application should be included within the protection scope of the embodiments of this application.
Claims
1. An image processing system, characterized in that, The system includes an image segmentation module and an image fusion module; The image segmentation module is configured to perform image segmentation on the acquired first product image to obtain an image mask corresponding to the first product in the first product image; wherein, the first product image includes a preset person and the first product, and the hand of the preset person and the first product at least partially overlap; The image fusion module is configured to perform image fusion based on the second product image, the image mask, and the first product image to obtain a target product image; wherein, the second product image includes a second product, and the target product image includes the preset person and the second product, and the hand of the preset person and the second product at least partially overlap; The image fusion module includes: An image adjustment unit is configured to perform shape adjustment on the second product image based on hand key points and the image mask to obtain a deformed image; A pixel fusion unit is configured to perform image fusion based on the deformed image, the first product image, and the image mask to obtain the target product image; Wherein, the first product is the product to be replaced, and the second product is the product used to replace the first product; The image segmentation module includes: The key point extraction unit is configured to extract key points based on a preset person in the first product image, and obtain the hand key points of the preset person. The first image segmentation unit is configured to perform image segmentation on the first product image to obtain a first image mask containing the product and the hand of the preset person; wherein, in the first image mask, the first product and the hand of the preset person at least partially overlap. The second image segmentation unit is configured to perform secondary image segmentation on the first product image based on the product prompt, the key points of the preset person's hand, and the first image mask to obtain a second image mask; wherein, the product prompt is used to characterize the reference type of the first product, and the second image mask is used to characterize the product mask obtained by filling in the partially overlapping area according to the product prompt; The mask fusion unit is configured to perform mask fusion on the first image mask and the second image mask to obtain the image mask.
2. The image processing system according to claim 1, characterized in that, The mask fusion unit includes: The state recognition subunit is configured to perform state recognition on the hand of the preset person in the first image mask to obtain the hand state; The region segmentation subunit is configured to segment the first image mask into regions based on the hand state to obtain multiple hand regions; the hand regions include occlusion edge regions, occlusion interior regions, pressing edge regions, and / or pressing interior regions; The mask fusion subunit is configured to perform mask fusion on the first image mask and the second image mask based on the plurality of hand regions and the partially overlapping regions to obtain the image mask.
3. The image processing system according to claim 2, characterized in that, The state recognition subunit is configured as follows: The distance between the hand of the preset person in the first image mask and the edge of the product is detected. If the edge distance is greater than or equal to a preset threshold, the hand is determined to be occluded. And / or, if the edge spacing is less than a preset threshold, the hand is determined to be in a pressing state.
4. The image processing system according to claim 2, characterized in that, The region division subunit is configured as follows: For a hand in a covered state, the outer contour of the hand is defined as the covered edge area and the inside of the outer contour of the hand is defined as the covered inner area; or, for a hand in a pressed state, the outer contour of the hand is defined as the pressed edge area and the inside of the outer contour of the hand is defined as the pressed inner area.
5. The image processing system according to claim 1, characterized in that, The image adjustment unit includes: The control point extraction subunit is configured to extract control points from the image mask based on the hand key points to obtain multiple target control points, and to extract control points from the second product image to obtain multiple source control points; wherein the target control points are used to characterize the outer contour of the first product, and the source control points are used to characterize the outer contour of the second product image; The pixel adjustment subunit is configured to calculate pixel adjustment parameters based on the plurality of target control points and the plurality of source control points, and to perform morphological adjustment on the second product image based on the pixel adjustment parameters to obtain the deformed image.
6. The image processing system according to claim 5, characterized in that, The pixel adjustment subunit includes: The first pixel adjustment subunit is configured to calculate a first adjustment parameter based on the target control point and the source control point, and move the source control point in the second product image based on the first adjustment parameter to obtain an initial deformed image. The second pixel adjustment subunit is configured to calculate a second adjustment parameter and a second adjustment weight based on the distance between the source control point and other control points in the initial deformed image, and to move the source control point in the initial deformed image based on the second adjustment parameter and the second adjustment weight to obtain the deformed image.
7. The image processing system according to claim 6, characterized in that, The second pixel adjustment subunit is configured as follows: Based on the distance between a pixel and each of the source control points in the initial deformed image, the second adjustment parameter corresponding to each of the source control points is calculated, wherein the second adjustment parameter is used to characterize the deformation amplitude of the pixel corresponding to the source control points at different distances; Based on the second adjustment parameter, the coordinate values of the source control point and the coordinate values of the target control point, the second adjustment weight of each source control point corresponding to the pixel in the initial deformed image is calculated; wherein, the second adjustment weight is used to characterize the constraint relationship between the pixel and the source control points at different distances; The source control points in the initial deformation image are moved according to the second adjustment parameter and the second adjustment weight to obtain the deformation image.
8. The image processing system according to claim 2, characterized in that, The pixel fusion unit includes: An edge blending subunit is configured to perform image edge blending between the deformed image and the first product image based on the image mask to obtain a first blended image; The illumination fusion subunit is configured to perform image background fusion based on the first fused image and the background area of the person in the first product image, excluding the first product, to obtain a second fused image; The shadow blending subunit is configured to perform image background blending based on the background areas of the second blended image and the first product image, excluding the first product and the preset person, to obtain the target product image.
9. The image processing system according to claim 8, characterized in that, The edge fusion subunit is configured as follows: Determine each region to be merged contained in the image mask; each region to be merged includes the occlusion edge region, the occlusion interior region, the pressed edge region, the pressed interior region, and / or the partially overlapping region; Based on the fusion strategy corresponding to each region marker, the deformed image and the first product image are fused at the image edges to obtain the first fused image; The fusion strategy includes: performing edge protection processing on the occluded edge area, making the pressed edge area transparent, performing pixel retention processing on the occluded inner area and the pressed inner area, and performing pixel replacement processing on the partially overlapping area.
Citation Information
Patent Citations
Image processing method, computing device, electronic device and storage medium
CN120318355A