Image processing method and device, electronic equipment and storage medium

By adjusting the parameters of diffuse circles in electronic devices and simulating optical blurring, the problem of difficult to achieve optical blurring effects in electronic devices is solved, and the blurring effects are achieved with a more delicate and natural effect.

CN119450188AActive Publication Date: 2025-02-14BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202310968134.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-02
Publication Date
2025-02-14
Estimated Expiration
2043-08-02

AI Technical Summary

Technical Problem

In electronic devices, optical blur effect is difficult to achieve due to space limitations, and computational blur is usually used, but problems are prone to unnatural blur transitions.

Method used

By acquiring the shooting parameters of the image to be processed and the object distance of the diffuse circle, adjusting the diffuse circle to obtain the processed image, achieving separate processing of the object point light source and simulating optical blur.

Benefits of technology

The blur effect is achieved more delicate and natural, and the details are more obvious, avoiding the problem of unnatural transition of blur and achieving better blur effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119450188A_ABST
    Figure CN119450188A_ABST
Patent Text Reader

Abstract

The invention relates to an image processing method and device, electronic equipment and a storage medium. The image processing method comprises the following steps: acquiring shooting parameters of a to-be-processed image; obtaining a confusion circle in the to-be-processed image and an object distance of the confusion circle; and based on the object distance of the confusion circle and the shooting parameters, adjusting the confusion circle to obtain a processed image. According to the method, the processed image is obtained by adjusting the confusion circle, the object point light source is independently processed, optical blurring can be simulated to the maximum extent, the blurring effect is finer and more natural, details are more obvious, the good blurring effect is achieved, and the problem that blurring is excessively unnatural is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of image processing technology, and in particular to an image processing method, device, electronic device and storage medium. Background Art

[0002] When an electronic device shoots an image or video, if it wants to achieve a blur effect in the image or video by optical blur, it is necessary to set a large shooting module in the electronic device to lengthen the focal length to achieve the optical blur effect. However, this method is limited by the small space in the electronic device and cannot accommodate a large module. Therefore, in the electronic device, a computational blur method is usually used to blur the background in the image or video to achieve a background blur effect. Summary of the invention

[0003] In order to overcome the problems existing in the related art, the present disclosure provides an image processing method, device, electronic device and storage medium.

[0004] According to a first aspect of an embodiment of the present disclosure, there is provided an image processing method, the image processing method comprising:

[0005] Obtain shooting parameters of the image to be processed;

[0006] Acquire the confusion circle in the image to be processed and the object distance of the confusion circle;

[0007] Based on the object distance of the confusion circle and the shooting parameters, the confusion circle is adjusted to obtain a processed image.

[0008] In an exemplary embodiment, obtaining the object distance of the circle of confusion includes:

[0009] Determine the diameter of the circle of confusion based on the number of pixels occupied by the diameter of the circle of confusion in the image to be processed;

[0010] Based on the shooting parameters and the diameter of the circle of confusion, an object distance of the circle of confusion is determined.

[0011] In an exemplary embodiment, obtaining the circle of confusion in the image to be processed includes:

[0012] A partial or complete circle of confusion in the image to be processed is obtained.

[0013] In an exemplary embodiment, the obtaining of a part of the confusion circle or the whole of the confusion circle in the image to be processed includes:

[0014] Based on a preset neural network algorithm, some or all of the circles of confusion in the image to be processed are identified.

[0015] In an exemplary embodiment, adjusting the circle of confusion based on the object distance of the circle of confusion and the shooting parameters to obtain a processed image includes:

[0016] Adjusting the shooting parameters to obtain the adjusted shooting parameters;

[0017] Determining a target diameter of the circle of confusion based on the object distance of the circle of confusion and the adjusted shooting parameters;

[0018] The diameter of the circle of confusion is adjusted to the target diameter to obtain the processed image.

[0019] In an exemplary embodiment, the shooting parameters include focus distance, focal length, and aperture value.

[0020] In an exemplary embodiment, determining the target diameter of the circle of confusion based on the object distance of the circle of confusion and the adjusted shooting parameters includes:

[0021] The target diameter is determined by the following formula:

[0022]

[0023] Wherein, δ represents the target diameter, u B represents the object distance of the circle of confusion, u A represents the focus distance, f represents the adjusted focal length, and F represents the adjusted aperture value.

[0024] According to a second aspect of an embodiment of the present disclosure, there is provided an image processing apparatus, the image processing apparatus comprising:

