Image blurring detection method and device, electronic equipment and readable storage medium

By acquiring the device motion angle and optical compensation angle to determine the uncompensated angle, the problem of traditional image blur detection is solved, and efficient image blur detection is achieved.

CN120411045APending Publication Date: 2025-08-01GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510534983.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-25
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

Traditional image blur detection methods are affected by the size of image data and are less efficient.

Method used

By acquiring the device motion angle and optically compensated angle, determining the uncompensated angle, and then determining the degree of image blur, simplifying the blur detection process.

Benefits of technology

The efficiency of image blur detection is improved, the detection time is shortened, and the requirements for image data quality are reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120411045A_ABST
    Figure CN120411045A_ABST
Patent Text Reader

Abstract

The invention relates to an image fuzzy detection method and device, electronic equipment and a readable storage medium. The method comprises the following steps: acquiring an equipment motion angle and an optical compensation angle corresponding to image data to be detected; determining an uncompensated angle corresponding to the to-be-detected image data based on the equipment motion angle and the optical compensation angle; and determining the fuzzy degree of the to-be-detected image data based on the uncompensated angle. By adopting the method, the image blurring detection efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technologies, and particularly to an image blur detection method, apparatus, electronic device, and readable storage medium. Background Art

[0002] With the development of image processing technologies, image anti-shake technologies have been widely applied to electronic devices. Image anti-shake technology is a technology that reduces or eliminates image blur caused by camera shake, and the use effect of image anti-shake technology can be measured by the image blur detection result of image data.

[0003] In traditional technologies, image blur detection of image data is achieved by analyzing the image content of the image data. The duration of image blur detection is affected by the size of the image data, resulting in low efficiency of image blur detection. Summary of the Invention

[0004] Embodiments of this application provide an image blur detection method, apparatus, electronic device, and readable storage medium, which can improve the efficiency of image blur detection.

[0005] In a first aspect, this application provides an image blur detection method, including:

[0006] Obtaining a device movement angle and an optical compensation angle corresponding to image data to be detected;

[0007] Based on the device movement angle and the optical compensation angle, determining an uncompensated angle corresponding to the image data to be detected;

[0008] Based on the uncompensated angle, determining the blur degree of the image data to be detected.

[0009] In a second aspect, this application further provides an image blur detection apparatus, including:

[0010] An obtaining module, configured to obtain a device movement angle and an optical compensation angle corresponding to image data to be detected;

[0011] A determining module, configured to determine an uncompensated angle corresponding to the image data to be detected based on the device movement angle and the optical compensation angle;

[0012] A detection module, configured to determine the blur degree of the image data to be detected based on the uncompensated angle.

[0013] In a third aspect, this application further provides an electronic device, including a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the steps of the method according to any one of the first aspect are implemented.

[0014] Fourthly, the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method described in any one of the first aspects are implemented.

[0015] Fifthly, the present application also provides a computer program product, including a computer program, and when the computer program is executed by a processor, the steps of the method described in any one of the first aspects are implemented.

[0016] For the above image blur detection method, device, electronic device, computer-readable storage medium and computer program product, the device movement angle and optical compensation angle corresponding to the image data to be detected are obtained; based on the device movement angle, the uncompensated angle and optical compensation angle corresponding to the image data to be detected are determined; based on the uncompensated angle, the blur degree of the image data to be detected is determined. By determining the uncompensated angle corresponding to the image data to be detected through the device movement angle and optical compensation angle corresponding to the image data to be detected, the blur degree of the image data to be detected can be determined according to the uncompensated angle. The process of determining the blur degree has fewer steps and less calculation amount, shortening the duration of image blur detection, and the image blur detection is independent of the size of the image data to be detected, thereby improving the efficiency of image blur detection. Description of the Drawings

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

[0018] Figure 1 It is a schematic flowchart of an image blur detection method in an embodiment;

[0019] Figure 2 It is a schematic diagram of optical image stabilization in an embodiment;

[0020] Figure 3 It is a schematic flowchart of the target image data determination step in an embodiment;

[0021] Figure 4 It is a schematic flowchart of the target anti-shake intensity determination step in an embodiment;

[0022] Figure 5 It is a schematic flowchart of image blur detection in an embodiment;

