An image processing method, device, medium and computer device

By acquiring the phase-shifted image sequence and phase map analysis of sinusoidal background light, the problem of insufficient fineness and robustness of foreground extraction contour edges in existing technologies is solved, and efficient foreground object contour edge extraction is achieved.

CN115471518BActive Publication Date: 2026-08-25WUHAN RULER TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210970238.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-12
Publication Date
2026-08-25
Estimated Expiration
2042-08-12

AI Technical Summary

Technical Problem

Existing foreground extraction techniques suffer from insufficient precision in product contour edges, lack of robustness, and difficulty in extracting transparent materials.

Method used

A sinusoidal background light distribution is obtained by using multiple equally spaced parallel strip lights and a semi-transparent light shield. The phase map is verified by acquiring a phase-shifted image sequence and analyzing the phase image to obtain the outline edge of the foreground object.

Benefits of technology

It achieves fast image processing speed, high precision of contour edges, strong robustness of data processing, and minimal impact of transparent material extraction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115471518B_ABST
    Figure CN115471518B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose an image processing method, device, medium and computer equipment. The method comprises the steps of: obtaining a sinusoidal distribution background light of a background plate, the sinusoidal distribution background light being obtained by a plurality of strip lights arranged equidistantly and in parallel and a translucent light shield; obtaining an initial background plate light of the sinusoidal distribution background light; obtaining sinusoidal distribution background lights of different brightness distribution periods; collecting a group of phase shift image sequences corresponding to the distribution period of the sinusoidal distribution background light, the images of the phase shift image sequences comprising foreground objects shielding the background plate; analyzing the sinusoidal distribution background light and the phase image sequence to obtain a phase diagram on the background plate; and checking the phase diagram to obtain the contour edge of the foreground object. The method has the advantages of fast image processing speed, high contour edge fineness, high data processing robustness and small influence on transparent material extraction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of foreground image processing technology, and particularly to an image processing method, apparatus, medium, and computer equipment. Background Technology

[0002] E-commerce platforms need to obtain white background images of products as part of the product details page. Existing online platforms, e-commerce groups, and user groups all have high requirements for the image quality of the white background images of products, especially the fineness of the product outline edges in the white background images.

[0003] Traditional automated foreground extraction techniques typically employ techniques such as green masking, multiple exposure, and Trimap-free methods within deep learning frameworks to extract foregrounds from raw photos taken by a camera. However, existing foreground extraction techniques have the following drawbacks: 1. The fineness of the product's outline edges is insufficient; 2. The robustness of the product's outline edges is somewhat lacking; 3. Extraction of transparent materials is difficult. Summary of the Invention

[0004] In view of the shortcomings of the prior art, the purpose of this invention is to provide an image processing method, apparatus, medium and computer equipment that can automatically and quickly extract foreground images.

[0005] Specifically, this application provides an image processing method, including the following steps:

[0006] The background light of the background board is obtained by a sinusoidal distribution, which is obtained by multiple strip lights arranged in parallel at equal intervals and a semi-transparent light shield.

[0007] Obtain the initial background illumination with a sinusoidal background light distribution;

[0008] Obtain sinusoidal background light with different brightness distribution periods;

[0009] Acquire a set of phase-shifted image sequences corresponding to the distribution period of the sinusoidal background light, wherein the images in the phase-shifted image sequences include foreground objects that occlude the background panel;

[0010] The phase map on the background plate is obtained by analyzing the sinusoidal background light and phase image sequence;

[0011] The phase map is verified to obtain the outline edge of the foreground object.

[0012] Furthermore, the simulated brightness of the corresponding points of the initial background illumination is as follows:

[0013]

[0014] Where x is the x-axis direction of the strip light arrangement, i is the sequence number of the strip light, the number of strip lights is (2N+1), D is the brightness distribution period when the strip lights are fully lit, and R is the distance between the strip lights and the semi-transparent light shield.

[0015] Furthermore, the step of obtaining sinusoidal background light with different brightness distribution periods includes:

[0016] Multiple sinusoidal background lights with continuously and equally varying brightness distributions are obtained by combining the bright and dark sequences of strip lights.

[0017] Furthermore, the images in the phase-shifted image sequence are:

[0018] I n (u,v)=α(u,v)*F(u,v)+(1-α(u,v))*B n (u,v)

[0019] Where α(u,v) is the transparency, F(u,v) is the foreground image, and B... n (u,v) represents the background image;

