Portrait progressive segmentation method, system and equipment based on edge equipment and medium

By using chromatic aberration matrix and chromaticity matrix processing technology on edge devices, the precise segmentation and natural transition effect of portraits and backgrounds is achieved, solving the problem of real-time processing and segmentation accuracy of the prior art on edge devices, reducing hardware costs and simplifying operations.

CN120070488APending Publication Date: 2025-05-30GUANGZHOU BAOLUN ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510139851.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-08
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

The existing portrait segmentation technology is difficult to achieve real-time processing on edge devices with limited computing power, and requires higher segmentation accuracy when processing portrait details to avoid blurred or unnatural effects. At the same time, the green screen background segmentation technology is limited by the procurement and operation complexity of green screen.

Method used

A progressive segmentation method of portraits based on edge devices is proposed. By acquiring the static portrait images and any background images collected by the camera device, red, green and blue components are extracted, and the color difference matrix is ​​used to initially distinguish portrait pixels and background pixels, and the edge pixels of portrait edge pixels are translucent through the chromaticity matrix processing, realizing the precise segmentation and natural transition effect between portraits and backgrounds.

Benefits of technology

Real-time portrait segmentation is realized on edge devices with limited computing power, improving segmentation quality and efficiency, reducing hardware costs, and simplifying the operation process, avoiding fuzzy or unnatural segmentation effects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120070488A_ABST
    Figure CN120070488A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, and discloses a portrait progressive segmentation method, system and device based on an edge device and a medium, and the method comprises the steps: obtaining a static portrait image and any background image collected by a camera device; extracting a red component, a green component and a blue component in the static portrait image, and calculating a pixel difference value with a background color according to a color difference matrix d so as to preliminarily distinguish a portrait pixel from a background pixel; and inputting the preliminarily distinguished portrait pixels into a color rendering matrix a, and processing according to a preset rule to obtain a portrait progressive segmentation image, so that the edge pixels of the portrait are in a semitransparent state. Compared with the prior art, the method solves the problem of guaranteeing the segmentation precision of the current portrait segmentation technology, and reduces the requirements for hardware and the operation convenience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of image processing technology, and specifically relates to a method, system, device and medium for progressive portrait segmentation based on edge devices. Background Art

[0002] At present, portrait segmentation technology is mainly divided into two categories: natural background segmentation and green (blue) screen background segmentation. Natural background segmentation technology relies on deep learning segmentation models and can achieve accurate segmentation of portraits under any background. However, this technology requires large computing resources and is usually deployed on servers or high-performance computers. It is not applicable to edge devices with limited computing power. This has limited the promotion of this technology in real-time processing or mobile application scenarios to a certain extent.

[0003] In contrast, green screen background segmentation technology has lower computational complexity and can meet the real-time requirements of video cutouts or real-time interactive applications. Its core lies in accurately identifying and extracting the boundary between the portrait and the green screen background, and outputting a binary mask image through algorithm processing to achieve portrait separation. However, this technology also faces certain challenges, especially when processing portrait details such as hair and fur, which requires higher segmentation accuracy to avoid blurry or unnatural effects.

[0004] In addition, green screen background segmentation technology is also limited by practical operations such as green screen procurement, setting, and storage, which increases the complexity and cost of using this technology. Therefore, how to reduce the hardware requirements and ease of operation while ensuring segmentation accuracy has become an urgent problem to be solved in the development of current portrait segmentation technology. Summary of the invention

[0005] This application proposes a method, system, device and medium for progressive portrait segmentation based on edge devices, which solves the problem of current portrait segmentation technology in ensuring segmentation accuracy while reducing hardware requirements and operating convenience.

[0006] A first aspect of the present application provides a portrait progressive segmentation method based on an edge device, which is applied to an edge device. The method includes:

[0007] Obtain a static portrait image and an arbitrary background image captured by a camera device;

[0008] Extracting the red component, green component and blue component in the static portrait image, and calculating the difference between the portrait pixel and the background color pixel according to the color difference matrix d, so as to preliminarily distinguish the portrait pixel from the background pixel;