[0025] An acquisition module, configured to acquire shooting parameters of an image to be processed;

[0026] A calculation module, configured to obtain a confusion circle in the image to be processed and an object distance of the confusion circle;

[0027] The processing module is configured to adjust the circle of confusion based on the object distance of the circle of confusion and the shooting parameters to obtain a processed image.

[0028] In an exemplary embodiment, the acquisition module is further configured to:

[0029] Determine the diameter of the circle of confusion based on the number of pixels occupied by the diameter of the circle of confusion in the image to be processed;

[0030] Based on the shooting parameters and the diameter of the circle of confusion, an object distance of the circle of confusion is determined.

[0031] In an exemplary embodiment, the computing module is further configured to:

[0032] A partial or complete circle of confusion in the image to be processed is obtained.

[0033] In an exemplary embodiment, the computing module is further configured to:

[0034] Based on a preset neural network algorithm, some or all of the circles of confusion in the image to be processed are identified.

[0035] In an exemplary embodiment, the processing module is further configured to:

[0036] Adjusting the shooting parameters to obtain the adjusted shooting parameters;

[0037] Determining a target diameter of the circle of confusion based on the object distance of the circle of confusion and the adjusted shooting parameters;

[0038] The diameter of the circle of confusion is adjusted to the target diameter to obtain the processed image.

[0039] In an exemplary embodiment, the shooting parameters include focus distance, focal length, and aperture value.

[0040] In an exemplary embodiment, the processing module is further configured to:

[0041] The target diameter is determined by the following formula:

[0042]

[0043] Wherein, δ represents the target diameter, u B represents the object distance of the circle of confusion, u A represents the focus distance, f represents the adjusted focal length, and F represents the adjusted aperture value.

[0044] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, including:

[0045] processor;

[0046] a memory for storing processor-executable instructions;

[0047] Wherein, the processor is configured to execute the image processing method as described in the first aspect of the embodiment of the present disclosure.

[0048] According to the fourth aspect of an embodiment of the present disclosure, a non-temporary computer-readable storage medium is provided. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device can perform the image processing method as described in the first aspect of the embodiment of the present disclosure.

[0049] The above-mentioned method disclosed in the present invention has the following beneficial effects: the method in the embodiment of the present invention obtains the processed image by adjusting the diffusion circle, which is a separate processing of the object point light source, and can simulate optical blur to the greatest extent, making the blur effect more delicate and natural, and the details more obvious, achieving a better blur effect, and avoiding the problem of unnatural blur transition.

[0050] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0052] Figure 1 is a flowchart of an image processing method according to an exemplary embodiment;

[0053] Figure 2 is a schematic diagram showing a formation principle of a circle of confusion according to an exemplary embodiment;

[0054] Figure 3 is a schematic diagram of an image to be processed according to an exemplary embodiment;

[0055] Figure 4 is a schematic diagram of processing an image according to an exemplary embodiment;

[0056] Figure 5 is a flowchart of an image processing method according to an exemplary embodiment;

[0057] Figure 6 is a flowchart of an image processing method according to an exemplary embodiment;

[0058] Figure 7 is a block diagram of an image processing device according to an exemplary embodiment;

[0059] Figure 8 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0060] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0061] In the related art, when the background of an image or video is blurred by computational blurring, there will be a problem of stiff blurring transition due to unnatural blurring transition, which makes the hair details in the blurred image or video unclear and other serious problems.

[0062] In an exemplary embodiment of the present disclosure, in order to overcome the problem of rigid blur transition in the related art, an image processing method is provided: obtaining shooting parameters of an image to be processed, obtaining a circle of confusion and an object distance of the circle of confusion in the image to be processed, and adjusting the circle of confusion based on the object distance of the circle of confusion and the shooting parameters to obtain a processed image. The method in the embodiment of the present disclosure obtains a processed image by adjusting the circle of confusion, which is a separate processing of an object point light source, and can simulate optical blur to the greatest extent, making the blur effect more delicate and natural, and the details more obvious, achieving a better blur effect, and avoiding the problem of unnatural blur transition.

[0063] In an exemplary embodiment of the present disclosure, an image processing method is provided. Figure 1 is a flowchart of an image processing method according to an exemplary embodiment. Figure 1 As shown, the following steps are included:

[0064] Step S101, obtaining shooting parameters of the image to be processed;

[0065] Step S102, obtaining the confusion circle and the object distance of the confusion circle in the image to be processed;

