Image processing method, electronic equipment and image processing system

By calculating the depth difference information and target blur parameters of the focus depth parameters and pixel depth parameters in the image, the blur degree of each pixel is determined and blurred, the problem of inability to flexibly adjust the blur degree in the prior art is solved, and more flexible is achieved and efficient image background blur effect.

CN119402746APending Publication Date: 2025-02-07ARASHI VISION INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411327237.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-23
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

In the image background blur processing, the degree of blur cannot be flexibly adjusted according to actual needs, resulting in the processed image being unable to meet the actual needs.

Method used

By obtaining the focus depth parameters of the image to be processed and the pixel depth parameters of the pixels in the background area, the depth difference information and the target blur parameters are calculated, and the degree of blurring of each pixel is determined based on this information, and blurring is performed.

Benefits of technology

The blurring degree of pixels is flexibly determined according to the blurring degree of the background area, ensuring that the processed image meets actual needs, and enhancing the flexibility and effect of image processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119402746A_ABST
    Figure CN119402746A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an image processing method, electronic equipment, shooting equipment and an image processing system, and the method comprises the steps: obtaining a to-be-processed image which comprises a background region; determining a focusing depth parameter of the to-be-processed image and a pixel depth parameter of at least part of pixels in the background area; depth difference information between the focusing depth parameter and the pixel depth parameter and a target fuzzy parameter corresponding to each pixel in the at least part of pixels are determined, and the target fuzzy parameter is determined based on the fuzzy degree requirement of the background area; determining the fuzzy degree of each pixel in the at least part of pixels based on the depth difference information and the target fuzzy parameter; and based on the fuzzy degree of each pixel in the at least part of pixels, performing fuzzy processing on the at least part of pixels.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to but is not limited to the field of image blur processing, and in particular to an image processing method, an electronic device and an image processing system. Background Art

[0002] In application scenarios such as video conferencing, video calls, and live video broadcasting, in order to achieve the effect of highlighting the subject and increasing the beauty of the picture, the background of the image can be blurred or blurred; however, in related technologies, the background is usually blurred only based on the depth parameters of the background. In this way, the blurred image may not meet the actual needs of blurring. Summary of the invention

[0003] Embodiments of the present application provide an image processing method, an electronic device, and an image processing system.

[0004] According to a first aspect of an embodiment of the present application, there is provided an image processing method, which is applied in an electronic device, and the method includes:

[0005] Acquire an image to be processed, wherein the image to be processed includes a background area;

[0006] Determining a focus depth parameter of the image to be processed and a pixel depth parameter of at least part of the pixels in the background area;

[0007] Determining depth difference information between the focus depth parameter and the pixel depth parameter, and a target blur parameter corresponding to each pixel in the at least part of the pixels, wherein the target blur parameter is determined based on a blur degree requirement of the background area;

[0008] Determining a blur degree of each pixel in the at least some pixels based on the depth difference information and the target blur parameter;

[0009] Based on the blur degree of each pixel in the at least part of the pixels, blur processing is performed on the at least part of the pixels.

[0010] In some embodiments, the target blur parameters corresponding to the pixels in the at least part of the pixels are the same parameters.

[0011] In some embodiments, the target blur parameter corresponding to each pixel in the at least some pixels is a depth parameter in the pixel depth parameters of the at least some pixels.

[0012] In some embodiments, after acquiring the image to be processed, the method further includes: determining, in the background area, a first portion of pixels that need to be blurred and a second portion of pixels that do not need to be blurred; blurring the at least portion of pixels based on the blur degree of each pixel in the at least portion of pixels, including: blurring the first portion of pixels based on the blur degree of each pixel in the first portion of pixels while keeping the pixel information of the second portion of pixels unchanged.

[0013] In some embodiments, determining a first part of pixels that need to be blurred and a second part of pixels that do not need to be blurred in the background area includes: determining pixel depth parameters of each pixel in the background area; among the pixels in the background area, determining pixels whose pixel depth parameters meet preset conditions as the first part of pixels, and determining pixels whose pixel depth parameters do not meet the preset conditions as the second part of pixels.