[0009] The preliminarily distinguished portrait pixels are input into the colorimetric matrix a, and processed according to a preset rule to obtain a portrait progressive segmentation image, so that the portrait edge pixels are in a semi-transparent state.

[0010] In this implementation, by using unique color difference matrices and chromaticity matrices for calculation, the segmentation effect at the edges of the human figure is natural, avoiding blurring or unnatural phenomena and improving the segmentation quality. At the same time, real-time processing can be achieved on edge devices with limited computing power, eliminating the need for high-performance hardware and significantly enhancing the real-time performance of human figure segmentation. This application avoids using models with high complexity and uses the simplest possible method. By simply calculating the pixel values of the image frame, the chromaticity channel layer of the image frame can be obtained, which can be used to fuse the original screen or any background with the image frame. Moreover, a good effect is achieved through semi-transparent fusion in the segmentation details at the edges of the human figure, thus achieving the purpose of reducing hardware costs.

[0011] In a possible implementation method of the first aspect, the obtaining of the static human figure image and any background image collected by the imaging device is specifically as follows:

[0012] The static human figure image includes the human figure and the edge device screen, where the edge device screen presents green or blue as a whole while retaining the original display content.

[0013] In a possible implementation method of the first aspect, calculating the pixel difference from the background color according to the color difference matrix specifically includes:

[0014] Determine the background color channel closest to the display of the edge device screen;

[0015] By comparing and calculating the difference one by one with the other two color channels of the image, calculate the difference result between the image and the background color;

[0016] According to the pre-set mapping relationship between the difference and the proximity to the background color, that is, the closer the pixel is to the background color, the smaller the calculated difference result; conversely, the greater the difference between the pixel and the background color, the larger the calculation result.

[0017] In a possible implementation method of the first aspect, input the preliminarily distinguished human figure pixels into the chromaticity matrix a, and the expression of the chromaticity matrix a is:

[0018]

[0019] where a is the chromaticity matrix, μ is the background color proximity threshold, and σ is the transparency adjustment parameter.

[0020] In a possible implementation method of the first aspect, after obtaining the progressive segmentation image of the human figure according to the preset rules, it further includes:

[0021] Perform morphological processing and interpolation restoration on the chromaticity matrix a to obtain the chromaticity channel layer;

[0022] According to the chrominance channel layer, the arbitrary image is weighted and fused with the progressive portrait segmentation image.

[0023] The expression of the morphological processing is as follows:

[0024] a' = gaussian(close(erode(a)))

[0025] Wherein, erode(·) is a morphological erosion operator, close(·) is a morphological closing operation, and gaussian(·) is a Gaussian filter.

[0026] Through steps such as extracting color components, calculating color differences, and chrominance matrix processing, this application not only realizes the accurate segmentation of the portrait and the background, but also cleverly processes the pixels at the portrait edge, making it present a more delicate and natural transition effect. This innovative image processing technology not only improves the accuracy and efficiency of image segmentation, but also provides a more reliable and rich foundation for subsequent image analysis, recognition, and applications.

[0027] The second aspect of this application provides a progressive portrait segmentation system based on an edge device, which is applied to the edge device. The system includes an acquisition module, a discrimination module, and a segmentation module:

[0028] The acquisition module is used to acquire a static portrait image and an arbitrary background image collected by a camera device;

[0029] The discrimination module is used to extract the red component, green component, and blue component in the static portrait image, and calculate the pixel difference from the background color according to the color difference matrix d to preliminarily distinguish portrait pixels from background pixels;

[0030] The segmentation module inputs the preliminarily distinguished portrait pixels into the chrominance matrix a, and processes them according to preset rules to obtain a progressive portrait segmentation image, so that the portrait edge pixels present a semi-transparent state.

[0031] After the segmentation module, it further includes:

[0032] Performing morphological processing and interpolation restoration on the chrominance matrix a to obtain a chrominance channel layer;