[0066] Step S103, adjusting the circle of confusion based on the object distance of the circle of confusion and the shooting parameters to obtain a processed image.

[0067] The method in the disclosed embodiment is applied to electronic devices, including smart phones, tablets, smart wearable devices and other electronic devices with shooting functions. The image processing method in the disclosed embodiment can be applied to the image post-processing process of the initial image before obtaining the captured image during the image shooting process; it can also be applied to the image processing process when editing the image after obtaining the captured image; it can also be applied to other image processing processes that require blurring of the image. Since the video is composed of multiple frames of images, the method in the disclosed embodiment can be applied to the processing of each frame of the video.

[0068] In step S101, the image to be processed may be an initial image captured by the image acquisition module during the image shooting process, or may be an image to be processed by the user during the image editing process. The shooting parameters are the parameters of the image acquisition module when shooting the image to be processed, and are stored in the image information of the image to be processed.

[0069] In some embodiments, the shooting parameters include focus distance, focal length, and aperture value. The focus distance indicates the distance from the focal plane to the lens during shooting. The position of the focal plane is the focus position. The focus position can be selected by the autofocus function of the image acquisition module, or by the focus instruction of the user in the shooting scene screen. After the focus position is selected, the object at the focus position is the clearest in the acquired image, and the object outside the focus position is blurred. The focal length indicates the distance from the lens focus to the optical center of the lens, usually represented by f. The focal length can control the field of view of the lens. The larger the focal length, the larger the field of view of the lens; the smaller the focal length, the smaller the field of view of the lens. The aperture value indicates the ratio of the focal length of the lens to the diameter of the lens aperture, usually represented by the F value. The aperture value can control the amount of light entering the lens. The larger the aperture value, the smaller the lens aperture, and the less light entering the lens; the smaller the aperture value, the larger the lens aperture, and the more light entering the lens.

[0070] In step S102, when a point on an object in a captured image is imaged, due to aberration, an imaging light beam forms a diffuse circular projection on an image plane, and the circular projection is the circle of confusion. Figure 2 is a schematic diagram showing the formation principle of the circle of confusion according to an exemplary embodiment, such as Figure 2 As shown, the amount of light entering the lens is controlled by the aperture. Point A is a point on the object at the focus position. The light of point A converges to point A' after passing through the lens. Point A' is located on the imaging plane. At this time, the image of point A on the imaging plane is a point, which can be regarded as a diffuse circle with a minimum diameter; point B is a point on the object outside the focus position. The light of point B converges to point B' after passing through the lens. Point B' is located before the imaging plane. At this time, the image of point B on the imaging plane is a diffuse circle with a diameter of δ; the vertical distance from point A to the lens is the focus distance, and the vertical distance from point B to the lens is the object distance of the diffuse circle formed by point B. Therefore, the diffuse circle can reflect the degree of blurring of the image. The larger the diameter of the diffuse circle, the farther the point on the object forming the diffuse circle is from the focal plane, and the blurrier the picture; the smaller the diameter of the diffuse circle, the closer the point on the object forming the diffuse circle is from the focal plane, and the clearer the picture. The object distance of the confusion circle represents the distance from the point on the object that forms the confusion circle to the lens, that is, Figure 2 The distance from the midpoint B to the lens.

[0071] It should be noted that the confusion circle may also be called a confusion spot, a vignetting circle, a confusion point, a blur circle, a blur point, etc. The shape of the confusion circle is not necessarily a regular circle, but may also be a polygon close to a circle.

[0072] When obtaining the confusion circle in the image to be processed, the confusion circle in the image to be processed can be detected by a target detection algorithm, or the confusion circle in the image to be processed can be identified by other image recognition algorithms. In one example, Figure 3is a schematic diagram of an image to be processed according to an exemplary embodiment. Figure 3 As shown, the approximately circular polygon in the image to be processed is the identified confusion circle.

[0073] When obtaining the object distance of the confusion circle, the image to be processed can be converted into a depth map. For example, the image to be processed is input into a preset depth of field recognition algorithm, the depth information of the image to be processed is output, and a depth map is generated based on the depth information. Another example is to use a binocular camera to shoot the image to be processed, and generate a depth map based on binocular vision algorithms such as dense stereo matching and sparse matching. The generated depth map includes the distance from each point in the shooting scene to the lens. Therefore, the object distance of the confusion circle can be obtained from the depth map. When obtaining the object distance of the confusion circle, it is also possible to identify the diameter of the confusion circle and then use the depth map to obtain the object distance of the confusion circle. Figure 2 The schematic diagram of the formation principle of the confusion circle shown is used to calculate the object distance of the confusion circle based on the shooting parameters and the diameter of the confusion circle.