[0014] In some embodiments, the preset condition is that a depth difference between a pixel depth parameter and the focus depth parameter is greater than a first set value.

[0015] In some embodiments, determining the blur degree of each pixel in the at least portion of pixels based on the depth difference information and the target blur parameter includes: obtaining a target adjustment parameter, wherein the target adjustment parameter indicates a blur adjustment degree; determining the blur degree of each pixel in the at least portion of pixels based on the depth difference information, the target blur parameter and the target adjustment parameter, wherein the blur degree is associated with the target adjustment parameter.

[0016] In some embodiments, the acquiring of the target adjustment parameter includes: displaying a fuzzy adjustment control, the fuzzy adjustment control being used to determine a fuzzy adjustment degree; and acquiring the target adjustment parameter in response to a trigger operation on the fuzzy adjustment control.

[0017] In some embodiments, determining the focus depth parameter of the image to be processed includes: identifying a target object in the image to be processed; determining a target focus area of ​​the image to be processed based on pixels corresponding to the target object; and determining the focus depth parameter of the object to be processed based on pixel depth parameters of pixels in the target focus area.

[0018] In some embodiments, after blurring the at least part of the pixels, the method further includes: determining a diffusion radius of each pixel based on a pixel depth parameter of each pixel in the blurred image; determining a diffusion range of a first pixel in the blurred image based on a diffusion radius of the first pixel, the first pixel representing any pixel in the blurred image; searching for a target pixel diffused to the first pixel in the diffusion range of the first pixel, the distance between the target pixel and the first pixel being less than the diffusion radius of the target pixel;

[0019] Based on the found brightness value of each target pixel, the pixel information of each target pixel is updated.

[0020] In some embodiments, updating the pixel information of each target pixel based on the brightness value of each target pixel found includes: determining the weight of each target pixel based on the brightness value of each target pixel found; and performing weighted processing on the pixel information of each target pixel based on the weight of each target pixel to obtain updated pixel information of each target pixel.

[0021] According to a second aspect of an embodiment of the present application, an electronic device is provided, comprising a processor and a memory for storing a computer program that can be run on the processor; wherein the processor is used to run the computer program to execute any one of the above-mentioned image processing methods.

[0022] According to a third aspect of an embodiment of the present application, there is provided an image processing system, which includes at least one electronic device as described above, and at least one image acquisition device, wherein the electronic device forms a communication connection with the image acquisition device, and the image acquisition device is used to acquire an image to be processed.

[0023] It can be seen that since the target blur parameter can be determined based on the blur level requirement of the background area, and the blur level of the pixel can be determined based on the target blur parameter, after blurring the pixel according to the blur level of the pixel, the blurred image can meet the blur level requirement of the background area. Further, in the case of determining the target blur parameter based on the flexibly set blur level requirement, the embodiment of the present application can flexibly determine the blur level of the pixel in the background area.

[0024] It should be understood that the above general description and the following detailed description are merely exemplary and explanatory, and are not intended to limit the technical solutions of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

[0026] Figure 1 A flowchart of an image processing method according to an embodiment of the present application;

[0027] Figure 2 A flowchart for determining some pixels that need to be blurred in an embodiment of the present application;

[0028] Figure 3 A flowchart of determining the blur degree of a pixel in an embodiment of the present application;

[0029] Figure 4 A schematic diagram of a curve relationship between a pixel depth parameter and a blur degree of a background area at different focus depths provided in an embodiment of the present application;

[0030] Figure 5 This is a flow chart of generating a light spot by updating pixel information in an embodiment of the present application;

[0031] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0032] Figure 7 Schematic diagram of the structure of the image processing system according to an embodiment of the present application. DETAILED DESCRIPTION

[0033] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0034] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0035] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing this application and are not intended to limit this application.