[0033] According to the chrominance channel layer, the arbitrary image is weighted and fused with the progressive portrait segmentation image.

[0034] The third aspect of this application provides a progressive portrait segmentation device based on an edge device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. The feature is that when the processor executes the program, it implements the progressive portrait segmentation method based on an edge device according to any one of claims 1 to 6.

[0035] A fourth aspect of the present application provides a computer-readable storage medium storing at least one executable instruction, which causes a portrait progressive segmentation method / system based on an edge device to perform the operations of the portrait progressive segmentation method based on an edge device as described in any one of the above.

[0036] The above description is only an overview of the technical solutions of the embodiments of the present invention. In order to be able to understand the technical means of the embodiments of the present invention more clearly, it can be implemented according to the content of the description. And in order to make the above and other purposes, features and advantages of the embodiments of the present invention more obvious and understandable, the specific embodiments of the present invention are specifically exemplified below. Description of the Drawings

[0037] In order to more clearly illustrate the technical solutions of the present application, the drawings required for the implementation will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0038] Figure 1 is a flowchart of an embodiment of the portrait progressive segmentation method based on an edge device provided by the present application;

[0039] Figure 2 is a static portrait image disclosed in an embodiment of the portrait progressive segmentation method based on an edge device provided by the present application;

[0040] Figure 3 is a background image disclosed in an embodiment of the portrait progressive segmentation method based on an edge device provided by the present application;

[0041] Figure 4 is an image output by fusing the static portrait image and the background image disclosed in an embodiment of the portrait progressive segmentation method based on an edge device provided by the present application;

[0042] Figure 5 is a structural flowchart of an embodiment of the portrait progressive segmentation system based on an edge device provided by the present application;

[0043] Figure 6 is a structural diagram of an embodiment of the portrait progressive segmentation system based on an edge device provided by the present application;

[0044] Figure 7 is a structural diagram of an embodiment of the portrait progressive segmentation device based on an edge device provided by the present application. Detailed Embodiments

[0045] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0046] Embodiment 1

[0047] See also Figure 1 As shown, the edge device-based portrait progressive segmentation method provided in the embodiment of the present application includes steps S101-S103 specifically:

[0048] Step S101: obtaining a static portrait image and an arbitrary background image captured by a camera device;

[0049] Step S102: extracting the red component, green component and blue component in the static portrait image, and calculating the pixel difference with the background color according to the color difference matrix d, so as to preliminarily distinguish the portrait pixels from the background pixels;

[0050] Step S103: inputting the preliminarily distinguished portrait pixels into the color rendering matrix a, and processing according to a preset rule to obtain a portrait progressive segmentation image, so that the portrait edge pixels are in a semi-transparent state.

[0051] In this embodiment, a unique color difference matrix and chromaticity matrix are used for calculation, so that the segmentation effect of the portrait edge is natural, blurring or unnatural phenomena are avoided, and the segmentation quality is improved. At the same time, real-time processing can be achieved on edge devices with limited computing power, avoiding the need for high-performance hardware and significantly improving the real-time performance of portrait segmentation. This application avoids the use of highly complex models and uses the simplest method possible. Only by calculating the pixel values ​​of the image frame, the chromaticity channel layer of the image frame can be obtained, which can be used to merge the original screen or any background with the image frame, and a better effect is achieved through translucent fusion in the segmentation details of the portrait edge, thereby achieving the purpose of reducing hardware costs.

[0052] Furthermore, the acquisition of the static portrait image and any background image captured by the camera device is specifically:

[0053] The static portrait image includes a portrait and an edge device screen, wherein the edge device screen retains the original display content and appears green or blue as a whole.

[0054] In a preferred embodiment, first, start the green (blue) screen implementation application on the edge device, so that the display screen presents the green (blue) screen color as a whole while retaining the original content, and use this as the background. Then, use the camera to capture the picture, and record the captured picture as s, whose shape is H*W*C (where H represents the picture height, W represents the picture width, and C is generally 3, representing the number of channels of a color picture), as Figure 2 and Figure 3 shown.