[0023] Figure 6 It is a schematic flowchart of image blur detection in another embodiment;

[0024] Figure 7 It is a structural block diagram of an image blur detection device in an embodiment;

[0025] Figure 8 It is an internal structure diagram of an electronic device in an embodiment. Detailed implementation manners

[0026] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0027] In some exemplary embodiments, as Figure 1 shown, an image blur detection method is provided. Taking the case where the method is applied to an electronic device as an example for description, the electronic device can be, but is not limited to, various personal computers, laptop computers, smart phones, tablet computers, Internet of Things devices, and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, smart cars, etc., and the portable wearable devices can be smart watches and smart bracelets, etc. It can be understood that the method can also be applied to a system including an electronic device and a server, and is implemented through the interaction between the electronic device and the server. In this embodiment, the method includes the following steps 102 to step 106. Among them:

[0028] Step 102: Obtain the device motion angle and the optical compensation angle corresponding to the image data to be detected.

[0029] Among them, the image data to be detected refers to the image data that needs to be subjected to image blur detection, and image blur detection refers to the process of determining the blur degree of the image data. The image data to be detected can be a frame of image data captured by the electronic device in the image capture mode, or a frame of image data in a video captured by the electronic device in the video recording mode. The device motion angle refers to the angle of movement of the electronic device during the exposure period of the image data to be detected. The optical compensation angle refers to the angle of optical image stabilization compensation, and the optical compensation angle can be obtained through the optical image stabilization module. The optical image stabilization module refers to the module in the electronic device for optical image stabilization. The optical image stabilization module performs optical image stabilization during the process of obtaining the image data to be detected.

[0030] Exemplarily, the electronic device obtains the image data to be detected and the exposure period corresponding to the image data to be detected, and obtains the device motion angle and the optical compensation angle corresponding to the exposure period.

[0031] In some exemplary embodiments, when the electronic device includes an optical image stabilization module and the optical image stabilization module is turned on, the image sensor is used to obtain the image data to be detected and the exposure period of the image data to be detected, the motion sensor is used to obtain the device motion angle of the electronic device during the exposure period, and the optical image stabilization module is used to obtain the optical compensation angle corresponding to the exposure period. In some exemplary embodiments, when the electronic device is in the image capture mode, the image sensor is used to obtain the image data to be detected and the exposure period of the image data to be detected, the motion sensor is used to obtain the device motion angle of the electronic device during the exposure period, and the optical image stabilization module is used to obtain the optical compensation angle corresponding to the exposure period.

[0032] In some exemplary embodiments, when the electronic device is in the video recording mode, the image sensor is used to obtain the image data to be detected and the exposure period of the image data to be detected, the motion sensor is used to obtain the device motion angle of the electronic device during the exposure period, and the optical image stabilization module is used to obtain the optical compensation angle corresponding to the exposure period.

[0033] In some exemplary embodiments, when the electronic device is in a motion scenario, the optical image stabilization module is turned on. The image sensor is used to obtain the image data to be detected and the exposure period of the image data to be detected, the motion sensor is used to obtain the device motion angle of the electronic device during the exposure period, and the optical image stabilization module is used to obtain the optical compensation angle corresponding to the exposure period. A motion scenario refers to a scenario where the electronic device moves. For example, image data or video is captured while walking.

[0034] Step 104: Determine the uncompensated angle corresponding to the image data to be detected based on the device motion angle and the optical compensation angle.

[0035] The uncompensated angle refers to the device motion angle that has not been compensated by the image stabilization technology. It can be understood that the device motion angle is compensated using the image stabilization technology, but the image stabilization technology only compensates for part of the device motion angle, and the uncompensated part of the device motion angle is the uncompensated angle. The uncompensated angle is less than or equal to the device motion angle. The image stabilization technology includes at least one of, but is not limited to, optical image stabilization (Optical Image Stabilization, abbreviated as OIS) and electronic image stabilization (Electronic Image Stabilization, abbreviated as EIS), etc. Optical image stabilization refers to the technology of reducing or eliminating the jitter of the electronic device by adjusting the position of the lens or the image sensor, and it is a physical anti-shake method. Optical image stabilization compensates for the device motion angle by moving the lens or the image sensor through a micro motor (such as a shrapnel, piezoelectric, ball, shape memory alloy, etc.). Electronic image stabilization refers to the technology of reducing or eliminating the jitter of the electronic device by adjusting the position of the image, and it is a software anti-shake method.