[0036] In application scenarios such as video conferencing, video calls, and live video broadcasts, there is a need to improve the display effect of image pictures. In the relevant technology, the need to improve the display effect of image pictures can be specifically reflected in the following demand points: 1) The need for privacy protection. For example, in scenarios such as working from home and remote meetings, it is necessary to pay attention to protecting the privacy of the person being photographed to avoid unnecessary trouble or infringement. User privacy can be protected by blurring the background, mosaics, or replacing the background. 2) The need for enhanced visual effects. For example, in order to achieve the effect of highlighting the subject and increasing the beauty of the picture, it is necessary to blur the background or depth of field of the image to enhance the viewing experience of the picture. Here, background blur refers to the blurring of the image background. By blurring the image background, the main object or main character in the image can be highlighted. 3) In a meeting scenario, there is a need to share images with others.

[0037] In order to meet the above requirements, it is necessary to identify the foreground and background of the image, and it is necessary to obtain the depth parameters of each pixel in the image. In a technical solution of the related technology, the depth parameters of the scene image can be obtained by processing the scene image data, and the background area is divided into at least one blurred area based on the depth parameters of the background area of ​​the image. The degree of blurring of each blurred area is determined, and the degree of blurring of each blurred area is positively correlated with the corresponding depth parameter. The defects of this solution include: 1) It is necessary to divide the background area into one or more blurred areas, which increases the complexity of image processing; 2) The degree of blurring cannot be adjusted according to the actual needs of blurring processing, and the influence of different aperture sizes on the degree of blurring cannot be reflected. For example, different degrees of blurring that reflect the aperture size cannot be set for apertures from F1.5 to F4.0.

[0038] In view of the above-mentioned technical problems existing in the related art, a technical solution of the embodiment of the present application is proposed.

[0039] The embodiment of the present application provides an image processing method, which can be applied to an electronic device. Exemplarily, the electronic device can be a terminal with a display such as a mobile phone, a tablet computer, a personal computer (PC), a camera, etc. In some embodiments, the electronic device can include an image acquisition device for acquiring an image to be processed; in other embodiments, the electronic device can be independently provided with the image acquisition device, and the electronic device and the image acquisition device can form a communication connection, for example, by wired or wireless means.

[0040] Figure 1 is a flowchart of the image processing method according to an embodiment of the present application, such as Figure 1 As shown, the process includes:

[0041] Step 101: Acquire an image to be processed, wherein the image to be processed includes a background area.

[0042] In some embodiments, the image to be processed can be acquired by an image acquisition device in the electronic device. In other embodiments, when the electronic device forms a communication connection with the image acquisition device, the electronic device can also receive the image to be processed sent by the image acquisition device. For example, when the user determines that background blur processing needs to be performed on the captured image, a webcam can be connected to the electronic device, and the electronic device can receive the image captured in real time by the webcam.

[0043] Of course, in other embodiments, the electronic device may obtain a pre-stored image to be processed, or may obtain the image to be processed from a network.

[0044] In some embodiments, after acquiring the image to be processed, the electronic device may be switched from the current mode to the background blur mode, where the background blur mode refers to a mode in which the background area in the image is blurred. Exemplarily, the electronic device may be switched from the current mode to the background blur mode based on a preset event, for example, the electronic device may be automatically switched to the background blur mode after the electronic device is turned on, or the electronic device may be automatically switched to the background blur mode periodically, or the electronic device may be switched to the background blur mode by operations such as clicking, double-clicking, sliding, or gesture triggering.

[0045] Here, after acquiring the image to be processed, the foreground area and the background area of ​​the image to be processed can be identified. For example, the foreground area and the background area can be divided in the image to be processed according to the depth parameters of each pixel in the image to be processed, or the image to be processed can be divided into the foreground area and the background area using a pre-trained image segmentation model.

[0046] Step 102: Determine a focus depth parameter of the image to be processed and a pixel depth parameter of at least part of the pixels in the background area.

[0047] In the embodiment of the present application, the focus depth parameter can be determined according to the pixel depth parameter of the foreground area in the image to be processed.