[0055] Optionally, downsample the picture s by k times to obtain a low-resolution picture s k , whose shape is This step reduces the computational amount to of the original, which can greatly improve the running speed and significantly reduce the resource occupancy;

[0056] Implementably, separate the picture s into three matrices r, g, and b according to the channel dimension, that is, the red component r, the green component g, and the blue component b of the picture pixels.

[0057] Further, calculate the pixel difference from the background color according to the color difference matrix, specifically including:

[0058] Determine the background color channel closest to the screen display of the edge device;

[0059] By comparing and calculating the difference one by one with the other two color channels of the image, calculate the difference result between the image and the background color;

[0060] According to the mapping relationship between the preset difference and the proximity to the background color, that is, the closer the pixel is to the background color, the smaller the calculated difference result; conversely, the greater the difference between the pixel and the background color, the larger the calculation result.

[0061] It should be noted that since the RGB of pure green is 0, 255, 0, and the RGB of pure blue is 0, 0, 255, affected by environmental factors such as light and color difference, although the collected background pixels are not exactly these values, they are closer than other colors. Therefore, according to whether the background is a green screen or a blue screen, calculate the color difference matrix d through the following formula:

[0062] or

[0063] The value of the color channel (green or blue) corresponding to the background pixel in the picture s will be significantly greater than the other two channels. The closer the pixel is to the background color, the smaller the calculation result, and the greater the difference between the pixel and the background color, the larger the calculation result. Therefore, this index can initially separate the portrait and background pixels.

[0064] Further, input the preliminarily distinguished portrait pixels into the chromaticity matrix a, and the expression of the chromaticity matrix a is:

[0065]

[0066] where a is the chromaticity matrix, μ is the background color proximity threshold, and σ is the transparency adjustment parameter.

[0067] In a preferred embodiment, there are two key parameters in the above formula that play an important role in the portrait edge processing effect. Among them, μ, as the background color proximity threshold, its core role is to compare the chromaticity of the color closest to pure green (0, 255, 0) or pure blue (0, 0, 255) in the image. In actual operation, due to factors such as the light and color difference in the acquisition environment, although the background pixels will not be exactly the same as pure green or pure blue, they will be relatively close. Through the setting of μ, the chromaticity of these pixels close to the background color can be accurately identified and adjusted to 0, effectively removing the residual background color at the portrait edge and avoiding its interference with the portrait segmentation effect. And σ can be called the transparency adjustment parameter, and there is a close regulation relationship between it and the color difference and transparency. When the color difference of the pixel is above a certain specific value, through the action of σ, its chromaticity will be set to 255, showing a completely opaque state, ensuring that the key parts such as the portrait main body can be clearly and completely displayed; when the color difference is below a certain value, the pixel enters a semi-transparent state, and as the color difference continuously decreases until it becomes 0, the pixel will gradually become fully transparent. In the area of the person's edge, due to the phenomenon of light reflection and color fusion with the background pixels, the person's edge will show a certain degree of background color. It is precisely through the coordinated regulation of the chromaticity by μ and σ that the pixels in the semi-transparent state exactly match the portrait edge pixels, and then a natural and smooth progressive edge effect is successfully achieved, greatly improving the quality and visual effect of portrait segmentation, making the transition between the portrait and the background smoother and more realistic.

[0068] Further, after obtaining the portrait progressive segmentation image according to the preset rules, it further includes:

[0069] Perform morphological processing and interpolation restoration on the chromaticity matrix a to obtain the chromaticity channel layer;

[0070] According to the chromaticity channel layer, perform weighted fusion on the arbitrary image and the portrait progressive segmentation image.

[0071] The expression of the morphological processing is:

[0072] a' = gaussian(close(erode(a)))

[0073] Among them, erode(·) is a morphological erosion operator, close(·) is a morphological closing operation, and gaussian(·) is a Gaussian filter.