[0036] Exemplarily, the electronic device subtracts the optical compensation angle from the device movement angle to obtain the uncompensated angle corresponding to the image data to be detected.

[0037] In some exemplary embodiments, in the absence of an optical compensation angle, the optical compensation angle is equal to zero, and the electronic device determines the device movement angle as the uncompensated angle corresponding to the image data to be detected. Among them, the absence of an optical compensation angle may mean that the electronic device does not include an optical image stabilization module, or the electronic device includes an optical image stabilization module, but the optical image stabilization module is not turned on. That is, if optical image stabilization is not performed during the acquisition of the image data to be detected, the device movement angle is directly determined as the uncompensated angle corresponding to the image data to be detected. The calculation amount of the uncompensated angle is small, the determination duration of the uncompensated angle is shortened, and thus the efficiency of image blur detection is improved.

[0038] Step 106, based on the uncompensated angle, determine the blur degree of the image data to be detected.

[0039] Among them, the blur degree is data representing the degree of sharpness decline of the image data to be detected. The higher the blur degree, the higher the degree of sharpness decline of the image data to be detected, and the lower the sharpness of the image data to be detected. The blur degree is proportional to the uncompensated angle, that is, the larger the uncompensated angle, the higher the blur degree of the image data to be detected, and the smaller the uncompensated angle, the lower the blur degree of the image data to be detected.

[0040] Exemplarily, the electronic device determines the blur degree of the image data to be detected based on the uncompensated angle.

[0041] In some exemplary embodiments, the electronic device determines the uncompensated angle as the blur degree of the image data to be detected. That is, the uncompensated angle of the image data to be detected is directly used to represent the blur degree of the image data to be detected.

[0042] The above image blur detection method determines the uncompensated angle corresponding to the image data to be detected through the device movement angle and the optical compensation angle corresponding to the image data to be detected. According to the uncompensated angle, the blur degree of the image data to be detected can be determined. The determination process of the blur degree has few steps and small calculation amount, shortening the duration of image blur detection, and the image blur detection is independent of the size of the image data to be detected, thus improving the efficiency of image blur detection. Moreover, during the image blur detection process, the image data to be detected is not used, and the data quality of the image data to be detected will not affect the accuracy of the blur degree. Compared with using the image data to be detected for image blur detection, the requirement for the data quality of the image data to be detected is reduced, and thus the requirements for the shooting environment and shooting scene are reduced.

[0043] In some exemplary embodiments, determining an uncompensated angle corresponding to image data to be detected based on a device motion angle and an optical compensation angle includes:

[0044] When the device motion angle is greater than an optical angle compensation threshold, perform the step of determining an uncompensated angle corresponding to image data to be detected based on the device motion angle and the optical compensation angle.

[0045] Exemplarily, when there is an optical compensation angle, an electronic device obtains an optical angle compensation threshold, compares the device motion angle with the optical angle compensation threshold. If the device motion angle is greater than the optical angle compensation threshold, determine an uncompensated angle corresponding to the image data to be detected based on the device motion angle and the optical compensation angle; if the device motion angle is less than or equal to the optical angle compensation threshold, determine the uncompensated angle as zero. Herein, the optical angle compensation threshold refers to the maximum value of the optical compensation angle of optical image stabilization. It can be understood that the optical compensation angle of optical image stabilization is limited, and the maximum value of the optical compensation angle is the optical angle compensation threshold. The optical angle compensation threshold is not limited herein and can be 1 degree, 2 degrees, 3 degrees, etc. For example, the schematic diagram of optical image stabilization is as Figure 2 shown. The optical angle compensation threshold of optical image stabilization is 1 degree, the optical compensation angle of optical image stabilization is 1 degree, and the device motion angle of the electronic device during the exposure period is 1.5, then the uncompensated angle of the image data to be detected is 0.5 degrees.