[0020] The background image is:

[0021] B n (u,v)=B reference (u,v)*cos(φ(u,v)+σ n )

[0022] Among them, B reference The reference brightness for the background image is (u,v), and the principal phase value on the background light panel is (σ). n This represents the radians of phase shift.

[0023] Furthermore, the step of parsing the sinusoidal background light and phase image sequence to obtain the phase map on the background plate includes:

[0024] The phase map on the background plate is obtained by analyzing the sinusoidal background light and phase image sequence using a three-step phase shift method.

[0025] Furthermore, by grouping three consecutive strip lights together, and illuminating only one strip light from each group at a time, and illuminating them sequentially according to their arrangement, three sinusoidal background lights are obtained. The phase shift σ n They are respectively

[0026] The phase image sequence is as follows:

[0027]

[0028] I2=α(u,v)*F(u,v)+(1-α(u,v))*B reference (u,v)*cos(φ(u,v))

[0029]

[0030] Analysis of the phase image sequence yields:

[0031]

[0032] According to the corresponding B in the calibration reference and background image B n (u,v)=B reference (u,v)*cos(φ(u,v)+σ n We can obtain:

[0033]

[0034] B2 = B reference (u,v)*cos(φ(u,v))

[0035]

[0036] Based on B1, B2, and B3, the transparency and the outline edge of the foreground object can be derived:

[0037]

[0038]

[0039] Furthermore, the transparency and the outline edge of the foreground object are optimized by constructing an energy optimization equation: E = argmin(I n -α*(FB n )-B n ).

[0040] An image processing apparatus, comprising:

[0041] The background light acquisition module is used to acquire the sinusoidal distribution background light of the background board. The sinusoidal distribution background light is acquired by multiple strip lights arranged in parallel at equal intervals and a semi-transparent light shield.

[0042] The initial background light acquisition module is used to acquire the initial background illumination of the sinusoidal background light distribution.

[0043] The sinusoidal background light acquisition module is used to acquire sinusoidal background light with different brightness distribution periods;

[0044] The image sequence acquisition module is used to acquire a set of phase-shifted image sequences corresponding to the distribution period of the sinusoidal background light, wherein the images in the phase-shifted image sequences include foreground objects that occlude the background plate;

[0045] The phase map parsing module is used to parse the sinusoidal background light and phase image sequence to obtain the phase map on the background plate;

[0046] The contour acquisition module is used to verify the contour edges of the foreground object obtained from the phase map.

[0047] A computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the following steps:

[0048] The background light of the background board is obtained by a sinusoidal distribution, which is obtained by multiple strip lights arranged in parallel at equal intervals and a semi-transparent light shield.

[0049] Obtain the initial background illumination with a sinusoidal background light distribution;

[0050] Obtain sinusoidal background light with different brightness distribution periods;

[0051] Acquire a set of phase-shifted image sequences corresponding to the distribution period of the sinusoidal background light, wherein the images in the phase-shifted image sequences include foreground objects that occlude the background panel;

[0052] The phase map on the background plate is obtained by analyzing the sinusoidal background light and phase image sequence;

[0053] The phase map is verified to obtain the outline edge of the foreground object.

[0054] A computer device includes a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the following steps:

[0055] The background light of the background board is obtained by a sinusoidal distribution, which is obtained by multiple strip lights arranged in parallel at equal intervals and a semi-transparent light shield.

[0056] Obtain the initial background illumination with a sinusoidal background light distribution;

[0057] Obtain sinusoidal background light with different brightness distribution periods;

[0058] Acquire a set of phase-shifted image sequences corresponding to the distribution period of the sinusoidal background light, wherein the images in the phase-shifted image sequences include foreground objects that occlude the background panel;

[0059] The phase map on the background plate is obtained by analyzing the sinusoidal background light and phase image sequence;

[0060] The phase map is verified to obtain the outline edge of the foreground object.

[0061] Compared with existing technologies, the technical solution provided in this application obtains a corresponding phase-shifted image sequence by setting a continuously sinusoidal background light with a controllable distribution period, obtains a phase map by analyzing the sinusoidal background light and phase image, and obtains the contour edge data of the foreground object by verifying the phase map. It has advantages such as fast image processing speed, high contour edge precision, high data processing robustness, and minimal impact from transparent material extraction. Attached Figure Description

[0062] Figure 1 This is a flowchart of an image processing method according to the present invention;

[0063] Figure 2 This is a schematic diagram of a sinusoidal distribution background light in an image processing method according to the present invention;

[0064] Figure 3 This is a schematic diagram of the three-step phase-shift analytical method for image processing according to the present invention;

[0065] Figure 4 This is a structural block diagram of an image processing device according to the present invention;

[0066] Figure 5 This is a structural block diagram of a computer device in an embodiment of the present invention. Detailed Implementation

[0067] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0068] Example 1