[0074] Optionally, during the process of human portrait segmentation, there may be some problems with the calculated chromaticity matrix. Noise points may be generated by the camera. These noise points are usually isolated and have a large difference from the surrounding pixels, which will interfere with subsequent processing and analysis. The hollow problem is generally caused by color patches on the clothes that are close to the background, which will affect the integrity and accuracy of the human portrait edge. The morphological erosion operator erode(·) can remove noise points. By shrinking the object boundary, it eliminates those isolated small points and makes the image purer. For example, for some small-area noise point regions, the erosion operation can distinguish them from the surrounding valid pixels and remove them. The closing operation close(·) can fill the hollow regions. It first dilates the image to connect adjacent objects, and then erodes it back to approximately the original size, thereby filling the hollow parts caused by the color patches on the clothes and the background, making the chromaticity matrix more complete and continuous in structure. The Gaussian filter gaussian(·) can smooth the edges of the image while maintaining the general shape of the image by performing weighted averaging on each pixel point in the image and its neighboring pixels. In the region where the human portrait edge transitions to the background, the Gaussian filter will comprehensively consider the gray level difference between the edge pixels and the background pixels, adjust the originally abrupt boundary to a gradually transitional form, and simulate a natural semi-transparent transition effect. For example, for the edges of details such as hair strands, the Gaussian filter can make them blend with the background more naturally, avoiding obvious jagged or broken phenomena, further improving the visual quality of the image, making the final human portrait segmentation effect more realistic and delicate, and providing a better basis for subsequent processing.

[0075] Optionally, if the low-resolution picture s is used through step 2 k , then it is necessary to restore the size of the chromaticity matrix a′ to H*W through interpolation, which is the chromaticity channel layer. If it is necessary to integrate a smaller human figure into a local area of the background picture, this step can also be skipped.

[0076] In a preferred embodiment, after obtaining the chromaticity channel layer, it can be merged with the original picture into a 4-channel RGBA picture. Or use the chromaticity channel layer as a weight and perform weighted fusion with the original screen content or any background picture t to obtain the final picture after background replacement. The fusion expression is:

[0077] s r = a′*s + (1 - a′)*t.

[0078] Fuse the original image s and the background image t to achieve the effect of background replacement or image synthesis. Among them, the chrominance matrix a′ serves as a weight coefficient, determining the proportion of the original image and the background image for each pixel during the fusion process. When the pixel chrominance in a′ is 0, the pixel in the fused image is completely taken from the background image t; when the chrominance is 255, the pixel is completely taken from the original image s; when it is between 0 and 255, partial fusion of the original image and the background image is achieved, resulting in a natural transition effect, enabling the portrait to blend naturally with the new background and avoiding obvious splicing traces. When fusing with the original screen content, the overlay formula can also avoid image distortion caused by color difference, overexposure, underexposure, etc. during the direct camera capture due to light, environment, and hardware reasons, ensuring the clear visibility of the screen content. By reasonably adjusting the weights of the original image and the background image, the influence of light and environmental factors on the image can be compensated to a certain extent, enabling the finally fused image to maintain a good visual effect under different light and environmental conditions, such as Figure 4 shown.

[0079] Furthermore, since the edges of the person will show a certain background color due to reflection and color fusion with background pixels, by combining the overlay formula with the chrominance matrix, the semi-transparent portrait edge pixels can be naturally fused with the background, achieving a gradual edge effect. This gradual effect cannot be achieved by simple binary segmentation alone. The overlay operation makes the transition between the portrait and the background smoother and more natural, conforming to the visual perception of the human eye and improving the quality and realism of the image. At the same time, by dynamically adjusting the weights of the original image and the background image according to the specific values of each pixel in the chrominance matrix, personalized fusion processing can be carried out for the characteristics of different regions in the image. For the main part of the portrait, the chrominance is higher, and more original image information is retained; for the edge and background transition regions, according to their different chrominances, the weight of the background image is gradually increased, achieving a natural transition from the portrait to the background. This flexible fusion method can adapt to various complex image scenarios and background changes.