[0046] In this embodiment, when there is an optical compensation angle, compare the device motion angle with the optical angle compensation threshold. If the device motion angle is greater than the optical angle compensation threshold, it indicates that optical image stabilization cannot completely compensate for the device motion angle, and the uncompensated angle is not zero. Then determine an uncompensated angle corresponding to the image data to be detected based on the device motion angle and the optical compensation angle; if the device motion angle is less than or equal to the optical angle compensation threshold, it indicates that optical image stabilization can completely compensate for the device motion angle, and the uncompensated angle is zero. Then there is no need to determine an uncompensated angle corresponding to the image data to be detected based on the device motion angle and the optical compensation angle, avoiding determining an uncompensated angle corresponding to the image data to be detected based on the device motion angle and the optical compensation angle when the device motion angle is less than or equal to the optical angle compensation threshold. Thus, the computational amount for determining the uncompensated angle is reduced, the determination duration of the uncompensated angle is shortened, and the determination efficiency of the uncompensated angle is improved.

[0047] In some exemplary embodiments, obtaining a device motion angle and an optical compensation angle corresponding to image data to be detected includes:

[0048] Obtain the exposure time period of the image data to be detected; obtain the motion angular velocity corresponding to the exposure time period through a motion sensor, and obtain the optical compensation angle corresponding to the exposure time period through an optical compensation module; determine the device motion angle corresponding to the image data to be detected based on the motion angular velocity and the exposure time period.

[0049] Among them, the exposure time period refers to the time period during which the image sensor receives light during the generation of the image data to be detected. It can be understood as the time period when the camera shutter is open. The motion sensor refers to a sensor that collects the motion angular velocity of the electronic device, and the motion sensor can be a gyroscope. The motion angular velocity refers to the angular velocity of the motion of the electronic device collected by the motion sensor.

[0050] Exemplarily, the electronic device obtains the exposure time period of the image data to be detected and the motion angular velocity of the electronic device during the exposure time period, performs an integration operation on the exposure time period and the motion angular velocity to obtain the device motion angle corresponding to the image data to be detected, and obtains the optical compensation angle corresponding to the exposure time period through the optical compensation module.

[0051] In this embodiment, the device motion angle corresponding to the image data to be detected is determined by the motion angular velocity corresponding to the exposure time period and the exposure time period, and the optical compensation angle corresponding to the exposure time period is obtained through the optical compensation module, providing accurate basic data for subsequent determination of the blur degree.

[0052] In some exemplary embodiments, determining the blur degree of the image data to be detected based on the uncompensated angle includes:

[0053] Obtain the conversion coefficient from angle to pixel displacement; determine the blur degree of the image data to be detected based on the uncompensated angle and the conversion coefficient.

[0054] Among them, the conversion coefficient from angle to pixel displacement refers to the coefficient that converts the uncompensated angle to the pixel position, characterizing the influence degree of the uncompensated angle on the image data. The conversion coefficient can be determined according to the horizontal resolution and the field of view angle of the image sensor. For example, dividing the horizontal resolution of the image sensor by the field of view angle to obtain the conversion coefficient; the conversion coefficient can also be determined according to the horizontal resolution, the field of view angle and the equivalent focal length of the image sensor. For example, multiplying the horizontal resolution of the image sensor by the equivalent focal length and then dividing by the field of view angle to obtain the conversion coefficient. The conversion coefficient can be a pre-set parameter, that is, a parameter stored in the electronic device.

[0055] Exemplarily, the electronic device obtains the conversion coefficient from angle to pixel displacement, multiplies the uncompensated angle by the conversion coefficient to obtain the blur degree of the image data to be detected.

[0056] In some exemplary embodiments, after determining the blurriness of the image data to be detected, it further includes: determining the blur level of the image data to be detected based on the blurriness and a blur threshold. Wherein, the blur threshold is a value for comparison with the blurriness, and the number of blur thresholds can be one or more. The blur level refers to the blur level of the image data to be detected. For example, the blur thresholds include a first blur threshold and a second blur threshold, and the first blur threshold is greater than the second blur threshold. The blurriness is compared with the first blur threshold and the second blur threshold respectively. If the blurriness is greater than the first blur threshold, it is determined that the blur level of the image data to be detected is very blurry; if the blurriness is greater than or equal to the second blur threshold and less than or equal to the first blur threshold, it is determined that the blur level of the image data to be detected is slightly blurry; if the blurriness is less than the second blur threshold, it is determined that the blur level of the image data to be detected is not blurry.