[0069] The technical problem to be solved in this embodiment is that traditional automated foreground extraction technology usually uses techniques such as green masking, multiple exposure, and Trimap-free under the deep learning framework to perform foreground extraction operations on the original photos taken by the camera. However, the existing foreground extraction technology has the following defects: First, the fineness of the product's outline edge is not high enough; second, the robustness of the product's outline edge is somewhat lacking; and third, it is difficult to extract transparent materials.

[0070] This embodiment provides an image processing method, such as... Figure 1 As shown, the steps include:

[0071] S101: Obtain the sinusoidal distribution background light of the background board, wherein the sinusoidal distribution background light is obtained by multiple strip lights arranged in parallel at equal intervals and a semi-transparent light shield.

[0072] S102: Obtain the initial background illumination of the sinusoidal background light distribution;

[0073] S103: Obtain sinusoidal background light with different brightness distribution periods;

[0074] S104: Acquire a set of phase-shifted image sequences corresponding to the distribution period of the sinusoidal background light, wherein the images in the phase-shifted image sequences include foreground objects that obscure the background.

[0075] S105: Analyze the sinusoidal background light and phase image sequence to obtain the phase map on the background plate;

[0076] S106: Verify the phase map to obtain the outline edge of the foreground object.

[0077] Compared with existing technologies, the technical solution provided in this application obtains a corresponding phase-shifted image sequence by setting a continuously sinusoidal background light with a controllable distribution period, obtains a phase map by analyzing the sinusoidal background light and phase image, and obtains the contour edge data of the foreground object by verifying the phase map. It has advantages such as fast image processing speed, high contour edge precision, high data processing robustness, and minimal impact from transparent material extraction.

[0078] Example 2

[0079] This embodiment elaborates on how to implement the method in Embodiment 1. The technical problem solved by this embodiment is the traditional automated foreground extraction technology, which usually uses techniques such as green masking, multiple exposure, and Trimap-free under the deep learning framework to perform foreground extraction operations on the original photos taken by the camera. However, the existing foreground extraction technology has the following defects: 1. The fineness of the product's outline edge is not high enough; 2. The robustness of the product's outline edge is somewhat lacking; 3. It is difficult to extract transparent materials.

[0080] The image processing method of this embodiment includes the following steps:

[0081] like Figure 2 As shown, a sinusoidal distribution of background lighting is obtained for the background panel. The sinusoidal distribution of background lighting is obtained by multiple strip lights arranged in parallel at equal intervals and a semi-transparent light-shielding plate.

[0082] The simulated brightness of the corresponding point of the initial background illumination is:

[0083]

[0084] Where x is the x-axis direction of the strip light arrangement, i is the sequence number of the strip light, the number of strip lights is (2N+1), D is the brightness distribution period when the strip lights are fully lit, and R is the distance between the strip lights and the semi-transparent light shield.

[0085] Obtain the initial background illumination with a sinusoidal background light distribution;

[0086] Obtain sinusoidal background light with different brightness distribution periods; specifically, multiple sinusoidal background lights with continuously equal brightness distribution periods can be obtained by combining the bright and dark sequences of strip lights.

[0087] Acquire a set of phase-shifted image sequences corresponding to the distribution period of the sinusoidal background light, wherein the images in the phase-shifted image sequences include foreground objects that occlude the background panel;

[0088] The images in the phase-shifted image sequence are:

[0089] I n (u,v)=α(u,v)*F(u,v)+(1-α(u,v))*B n (u,v) (2-1)

[0090] Where α(u,v) is the transparency, F(u,v) is the foreground image, and B... n (u,v) represents the background image;

[0091] The background image is:

[0092] B n (u,v)=B reference (u,v)*cos(φ(u,v)+σ n (2-2)

[0093] Among them, B reference The reference brightness for the background image is (u,v), and the principal phase value on the background light panel is (σ). n This represents the radians of phase shift.

[0094] The phase map on the background is obtained by parsing the sinusoidal background light and phase image sequence; the contour edge of the foreground object is obtained by verifying the phase map.

[0095] like Figure 3 As shown, in a specific three-step phase-shift analysis scheme, three consecutive strip lights are grouped together. Only one strip light from each group is illuminated at a time, and these strip lights are illuminated sequentially to obtain three sinusoidal background lights. The phase shift σ... n They are respectively

[0096] The phase image sequence is as follows:

[0097]

[0098] I2=α(u,v)*F(u,v)+(1-α(u,v))*B reference (u,v)*cos(φ(u,v)) (3-2)

[0099]

[0100] Analysis of the phase image sequence yields:

[0101]

[0102]

[0103] B2 = B reference (u,v)*cos(φ(u,v)) (5-2)

[0104]

[0105] Based on B1, B2, and B3, the transparency and the outline edge of the foreground object can be derived:

[0106]

[0107]

[0108] This solution can also optimize the transparency and the outline edges of the foreground object by constructing an energy optimization equation:

[0109] E = argmin(I) n -α*(FB n )-B n (7-1).

[0110] Compared with existing technologies, the technical solution provided in this application obtains a corresponding phase-shifted image sequence by setting a continuously sinusoidal background light with a controllable distribution period, obtains a phase map by analyzing the sinusoidal background light and phase image, and obtains the contour edge data of the foreground object by verifying the phase map. It has advantages such as fast image processing speed, high contour edge precision, high data processing robustness, and minimal impact from transparent material extraction.

[0111] Example 3

[0112] This embodiment provides an image processing device. The technical problem to be solved by this embodiment is that traditional automated foreground extraction technology usually uses techniques such as green masking, multiple exposure, and Trimap-free under the deep learning framework to perform foreground extraction operations on the original photos taken by the camera. However, the existing foreground extraction technology has the following defects: 1. The fineness of the product's outline edge is not high enough; 2. The robustness of the product's outline edge is somewhat lacking; 3. It is difficult to extract transparent materials.

[0113] like Figure 4 As shown, this device includes:

[0114] Background light acquisition module 100 is used to acquire the sinusoidal distribution background light of the background board. The sinusoidal distribution background light is acquired by multiple strip lights arranged in parallel at equal intervals and a semi-transparent light shield.

[0115] The initial background light acquisition module 200 is used to acquire the initial background illumination of the sinusoidal background light distribution;

[0116] The sinusoidal background light acquisition module 300 is used to acquire sinusoidal background light with different brightness distribution periods;

[0117] The image sequence acquisition module 400 is used to acquire a set of phase-shifted image sequences corresponding to the distribution period of the sinusoidal background light, wherein the images in the phase-shifted image sequences include foreground objects that occlude the background plate;

[0118] Phase map parsing module 500 is used to parse the sinusoidal distributed background light and phase image sequence to obtain the phase map on the background plate;

[0119] The contour acquisition module 600 is used to verify the contour edges of the foreground object obtained by the phase map.

[0120] Compared with existing technologies, the technical solution provided in this application obtains a corresponding phase-shifted image sequence by setting a continuously sinusoidal background light with a controllable distribution period, obtains a phase map by analyzing the sinusoidal background light and phase image, and obtains the contour edge data of the foreground object by verifying the phase map. It has advantages such as fast image processing speed, high contour edge precision, high data processing robustness, and minimal impact from transparent material extraction.

[0121] Example 4

[0122] Figure 5 An internal structural diagram of a computer device in one embodiment is shown. This computer device can specifically be a terminal or a server. Figure 5As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and may also store a computer program. When executed by the processor, this computer program enables the processor to implement an image processing method. The internal memory may also store a computer program, which, when executed by the processor, enables the processor to perform the image processing method. Those skilled in the art will understand that... Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0123] In one embodiment, a computer device is provided, including a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the following steps:

[0124] The background light of the background board is obtained by a sinusoidal distribution, which is obtained by multiple strip lights arranged in parallel at equal intervals and a semi-transparent light shield.

[0125] Obtain the initial background illumination with a sinusoidal background light distribution;

[0126] Obtain sinusoidal background light with different brightness distribution periods;

[0127] Acquire a set of phase-shifted image sequences corresponding to the distribution period of the sinusoidal background light, wherein the images in the phase-shifted image sequences include foreground objects that occlude the background panel;

[0128] The phase map on the background plate is obtained by analyzing the sinusoidal background light and phase image sequence;