[0080] In this embodiment, the present application not only achieves precise segmentation of the portrait and the background through steps such as extracting color components, calculating color differences, and processing the chrominance matrix, but also cleverly processes the pixels at the portrait edges, making them present a more delicate and natural transition effect. This innovative image processing technology not only improves the accuracy and efficiency of image segmentation, but also provides a more reliable and rich basis for subsequent image analysis, recognition, and applications.

[0081] Embodiment 2

[0082] Figure 5A structural flow chart of an embodiment of the edge device-based portrait progressive segmentation system provided by the present invention is shown. The specific embodiment of the present invention does not limit the specific implementation of the edge device-based portrait progressive segmentation system.

[0083] Please refer to Figure 6 , is a portrait progressive segmentation system based on an edge device provided in an embodiment of the present application, the system comprising:

[0084] The acquisition module is used to acquire a static portrait image and any background image captured by a camera device;

[0085] The distinguishing module is used to extract the red component, the green component and the blue component in the static portrait image, and calculate the difference between the background color pixels according to the color difference matrix d to preliminarily distinguish the portrait pixels from the background pixels;

[0086] The segmentation module inputs the preliminarily distinguished portrait pixels into the color rendering matrix a, and processes the preliminarily distinguished portrait pixels according to a preset rule to obtain a portrait progressive segmentation image, so that the portrait edge pixels are semi-transparent.

[0087] After the segmentation module, it also includes:

[0088] Performing morphological processing and interpolation restoration on the chromaticity matrix a to obtain a chromaticity channel layer;

[0089] According to the chromaticity channel layer, the arbitrary image is weightedly fused with the portrait progressive segmentation image.

[0090] The above-mentioned edge device-based portrait progressive segmentation system can implement the edge device-based portrait progressive segmentation method of the above-mentioned method embodiment. The options in the above-mentioned method embodiment are also applicable to this embodiment and will not be described in detail here. The rest of the contents of the embodiments of the present application can refer to the contents of the above-mentioned method embodiment, and in some preferred embodiments, they will not be repeated.

[0091] Embodiment 3

[0092] Figure 7 A structural schematic diagram of an embodiment of a portrait progressive segmentation device based on an edge device provided by the present invention is shown. The specific embodiment of the present invention does not limit the specific implementation of the portrait progressive segmentation device based on the edge device.

[0093] like Figure 7 As shown, the edge device-based progressive portrait segmentation device may include: a processor (processor) 302, a communication interface (Communications Interface) 304, a memory (memory) 306, and a communication bus 308.

[0094] Among them: The processor 302, the communication interface 304, and the memory 306 communicate with each other through the communication bus 308. The communication interface 304 is used to communicate with network elements of other devices such as clients or other servers. The processor 302 is used to execute the program 310, and specifically can execute the relevant steps in the above-described method embodiments for progressive portrait segmentation based on edge devices.

[0095] Specifically, the program 310 may include program code, and the program code includes computer-executable instructions.

[0096] The processor 302 may be a central processing unit CPU, or a specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present invention. One or more processors included in the progressive portrait segmentation device based on edge devices may be of the same type of processor, such as one or more CPUs; or may be of different types of processors, such as one or more CPUs and one or more ASICs.

[0097] The memory 306 is used to store the program 310. The memory 306 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk memory.

[0098] The algorithms or displays provided herein are not inherently related to any particular computer, virtual system, or other device. In addition, the embodiments of the present invention are not directed to any particular programming language.

[0099] In the specification provided herein, a large number of specific details are described. However, it can be understood that the embodiments of the present invention can be practiced without these specific details. Similarly, in order to streamline the present invention and help understand one or more of the various inventive aspects, in the above description of the exemplary embodiments of the present invention, the various features of the embodiments of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. Among them, the claims following the specific implementation manner are hereby expressly incorporated into the specific implementation manner, and each claim itself is a separate embodiment of the present invention.

[0100] Those skilled in the art can understand that the modules in the devices in the embodiments can be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments can be combined into one module or unit or component, and in addition, they can be divided into multiple sub-modules or sub-units or sub-components. Except that at least some of such features and / or processes or units are mutually exclusive.