[0048] In some embodiments, after the mode of the electronic device is switched to the background blur mode, the depth parameters of each pixel in the image to be processed can be determined using a depth estimation algorithm; in one example, a monocular depth estimation model based on convolutional neural network technology can be used to estimate the depth of each pixel in the image to be processed, thereby determining the depth parameters of each pixel in the image to be processed; here, the depth parameter of each pixel can be a real depth such as physical depth, real distance, or a relative depth between pixels; the monocular depth estimation model can be a MiDas (Multiple Depth Estimation Accuracy with Single Network) model, a monocular depth (Monocular Depth, mono-depth) model, a depth-anything model, etc. In another example, a binocular depth estimation model can be used to estimate the depth of each pixel in the image to be processed; two images of the same scene can be taken by two cameras, and then a disparity map can be generated using a stereo matching algorithm, and then the depth parameters of each pixel in the image to be processed are calculated based on the disparity map and the baseline between the binoculars.

[0049] In some embodiments, determining the focus depth parameter of the image to be processed includes: identifying a target object in the image to be processed; determining a target focus area of ​​the image to be processed based on pixels corresponding to the target object; and determining a focus depth parameter of the object to be processed based on pixel depth parameters of pixels in the target focus area.

[0050] Here, the target object may be an object existing in the foreground area such as a human face, a human head, or a human body. In one example, the largest human face or the largest human head in the image to be processed may be identified by an image recognition algorithm, and the identified largest human face or the largest human head may be used as the target object. In another example, a human body segmentation model of the image may be used to segment a human body in the image to be processed, and the segmented human body may be used as the target object.

[0051] Exemplarily, the area where the pixels corresponding to the target object are located can be determined as the target focus area of ​​the image to be processed. After determining the target focus area of ​​the image to be processed, the focus depth parameters can be determined based on the pixel depth parameters of the pixels in the target focus area. For example, statistical operations can be performed on the pixel depth parameters of the pixels in the target focus area, where the statistical operations can include, for example, averaging operations on all or part of the pixel depth parameters, so as to obtain the focus depth parameters of the object to be processed.

[0052] It can be seen that the embodiment of the present application can, after identifying the target object of the image to be processed, use the pixel depth parameters of the pixels of the target object as the basis for the focus depth parameters of the object to be processed. Therefore, the focus depth parameters of the object to be processed can reflect the relevant information of the target object, and thus, it is helpful to realize the blurring of pixels in the background area of ​​the image according to the relevant information of the target object.

[0053] Step 103: Determine depth difference information between the focus depth parameter and the pixel depth parameter, and a target blur parameter corresponding to each pixel in at least part of the pixels, wherein the target blur parameter is determined based on a blur degree requirement of the background area.

[0054] The depth difference information refers to relevant information that can reflect the depth difference between the focus depth parameter and the pixel depth parameter. For example, the depth difference information can be determined based on the absolute value of the difference between the focus depth parameter and the pixel depth parameter. For example, if the focus depth parameter is P and the pixel depth parameter is D, the depth difference information can be specifically |PD|.

[0055] Step 104: Determine the blur level of each pixel in at least part of the pixels based on the depth difference information and the target blur parameter.

[0056] Exemplarily, the blur degree of each pixel may be positively correlated with the depth difference information and negatively correlated with the target blur parameter; for example, the blur degree of each pixel may be denoted as C, where C is proportional to the depth difference information and inversely proportional to the target blur parameter.

[0057] Step 105: performing blur processing on at least some of the pixels based on the blur degree of each pixel in at least some of the pixels.

[0058] It can be seen that since the target blur parameter can be determined based on the blur level requirement of the background area, and the blur level of the pixel can be determined based on the target blur parameter, after blurring the pixel according to the blur level of the pixel, the blurred image can meet the blur level requirement of the background area. Further, in the case of determining the target blur parameter based on the flexibly set blur level requirement, the embodiment of the present application can flexibly determine the blur level of the pixel in the background area.