[0129] The phase map is verified to obtain the outline edge of the foreground object.

[0130] In one embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, causes the processor to perform the following steps:

[0131] The background light of the background board is obtained by a sinusoidal distribution, which is obtained by multiple strip lights arranged in parallel at equal intervals and a semi-transparent light shield.

[0132] Obtain the initial background illumination with a sinusoidal background light distribution;

[0133] Obtain sinusoidal background light with different brightness distribution periods;

[0134] Acquire a set of phase-shifted image sequences corresponding to the distribution period of the sinusoidal background light, wherein the images in the phase-shifted image sequences include foreground objects that occlude the background panel;

[0135] The phase map on the background plate is obtained by analyzing the sinusoidal background light and phase image sequence;

[0136] The phase map is verified to obtain the outline edge of the foreground object.

[0137] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.

[0138] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0139] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. An image processing method, characterized in that, Including the following steps: The background light of the background board is obtained by a sinusoidal distribution, which is obtained by multiple strip lights arranged in parallel at equal intervals and a semi-transparent light shield. Obtain the initial background illumination with a sinusoidal background light distribution; Obtain sinusoidal background light with different brightness distribution periods; Acquire a set of phase-shifted image sequences corresponding to the distribution period of the sinusoidal background light, wherein the images in the phase-shifted image sequences include foreground objects that occlude the background panel; The phase map on the background plate is obtained by analyzing the sinusoidal background light and phase image sequence using a three-step phase-shifting method. Verify the phase map to obtain the outline edge of the foreground object; The images in the phase-shifted image sequence are: ; in For transparency, Foreground image, Background image; The background image is: ; in, Use the background image as a reference brightness. The main phase value on the background light panel; The phase shift is in radians; Using three consecutive strip lights as a group, only one strip light in each group is illuminated at a time, and these strip lights are illuminated sequentially to obtain three sinusoidal background lights. The phase shift... They are respectively Based on the three phase image sequences, the following was obtained through analysis: According to the corresponding calibration Three background images are obtained, and the transparency and outline edges of the foreground objects are derived from these three background images.

2. The image processing method according to claim 1, characterized in that, The simulated brightness of the corresponding points, including the initial background lighting, is as follows: ; Where x is the x-axis direction of the strip light arrangement, i is the sequence number of the strip light, the number of strip lights is (2N+1), D is the brightness distribution period when the strip lights are fully lit, and R is the distance between the strip lights and the semi-transparent light shield.

3. The image processing method according to claim 1, characterized in that, The steps for obtaining sinusoidal background light with different brightness distribution periods include: Multiple sinusoidal background lights with continuously and equally varying brightness distributions are obtained by combining the bright and dark sequences of strip lights.

4. The image processing method according to claim 1, characterized in that: The phase image sequence is as follows: ; ; ; Analysis of the phase image sequence yields: ; According to the calibration and background image We can obtain: ; ; ; according to , and The transparency and the outline edge of the foreground object can be derived: ; 。 5. The image processing method according to claim 1, characterized in that: The transparency and the outline edges of the foreground object are optimized by constructing an energy optimization equation: .

6. An image processing apparatus, characterized in that, The apparatus for applying the image processing method according to any one of claims 1 to 5, the apparatus comprising: The background light acquisition module is used to acquire the sinusoidal distribution background light of the background board. The sinusoidal distribution background light is acquired by multiple strip lights arranged in parallel at equal intervals and a semi-transparent light shield. The initial background light acquisition module is used to acquire the initial background illumination of the sinusoidal background light distribution. The sinusoidal background light acquisition module is used to acquire sinusoidal background light with different brightness distribution periods; The image sequence acquisition module is used to acquire a set of phase-shifted image sequences corresponding to the distribution period of the sinusoidal background light, wherein the images in the phase-shifted image sequences include foreground objects that occlude the background panel; The phase map parsing module is used to parse the sinusoidal background light and phase image sequence to obtain the phase map on the background plate; The contour acquisition module is used to verify the contour edges of the foreground object obtained from the phase map.

7. A computer-readable storage medium, characterized in that, The device stores a computer program that, when executed by a processor, causes the processor to perform the steps of the method as described in any one of claims 1 to 5.

8. A computer device, characterized in that, It includes a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Image processing method, image processing device, electronic device and computer readable storage medium

    CN107590793A

  • Image processing method and device, electronic device and computer readable storage medium

    CN107730509A