[0057] In this embodiment, the blurriness of the image data to be detected is determined by the uncompensated angle and the conversion coefficient, and the amount of calculation is small, thereby improving the efficiency of determining the blurriness, that is, improving the efficiency of image blur detection.

[0058] In some exemplary embodiments, as Figure 3 shown, the image blur detection method further includes:

[0059] Step 302, in the image shooting mode, compare the blurriness corresponding to multiple frames of image data to be detected to obtain the minimum blurriness.

[0060] Wherein, the image shooting mode refers to the mode of shooting an image, that is, the photo-taking mode. The image shooting mode may include image preview or may not include image preview. The target shooting scenes corresponding to the above multiple frames of image data to be detected are the same, that is, the shooting contents of the multiple frames of image data to be detected are the same.

[0061] Exemplarily, in the image shooting mode, after the electronic device determines the blurriness of multiple frames of image data corresponding to the target shooting scene, it compares the blurriness of the multiple frames of image data to be detected to obtain the minimum blurriness.

[0062] Step 304, determine the image data to be detected corresponding to the minimum blurriness as the target image data.

[0063] Wherein, the target image data refers to the image data with the highest clarity among the multiple frames of image data to be detected, and the target image data can be used for display, storage or output.

[0064] Exemplarily, the electronic device determines the image data to be detected corresponding to the minimum blurriness as the target image data.

[0065] In this embodiment, by comparing the blurring degrees of multiple frames of to-be-detected image data of a target shooting scene, the minimum blurring degree is obtained, and the to-be-detected image data corresponding to the minimum blurring degree is determined as the target image data, that is, the to-be-detected image data with the lowest blurring degree is determined as the target image data, or in other words, the to-be-detected original image data with the highest clarity is determined as the target image data, thereby improving the clarity of the target image data.

[0066] In some exemplary embodiments, such as Figure 4 shown, the above image blurring detection method includes:

[0067] Step 402, in the video recording mode, for each frame of to-be-detected image data among multiple frames of to-be-detected image data, compare the blurring degree corresponding to the to-be-detected image data with a blurring threshold to obtain a comparison result corresponding to the to-be-detected image data.

[0068] Among them, the video recording mode refers to the mode of recording a video. The blurring threshold refers to the value for comparing with the blurring degree, and the blurring threshold can be a preset threshold, which is not limited here. The comparison result refers to the result of comparing the blurring degree corresponding to the to-be-detected image data with the blurring threshold, and the comparison result can be one of greater than, equal to, or less than. The number of the above multiple frames of to-be-detected image data can be set according to actual needs. For example, the number of the above multiple frames of to-be-detected image data is set according to the computing power of the electronic device. The stronger the computing power of the electronic device, the smaller the number of the above multiple frames of to-be-detected image data, that is, the frequency of improving the target anti-shake intensity. The above multiple frames of to-be-detected image data can be consecutive multiple frames of to-be-detected image data or non-consecutive multiple frames of to-be-detected image data. For example, the above multiple frames of to-be-detected image data are the 1st frame image data, the 3rd frame image data, the 5th frame image data, the 7th frame image data, and the 9th frame image data.

[0069] Exemplarily, in the video recording mode, for each frame of to-be-detected image data among consecutive multiple frames of to-be-detected image data, the electronic device compares the blurring degree corresponding to the to-be-detected image data with the blurring threshold to obtain a comparison result corresponding to the to-be-detected image data.

[0070] Step 404, based on the comparison results corresponding to the multiple frames of to-be-detected image data, determine the target anti-shake intensity of the electronic anti-shake.

[0071] Among them, the anti-shake intensity refers to the intensity of the electronic anti-shake compensating for the image. The target anti-shake intensity refers to the anti-shake intensity determined by the electronic device according to the comparison results corresponding to the multiple frames of to-be-detected image data.

[0072] Exemplarily, the electronic device determines the target anti-shake intensity of the electronic anti-shake according to the comparison results corresponding to the frame of to-be-detected image data.

[0073] In this embodiment, the target anti-shake intensity of electronic image stabilization is determined based on the comparison results corresponding to multiple frames of image data to be detected, that is, the anti-shake intensity of electronic image stabilization is dynamically adjusted according to the blur degree of the image data to be detected, so that the video maintains a natural and smooth visual experience under different motion conditions, that is, the smoothness of the video is improved.