[0059] In some embodiments of the present application, the target blur parameter corresponding to each pixel in the at least some pixels may be a dynamically changing parameter, for example, the target blur parameter corresponding to each pixel in the at least some pixels may correspond to a pixel depth parameter of the pixel. In one example, the focus depth parameter is P, the pixel depth parameter of one pixel in the at least some pixels is D, and the blur degree of the corresponding pixel is C, then the blur degree C of the corresponding pixel is determined according to formula (1).

[0060]

[0061] In some embodiments of the present application, the target blur parameter corresponding to each pixel in the at least some pixels is the same parameter. Exemplarily, the target blur parameter corresponding to each pixel in the at least some pixels is a depth parameter in the pixel depth parameters of the at least some pixels.

[0062] It can be understood that since the blur degree of each pixel is determined based on the depth difference information and the target blur parameter, when the target blur parameter corresponding to each pixel in at least some of the above pixels is the same parameter, the blur degree of each pixel can more fully reflect the depth difference information, thereby facilitating blurring the pixel according to the depth difference information.

[0063] In some embodiments of the present application, after acquiring the image to be processed, a first portion of pixels that need to be blurred and a second portion of pixels that do not need to be blurred can also be determined in the background area. Accordingly, based on the blur degree of each pixel in at least a portion of the pixels, blurring is performed on at least a portion of the pixels, including: blurring the first portion of pixels based on the blur degree of each pixel in the first portion of pixels while keeping the pixel information of the second portion of pixels unchanged.

[0064] Here, the first part of pixels that need to be blurred and the second part of pixels that do not need to be blurred can be determined according to the actual needs of the blur processing. The pixel information of the second part can be information such as grayscale values.

[0065] It can be seen that the embodiment of the present application can blur the first part of pixels while keeping the pixel information of the second part of pixels unchanged. Therefore, the embodiment of the present application does not need to blur all the pixels in the background area, but can blur part of the pixels in the background area. Thus, it can be adapted to the scene that needs to clearly display part of the content in the background area.

[0066] In some embodiments of the present application, reference Figure 2 In the background area, the process of determining a first portion of pixels that need to be blurred and a second portion of pixels that do not need to be blurred may include:

[0067] Step A1: Determine the pixel depth parameter of each pixel in the background area.

[0068] Step A2: among the pixels in the background area, pixels whose pixel depth parameters satisfy a preset condition are determined as first-part pixels, and pixels whose pixel depth parameters do not satisfy the preset condition are determined as second-part pixels.

[0069] Exemplarily, the preset condition is that the depth difference between the pixel depth parameter and the focus depth parameter is greater than a first setting value. Here, the first setting value can be determined according to actual needs.

[0070] It can be seen that the embodiment of the present application can reasonably determine the partial pixels that need to be blurred and the partial pixels that do not need to be blurred according to preset conditions; further, when the depth difference between the pixel depth parameter and the focus depth parameter is greater than the first set value, it means that the relative depth between the pixel and the target object is large. At this time, by blurring the pixels, the effect of highlighting the target object in the image can be achieved.

[0071] In some embodiments of the present application, reference Figure 3 The process of determining a blur level of each pixel in at least some of the pixels based on the depth difference information and the target blur parameter includes:

[0072] Step B1: Obtain a target adjustment parameter, wherein the target adjustment parameter indicates a fuzzy adjustment degree.

[0073] Step B2: Based on the depth difference information, the target blur parameter and the target adjustment parameter, determine the blur degree of each pixel in at least part of the pixels, where the blur degree is associated with the target adjustment parameter.

[0074] For example, the target adjustment parameter may be denoted as R. The target adjustment parameter R may be flexibly set by the user. After the target adjustment parameter R is determined, the blur degree C of the corresponding pixel may be determined according to formula (2).

[0075]