[0074] Step S103, by Figure 2 The schematic diagram of the formation principle of the confusion circle is shown. The factors that affect the size of the confusion circle include the object distance of the confusion circle and the shooting parameters. When processing an image, the object distance of the confusion circle is determined, that is, the distance between the point on the object in the shooting scene and the lens does not change. Therefore, when the object distance of the confusion circle is determined, the confusion circle is adjusted by adjusting the value of the shooting parameters to adjust the blurring effect of the image to be processed.

[0075] For example, adjusting the focus distance, that is, adjusting the position of the focal plane, this method is only applicable to image processing when the image is edited after the image is captured, and when the depth information of all object points in the image to be processed can be known, the user selects a new focus position in the image to be processed through the adjustment instruction, and the confusion circle of each object point is re-formed according to the new focus position, so that the blurred position in the processed image obtained has changed. Alternatively, adjusting the focal length or adjusting the aperture value, that is, adjusting the position of the convergence point of the object point light source after passing through the lens, this method is applicable to image processing at any stage, according to the preset adjustment method, a new focal length or a new aperture value is obtained, and a new convergence point after passing through the lens is re-formed, and a new confusion circle is formed on the imaging plane based on the new convergence point, at this time, the degree of blur in the processed image obtained will change, if the diameter of the confusion circle becomes larger, the blur intensity of the processed image will increase, if the diameter of the confusion circle becomes smaller, the degree of blur in the processed image will decrease.

[0076] In one example, Figure 4 is a schematic diagram of processing an image according to an exemplary embodiment. Figure 4 As shown in the figure, the approximately circular polygon in the processed image is the adjusted confusion circle. Figure 3In comparison, the diameter of the adjusted confusion circle is larger, so the processed image is more blurred.

[0077] In the exemplary embodiment of the present disclosure, since the confusion circle is formed by the object point light source and is formed when the image is captured, obtaining the processed image by adjusting the confusion circle is a separate processing of the object point light source, which can simulate optical blur to the greatest extent, making the blur effect more delicate and natural, and the details more obvious, achieving a better blur effect, and avoiding the problem of unnatural blur transition.

[0078] In an exemplary embodiment of the present disclosure, an image processing method is provided. Figure 5 is a flowchart of an image processing method according to an exemplary embodiment. Figure 5 As shown, the following steps are included:

[0079] Step S501, obtaining shooting parameters of the image to be processed;

[0080] Step S502, obtaining the confusion circle and the object distance of the confusion circle in the image to be processed;

[0081] Step S503, adjusting the shooting parameters and obtaining the adjusted shooting parameters;

[0082] Step S504, determining a target diameter of the circle of confusion based on the object distance of the circle of confusion and the adjusted shooting parameters;

[0083] Step S505, adjusting the diameter of the circle of confusion to a target diameter to obtain a processed image.

[0084] The contents of step S501-step S502 are the same as those of step S101-step S102, and are not described again here.

[0085] In step S503, if the image is edited after the image shooting is completed, at least one of the focus distance, focal length, and aperture value is adjusted according to the user's adjustment instruction to obtain the adjusted shooting parameters; if the initial image collected during the image shooting is post-processed, at least one of the focal length and aperture value is adjusted according to the preset adjustment method to obtain the adjusted shooting parameters. The preset adjustment method is an adjustment method pre-configured in the memory of the electronic device. For example, when the image blur is to be processed more strongly, the preset adjustment method is set to increase the focal length or decrease the aperture value or increase the focal length and decrease the aperture value at the same time; when the image blur is to be processed less strongly, the preset adjustment method is set to decrease the focal length or increase the aperture value or decrease the focal length and increase the aperture value at the same time.

[0086] In step S504, the target diameter is determined by the following formula:

[0087]

[0088] Where δ represents the target diameter, u B represents the object distance of the circle of confusion, u A Indicates the focus distance, f indicates the adjusted focal length, and F indicates the adjusted aperture value. The adjusted shooting parameters are the preset values. If the focal length or aperture value is not adjusted, the adjusted values ​​are the same as the values ​​before adjustment.