[0074] In some exemplary embodiments, determining the target anti-shake intensity of electronic image stabilization based on the comparison results corresponding to multiple frames of image data to be detected includes:

[0075] When the comparison results corresponding to multiple frames of image data to be detected are all greater than, reduce the current anti-shake intensity of electronic image stabilization to obtain the target anti-shake intensity.

[0076] Wherein, the current anti-shake intensity refers to the current anti-shake intensity of electronic image stabilization.

[0077] Exemplarily, when the comparison results corresponding to multiple frames of image data to be detected are all greater than, the electronic device reduces the current anti-shake intensity of electronic image stabilization to obtain the target anti-shake intensity.

[0078] In some exemplary embodiments, determine the first quantity of multiple frames of image data to be detected, and the second quantity of comparison results that are greater than, determine the ratio between the second quantity and the first quantity, compare the ratio with the ratio threshold, and when the ratio is equal to or greater than the ratio threshold, the electronic device reduces the current anti-shake intensity of electronic image stabilization to obtain the target anti-shake intensity. Wherein, the first quantity refers to the total quantity of the image data to be detected in multiple frames of image data to be detected. The second quantity refers to the quantity of comparison results that are greater than among the comparison results corresponding to multiple frames of image data to be detected. The ratio threshold refers to the threshold for comparison with the ratio, and the ratio threshold can be a preset value.

[0079] In some exemplary embodiments, when the comparison results corresponding to multiple frames of image data to be detected are all equal to, determine the current anti-shake intensity of electronic image stabilization as the target anti-shake intensity.

[0080] In some exemplary embodiments, when the comparison results corresponding to multiple frames of image data to be detected are all less than, increase the current anti-shake intensity of electronic image stabilization to obtain the target anti-shake intensity.

[0081] In this embodiment, when the comparison results corresponding to multiple frames of image data to be detected are all greater than, the target anti-shake intensity is obtained by reducing the current anti-shake intensity of electronic image stabilization, that is, when the blur degree of multiple frames of image data to be detected is relatively large, reduce the current anti-shake intensity of electronic image stabilization, and use a target anti-shake intensity lower than the current anti-shake intensity for electronic image stabilization, so as to avoid the "flashing blur" phenomenon caused by excessive picture cropping, make the blur in the video more natural, and improve the smoothness of the video.

[0082] In some exemplary embodiments, when the electronic device includes an optical image stabilization module, the flowchart of image blur detection is as shown in Figure 5 follows, including:

[0083] Step 502, the electronic device turns on the optical image stabilization module in the image shooting mode or the video recording mode;

[0084] Step 504, the image sensor is used to obtain the image data to be detected and the exposure time period of the image data to be detected;

[0085] Step 506, the gyroscope is used to obtain the movement angular velocity of the electronic device during the exposure time period, and based on the movement angular velocity and the exposure time period, the device movement angle corresponding to the image data to be detected is determined;

[0086] Step 508, the optical image stabilization module is used to obtain the optical compensation angle corresponding to the exposure time period;

[0087] Step 510, subtract the optical compensation angle from the device movement angle to obtain the uncompensated angle corresponding to the image data to be detected;

[0088] Step 512, obtain the conversion coefficient from the angle to the pixel displacement, and multiply the uncompensated angle by the conversion coefficient to obtain the blur degree of the image data to be detected.

[0089] In the above image blur detection method, the uncompensated angle corresponding to the image data to be detected is determined by the device movement angle and the optical compensation angle corresponding to the image data to be detected. According to the uncompensated angle, the blur degree of the image data to be detected can be determined. The process of determining the blur degree has fewer steps and less calculation amount, shortening the duration of image blur detection, and the image blur detection is independent of the size of the image data to be detected, thereby improving the efficiency of image blur detection.

[0090] In some exemplary embodiments, when the electronic device does not include an optical image stabilization module, the flowchart of image blur detection is as shown in Figure 6 follows, including:

[0091] Step 602, the electronic device is in the image shooting mode or the video recording mode;

[0092] Step 604, the image sensor is used to obtain the image data to be detected and the exposure time period of the image data to be detected;

[0093] Step 606, the gyroscope is used to obtain the movement angular velocity of the electronic device corresponding to the exposure time period, and based on the movement angular velocity and the exposure time period, the device movement angle corresponding to the image data to be detected is determined;