[0076] When the blur degree C of the corresponding pixel is determined according to formula (2), it can be obtained by Figure 4 The relationship between the pixel depth parameter and blur degree of the background area at different focus depths is presented. Figure 4 , the horizontal axis represents the pixel depth parameter, the vertical axis represents the blur degree, curve 1 represents the relationship curve between the pixel depth parameter and the blur degree of the background area when the focus depth parameter is 0.5m, and curve 2 represents the relationship curve between the pixel depth parameter and the blur degree of the background area when the focus depth parameter is 1m. It can be seen that when the difference between the pixel depth parameter of the background area and the focus depth parameter is greater, the blur degree of the corresponding pixel is greater, and conversely, when the difference between the pixel depth parameter of the background area and the focus depth parameter is smaller, the blur degree of the corresponding pixel is smaller, which is conducive to simulating the depth of field blur effect in the real scene.

[0077] It can be seen that the embodiment of the present application can flexibly adjust the blur degree of the pixel according to the target adjustment parameter indicating the blur adjustment degree, which is conducive to simulating different blur degrees corresponding to different apertures.

[0078] In some embodiments of the present application, the process of obtaining the target adjustment parameter includes: displaying a fuzzy adjustment control, where the fuzzy adjustment control is used to determine the degree of fuzzy adjustment; and obtaining the target adjustment parameter in response to a trigger operation on the fuzzy adjustment control.

[0079] Here, the blur adjustment control can be in the form of an icon, an input box, a button, etc., for inputting information. The triggering operation for the blur adjustment control can be a specific touch operation, such as a single-click operation, a long-press operation, a double-click operation, and a sliding operation, etc., or can be triggered by voice, gesture, etc.; optionally, the triggering operation can also be a combination of a series of operations, which is not limited in this embodiment. It can be seen that by displaying the blur adjustment control, it is conducive to enabling the user to manually adjust the blur degree, and enhances the interactivity when blurring the background area pixels.

[0080] In some embodiments of the present application, after blurring the at least part of the pixels, a light spot may be generated by updating pixel information.

[0081] Reference Figure 5 ,The process of updating pixel information includes:

[0082] Step C1: Determine the diffusion radius of each pixel based on the pixel depth parameter of each pixel in the image after blur processing.

[0083] Here, the pixel depth parameter of each pixel may be multiplied by the target adjustment parameter R to obtain the diffusion radius of the corresponding pixel.

[0084] Step C2: determining a diffusion range of a first pixel based on a diffusion radius of a first pixel in the image after blur processing, wherein the first pixel represents any pixel in the image after blur processing.

[0085] Here, taking the first pixel as the center of the circle and the diffusion radius of the first pixel as the radius, the circular diffusion range of the first pixel can be determined.

[0086] Step C3: searching for a target pixel diffused to the first pixel within the diffusion range of the first pixel, and the distance between the target pixel and the first pixel is the diffusion radius of the target pixel.

[0087] Exemplarily, the first pixel is recorded as q. If the distance between the first pixel p and the pixel x is less than the diffusion radius of the pixel x, it can be considered that the pixel x has diffused to the first pixel p, and the pixel x is determined as the target pixel.

[0088] Step C4: based on the found brightness value of each target pixel, update the pixel information of each target pixel.

[0089] By updating the pixel information of each target pixel, a light spot can be generated.

[0090] Exemplarily, the weight of each target pixel can be determined based on the brightness value of each target pixel found; then, based on the weight of each target pixel, the pixel information of each target pixel is weighted to obtain updated pixel information of each target pixel.

[0091] Here, the weight of the target pixel is positively correlated with the brightness value of the target pixel, that is, a target pixel with a larger brightness value has a larger target pixel.

[0092] It can be seen that the embodiment of the present application can determine the target pixels whose pixel information needs to be updated according to the diffusion radius of the pixels in the image after blur processing, and the simulation of the light spot effect can be achieved by updating the pixel information of each target pixel.