[0089] In step S505, the diameter of the confusion circle is adjusted to the target diameter, and the following can be obtained: Figure 4 The processed image shown is Figure 3 In comparison, the degree of blur is enhanced.

[0090] In the exemplary embodiment of the present disclosure, the processed image is obtained by adjusting the diffusion circle, which is a separate processing of the object point light source. It can simulate optical blur to the greatest extent, make the blur effect more delicate and natural, and make the details more obvious, so as to achieve a better blur effect and avoid the problem of unnatural blur transition.

[0091] In an exemplary embodiment of the present disclosure, an image processing method is provided. Figure 6 is a flowchart of an image processing method according to an exemplary embodiment. Figure 6 As shown, the following steps are included:

[0092] Step S601, obtaining shooting parameters of the image to be processed;

[0093] Step S602, obtaining a part of the confusion circle or the whole confusion circle in the image to be processed;

[0094] Step S603, determining the diameter of the circle of confusion based on the number of pixels occupied by the diameter of the circle of confusion in the image to be processed;

[0095] Step S604, determining the object distance of the circle of confusion based on the shooting parameters and the diameter of the circle of confusion;

[0096] Step S605, adjusting the shooting parameters and obtaining the adjusted shooting parameters;

[0097] Step S606, determining a target diameter of the circle of confusion based on the object distance of the circle of confusion and the adjusted shooting parameters;

[0098] Step S607, adjusting the diameter of the circle of confusion to a target diameter to obtain a processed image.

[0099] The content of step S601 is the same as that of step S501 , and the content of steps S605 to S607 is the same as that of steps S503 to S505 , which will not be repeated here.

[0100] In step S602, a part of the confusion circle in the image to be processed may be obtained, for example, a part of the confusion circle that is more obvious in the image to be processed may be obtained, or all the confusion circles in the image to be processed may be obtained. The number of the obtained confusion circles depends on the recognition ability of the method for identifying the confusion circles. It should be noted that the more the number of the obtained confusion circles is, the better the blurring effect is.

[0101] In some implementations, based on a preset neural network algorithm, a portion of the confusion circle or all of the confusion circles in the image to be processed are identified.

[0102] The preset neural network algorithm can be a target detection algorithm, an image recognition algorithm or other neural network algorithms. The image to be processed is input into the preset neural network algorithm, and the output is as follows: Figure 3 The image to be processed is shown with the circle of confusion.

[0103] In step S603, the diameter of the circle of confusion is a straight line passing through the center point of the circle of confusion, and the number of pixel points occupied by the diameter of the circle of confusion in the image to be processed is determined as the diameter value of the circle of confusion.

[0104] In step S604, the object distance of the confusion circle is determined by the following formula:

[0105]

[0106] Among them, u B represents the object distance of the confusion circle, δ represents the diameter of the confusion circle, and u A Indicates the focus distance, f ‘ Indicates focal length, F ’ Represents the aperture value. Substituting the shooting parameters of the image to be processed and the diameter of the confusion circle in the image to be processed into the above formula, the object distance of the confusion circle can be calculated.

[0107] In an exemplary embodiment of the present disclosure, based on the identified diameter of the circle of confusion, the object distance of the circle of confusion is determined by a formula. Even if the image information of the image to be processed does not contain depth information, the object distance within the circle of confusion can be obtained, making the image processing method more widely applicable.

[0108] In an exemplary embodiment of the present disclosure, an image processing device is provided. Figure 7 is a block diagram of an image processing device according to an exemplary embodiment. Figure 7 As shown, the image processing device includes:

[0109] An acquisition module 701 is configured to acquire shooting parameters of an image to be processed;

[0110] A calculation module 702 is configured to obtain a confusion circle and an object distance of the confusion circle in the image to be processed;

[0111] The processing module 703 is configured to adjust the circle of confusion based on the object distance of the circle of confusion and the shooting parameters to obtain a processed image.

[0112] In an exemplary embodiment, the acquisition module 701 is further configured to:

[0113] Determine the diameter of the circle of confusion based on the number of pixels occupied by the circle of confusion diameter in the image to be processed;

[0114] Based on the recording parameters and the diameter of the circle of confusion, the object distance of the circle of confusion is determined.

[0115] In an exemplary embodiment, the calculation module 702 is further configured to:

[0116] Get part of the confusion circle or all of the confusion circles in the image to be processed.

[0117] In an exemplary embodiment, the calculation module 702 is further configured to:

[0118] Based on a preset neural network algorithm, some or all of the confusion circles in the image to be processed are identified.

[0119] In an exemplary embodiment, the processing module 703 is further configured to:

[0120] Adjust shooting parameters and obtain the adjusted shooting parameters;

[0121] Determine the target diameter of the circle of confusion based on the object distance of the circle of confusion and the adjusted shooting parameters;

[0122] The diameter of the circle of confusion is adjusted to the target diameter to obtain a processed image.

[0123] In an exemplary embodiment, the shooting parameters include focus distance, focal length, and aperture value.

[0124] In an exemplary embodiment, the processing module 703 is further configured to:

[0125] The target diameter is determined by the following formula:

[0126]

[0127] Where δ represents the target diameter, u B represents the object distance of the circle of confusion, u A represents the focus distance, f represents the adjusted focal length, and F represents the adjusted aperture value.

[0128] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0129] Figure 8 is a block diagram of an electronic device 800 according to an exemplary embodiment.

[0130] Reference Figure 8 , the electronic device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .

[0131] The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.

[0132] The memory 804 is configured to store various types of data to support operations on the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0133] The power supply component 806 provides power to the various components of the electronic device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 800.

[0134] The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the electronic device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0135] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the electronic device 800 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.

[0136] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.

[0137] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the electronic device 800. For example, the sensor assembly 814 can detect the open / closed state of the electronic device 800, the relative positioning of the components, such as the display and keypad of the electronic device 800, and the sensor assembly 814 can also detect the position change of the electronic device 800 or a component of the electronic device 800, the presence or absence of contact between the user and the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and the temperature change of the electronic device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0138] The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0139] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.

[0140] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by a processor 820 of an electronic device 800 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0141] A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of a device, enables the device to perform an image processing method, the method including any one of the above-mentioned image processing methods.

[0142] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0143] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. An image processing method, characterized in that: The image processing method comprises: Obtain shooting parameters of the image to be processed; Acquire the confusion circle in the image to be processed and the object distance of the confusion circle; Based on the object distance of the confusion circle and the shooting parameters, the confusion circle is adjusted to obtain a processed image.

2. The image processing method according to claim 1, characterized in that: The obtaining of the object distance of the circle of confusion comprises: Determine the diameter of the circle of confusion based on the number of pixels occupied by the diameter of the circle of confusion in the image to be processed; Based on the shooting parameters and the diameter of the circle of confusion, an object distance of the circle of confusion is determined.

3. The image processing method according to claim 1, characterized in that: The obtaining of the circle of confusion in the image to be processed comprises: A partial or complete circle of confusion in the image to be processed is obtained.

4. The image processing method according to claim 3, characterized in that: The obtaining of part of or all of the circles of confusion in the image to be processed includes: Based on a preset neural network algorithm, some or all of the circles of confusion in the image to be processed are identified.

5. The image processing method according to claim 1, characterized in that: The step of adjusting the circle of confusion based on the object distance of the circle of confusion and the shooting parameters to obtain a processed image includes: Adjusting the shooting parameters to obtain the adjusted shooting parameters; Determining a target diameter of the circle of confusion based on the object distance of the circle of confusion and the adjusted shooting parameters; The diameter of the circle of confusion is adjusted to the target diameter to obtain the processed image.

6. The image processing method according to claim 5, characterized in that: The shooting parameters include focus distance, focal length, and aperture value.

7. The image processing method according to claim 6, characterized in that: The step of determining a target diameter of the circle of confusion based on the object distance of the circle of confusion and the adjusted shooting parameters includes: The target diameter is determined by the following formula: Wherein, δ represents the target diameter, u B represents the object distance of the circle of confusion, u A represents the focus distance, f represents the adjusted focal length, and F represents the adjusted aperture value.

8. An image processing device, characterized in that: The image processing device comprises: An acquisition module, configured to acquire shooting parameters of an image to be processed; A calculation module, configured to obtain a confusion circle in the image to be processed and an object distance of the confusion circle; The processing module is configured to adjust the circle of confusion based on the object distance of the circle of confusion and the shooting parameters to obtain a processed image.

9. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to execute the image processing method according to any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the image processing method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Device and method for virtually processing depth image

    CN105163042A

  • Image definition restoration method and device and image shooting method and device

    CN111835968A

  • Image blurring method, storage medium and terminal equipment

    CN113965664A

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

    CN115375566A

  • Image processing method and device, storage medium and electronic equipment

    CN116362958A