[0094] Step 608: Determine the uncompensated angle corresponding to the device motion angle as the uncompensated angle corresponding to the image data to be detected;

[0095] Step 610: Obtain the conversion coefficient from the angle to the pixel displacement, and multiply the uncompensated angle by the conversion coefficient to obtain the blur degree of the image data to be detected.

[0096] In the above image blur detection method, the uncompensated angle corresponding to the image data to be detected is determined by the device motion angle corresponding to the image data to be detected. According to the uncompensated angle, the blur degree of the image data to be detected can be determined. The process of determining the blur degree has fewer steps and less computational complexity, shortening the duration of image blur detection. Moreover, the image blur detection is independent of the size of the image data to be detected, thereby improving the efficiency of image blur detection.

[0097] It should be understood that although the steps in the flowcharts involved in the above embodiments are sequentially shown according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise clearly stated in this article, there is no strict order limit for the execution of these steps, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or alternately with at least a part of other steps or steps or stages in other steps.

[0098] Based on the same inventive concept, an embodiment of the present application also provides an image blur detection device for implementing the above-mentioned image blur detection method. The solution provided by this device to solve the problem is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the following image blur detection device can refer to the limitations on the image blur detection method in the above text, and will not be repeated here.

[0099] In some exemplary embodiments, as Figure 7 shown, an image blur detection device 700 is provided, including: an acquisition module 702, a determination module 704, and a detection module 706, where:

[0100] The acquisition module 702 is configured to acquire the device motion angle and the optical compensation angle corresponding to the image data to be detected;

[0101] The determination module 704 is configured to determine the uncompensated angle corresponding to the image data to be detected based on the device motion angle and the optical compensation angle;

[0102] The detection module 706 is configured to determine the blurring degree of the image data to be detected based on the uncompensated angle.

[0103] In some exemplary embodiments, the determination module 704 is further configured to: when the device movement angle is greater than the optical angle compensation threshold, perform the step of determining the uncompensated angle corresponding to the image data to be detected based on the device movement angle and the optical compensation angle.

[0104] In some exemplary embodiments, the acquisition module 702 is further configured to: acquire the exposure time period of the image data to be detected; acquire the movement angular velocity corresponding to the exposure time period through a motion sensor, and acquire the optical compensation angle corresponding to the exposure time period through an optical compensation module; determine the device movement angle corresponding to the image data to be detected based on the movement angular velocity and the exposure time period.

[0105] In some exemplary embodiments, the detection module 706 is further configured to: acquire the conversion coefficient from angle to pixel displacement; determine the blurring degree of the image data to be detected based on the uncompensated angle and the conversion coefficient.

[0106] In some exemplary embodiments, the image blurring detection device further includes a screening module, and the screening module is configured to: in the image shooting mode, compare the blurring degrees corresponding to multiple frames of image data to be detected to obtain the minimum blurring degree; determine the image data to be detected corresponding to the minimum blurring degree as the target image data.

[0107] In some exemplary embodiments, the image blurring detection device further includes an adjustment module, and the adjustment module is configured to: in the video recording mode, for each frame of the image data to be detected among multiple frames of the image data to be detected, compare the blurring degree corresponding to the image data to be detected with a blurring threshold to obtain a comparison result corresponding to the image data to be detected; determine the target anti-shake intensity of the electronic anti-shake based on the comparison results corresponding to multiple frames of the image data to be detected.

[0108] In some exemplary embodiments, the adjustment module is further configured to: when the comparison results corresponding to multiple frames of the image data to be detected are all greater than, reduce the current anti-shake intensity of the electronic anti-shake to obtain the target anti-shake intensity.

[0109] Each module in the above image blurring detection device can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in the processor in the electronic device in hardware form or be independent of the processor, or be stored in the memory in the electronic device in software form, so that the processor can call and execute the operations corresponding to the above modules.

[0110] In some exemplary embodiments, an electronic device is provided, and the electronic device can be a terminal, and its internal structure diagram can be as Figure 8As shown in the figure. The electronic device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface, the display unit, and the input device are connected to the system bus through the input / output interface. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the electronic device is used to exchange information between the processor and external devices. The communication interface of the electronic device is used to communicate with external terminals in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a XXX method. The display unit of the electronic device is used to form a visually visible picture, which can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the electronic device can be a touch layer covering the display screen, or a button, a trackball, or a touchpad provided on the housing of the electronic device, or an external keyboard, touchpad, or mouse, etc.