[0093] The embodiment of the present application can perform pixel blur processing on the background area of ​​the image to be processed acquired in real time. For example, the blur processing algorithm can be realized in real time by accelerating the processing through lightweight equipment and algorithms. For example, the embodiment of the present application can use the computing power of embedded devices to perform the pixel blur processing function, or transmit the image to be processed to a terminal such as a PC or a mobile phone, and perform the pixel blur processing function on the terminal.

[0094] In summary, the embodiment of the present application proposes a background area pixel blur processing solution based on depth estimation. It does not need to rely on laser radar, structured light, infrared and other equipment to obtain depth, but can automatically calculate the depth parameters of the image to be processed through the image depth estimation algorithm, and automatically analyze the foreground area and background area in the image to be processed, and then calculate the blur degree of the background pixel according to the relative relationship between the pixel depth parameter of the background area and the focus depth parameter, so as to achieve the effect of highlighting the subject, blurring the background and simulating the depth of field. At the same time, the embodiment of the present application proposes a function for the user to determine the blur adjustment degree, so as to simulate the background blur effect under different apertures. The technical solution of the embodiment of the present application is adopted, which helps to enhance the artistry of the image, and can also achieve the effect of balancing the image hierarchy and improving the visual experience. By blurring the pixels of the background part, it is also possible to blur the user information in the background part, so as to achieve the effect of protecting the user's privacy.

[0095] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.