[0101] It should be noted that the above embodiments are illustrative of the present invention rather than restrictive of the present invention, and those skilled in the art can design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in the claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention can be implemented by means of hardware including several different elements and by means of a suitably programmed computer. In a unit claim listing several devices, several of these devices can be embodied by the same item of hardware. The use of the words first, second, and third, etc. does not denote any order. These words can be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be construed as limiting the order of execution.

Claims

1. A progressive portrait segmentation method based on edge devices, characterized in that: Applied to edge devices, including: Obtain a static portrait image and an arbitrary background image captured by a camera device; Extracting the red component, green component and blue component in the static portrait image, and calculating the difference between the portrait pixel and the background color pixel according to the color difference matrix d, so as to preliminarily distinguish the portrait pixel from the background pixel; The preliminarily distinguished portrait pixels are input into the colorimetric matrix a, and processed according to a preset rule to obtain a portrait progressive segmentation image, so that the portrait edge pixels are in a semi-transparent state.

2. According to claim 1, the edge device-based portrait progressive segmentation method is characterized in that: The step of obtaining a static portrait image and any background image captured by a camera device includes: The static portrait image includes a portrait and an edge device screen, wherein the edge device screen retains the original display content and appears green or blue as a whole.

3. The edge device-based portrait progressive segmentation method according to claim 1, characterized in that: Calculate the pixel difference with the background color according to the color difference matrix, specifically including: Determine the background color channel that is closest to the edge device screen display; By comparing and calculating the difference with the other two color channels of the image one by one, the difference between the image and the background color is calculated; According to the preset mapping relationship between the difference value and the degree of proximity to the background color, the closer the pixel is to the background color, the smaller the calculated difference result; conversely, the greater the difference between the pixel and the background color, the larger the calculated result.

4. The edge device-based portrait progressive segmentation method according to claim 1, characterized in that: The preliminarily distinguished portrait pixels are input into the color rendering matrix a, and the expression of the color rendering matrix a is: Among them, a is the color matrix, μ is the background color proximity threshold, and σ is the transparency adjustment parameter.

5. The edge device-based portrait progressive segmentation method according to claim 1, characterized in that: After the portrait progressive segmentation image is obtained by processing according to the preset rules, the method further includes: Performing morphological processing and interpolation restoration on the chromaticity matrix a to obtain a chromaticity channel layer; According to the chromaticity channel layer, the arbitrary image is weightedly fused with the portrait progressive segmentation image.

6. The edge device-based portrait progressive segmentation method according to claim 5, characterized in that: The expression of the morphological processing is: A = gaussian(close(erode(a))) Among them, erode(·) is the morphological erosion operator, close(·) is the morphological closing operation, and gaussian(·) is the Gaussian filter.

7. The edge device-based portrait progressive segmentation system is characterized by: Applied to edge devices, including acquisition module, differentiation module and segmentation module: The acquisition module is used to acquire a static portrait image and any background image captured by a camera device; The distinguishing module is used to extract the red component, the green component and the blue component in the static portrait image, and calculate the difference between the background color pixels according to the color difference matrix d to preliminarily distinguish the portrait pixels from the background pixels; The segmentation module inputs the preliminarily distinguished portrait pixels into the color rendering matrix a, and processes the preliminarily distinguished portrait pixels according to a preset rule to obtain a portrait progressive segmentation image, so that the portrait edge pixels are semi-transparent.

8. The edge device-based portrait progressive segmentation system according to claim 7, characterized in that: After the segmentation module, it also includes: Performing morphological processing and interpolation restoration on the chromaticity matrix a to obtain a chromaticity channel layer; According to the chromaticity channel layer, the arbitrary image is weightedly fused with the portrait progressive segmentation image.

9. A portrait progressive segmentation device based on an edge device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the edge device-based progressive portrait segmentation method as described in any one of claims 1 to 6 is implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the edge device-based progressive portrait segmentation method as described in any one of claims 1 to 6 is implemented.