[0111] Those skilled in the art can understand that Figure 8 the structure shown in the figure is only a block diagram of some structures related to the solution of the present application, and does not constitute a limitation on the electronic device to which the solution of the present application is applied. The specific electronic device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.

[0112] In one embodiment, an electronic device is provided, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, the steps in the above method embodiments are implemented.

[0113] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by the processor, the steps in the above method embodiments are implemented.

[0114] In one embodiment, a computer program product is provided, including computing

[0115] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data that have been authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with relevant regulations.

[0116] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in this application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., and are not limited thereto. The processors involved in the embodiments provided in this application can be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, data processing logics based on quantum computing, artificial intelligence (AI) processors, etc., and are not limited thereto.

[0117] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this application.

[0118] The above-described embodiments merely represent several implementation manners of this application. The description is relatively specific and detailed, but it should not be construed as a limitation on the patent scope of this application. It should be noted that for those of ordinary skill in the art, without departing from the concept of this application, several modifications and improvements can still be made, and these all belong to the protection scope of this application. Therefore, the protection scope of this application shall be subject to the appended claims.

Claims

1. An image blur detection method, characterized in that, The method includes: Obtaining a device motion angle and an optical compensation angle corresponding to the image data to be detected; Determining an uncompensated angle corresponding to the image data to be detected based on the device motion angle and the optical compensation angle; Determining the blur degree of the image data to be detected based on the uncompensated angle.

2. The method according to claim 1, wherein The determining an uncompensated angle corresponding to the image data to be detected based on the device motion angle and the optical compensation angle includes: When the device motion angle is greater than the optical angle compensation threshold, performing the step of determining an uncompensated angle corresponding to the image data to be detected based on the device motion angle and the optical compensation angle.

3. The method according to claim 1, characterized in that, The obtaining a device motion angle and an optical compensation angle corresponding to the image data to be detected includes: Obtaining an exposure time period of the image data to be detected; Obtaining a motion angular velocity corresponding to the exposure time period through a motion sensor, and obtaining an optical compensation angle corresponding to the exposure time period through an optical compensation module; Determining a device motion angle corresponding to the image data to be detected based on the motion angular velocity and the exposure time period.

4. The method according to claim 1, characterized in that, The determining the blur degree of the image data to be detected based on the uncompensated angle includes: Obtaining a conversion coefficient from an angle to a pixel displacement; Determining the blur degree of the image data to be detected based on the uncompensated angle and the conversion coefficient.

5. The method according to claim 1, characterized in that, The method further includes: In an image capture mode, comparing the blur degrees corresponding to multiple frames of image data to be detected to obtain the minimum blur degree; Determining the image data to be detected corresponding to the minimum blur degree as the target image data.

6. The method according to claim 1, wherein The method includes: In a video recording mode, for each frame of the image data to be detected among multiple frames of the image data to be detected, comparing the blur degree corresponding to the image data to be detected with a blur threshold to obtain a comparison result corresponding to the image data to be detected; Determining a target anti-shake intensity of electronic anti-shake based on the comparison results corresponding to the multiple frames of the image data to be detected.

7. The method according to claim 6, wherein The determining a target anti-shake intensity of electronic anti-shake based on the comparison results corresponding to the multiple frames of the image data to be detected includes: When the comparison results corresponding to the multiple frames of the image data to be detected are all greater than, reducing the current anti-shake intensity of the electronic anti-shake to obtain the target anti-shake intensity.

8. An image blur detection device, characterized in that, The apparatus includes: An obtaining module, configured to obtain a device motion angle and an optical compensation angle corresponding to the image data to be detected; A determining module, configured to determine an uncompensated angle corresponding to the image data to be detected based on the device motion angle and the optical compensation angle; A detecting module, configured to determine the blur degree of the image data to be detected based on the uncompensated angle.

9. An electronic device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, the steps of the method according to any one of claims 1 to 7 are implemented.

11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, the steps of the method according to any one of claims 1 to 7 are implemented.