[0096] It should be noted that in the embodiments of the present application, if the above method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium, including a number of instructions to enable a computer device (which can be a terminal, a server, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a disk or an optical disk. In this way, the embodiments of the present application are not limited to any specific combination of hardware and software.

[0097] Correspondingly, an embodiment of the present application further provides a computer program product, which includes computer executable instructions, and the computer executable instructions are used to implement any image processing method provided in the embodiment of the present application.

[0098] Correspondingly, an embodiment of the present application further provides a computer storage medium, on which computer executable instructions are stored, and the computer executable instructions are used to implement any one of the image processing methods provided in the above embodiments.

[0099] Based on the image processing method applied to an electronic device proposed in the foregoing embodiment, an embodiment of the present application proposes an electronic device. Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown in FIG. Figure 6 As shown, the electronic device 60 may include:

[0100] Memory 601, configured to store executable instructions;

[0101] The processor 602 is configured to implement any one of the above-mentioned image processing methods when executing the executable instructions stored in the memory 601.

[0102] The processor 602 may be at least one of an ASIC, a DSP, a DSPD, a PLD, a FPGA, a CPU, a controller, a microcontroller, and a microprocessor.

[0103] The above-mentioned computer-readable storage medium and memory 602 can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory (Flash Memory), a magnetic surface memory, an optical disk, or a compact disc read-only memory (CD-ROM) and other memories; it can also be various terminals including one or any combination of the above-mentioned memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.

[0104] The present application also provides an image processing system, referring to Figure 7 The image processing system 70 includes at least one electronic device 60 as described above and at least one image acquisition device 701. The electronic device 60 is in communication connection with the image acquisition device 701. The image acquisition device 701 is used to acquire images to be processed.

[0105] It should be noted that the description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the device embodiment of the present application, please refer to the description of the method embodiment of the present application for understanding.

[0106] In some embodiments, the functions or modules included in the device provided in the embodiments of the present application can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments. For the sake of brevity, it will not be repeated here.

[0107] The above description of various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other, and for the sake of brevity, they will not be repeated herein.

[0108] The methods disclosed in the various method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.

[0109] The features disclosed in the various product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.

[0110] The features disclosed in the various method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.

[0111] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. An image processing method, characterized in that: Applied to electronic equipment, the method comprises: Acquire an image to be processed, wherein the image to be processed includes a background area; Determining a focus depth parameter of the image to be processed and a pixel depth parameter of at least part of the pixels in the background area; Determining depth difference information between the focus depth parameter and the pixel depth parameter, and a target blur parameter corresponding to each pixel in the at least part of the pixels, wherein the target blur parameter is determined based on a blur degree requirement of the background area; Determining a blur degree of each pixel in the at least some pixels based on the depth difference information and the target blur parameter; Based on the blur degree of each pixel in the at least part of the pixels, blur processing is performed on the at least part of the pixels.

2. The method according to claim 1, characterized in that The target blur parameters corresponding to the pixels in at least part of the pixels are the same parameters.

3. The method according to claim 2, characterized in that The target blur parameter corresponding to each pixel in the at least part of the pixels is a depth parameter in the pixel depth parameters of the at least part of the pixels.

4. The method according to claim 1, characterized in that: After acquiring the image to be processed, the method further includes: In the background area, determining a first portion of pixels that need to be blurred and a second portion of pixels that do not need to be blurred; The blurring process is performed on at least part of the pixels based on the blurring degree of each pixel in the at least part of the pixels, comprising: While keeping pixel information of the second part of pixels unchanged, blur processing is performed on the first part of pixels based on the blur degree of each pixel in the first part of pixels.

5. The method according to claim 4, characterized in that Determining, in the background area, a first portion of pixels that need to be blurred and a second portion of pixels that do not need to be blurred includes: Determining a pixel depth parameter of each pixel in the background area; Among the pixels in the background area, pixels whose pixel depth parameters satisfy a preset condition are determined as the first part of pixels, and pixels whose pixel depth parameters do not satisfy the preset condition are determined as the second part of pixels.

6. The method according to claim 5, characterized in that The preset condition is that a depth difference between a pixel depth parameter and the focus depth parameter is greater than a first set value.

7. The method according to any one of claims 1 to 6, characterized in that: The determining, based on the depth difference information and the target blur parameter, a blur degree of each pixel in the at least part of the pixels comprises: Acquiring a target adjustment parameter, wherein the target adjustment parameter indicates a fuzzy adjustment degree; Based on the depth difference information, the target blur parameter and the target adjustment parameter, a blur degree of each pixel in the at least part of the pixels is determined, and the blur degree is associated with the target adjustment parameter.

8. The method according to claim 7, characterized in that The obtaining of the target adjustment parameter comprises: Displaying a fuzzy adjustment control, wherein the fuzzy adjustment control is used to determine the degree of fuzzy adjustment; In response to a trigger operation on the fuzzy adjustment control, a target adjustment parameter is obtained.

9. The method according to any one of claims 1 to 6, characterized in that: The step of determining the focus depth parameter of the image to be processed includes: Identifying a target object in the image to be processed; Determining a target focus area of ​​the image to be processed based on pixels corresponding to the target object; Determine a focus depth parameter of the object to be processed according to pixel depth parameters of pixels in the target focus area.

10. The method according to any one of claims 1 to 6, characterized in that: After blurring the at least some of the pixels, the method further includes: Determine the diffusion radius of each pixel based on a pixel depth parameter of each pixel in the image after blur processing; determining a diffusion range of a first pixel based on a diffusion radius of the first pixel in the image after blur processing, wherein the first pixel represents any pixel in the image after blur processing; Searching for a target pixel diffused to the first pixel in the diffusion range of the first pixel, wherein the distance between the target pixel and the first pixel is smaller than the diffusion radius of the target pixel; Based on the found brightness value of each target pixel, the pixel information of each target pixel is updated.

11. The method according to claim 10, characterized in that The updating of the pixel information of each target pixel based on the brightness value of each target pixel found includes: Determining the weight of each target pixel based on the brightness value of each target pixel found; Based on the weight of each target pixel, weighted processing is performed on the pixel information of each target pixel to obtain updated pixel information of each target pixel.

12. An electronic device, characterized in that: The electronic device comprises a processor and a memory for storing a computer program that can be run on the processor; wherein, The processor is configured to run the computer program to perform the method of any one of claims 1 to 11.

13. An image processing system, characterized in that: The device comprises at least one electronic device as claimed in claim 11, and at least one image acquisition device, wherein the electronic device is in communication connection with the image acquisition device, and the image acquisition device is used to acquire the image to be processed.