A method, device, and electronic device for detecting the blur degree of a camera module
By acquiring and processing the RAW image parameters of the camera module at different angles, the problem of inaccurate detection of blur in the prior art is solved, and a comprehensive evaluation of the blur level and measuring the impact of hardware technology is achieved, thereby improving the user experience.
Patent Information
- Application Number
- CN202510137995.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-08
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2045-02-08
AI Technical Summary
The prior art is difficult to accurately detect the degree of blurring of the camera module, and cannot effectively measure the impact of the hardware technology of electronic equipment on the degree of blurring, resulting in poor user experience.
The degree of blur is evaluated by acquiring RAW images of the camera module at different angles, calculating and processing parameters in the image, such as reduction, contrast and brightness, and determining the comprehensive score based on these parameters.
It realizes the full range and multi-angle acquisition of the blur of the camera module, improves the accuracy of detection, and can measure the impact of hardware technology on the blur, thereby improving the user experience.
Smart Images

Figure CN119624942B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of terminal devices, and in particular, to a method, an apparatus, and an electronic device for detecting the degree of blurring of a camera module. Background Art
[0002] The images captured by an electronic device using a camera module may exhibit a phenomenon of image blurring, resulting in a decline in image quality. Among them, blurring (Blur), also known as fuzziness, from the perspective of the camera angle, due to the performance reasons of the camera module itself, may cause the camera to become blurred, and thus the captured images are unclear. That is to say, the details in the images are lost, the edges are not clear, etc. This situation is usually caused by the performance problems of the camera module itself. In order to solve the problem of camera module blurring, usually, the degree of blurring of the camera module, that is, the degree of fuzziness of the camera module, is first obtained. Through the analysis of the degree of fuzziness, it can provide a basis for subsequent adjustments, thereby improving the shooting effect of the camera module and improving the image quality.
[0003] However, at present, the detection results for determining the degree of blurring of the camera module are not accurate enough, and the detection results cannot be used to measure the influence of the hardware process of the electronic device on the degree of blurring of the camera module, resulting in a poor user experience. Summary of the Invention
[0004] In order to solve the above problems, the embodiments of the present application provide a method, an apparatus, and an electronic device for detecting the degree of blurring of a camera module. By performing calculations and processing based on RAW images at different first angles, it is possible to obtain the degree of blurring of the camera module in all directions and from multiple angles, effectively improving the accuracy of the electronic device in determining the blurring problem of the camera module. At the same time, the degree of blurring of the camera module can be used to measure the influence of the hardware process of the electronic device on the degree of blurring of the camera module, thereby improving the user experience.
[0005] To achieve the above object, in a first aspect, the embodiments of the present application provide a method for detecting the degree of blurring of a camera module, including: obtaining at least one first RAW image captured by the camera module at different first angles of a first test scene, where the first angle is the included angle formed by the camera module and a first light source; obtaining a first parameter corresponding to each first RAW image, where the first parameter is at least one of the reduction degree, contrast, and brightness corresponding to the first RAW image in the LAB color space; determining a first score corresponding to each first parameter, where the first score is used to characterize the degree of blurring of the first RAW image; and determining a comprehensive score based on all the first scores, where the comprehensive score is used to characterize the degree of blurring of the camera module.
[0006] The method for detecting the blur degree of the camera module provided by the embodiment of the present application starts from the perspective of RAW images and evaluates the blur degree of the camera module. This method can measure the influence of the hardware process of the electronic device on the blur degree of the camera module, and comprehensively obtain the blur degree of the camera module from different angles. In this way, through multi-angle and multi-dimensional analysis, the accuracy of the electronic device in judging the problem of the camera module being hazy is effectively improved, thereby further improving the user experience.
[0007] In a feasible implementation manner, obtaining at least one first RAW image captured by the camera module at different first angles includes: obtaining the target exposure time of the camera module and the sensitivity of the camera module at each first angle; based on the target exposure time and sensitivity at each first angle, obtaining the first RAW image at each first angle. By adopting the above method, obtaining the target exposure time and sensitivity at different angles can optimize the exposure control, ensure that the captured first RAW image is neither overexposed nor underexposed, thereby avoiding affecting the subsequent analysis of the blur degree of the camera module. In this way, it can better adapt to the changing shooting environment and perform controlled variable analysis under the same target exposure time and sensitivity conditions, so as to accurately detect the blur degree of the camera module.
[0008] In a feasible implementation manner, obtaining the target exposure time of the camera module at each first angle includes: obtaining the initial exposure time of the camera module and the sensitivity of the camera module at each first angle; based on the initial exposure time at each first angle and the sensitivity of the camera module at each first angle, determining the exposure amount of the camera module at each first angle; based on a preset brightness, adjusting the exposure amount of the camera module at each first angle to obtain the target exposure amount of the camera module at each first angle; based on the adjusted target exposure amount at each first angle, determining the target exposure time of the camera module at each first angle. By adopting the above method, the current exposure amount is determined through the initial exposure time and sensitivity of the camera module at each first angle, and then the exposure amount is adjusted through the preset brightness, so as to obtain the target exposure amount at each first angle and finally determine the target exposure time. In this way, it ensures the stability of the image brightness under different angles and lighting conditions, avoids overexposure or underexposure, and at the same time, the precise adjustment of the exposure time helps to improve the accuracy of the blur degree detection.
[0009] In a feasible implementation manner, based on a preset brightness, the exposure amount of the camera module at each first angle is adjusted to obtain the target exposure amount of the camera module at each first angle, including: based on the exposure amount at each first angle, obtaining a second RAW image captured by the camera module at each first angle; calculating the second brightness of the second RAW image at each first angle; the second brightness is the brightness corresponding to the gray value of the second RAW image; based on the second brightness and the preset brightness at each first angle, adjusting the exposure amount of the camera module at each first angle to obtain the target exposure amount of the camera module at each first angle. By adopting the above method, by calculating the brightness of the second gray image at each first angle and comparing it with the preset brightness, the exposure amount can be accurately adjusted to ensure that the brightness of the captured image reaches the expectation. In this way, the consistency of the image is improved, and the adjustment of the exposure amount is also optimized, enabling the camera module to adapt to different shooting environments, providing stable image quality. At the same time, the accurate adjustment of the exposure amount helps to improve the accuracy of blur degree detection.
[0010] In a feasible implementation manner, the first RAW image includes a target subject; obtaining the first parameter corresponding to each first RAW image includes: segmenting each first RAW image to obtain a first region, a second region, and a third region corresponding to each target subject; obtaining the first reduction degree corresponding to each first region, the first contrast degree corresponding to each third region, and the first brightness corresponding to each second region in the LAB color space. By adopting the above method, by segmenting the first RAW image and dividing the image into a first region, a second region, and a third region, the characteristics of each region can be analyzed more accurately. In the LAB color space, obtaining the reduction degree, contrast degree, and brightness of each region respectively can analyze the image from multiple dimensions. In this way, by obtaining the corresponding parameters for each region, the accuracy of the image parameters is improved.
[0011] In a feasible implementation manner, the first region includes the face region of the target subject; the second region includes the region corresponding to the forehead part of the target subject; the third region includes the region corresponding to the eye part of the target subject. By adopting the above method, the face, forehead, and eyes of the target subject are analyzed as independent regions respectively. In this way, more detailed and accurate processing can be performed on the images of different parts to ensure that the characteristics of each region can be accurately captured.
[0012] In a feasible implementation manner, each first RAW image is segmented to obtain a first region, a second region, and a third region corresponding to each target subject, including: using each first RAW image as the input of a pre-trained neural network model, and using the pre-trained neural network model to obtain the first region, the second region, and the third region of each target subject. By adopting the above method, the first RAW image is automatically segmented by the image segmentation model. In this way, the image can be quickly and accurately segmented into different regions. Especially for complex image analysis tasks, the processing speed can be significantly improved.
[0013] In a feasible implementation manner, obtaining a first reduction degree corresponding to each first region includes: obtaining a target image, where the target image is an image obtained from at least one preset image and having the same preset region as the first region; obtaining a fifth brightness corresponding to each first region; the fifth brightness is the brightness corresponding to the gray value in the first region; obtaining a target brightness corresponding to the preset region; the target brightness is the brightness corresponding to the gray value in the preset region; based on each fifth brightness and the target brightness, obtaining a first reduction degree corresponding to at least one first region; where each fifth brightness corresponds to a first reduction degree corresponding to a first region; one fifth brightness and one target brightness obtain a first reduction degree corresponding to a first region. By adopting the above method, based on the fifth brightness and the target brightness, the reduction degree between the first region in the first RAW image and the target image is determined. In this way, targeted optimization and adjustment can be performed for different first regions to ensure the overall quality of the image.
[0014] In a feasible implementation manner, based on the first mean value of the fifth luminance corresponding to each first region, the second mean value of the target luminance, and the first constant, determine the first result corresponding to each first region and the second result corresponding to each first region; wherein, the first mean value and the first result are in one-to-one correspondence, the first mean value and the second result are in one-to-one correspondence, and one first mean value, one second mean value, and one first constant yield one first result or one second result; based on the covariance between the fifth luminance and the target luminance of each first region and the second constant, determine the third result corresponding to each first region; based on each first result and each third result, determine the first product corresponding to each first region; wherein, the first result, the third result, and the first product are in one-to-one correspondence; based on the first variance corresponding to the fifth luminance of each first region, the second variance corresponding to the target luminance, and the second constant, determine the fourth result corresponding to each first region; based on each second result and each fourth result, determine the second product corresponding to each first region; wherein, the second result and the fourth result are in one-to-one correspondence; one second result and one fourth result yield one second product; based on the first product corresponding to each first region and the second product corresponding to each first region, obtain the first reduction degree corresponding to at least one first region; wherein, the first product and the second product are in one-to-one correspondence, and one first product and one second product yield one first reduction degree. By adopting the above method, calculate the product, variance, and covariance between the fifth luminance and the target luminance, and combine these statistics to obtain the first reduction degree of the first region. In this way, through the above refined calculation, the first reduction degree can be accurately obtained, significantly improving the accuracy of the first reduction degree and enhancing the user experience.
[0015] In a feasible implementation manner, obtaining the first reduction degree corresponding to each first region includes: using each first region as the input of a pre-trained machine learning model, and using the pre-trained machine learning model to obtain the first reduction degree corresponding to each first region. By adopting the above method, by using each first region as the input of a pre-trained machine learning model, the first reduction degree of each region can be obtained automatically and efficiently. In this way, the first reduction degree can be obtained quickly and accurately, significantly improving the processing speed and enhancing the user experience.
[0016] In a feasible implementation manner, before using each first region as the input of a pre-trained machine learning model to obtain the first reduction degree corresponding to each first region by using the pre-trained machine learning model, it further includes: obtaining a training set, where the training set includes at least one sample region image and the target reduction degree corresponding to the sample region image; using at least one of the at least one sample region image as the input of the machine learning model and using at least one target reduction degree as the output of the machine learning model to train the machine learning model. By adopting the above method, through using the images and target reduction degrees in the training set, the machine learning model can learn the influence of factors such as different brightness and contrast on the image quality. In this way, the model can be customized according to the actual application scenario, enhancing the adaptability of the model, enabling it to cope with changing shooting environments, and improving the efficiency and automation degree of overall image processing.
[0017] In a feasible implementation manner, obtaining the first contrast corresponding to each third region includes: obtaining the third brightness and the fourth brightness of each third region, where the fourth brightness is greater than the third brightness; based on the third brightness and the fourth brightness, obtaining the first contrast corresponding to at least one third region; where each third brightness corresponds to a fourth brightness, and one third brightness and one fourth brightness are used to obtain the first contrast corresponding to one third region. By adopting the above method, by obtaining the third brightness and the fourth brightness of each third region and calculating the corresponding first contrast based on these two brightnesses, the contrast of the image region can be evaluated more precisely. In this way, the contrast can be determined according to different regions with brightness differences in the image, thereby improving the overall visual effect and user experience.
[0018] In a feasible implementation manner, determining the first score corresponding to each first parameter includes: determining at least one first ratio based on each first brightness and the first weight; wherein, each first brightness corresponds to one first ratio, and one first brightness and the first weight obtain one first ratio; determining at least one second ratio based on each first contrast and the second weight; wherein, each first contrast corresponds to one second ratio, and one first contrast and the second weight obtain one second ratio; determining at least one third ratio based on each first reduction degree and the third weight; wherein, each first reduction degree corresponds to one third ratio, and one first reduction degree and the third weight obtain one third ratio; determining the first score corresponding to the blur degree of at least one first RAW image based on the first ratio, the second ratio, and the third ratio; wherein, the first ratio, the second ratio, and the third ratio correspond one by one, and one first ratio, one second ratio, and one third ratio obtain the first score corresponding to the blur degree of one first RAW image. By adopting the above method, multiple factors such as brightness, contrast, and reduction degree are comprehensively considered and combined with weight adjustment to accurately obtain the blur degree of the image. In this way, through this multi-dimensional detection method, the blur degree of the image can be calculated more accurately, thereby effectively improving the user experience.
[0019] In a feasible implementation manner, before obtaining at least one first RAW image captured by the camera module at different first angles, it further includes: constructing a first test scene, where the first test scene is a scene where the camera module captures a target subject with its back against the first light source. By adopting the above method, by constructing a completely black first test scene except for the first light source, it can help to improve the accuracy of subsequent detection of the blur degree of the camera module and further optimize the user experience.
[0020] In a feasible implementation manner, constructing at least one first test scene includes: obtaining the first positions of the target subject at different first angles; determining the second positions of the first light source and the third positions of the camera module at different first angles based on the first positions at different first angles; obtaining at least one first test scene based on the first positions, second positions, and third positions at different first angles; wherein, one first camera module and one first light source correspond to one first angle. By adopting the above method, by obtaining the positions of the target subject at different angles and determining the corresponding positions of the light source and the camera module based on these positions, a highly controllable and repeatable test environment can be created, improving the accuracy of the subsequent blur degree of the camera module.
[0021] In a feasible implementation, the different first angles include at least one of a first included angle formed by a perpendicular line of the camera module and the first light source, a second included angle formed by a perpendicular line of the camera module and the first light source, a third included angle formed by a perpendicular line of the camera module and the first light source, and a fourth included angle formed by a horizontal line of the camera module and the first light source; the second included angle is greater than the first included angle, the third included angle is greater than the second included angle, and the fourth included angle is greater than the second included angle. By adopting the above method, setting different first angles can comprehensively evaluate the performance of the camera module under various lighting conditions. In this way, more shooting scenarios can be covered, the comprehensiveness of the test process can be ensured, and finally the accuracy of the camera module blur detection can be improved.
[0022] To achieve the above object, in a second aspect, the present application provides a device for detecting the blur degree of a camera module, and the device has the function of implementing the behavior of the electronic device in the method for detecting the blur degree of the camera module in the first aspect above. The function can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.
[0023] In a third aspect, the present application provides an electronic device, including: a display screen, a memory, and one or more processors; the display screen and the memory are coupled to the processor; wherein, computer program code is stored in the memory, and the computer program code includes computer instructions, and when the computer instructions are executed by the processor, the electronic device is caused to execute the method for detecting the blur degree of the camera module provided in the first aspect above.
[0024] In a fourth aspect, the present application provides a computer-readable storage medium, including computer instructions, and when the computer instructions run on an electronic device, the electronic device is caused to execute the method for detecting the blur degree of the camera module provided in the first aspect above.
[0025] In a fifth aspect, the present application provides a computer program product, and when the computer program product runs on a computer, the computer is caused to execute the method for detecting the blur degree of the camera module provided in the first aspect above.
[0026] It can be understood that the beneficial effects that can be achieved by the technical solutions provided in the second to fifth aspects above can refer to the beneficial effects in the first aspect and any of its optional implementation manners, and will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 is a schematic structural diagram of a mobile phone provided in an embodiment of the present application;
[0028] Figure 2 is a schematic diagram of the process of starting a camera application program of the mobile phone provided in an embodiment of the present application;
[0029] Figure 3 It is a schematic structural diagram of an electronic device provided by an embodiment of the present application;
[0030] Figure 4 It is a schematic diagram of a layered architecture of a software system of the electronic device provided by this embodiment;
[0031] Figure 5 It is the first process schematic diagram of a method for detecting the blur degree of a camera module provided by an embodiment of the present application;
[0032] Figure 6 It is the first scenario schematic diagram of a method for detecting the blur degree of a camera module provided by an embodiment of the present application;
[0033] Figure 7 It is the first first-angle schematic diagram of a method for detecting the blur degree of a camera module provided by an embodiment of the present application;
[0034] Figure 8 It is the second scenario schematic diagram of a method for detecting the blur degree of a camera module provided by an embodiment of the present application;
[0035] Figure 9 It is the second first-angle schematic diagram of a method for detecting the blur degree of a camera module provided by an embodiment of the present application;
[0036] Figure 10 It is the third scenario schematic diagram of a method for detecting the blur degree of a camera module provided by an embodiment of the present application;
[0037] Figure 11 It is the third first-angle schematic diagram of a method for detecting the blur degree of a camera module provided by an embodiment of the present application;
[0038] Figure 12 It is the fourth scenario schematic diagram of a method for detecting the blur degree of a camera module provided by an embodiment of the present application;
[0039] Figure 13 It is the third first-angle schematic diagram of a method for detecting the blur degree of a camera module provided by an embodiment of the present application;
[0040] Figure 14 It is a schematic diagram of segmenting a first RAW image provided by an embodiment of the present application;
[0041] Figure 15 It is a schematic diagram of obtaining a target image provided by an embodiment of the present application;
[0042] Figure 16 It is the second process schematic diagram of a method for detecting the blur degree of a camera module provided by an embodiment of the present application;
[0043] Figure 17 It is a block diagram of a chip system provided by an embodiment of the present application. Specific implementation manners
[0044] Next, the technical solutions in the embodiments of the present application will be clearly described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments of the present application, other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0045] Hereinafter, terms such as "first" and "second" are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, features defined with "first", "second", etc. may explicitly or implicitly include one or more of such features. In the description of the present application, unless otherwise stated, the meaning of "a plurality" is two or more.
[0046] In addition, in the present application, orientation terms such as "upper", "lower", "inner", "outer", etc. are defined relative to the orientation in which the components in the drawings are schematically placed. It should be understood that these directional terms are relative concepts, which are used for relative description and clarification, and they may change accordingly with the change of the orientation in which the components in the drawings are placed.
[0047] To facilitate the understanding of the technical solutions of the embodiments of the present application by those skilled in the art, the technical terms involved in the embodiments of the present application will be explained below.
[0048] A raw image (Raw Image Format, RAW image) is an unprocessed or uncompressed image format, usually directly generated by a digital camera or other image acquisition devices. Different from standard JPEG or PNG images, RAW images retain more original data, the gray values and color information of RAW images are more accurate, and there is more room for post-processing.
[0049] Blur, also known as blurring, from the perspective of the camera, due to the performance reasons of the camera itself, it may cause the camera to become blurred, and then the captured image will be blurred, that is, the details in the image will be lost and the edges will be unclear.
[0050] The International Commission on Illumination (CIE) is an international organization dedicated to promoting the development of lighting, color, and visual science, and to facilitating humanity's understanding and application of light, color, and vision. The CIE has developed many international standards and specifications covering all aspects of lighting, such as lighting design, light source evaluation, color measurement, color representation, color temperature, etc. Among them, the CIE 1931 standard colorimetric observer and CIE standard light sources have become widely used international standards.
[0051] The CIE Lab color space is a color space defined by the CIE for describing and expressing the colors perceived by the human visual system. The Lab color space is a three-dimensional color space consisting of three channels: L represents lightness (brightness), a represents the axis from red to green, and b represents the axis from yellow to blue.
[0052] Luminance refers to the brightness of each pixel in an image, reflecting the light intensity of the image. In the CIE Lab color space, luminance is represented by the L (Lightness) channel. The value of L usually ranges from 0 to 100, where 0 represents the darkest and 100 represents the brightest. In this application, for the sake of distinction, luminance is represented by "Y".
[0053] Contrast is an important metric for measuring the brightness differences in an image. In the CIE Lab color space, it describes the degree of difference between the bright and dark regions in the image, affecting the clarity and detail presentation of the image.
[0054] Restoration Degree is usually used to measure the quality or restoration effect of an image. In the CIE Lab color space, the restoration degree is calculated by comparing the color characteristics of the restored image and the original image.
[0055] Exposure Time, also known as shutter time, refers to the length of time during which the photosensitive element (such as an image sensor or film) of a camera or video recording device is exposed to light during shooting. The length of the exposure time determines the duration for which the photosensitive element is exposed to light, thereby affecting the brightness and clarity of the image.
[0056] International Organization for Standardization (ISO) refers to the sensitivity to light, usually represented by the ISO value. The higher the ISO value, the more light the sensor can capture under the same exposure conditions, which is suitable for shooting in low-light environments; the lower the ISO value, it is suitable for shooting in well-lit environments and can obtain higher image quality.
[0057] Exposure Value (EV) is a parameter that measures the exposure level of an image and is usually expressed as the total amount of light in the image. It is jointly determined by the exposure time, aperture size, and ISO (sensitivity). The exposure value determines the brightness of the image. Too high an exposure value will cause the image to be overexposed, while too low an exposure value will cause the image to be underexposed.
[0058] A light source refers to an object or device that can emit light. In image capture, the light source is a key part that affects important factors such as the brightness, contrast, and clarity of the image. Based on the size of the light source, it can be divided into two categories. One is a point or line light source, such as indoor ceiling lights and outdoor street lights. The point or line light source is generally less than half of the imaging area of the camera module. The other is an area light source, such as a backlight scene. The area light source is generally larger than half of the imaging area of the camera module. Among them, in the embodiments of the present application, the area light source is taken as an example for illustration.
[0059] An 18% gray card usually refers to a gray object with a reflectivity of 18%. Its brightness is visually between black and white, that is, the human eye's brightness perception of it is approximately 50%. According to statistical estimates, the reflectivity of most objects in real life is close to 18%. This gray card reflects the standard brightness or exposure benchmark of the camera module. Therefore, under standard exposure conditions, the brightness value of the 18% gray card should be the expected brightness of the image.
[0060] With the development of the diversification of the functions of electronic devices, a camera module can often be set in the electronic device to utilize the camera module to implement the photo-taking function of the electronic device, thereby meeting the usage needs of users.
[0061] Figure 1 It is a schematic structural diagram of a mobile phone provided by an embodiment of the present application.
[0062] As Figure 1 shown, taking the electronic device as mobile phone 1 as an example, a camera module 2 is usually set on mobile phone 1. In this way, when the user uses mobile phone 1, functions such as taking photos, recording videos, video calls, and recognizing QR codes can be performed. At the same time, due to the portability of mobile phone 1, the user can take photos anytime and anywhere, meeting the user's needs for social interaction, recording, and creation.
[0063] Figure 2 It is a schematic diagram of the process of the mobile phone provided by an embodiment of the present application starting the camera application.
[0064] As Figure 2As shown in (a) therein, exemplarily, the main interface 10 of the mobile phone 1 may display icons of multiple application programs, such as clock icon, calendar icon, gallery icon, memo icon, file management icon, email icon, music icon, calculator icon, video icon, sports health icon, weather icon, browser icon, smart space icon, settings icon, recorder icon, app store icon, camera icon 101, contacts icon, phone icon, and message icon, etc. In addition, the main interface 10 of the mobile phone 1 may also display a status bar, and the status bar may include: one or more signal strength indicators of mobile communication signals, one or more signal strength indicators of Wi-Fi signals, a power indicator of the electronic device, a time indicator, etc.
[0065] In some embodiments, in response to a click operation 01 of the user on the camera icon 101 in the main interface 10, the mobile phone 1 starts the camera application program, and causes the screen displayed by the mobile phone 1 to Figure 2 switch from the main interface 10 shown in (a) therein to the camera shooting interface 11 shown in (b) in Figure 2 therein. The camera shooting interface 11 may include a viewfinder 111 and a shooting button 112. The viewfinder 111 can preview the actual picture captured by the current camera module 2 to help the user determine the shooting picture range, composition, etc. The shooting button 112 is a button for controlling the camera module 2 to take a picture when the user determines to take a picture. Further, in response to a click operation 02 of the user on the shooting button 112 in the camera shooting interface 11, an image of the current scene is captured.
[0066] It can be understood that the user can also start the camera application program through other shortcut methods or through the settings icon, and the present application does not limit the start of the camera application program.
[0067] In the above-mentioned scenario of taking pictures, the mobile phone 1 will call the camera module to capture an image of the current scene, and the captured image may be unclear, which may be due to the reason of the performance of the camera module itself, such as problems with hardware technology, etc. In order to solve the problem of the camera module being hazy, usually the haziness degree of the camera module, that is, the blurring degree of the camera module, is first obtained. Through the analysis of the blurring degree, a basis can be provided for subsequent adjustment, so as to improve the shooting effect of the camera module and improve the image quality.
[0068] In one embodiment, the electronic device acquires a captured image in a backlight scenario, calculates the contrast of the image based on the average brightness of the face region in the image and the color card in the image, and jointly evaluates the shooting effect of the camera module of the electronic device on the face in the backlight scenario according to the information of the gray scale bar displayed in the image. This embodiment results in inaccurate detection results of the blur degree of the camera module and the detection results cannot be used to measure the influence of the hardware process of the electronic device on the blur degree of the camera module.
[0069] In another embodiment, the electronic device acquires an image in a backlight scenario, detects the face region in the image, obtains the brightness of the face region, and makes adjustments based on a preset brightness and the obtained brightness of the face region to ensure a better shooting image effect in the final output. It can be seen that the above embodiment aims at adjusting the parameter adjustment during the shooting process, resulting in inaccurate detection results of the blur degree of the camera module and the detection results cannot be used to measure the influence of the hardware process of the electronic device on the blur degree of the camera module.
[0070] In summary, currently, the detection results for determining the blur degree of the camera module are inaccurate and the detection results cannot be used to measure the influence of the hardware process of the electronic device on the blur degree of the camera module, thus affecting the subsequent improvement of image quality and resulting in a poor user experience.
[0071] To solve the above problems, the embodiments of the present application provide a method for detecting the blur degree of a camera module, which can be used to measure the influence of the hardware process of the electronic device on the blur degree of the camera module, and can also obtain the blur degree of the camera module in all directions and from multiple angles, thereby effectively improving the accuracy of the electronic device in judging the problem of the camera module being hazy, and further improving the user experience.
[0072] The image display method provided in this embodiment can be applied to an electronic device. In some embodiments, the electronic device may be a mobile phone, a tablet computer, a handheld computer, a personal computer (PC), an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, an artificial intelligence (AI) device, a wearable device, etc. The embodiments of the present application do not impose special restrictions on the specific type of the electronic device.
[0073] Exemplarily, Figure 3 is a schematic structural diagram of an electronic device provided in the embodiments of the present application, taking a mobile phone as an example.
[0074] As Figure 3 shown, the mobile phone may include a processor 310, an external memory interface 320, an internal memory 321, a universal serial bus (USB) interface 330, a charging management module 340, a power management module 341, a battery 342, an antenna 1, an antenna 2, a mobile communication module 350, a wireless communication module 360, an audio module 370, a sensor module 380, a display screen 393, a subscriber identification module (SIM) card interface 394, and a camera 395, etc. Among them, the sensor module 380 may include a pressure sensor 380A, a fingerprint sensor 380B, an ambient light sensor 380C, a gyroscope sensor 380D, a temperature sensor 380E, etc.
[0075] The processor 310 may include one or more processing units. For example, the processor 310 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors.
[0076] The controller may be the nerve center and command center of the mobile phone. The controller may generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching and executing instructions.
[0077] A memory may also be provided in the processor 310 for storing instructions and data. In some embodiments, the memory in the processor 310 is a cache memory. This memory may save the instructions or data that the processor 310 has just used or recycled. If the processor 310 needs to use the instruction or data again, it can be directly called from the memory. This avoids repeated accesses, reduces the waiting time of the processor 310, and thus improves the efficiency of the system.
[0078] In some embodiments, the processor 310 may include one or more interfaces.
[0079] The external memory interface 320 can be used to connect to an external non-volatile memory to expand the storage capacity of the mobile phone. The external non-volatile memory communicates with the processor 310 through the external memory interface 320 to implement the data storage function. For example, files such as music and videos are saved in the external non-volatile memory.
[0080] The internal memory 321 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM).
[0081] The charging management module 340 is used to receive a charging input from a power supply device (such as a charger, laptop power, etc.). Among them, the charger can be a wireless charger or a wired charger. In some embodiments of wired charging, the charging management module 340 can receive the charging input of the wired charger through the USB interface 330. In some embodiments of wireless charging, the charging management module 340 can receive the wireless charging input through the wireless charging coil of the mobile phone.
[0082] While the charging management module 340 charges the battery 342, it can also supply power to the mobile phone through the power management module 341. Among them, the battery 342 can specifically be composed of multiple batteries connected in series. The power management module 341 is used to connect the battery 342, the charging management module 340 and the processor 310.
[0083] The power management module 341 is used to connect the battery 342, the charging management module 340 and the processor 310. The power management module 341 receives the input from the battery 342 and / or the charging management module 340 and supplies power to the processor 310, the internal memory 321, the display screen 393, the camera 395, the wireless communication module 360, etc. The power management module 341 can also be used to monitor parameters such as the voltage, current, battery cycle count, and battery health status (leakage, impedance) of the battery. In some other embodiments, the power management module 341 can also be provided in the processor 310.
[0084] The wireless communication function of the mobile phone can be implemented through antenna 1, antenna 2, the mobile communication module 350, the wireless communication module 360, the modem, and the baseband processor, etc.
[0085] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the mobile phone can be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization rate of the antennas.
[0086] The mobile communication module 350 can provide solutions for wireless communications such as 2G / 3G / 4G / 5G applied to mobile phones. The mobile communication module 350 can receive electromagnetic waves through antenna 1, and perform processing such as filtering and amplification on the received electromagnetic waves, and then transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 350 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves through antenna 1 and radiate it out. In some embodiments, at least some functional modules of the mobile communication module 350 can be provided in the processor 310. In some embodiments, at least some functional modules of the mobile communication module 350 and at least some modules of the processor 310 can be provided in the same device.
[0087] The wireless communication module 360 can provide solutions for wireless communications applied to mobile phones, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (IR), etc. The wireless communication module 360 can be one or more devices integrating at least one communication processing module. The wireless communication module 360 receives electromagnetic waves through antenna 2, performs frequency modulation and filtering processing on the electromagnetic wave signals, and sends the processed signals to the processor 310. The wireless communication module 360 can also receive the signals to be sent from the processor 310, perform frequency modulation and amplification on them, and convert them into electromagnetic waves through antenna 2 and radiate them out.
[0088] The electronic device can implement audio functions through the audio module 370, speaker 370A, receiver 370B, microphone 370C, headphone jack 370D, and the application processor, etc. Such as music playback, recording, etc.
[0089] The audio module 370 is used to convert digital audio information into analog audio signals for output, and is also used to convert analog audio inputs into digital audio signals. The audio module 370 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 370 can be provided in the processor 310, or some functional modules of the audio module 370 can be provided in the processor 310.
[0090] The speaker 370A, also known as the "loudspeaker", is used to convert an audio electrical signal into a sound signal. The electronic device can listen to music or hands-free calls through the speaker 370A. In the embodiments of the present application, the speaker 370A is used to play the sound of the media externally.
[0091] The receiver 370B, also known as the "earpiece", is used to convert an audio electrical signal into a sound signal. When the electronic device answers a call or a voice message, the voice can be listened to by bringing the receiver 370B close to the human ear.
[0092] The microphone 370C, also known as the "microphone" or "transmitter", is used to convert a sound signal into an electrical signal. When making a call or sending a voice message, the user can speak by bringing the mouth close to the microphone 370C to input the sound signal into the microphone 370C. The electronic device can be provided with at least one microphone 370C. In some other embodiments, the electronic device can be provided with two microphones 370C, which can not only collect sound signals but also implement a noise reduction function. In some other embodiments, the electronic device can also be provided with three, four or more microphones 370C to implement functions such as collecting sound signals, noise reduction, identifying the sound source, and implementing a directional recording function.
[0093] In some embodiments, the sensor module 380 may include a pressure sensor 380A, a fingerprint sensor 380B, an ambient light sensor 380C, a gyroscope sensor 380D, a temperature sensor 380E, etc.
[0094] Among them, the pressure sensor 380A is used to sense a pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 380A can be disposed on the display screen 393. There are many types of pressure sensors 380A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can include at least two parallel plates with conductive materials. When a force acts on the pressure sensor 380A, the capacitance between the electrodes changes. The mobile phone determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 393, the mobile phone detects the intensity of the touch operation according to the pressure sensor 380A. The mobile phone can also calculate the position of the touch according to the detection signal of the pressure sensor 380A. In the embodiments of the present application, the pressure sensor 380A can be used to detect the operation of the user on the camera icon 101.
[0095] The fingerprint sensor 380B is used to collect fingerprints. The mobile phone can use the collected fingerprint characteristics to implement functions such as fingerprint unlocking, accessing the application lock, fingerprint photography, and fingerprint payment.
[0096] The ambient light sensor 380C is used to sense the ambient light brightness. The ambient light sensor 380C can also cooperate with the proximity light sensor to detect whether the electronic device is in the pocket to prevent accidental touch.
[0097] The gyroscope sensor 380D can be used to determine the motion posture of the electronic device. In some embodiments, the angular velocity of the electronic device about three axes (i.e., the x, y, and z axes) can be determined by the gyroscope sensor 380D. The gyroscope sensor 380D can be used for anti-shake shooting.
[0098] The temperature sensor 380E is used to detect the temperature. In some embodiments, the mobile phone utilizes the temperature detected by the temperature sensor 380E to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 380E exceeds the threshold, the mobile phone reduces the performance of the processor located near the temperature sensor 380E in order to reduce power consumption and implement thermal protection. In some other embodiments, when the temperature is lower than another threshold, the mobile phone heats the battery 342 to avoid abnormal shutdown of the mobile phone caused by low temperature. In still other embodiments, when the temperature is lower than yet another threshold, the mobile phone boosts the output voltage of the battery 342 to avoid abnormal shutdown caused by low temperature.
[0099] In some embodiments, the mobile phone may include one or N cameras 395, where N is a positive integer greater than 1. The types of the cameras 395 can be distinguished according to the hardware configuration and the physical location. In the embodiments of the present application, RAW images can be obtained by using the cameras.
[0100] The mobile phone realizes the display function through the GPU, the display screen 393, and the application processor, etc. The GPU is a microprocessor for image editing, connected to the display screen 393 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 310 may include one or more GPUs, which execute program instructions to generate or change the display information.
[0101] The mobile phone can realize the shooting function through the ISP, the camera 395, the video codec, the GPU, the display screen 393, and the application processor, etc. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 310 may include one or more GPUs, which execute program instructions to generate or change the display information.
[0102] The ISP is used to process the data fed back by the camera 395. For example, when taking a photo, the shutter is opened, and the light passes through the lens and is transmitted to the camera photosensitive element. The optical signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye. The ISP can also optimize the noise and brightness of the image through algorithms. The ISP can also optimize parameters such as the exposure and color temperature of the shooting scene. In some embodiments, the ISP can be set in the camera 395. The camera 395 is used to capture static images or videos. In the embodiments of the present application, the ISP can be used to adjust the parameters in the shooting scene.
[0103] The digital signal processor is used to process digital signals. In addition to processing digital image signals, it can also process other digital signals. For example, when the mobile phone selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy, etc.
[0104] The display screen 393 is used to display images, videos, etc. The display screen 393 includes a display panel. In some embodiments, the mobile phone may include one or N display screens 393, where N is a positive integer greater than 1. In the embodiments of the present application, the display screen 393 can be used to display the pages required by the mobile phone (such as the shooting interface, etc.).
[0105] The SIM card interface 394 is used to connect the SIM card. The SIM card can be inserted into or pulled out from the SIM card interface 394 to achieve contact and separation from the mobile phone. The mobile phone can support one or more SIM card interfaces. The SIM card interface 394 can support Nano SIM cards, Micro SIM cards, SIM cards, etc. Multiple cards can be inserted into the same SIM card interface 394 at the same time. The SIM card interface 394 can also be compatible with external memory cards. The mobile phone interacts with the network through the SIM card to achieve functions such as calls and data communication. One SIM card corresponds to one user number.
[0106] It can be understood that the interface connection relationship between the modules illustrated in the embodiments of the present invention is only for illustrative purposes and does not constitute a limitation on the structure of the mobile phone. In other embodiments of the present application, the mobile phone can also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0107] Of course, it can be understood that the above Figure 3 is only an exemplary illustration in the form of a mobile phone for the electronic device. When the electronic device is in other device forms such as a tablet computer, a handheld computer, a PC, a PDA, a wearable device (such as a smart watch, a smart bracelet), etc., the structure of the electronic device may include less structure than that shown in Figure 3 or may include more structure than that shown in Figure 3 which is not limited herein.
[0108] It can be understood that generally, in addition to the support of hardware, the realization of the functions of the electronic device also requires the cooperation of software. The software system of the electronic device can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservices architecture, or a cloud architecture. In the embodiments of the present application, the Android® system with a layered architecture is taken as an example to exemplarily illustrate the software structure of the electronic device.
[0109] Figure 4 is a schematic diagram of the layered architecture of the software system of the electronic device provided in this embodiment.
[0110] In some examples, refer to Figure 4 As shown, in the embodiments of this application, the software of the electronic device is divided into five layers, from top to bottom are the application layer, the framework layer (or called the application framework layer), the system library and Android Runtime, the HAL layer (Hardware Abstraction Layer), and the driver layer (or called the kernel layer). Among them, the system library and Android Runtime can also be called the native framework layer or the native layer.
[0111] Among them, the application layer may include a series of applications. Such as Figure 4 As shown, the application layer may include applications (Application, APP) such as camera, gallery, calendar, map, WLAN, music, short message, call, video, etc.
[0112] The framework layer provides application programming interfaces (API) and programming frameworks for the applications in the application layer.
[0113] The application framework layer includes some predefined functions or services. For example, the application framework layer may include an activity manager, a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, a camera service, an audio judgment module, etc., and the embodiments of this application do not make any restrictions on this.
[0114] The system library may include multiple functional modules. For example: surface manager, Media Libraries, etc. The surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications. The media library supports the playback and recording of various common audio and video formats, as well as static image files, etc. The media library can support multiple audio and video coding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0115] The HAL layer is an interface layer located between the operating system kernel and the hardware circuit. Its purpose is to abstract the hardware. It hides the hardware interface details of a specific platform and provides a virtual hardware platform for the operating system, making it hardware-independent and portable across multiple platforms. The HAL layer provides a standard interface to display the device hardware functions to a higher-level Java API framework (i.e., the framework layer). The HAL layer contains multiple library modules, and each module implements an interface for a specific type of hardware component. For example, the mute control module, the camera HAL (which can also be called the camera HAL or the camera hardware abstraction module). Among them, the camera HAL includes a thumbnail corresponding image processing module and an image processing module, and the sensors HAL sensor module (or called the isensor service, sensor service).
[0116] The driver layer is the layer between the hardware and the software. The driver layer at least includes a display driver, a camera driver, an audio driver, a sensor driver, a battery driver, etc., which are not limited in this application.
[0117] The hardware layer includes a display, an audio digital processor, a power amplifier, a speaker, etc.
[0118] The following further describes the method for detecting the blur degree of the camera module provided by the embodiments of the present application with reference to the accompanying drawings.
[0119] When the electronic device appears blurry, it is more obvious especially in the light source or backlight scene. Therefore, the following will take the backlight scene as an example to demonstrate how to detect the blur degree of the camera module.
[0120] Figure 5 It is the first process schematic diagram of the method for detecting the blur degree of a camera module provided by the embodiments of the present application.
[0121] Combined with Figure 5 As shown, the method for detecting the blur degree of the camera module may include the following steps:
[0122] Step S1: Construct at least one first test scene, where the first test scene is a scene where the camera module shoots a target subject with its back to the first light source.
[0123] Among them, each first test scene may include a target subject, a first light source, and a camera module. The angle between the camera module and the first light source is different in each first test scene.
[0124] Step S1 includes steps S11 - S13.
[0125] Step S11: Obtain the first positions of the target subject at different first angles.
[0126] Wherein, the first angle is the included angle formed by the camera module and the first light source.
[0127] In one embodiment, when the first angle is the first included angle formed by the camera module and the perpendicular line of the first light source, obtain the first position of the target object at the first angle.
[0128] Figure 6 It is the first scenario schematic diagram of a method for detecting the blur degree of a camera module provided by an embodiment of the present application.
[0129] Figure 7 It is the first first angle schematic diagram of a method for detecting the blur degree of a camera module provided by an embodiment of the present application.
[0130] Such as Figure 6 and Figure 7 As shown, when the first test scenario is a test scenario where the first included angle formed by the camera module and the perpendicular line of the first light source is 0 degrees, the first light source in the first test scenario occupies most of the imaging field of view, that is, more than one-half. At this time, the first test scenario is a backlight scenario. Among them, the first included angle is 0 degrees, that is, the camera module, the target object, and the first light source are on the same straight line. Among them, this straight line is the perpendicular line of the first light source.
[0131] Exemplarily, when the first included angle formed by the camera module and the perpendicular line of the first light source is 0 degrees, determine the first position A of the target object 61.
[0132] In another embodiment, when the first angle is the second included angle formed by the camera module and the perpendicular line of the first light source, obtain the first position of the target object at the first angle.
[0133] Figure 8 It is the second scenario schematic diagram of a method for detecting the blur degree of a camera module provided by an embodiment of the present application.
[0134] Figure 9 It is the second first angle schematic diagram of a method for detecting the blur degree of a camera module provided by an embodiment of the present application.
[0135] Such as Figure 8 and Figure 9 As shown, when the first test scenario is a test scenario where the second included angle formed by the camera module and the perpendicular line of the first light source is 45 degrees, the first light source in the first test scenario occupies most of the imaging field of view, that is, more than one-half. At this time, the first test scenario is a side backlight scenario. Among them, the second included angle is 45 degrees, that is, the target object and the first light source are on the same straight line, and the camera module is not on this straight line.
[0136] Exemplarily, when the second included angle formed by the vertical line of the imaging module and the first light source is 45 degrees, the first position B of the target object 71 is determined.
[0137] In another embodiment, when the first angle is the third included angle formed by the vertical line of the imaging module and the first light source, the first position of the target object at the first angle is obtained.
[0138] Figure 10 It is the third scenario schematic diagram of a method for detecting the blur degree of an imaging module provided by an embodiment of the present application.
[0139] Figure 11 It is the third first angle schematic diagram of a method for detecting the blur degree of an imaging module provided by an embodiment of the present application.
[0140] Such as Figure 10 and Figure 11 As shown, when the first test scenario is a test scenario where the third included angle formed by the horizontal line of the imaging module and the first light source is 70 degrees, the first light source in the first test scenario occupies a small part of the imaging field of view, that is, less than one-half. At this time, the first test scenario is a side light scenario. Among them, the third included angle is 70 degrees, that is, the target object and the first light source are on the same straight line, and the imaging module is not on this straight line.
[0141] Exemplarily, when the third included angle formed by the vertical line of the imaging module and the first light source is 70 degrees, the first position C of the target object 81 is determined.
[0142] In yet another embodiment, when the first angle is the fourth included angle formed by the horizontal line of the imaging module and the first light source, the first position of the target object at the first angle is obtained.
[0143] Figure 12 It is the fourth scenario schematic diagram of a method for detecting the blur degree of an imaging module provided by an embodiment of the present application.
[0144] Figure 13 It is the third first angle schematic diagram of a method for detecting the blur degree of an imaging module provided by an embodiment of the present application.
[0145] Such as Figure 12 and Figure 13 As shown, when the first test scenario is a test scenario where the fourth included angle formed by the horizontal line of the imaging module and the first light source is 70 degrees, the first light source in the first test scenario occupies a small part of the imaging field of view, that is, less than one-half. At this time, the first test scenario is a top light scenario. Among them, the fourth included angle is 70 degrees, that is, the target object and the imaging module are on the same straight line, and the first light source is not on this straight line.
[0146] Exemplarily, when the fourth included angle formed by the horizontal line of the camera module and the first light source is 70 degrees, the first position D of the target object 91 is determined.
[0147] It should be noted that there can be two, three, etc. first angles. If there are two first angles, it is only necessary to ensure that the second included angle is greater than the first included angle. If there are three first angles, it is necessary to ensure that the second included angle is greater than the first included angle and the third included angle is greater than the second included angle. No specific limitation is made here.
[0148] The above gives embodiments of obtaining the first position of the target object under four first angles. Next, an exemplary description will continue in combination with the four first angles.
[0149] Step S12: Based on the first positions under different first angles, determine the second position of the first light source and the third position of the camera module under different first angles.
[0150] In one implementation manner, based on the first position of the target object, obtain the first distance between the target object and the first light source, and obtain the second distance between the target object and the camera module; based on the first distance, determine the second position of the first light source; based on the second distance, determine the third position of the camera module.
[0151] Combined with Figure 6 and Figure 7 In the above example shown, in the front-backlight scenario, that is, the first angle (the first included angle) is 0 degrees, based on the first position A of the target object 61, determine the first distance L between the target object 61 and the first light source 62 A , based on the first distance L A , determine the second position A' of the first light source 62; based on the first position A of the target object 61, determine the second distance L' between the target object 61 and the camera module 63 A , based on the second distance L' A , determine the third position A'' of the camera module 63. Exemplarily, determine that the first distance L between the target object 61 and the first light source 62 A is 100 cm, and the second distance L' between the target object 61 and the camera module 63 A is 50 cm.
[0152] Continue to combine Figure 8 and Figure 9 In the above example shown, in the side-backlight scenario, that is, the first angle (the second included angle) is 45 degrees, based on the first position B of the target object 71, determine the first distance L between the target object 71 and the first light source 72 B , based on the first distance L B, determine the second position B’ of the first light source 72; based on the first position B of the target object 71, determine the second distance L between the target object 71 and the camera module 73 B ’, based on the second distance L B ’, determine the third position B’’ of the camera module. Exemplarily, determine the first distance L between the target object 71 and the first light source 72 B to be 100 cm, and the second distance L B ’ between the target object 71 and the camera module 73 is 50 cm.
[0153] Continuing with the above example in combination with Figure 10 and Figure 11 shown, in a side light scenario, that is, the first angle (the third included angle) is 70 degrees, based on the first position C of the target object 81, determine the first distance L between the target object 81 and the first light source 82 C , based on the first distance L C , determine the second position C’ of the first light source 82; based on the first position C of the target object 81, determine the second distance L C ’ between the target object 81 and the camera module 83, and based on the second distance L C ’, determine the third position C’’ of the camera module. Exemplarily, determine the first distance L C between the target object 81 and the first light source 82 to be 100 cm, and the second distance L C ’ between the target object 81 and the camera module 83 is 50 cm.
[0154] Continuing with the above example in combination with Figure 9 shown, in a top light scenario, that is, the first angle (the fourth included angle) is 70 degrees, based on the first position D of the target object 91, determine the first distance L between the target object 91 and the first light source 92 D , based on the first distance L D , determine the second position D’ of the first light source 92; based on the first position D of the target object 91, determine the second distance L D ’ between the target object 91 and the camera module 93, and based on the second distance L D ’, determine the third position D’’ of the camera module. Exemplarily, determine the first distance L D between the target object 91 and the first light source 92 to be 100 cm, and the second distance L D ’ between the target object 91 and the camera module 93 is 50 cm.
[0155] It should be noted that the first distance and the second distance are determined according to user requirements and are not uniquely limited here. At the same time, there are differences in the field of view angles of the camera modules of different electronic devices, and appropriate adjustments will be made.
[0156] Step S13: Based on the first positions, second positions, and third positions at different first angles, obtain at least one first test scenario; wherein, one first camera module and one light source correspond to one first angle.
[0157] Continuing with the above examples shown in Figure 6 and Figure 7 In the front-backlit scenario, that is, when the first angle (the first included angle) is 0 degrees, construct a first test scenario including the target subject 61, the first light source 62, and the camera module 63.
[0158] Continuing with the above examples shown in Figure 8 and Figure 9 In the side-backlit scenario, the first angle (the second included angle) is 45 degrees, and construct a first test scenario including the target subject 71, the first light source 72, and the camera module 73.
[0159] Continuing with the above examples shown in Figure 10 and Figure 11 In the side-lit scenario, the first angle (the third included angle) is 70 degrees, and construct a first test scenario including the target subject 81, the first light source 82, and the camera module 83.
[0160] Continuing with the above examples shown in Figure 12 and Figure 13 In the top-lit scenario, the first angle (the fourth included angle) is 70 degrees, and construct a first test scenario including the target subject 91, the first light source 92, and the camera module 93.
[0161] It should be noted that, in order to control variables, the color temperature and light intensity of the first light source in the above four first test scenarios corresponding to the first angles are the same. Exemplarily, the color temperature of the first light source is set to 6500 Kelvin (K), and the light intensity is set to 15270 lux.
[0162] Step S2: Obtain at least one first RAW image captured by the camera module of the first test scenario at different first angles, where the first angle is the included angle formed by the camera module and the first light source.
[0163] Among them, one first angle corresponds to one first RAW image.
[0164] In one implementation, the camera module can be a camera module that supports RAW format data processing, which means that the camera module can directly output unprocessed raw images.
[0165] Continuing with the above examples, obtain four first RAW images captured by the camera module of the first test scenario at the above four first angles.
[0166] In another embodiment, the camera module can capture a first test scene at a first angle to obtain a captured image. Further, the captured image is processed to obtain a RAW image.
[0167] Continuing with the above example, the camera module captures the first test scene at the above four first angles to obtain four captured images, and RAW data is extracted from each captured image to obtain four first RAW images.
[0168] The following is an exemplary description of the specific implementation for obtaining the first RAW image. Step S2 includes steps S21 - S22.
[0169] Step S21: Obtain the target exposure time of the camera module at each first angle and the sensitivity of the camera module.
[0170] To ensure the exposure accuracy of the image, a target exposure amount can be set, and the exposure time is adjusted based on the target exposure amount. Therefore, the target exposure amount can be set according to actual needs.
[0171] It should be noted that in the scenario of detecting the blur degree of the camera modules in multiple electronic devices, there may be differences in the camera modules of different electronic devices. In the scenario of detecting the blur degree of the camera modules in multiple electronic devices, it is necessary to set based on the camera modules of multiple electronic devices. That is to say, the target exposure amounts of the corresponding camera modules in multiple electronic devices are controlled to be the same.
[0172] The following continues to take the camera module of an electronic device as an example for illustration.
[0173] In one embodiment, step S21 includes steps S211 - S214.
[0174] Step S211: Obtain the initial exposure time of the camera module at each first angle and the sensitivity of the camera module.
[0175] Continuing to combine with Figure 6 and Figure 7 In the above example shown, in the direct backlight scenario, that is, the first angle (the first included angle) is 0 degrees. Since the default exposure time and the minimum sensitivity of the camera module are known parameter information in the camera module, therefore, the default exposure time in the camera module can be directly obtained and used as the initial exposure time of the camera module , and the minimum sensitivity is used as the sensitivity of the camera module .
[0176] In the different scenarios corresponding to the other three first angles, obtaining the initial exposure time of the camera module and the sensitivity of the camera module is similar to the above example in the direct backlight scenario and will not be elaborated here.
[0177] Step S212: Determine the exposure amount of the camera module at each first angle based on the initial exposure time at each first angle and the sensitivity of the camera module at each first angle.
[0178] Continuing with the above example, in a direct backlight scenario, that is, when the first angle (first included angle) is 0 degrees, after obtaining the initial exposure time and the sensitivity , determine the exposure amount of the camera module .
[0179] For example, the exposure amount can be determined with reference to the following formula (1):
[0180] Formula (1);
[0181] where, is the exposure amount; is the aperture, ; is the exposure time, is the sensitivity of the camera module.
[0182] Exemplarily, determine the exposure amount of the camera module based on formula (1) .
[0183] In different scenarios corresponding to the other three first angles, determine the exposure amount of the camera module, which is similar to the above example in the direct backlight scenario and will not be elaborated here.
[0184] Step S213: Adjust the exposure amount of the camera module at each first angle based on a preset brightness to obtain the target exposure amount of the camera module at each first angle.
[0185] Among them, the preset brightness is set based on an 18% gray card. The 18% gray card is a standard exposure reference, that is, its reflectance is close to the average reflectance of common objects in many natural scenes.
[0186] In one embodiment, step S213 includes steps S2131 - S2133.
[0187] Step S2131: Obtain a second RAW image captured by the camera module at each first angle based on the exposure amount at each first angle.
[0188] Continuing with the above example, in a direct backlight scenario, that is, when the first angle (first included angle) is 0 degrees, at the exposure amount , obtain the second RAW image when the first angle is 0 degrees.
[0189] In different scenarios corresponding to the other three first angles, determine that the second RAW images corresponding to the three first angles are the second RAW image, the second RAW image, and the second RAW image respectively. Similar to the example in the front-backlit scenario above, it will not be elaborated here.
[0190] Step S2132: Calculate the second brightness of the second RAW image at each first angle; the second brightness is the brightness corresponding to the grayscale value of the second RAW image.
[0191] Among them, the grayscale value refers to the value of each pixel in the image, usually represented by a number (such as 0 to 255). The higher the grayscale value, the higher the brightness of the pixel, and the closer it is to white; the lower the grayscale value, the lower the brightness of the pixel, and the closer it is to black.
[0192] In one implementation, the RAW data of the second RAW image can be read through a dedicated parsing library or tool (such as libraw, etc.), and the brightness can be calculated based on the RAW data. Among them, the RAW data includes the pixel width and pixel height of the RAW image, and the brightness corresponding to each pixel.
[0193] Exemplarily, the brightness of the RAW image can be determined in combination with formula (2).
[0194] Formula (2);
[0195] Among them, is the total number of pixels of the RAW image, which is equal to the product of the pixel width and the pixel height; is the brightness of the th pixel value, is the brightness value of the th pixel, and they are accumulated from 1 to .
[0196] Following the examples shown in Figure 6 and Figure 7 , calculate the second brightness corresponding to the second RAW image in the front-backlit scenario, that is, when the first angle (the first included angle) is 0 degrees. . In different scenarios corresponding to the other three first angles, determine that the second brightnesses corresponding to the second RAW images corresponding to the three first angles are the second brightness , the second brightness , and the second brightness respectively.
[0197] Step S2133: Based on the second brightness and the preset brightness at each first angle, adjust the exposure amount of the camera module at each first angle to obtain the target exposure amount of the camera module at each first angle.
[0198] In one example, it is determined whether the second luminance corresponding to the second RAW image at each first angle is the same as a preset luminance. If they are the same, the exposure amount corresponding to the second RAW image at this time is determined as the target exposure amount. If they are different, the exposure amount of the camera module at each first angle is adjusted until the second luminance corresponding to the second RAW image is the same as the preset luminance, and the exposure amount corresponding to the second RAW image at this time is determined as the target exposure amount.
[0199] Exemplarily, adjusting the exposure amount of the camera module at each first angle can be to adjust the exposure time while ensuring that the sensitivity of the camera module remains unchanged, that is, adjusting from the initial exposure time to the first exposure time, determining the first exposure amount based on the first exposure time, obtaining the second RAW image corresponding to the first exposure amount based on the first exposure amount, comparing the second luminance of the second RAW image corresponding to the first exposure amount with the preset luminance. If they are the same, the first exposure amount at this time is determined as the target exposure amount. If they are different, the above operation is repeatedly executed (continuously adjusting the exposure time) until the second luminance corresponding to the second RAW image is the same as the preset luminance, and the exposure amount corresponding to the second RAW image at this time is determined as the target exposure amount.
[0200] Continuing with the example of step S2132 above, in a front-backlit scene, that is, when the first angle (the first included angle) is 0 degrees, if the second luminance corresponding to the second RAW image and the preset luminance Y 预 are the same, the exposure amount corresponding to the second RAW image is the target exposure amount. For the sake of easy distinction, is used as the target exposure amount .
[0201] In the different scenes corresponding to the other three first angles, it is determined that the target exposure amounts corresponding to the three first angles are respectively , and , which is similar to the example in the front-backlit scene above and will not be elaborated here.
[0202] Step S214: Based on the target exposure amount of the camera module at each first angle, determine the target exposure time of the camera module at each first angle.
[0203] Continuing with the above example, using the inverse operation of formula (1), determine the target exposure time of the camera module at each first angle. For example, according to the target exposure amount and formula (1), determine that in the front-backlit scene, that is, when the first angle (the first included angle) is 0 degrees, the target exposure time . In the different scenes corresponding to the other three first angles, it is determined that the target exposure amounts corresponding to the three first angles are respectively , and , similar to the examples in the front-backlit scene above, will not be elaborated here in detail.
[0204] Step S22: Based on the target exposure time and sensitivity at each first angle, obtain the first RAW image at each first angle.
[0205] Following the above examples, in the front-backlit scene, that is, the first RAW image I1 when the first angle (the first included angle) is 0 degrees, in the side-backlit scene, the first RAW image I2 when the first angle (the second included angle) is 45 degrees, in the side-light scene, the first RAW image I3 when the first angle (the third included angle) is 70 degrees, and in the top-light scene, the first RAW image I4 when the first angle (the fourth included angle) is 70 degrees.
[0206] Step S3: Obtain the first parameter corresponding to each first RAW image, where the first parameter is at least one of the reduction degree, contrast, and brightness corresponding to the first RAW image in the LAB color space.
[0207] Among them, the first RAW image is an image with bright-dark color differences. For example, the first RAW image includes a target subject, and the target subject includes regions with brightness differences.
[0208] Step S3 includes Step S31 - Step S32.
[0209] Step S31: Segment each first RAW image to obtain the first region, second region, and third region corresponding to each target subject.
[0210] Among them, the first RAW image includes a target subject.
[0211] Figure 14 is a schematic diagram for segmenting the first RAW image provided by an embodiment of the present application.
[0212] Combined with Figure 14 shown, the first region includes the face region of the target subject; the second region includes the region corresponding to the forehead part of the target subject; the third region includes the region corresponding to the eye part of the target subject.
[0213] It should be noted that the above first region can be the region corresponding to a human face, the region corresponding to an animal face, or other specific regions containing a large amount of detailed information. The second region can be the region corresponding to the forehead of a human face, or other relatively smooth regions; the third region can be the eye region including the eyeball and the sclera, or the region including a black and white chart, or other regions with brightness differences, and will not be specifically limited here.
[0214] Taking the target subject as a person as an example, the first RAW image is segmented to obtain the first region corresponding to the target subject as the face region, the second region corresponding to the target subject as the forehead region, and the third region corresponding to the target subject as the eye region for exemplary illustration.
[0215] Among them, there are various implementation manners for segmenting the first RAW image. Here, one of the embodiments will be used as an example for illustration.
[0216] In one embodiment, each first RAW image is used as the input of a pre-trained neural network model, and the first region, second region, and third region of each target subject are obtained by using the neural network model.
[0217] Among them, the pre-trained neural network model can be a pre-trained image segmentation model or other neural network models, which are not specifically limited herein.
[0218] The pre-trained neural network model refers to a neural network model that has been trained on a large-scale data set before use. To ensure the generalization ability of the neural network model, it is necessary to train the neural network model according to a large amount of training data.
[0219] In one implementation manner, the training manner of the neural network model will be described.
[0220] First, a training set is obtained. Among them, the training set includes at least one first RAW training image including a training target subject, and the first target region, second target region, and third target region corresponding to the first RAW training image. The first target region includes the region of the training target subject that contains a large amount of detailed information, that is, the region with more content elements. The second target region includes the region of the training target subject with relatively uniform brightness. The third target region includes the region of the training target subject with relatively obvious light and dark differences.
[0221] Exemplarily, the first target region includes the face region of the training target subject; the second target region includes the region corresponding to the forehead part of the training target subject; the third target region includes the region corresponding to the eye part of the training target subject.
[0222] Secondly, at least one first RAW training grayscale image is used as the input of the neural network model, and at least one first target region, at least one second target region, and at least one third target region are used as the output of the neural network model to train the neural network model.
[0223] It should be noted that to increase the generalization ability of the neural network model, generally a large amount of training sets are used to train the neural network model. Here, taking one first RAW training grayscale image to train the neural network model as an example for illustration.
[0224] Input the first RAW training grayscale image into the neural network model to obtain the first prediction region, the second prediction region, and the third prediction region corresponding to the first RAW training image. Use a preset loss function to determine the first loss value between the first prediction region and the first target region, the second loss value between the second prediction region and the second target region, and the third loss value between the third prediction region and the third target region. Based on the first loss value, the second loss value, and the third loss value, continuously adjust the neural network model. When the above loss values are all less than the preset threshold, it means that the training of the neural network model is completed, and the trained neural network model is obtained.
[0225] After the neural network model is trained, use the neural network model to segment the first RAW image. That is, input the first RAW image into the neural network model to output the first region, the second region, and the third region. Continuing with the above example, segment the first RAW images obtained at different first angles to obtain the first region, the second region, and the third region at different first angles. For example, in the direct backlight scenario, that is, when the first angle (the first included angle) is 0 degrees, for the first RAW image I1, the first region I 11 , the second region I 12 and the third region I 13 . In the side backlight scenario, when the first angle (the second included angle) is 45 degrees, for the first RAW image I2, the first region I 21 , the second region I 22 and the third region I 23 . In the side light scenario, when the first angle (the third included angle) is 70 degrees, for the first RAW image I3, the first region I 31 , the second region I 32 and the third region I 33 and in the top light scenario, when the first angle (the fourth included angle) is 70 degrees, for the first RAW image I4, the first region I 41 , the second region I 42 and the third region I 43 .
[0226] Step S32: Obtain the first reduction degree corresponding to each first region, the first contrast corresponding to each third region, and the first brightness corresponding to each second region in the LAB color space.
[0227] Step S32 includes steps S321 - S323.
[0228] Step S321: Obtain the first reduction degree corresponding to each first region in the LAB color space.
[0229] For the sake of convenience of description, the following uses the first area I of the first RAW image I1 when the first angle (first included angle) is 0 degrees 11 , the second area I 12 and the third area I 13 for illustration.
[0230] In one example, step S321 includes steps S3211 - S3214.
[0231] Step S3211: Obtain a target image, which is an image obtained from at least one preset image and having the same preset area as the first area I1.
[0232] Among them, the target image is a standard RAW image used to measure the reduction degree. The target image is usually used as a high-quality original image and used as a comparison benchmark to evaluate whether the first RAW image restores the details, colors, and other visual characteristics of the target image. The at least one preset image is a large number of standard RAW images collected according to different standard scenarios.
[0233] Exemplarily, as shown in Figure 15 , if there are 3 at least one preset images, namely II1, II2, and II3, obtain the preset image whose preset area is the same as the first area among the 3 preset images, and use this preset image as the target image, that is, II2 is the target image.
[0234] Step S3212: Obtain the fifth brightness corresponding to each first area; the fifth brightness is the brightness corresponding to the gray value in the first area.
[0235] Among them, the specific content of step S3212 can be determined with reference to the above formula (2), and will not be elaborated here.
[0236] Exemplarily, in combination with formula (2), the fifth brightness can be obtained .
[0237] Step S3213: Obtain the target brightness corresponding to the preset area; the target brightness is the brightness corresponding to the gray value in the preset area.
[0238] Among them, the specific content of step S3213 can be determined with reference to the above formula (2), and will not be elaborated here.
[0239] Exemplarily, in combination with formula (2), the fifth brightness can be obtained .
[0240] Step S3214: Based on each fifth brightness and the target brightness, obtain the first reduction degree corresponding to at least one first region; wherein, each fifth brightness corresponds to the first reduction degree corresponding to one first region; one fifth brightness and one target brightness yield the first reduction degree corresponding to one first region.
[0241] In one implementation, to determine the reduction degree of two images, the Structural Similarity Index (SSIM) can be used to evaluate the difference between the two images, or other methods can be employed, which are not specifically limited herein.
[0242] The following takes the SSIM evaluation method as an example for illustrative purposes.
[0243] Specifically, the determination method of the first reduction degree of the first region can be: Based on the first mean value of the fifth brightness corresponding to each first region, the second mean value of the target brightness, and the first constant, determine the first result corresponding to each first region and the second result corresponding to each first region; wherein, the first mean value corresponds one-to-one with the first result, the first mean value corresponds one-to-one with the second result, one first mean value, one second mean value, and one first constant yield one first result or one second result; Based on the covariance between the fifth brightness and the target brightness of each first region and the second constant, determine the third result corresponding to each first region; Based on each first result and each third result, determine the first product corresponding to each first region; wherein, the first result, the third result, and the first product correspond one-to-one; Based on the first variance of the fifth brightness corresponding to each first region, the second variance of the target brightness, and the second constant, determine the fourth result corresponding to each first region; Based on each second result and each fourth result, determine the second product corresponding to each first region; wherein, the second result and the fourth result correspond one-to-one; one second result and one fourth result yield one second product; Based on the first product corresponding to each first region and the second product corresponding to each first region, obtain the first reduction degree corresponding to at least one first region; wherein, the first product corresponds one-to-one with the second product, and one first product and one second product yield one first reduction degree.
[0244] Exemplarily, in combination with formula (3), determine the first reduction degree:
[0245] Formula (3);
[0246] Wherein, is the brightness of the first region, is the brightness of the target region, and represent and the mean values of, and denotes and the variance of, denotes and the covariance between, , denotes a constant, , , and are default coefficients, such as , , is the pixel range of the image, , is the bit depth of the image, indicating how many bits are used to store data for each pixel.
[0247] Following the examples of the above different first angles, in combination with formula (3), in the direct backlight scenario, that is, when the first angle (the first included angle) is 0 degrees, the first reduction degree of the first region is obtained 、In the side backlight scenario, when the first angle (the second included angle) is 45 degrees, the first reduction degree of the first region is obtained 、In the side light scenario, when the first angle (the third included angle) is 70 degrees, the first reduction degree of the first region is obtained and in the top light scenario, when the first angle (the fourth included angle) is 70 degrees, the first reduction degree of the first region is obtained .
[0248] In one example, step S321 includes step S3215.
[0249] Step S3215: Using each first region as the input of a pre-trained machine learning model, and using the pre-trained machine learning model, obtain the first reduction degree corresponding to each first region.
[0250] Among them, the pre-trained machine learning model refers to a machine learning model that has been trained on a large-scale data set before use. To ensure the generalization ability of the machine learning model, it is necessary to train the machine learning model according to a large amount of training data.
[0251] In one implementation manner, the training method of the machine learning model is described.
[0252] First, obtain a training set, which includes at least one sample region image and the target reduction degree corresponding to the sample region image.
[0253] Among them, the sample region image may include a face region image or other specific region images.
[0254] Then, using at least one sample region image as the input of the machine learning model and at least one target reduction degree as the output of the machine learning model, train the machine learning model.
[0255] It should be noted that, in order to improve the generalization ability of the machine learning model, a large number of training sets are generally used to train the machine learning model. Here, an example of training the machine learning model with a single sample region image will be used for illustration.
[0256] Input the sample region image into the machine learning model to obtain the predicted reduction degree corresponding to the sample region image. Based on a preset loss function, determine the loss value between the preset reduction degree and the target reduction degree. Based on the loss value, continuously adjust the parameters of the machine learning model. When all the above loss values are less than a preset threshold, it indicates that the training of the machine learning model is completed.
[0257] It should be noted that the above machine learning model is trained using a regression loss function, and other implementation methods can also be used, such as a contrast loss function, etc., which are not specifically limited here.
[0258] Continuing with the above examples of different first angles, using the machine learning model, in a direct backlight scenario, that is, when the first angle (the first included angle) is 0 degrees, obtain the first reduction degree of the first region 、in a side backlight scenario, when the first angle (the second included angle) is 45 degrees, obtain the first reduction degree of the first region 、in a side light scenario, when the first angle (the third included angle) is 70 degrees, obtain the first reduction degree of the first region and in a top light scenario, when the first angle (the fourth included angle) is 70 degrees, obtain the first reduction degree of the first region .
[0259] Step S322: Obtain the first contrast corresponding to each third region in the LAB color space.
[0260] In one implementation, step S322 includes steps S3221 - S3222.
[0261] Step S3221: Obtain the third brightness and the fourth brightness of each third region, where the fourth brightness is greater than the third brightness.
[0262] Taking the human eye region as an example for the third region, the third brightness is the brightness corresponding to the eyeball in the human eye region, and the fourth brightness is the brightness corresponding to the sclera in the human eye region.
[0263] For the specific content of step S3221, reference can be made to the specific content of step S2132, which will not be elaborated here.
[0264] Continuing with the above examples of different first angles, using a machine learning model, in a front-backlight scenario, that is, when the first angle (the first included angle) is 0 degrees, the third brightness of the third region is obtained. And the fourth brightness ; in a side-backlight scenario, when the first angle (the second included angle) is 45 degrees, the third brightness of the third region is obtained. And the fourth brightness ; in a side-light scenario, when the first angle (the third included angle) is 70 degrees, the third brightness of the third region is obtained. And the fourth brightness And in a top-light scenario, when the first angle (the fourth included angle) is 70 degrees, the third brightness of the third region is obtained. And the fourth brightness .
[0265] Step S3222: Based on the third brightness and the fourth brightness, obtain the first contrast corresponding to at least one third region; wherein, each third brightness corresponds to a fourth brightness, and a third brightness and a fourth brightness obtain the first contrast corresponding to a third region.
[0266] In one implementation manner, determine the first difference and the first sum of the third brightness and the fourth brightness of each third region; based on each first difference and each first sum, determine the first contrast corresponding to at least one third region.
[0267] Exemplarily, determine the first contrast in combination with formula (4):
[0268] Formula (4);
[0269] Wherein, is the first contrast, is the third brightness, is the fourth brightness.
[0270] Continuing with the above examples of different first angles, in a front-backlight scenario, that is, when the first angle (the first included angle) is 0 degrees, the first contrast of the third region is ; in a side-backlight scenario, when the first angle (the second included angle) is 45 degrees, the first contrast of the third region is ; in a side-light scenario, when the first angle (the third included angle) is 70 degrees, the first contrast of the third region is ; in a top-light scenario, when the first angle (the fourth included angle) is 70 degrees, the first contrast of the third region is .
[0271] Step S323: Obtain the first brightness corresponding to each second region in the LAB color space.
[0272] For the specific content of step S323, reference can be made to the specific content of step S2132, which will not be elaborated here.
[0273] Continuing with the above examples of different first angles, in the direct backlight scenario, that is, when the first angle (the first included angle) is 0 degrees, the first brightness corresponding to the second region is obtained ; in the side backlight scenario, when the first angle (the second included angle) is 45 degrees, the first brightness corresponding to the second region is obtained ; in the side light scenario, when the first angle (the third included angle) is 70 degrees, the first brightness corresponding to the second region is obtained ; in the top light scenario, when the first angle (the fourth included angle) is 70 degrees, the first brightness corresponding to the second region is obtained .
[0274] Step S4: Determine the first score corresponding to each first parameter, where the first score is used to characterize the blurring degree of the first RAW image.
[0275] In one implementation, based on each first brightness and the first weight, determine at least one first ratio; where each first brightness corresponds to a first ratio, and a first brightness and the first weight yield a first ratio; based on each first contrast and the second weight, determine at least one second ratio; where each first contrast corresponds to a second ratio, and a first contrast and the second weight yield a second ratio; based on each first reducibility and the third weight, determine at least one third ratio; where each first reducibility corresponds to a third ratio, and a first reducibility and the third weight yield a third ratio; based on the first ratio, the second ratio, and the third ratio, determine at least one first score corresponding to the blurring degree of the first RAW image; where the first ratio, the second ratio, and the third ratio correspond one by one, and a first ratio, a second ratio, and a third ratio yield a first score corresponding to the blurring degree of the first RAW image.
[0276] Among them, the second weight is greater than the first weight, and the third weight is greater than the first weight.
[0277] It should be noted that the first weight, the second weight, and the third weight are specifically set according to the actual scenario and are not specifically limited here.
[0278] Exemplarily, in combination with formula (5), determine the first score:
[0279] Formula (5);
[0280] Among them, is the first score, is the first weight, is the second weight, is the third weight.
[0281] Continuing with the above examples of different first angles, in a front-backlit scene, that is, when the first angle (the first included angle) is 0 degrees, the first score corresponding to the first RAW image is ; in a side-backlit scene, when the first angle (the second included angle) is 45 degrees, the first score corresponding to the first RAW image is ; in a side-lit scene, when the first angle (the third included angle) is 70 degrees, the first score corresponding to the first RAW image is ; in an overhead-lit scene, when the first angle (the fourth included angle) is 70 degrees, the first score corresponding to the first RAW image is .
[0282] S5: Determine a comprehensive score based on all the first scores, where the comprehensive score is used to characterize the blur degree of the camera module.
[0283] There are various ways to determine the comprehensive score. Here, two embodiments are taken as examples for illustration.
[0284] In one example, determine the comprehensive score based on all the first scores and the average weight.
[0285] Exemplarily, determine the comprehensive score in combination with formula (6):
[0286] Formula (6);
[0287] where, is the comprehensive score, is the average weight.
[0288] Continuing with the above examples of the four first angles, the four first scores obtained are , , , and . If is 0.8, is 0.6, is 0.5, is 0.7, and the average weight is 0.05, then based on formula (5), the determined comprehensive score is 0.13.
[0289] In another example, take the average of all the first scores to obtain the comprehensive score.
[0290] Exemplarily, determine the comprehensive score in combination with formula (7):
[0291] Formula (7);
[0292] Among them, is the total quantity of the first scores, is the comprehensive score.
[0293] Following the examples of the first angles of the above four, the four first scores obtained are , , , and . If is 0.8, is 0.6, is 0.5, is 0.7, based on formula (7), the determined comprehensive score is 0.7.
[0294] It should be noted that in the above embodiment, the comprehensive score is used to characterize the blur degree of the camera module. In order to meet the user's needs, in the actual application scenario, the brightness, contrast, and restoration degree of each area in the first RAW image can also be provided to the user, which will not be specifically described here.
[0295] In summary, through the first RAW images obtained from different angles, the blur degree of the camera module can be comprehensively evaluated to ensure the accuracy of the measurement results. Processing based on the RAW images not only helps to accurately determine the blur degree of the camera module, but also can deeply analyze the influence of the electronic device hardware process on the imaging quality, thereby guaranteeing and improving the user experience.
[0296] The following is an exemplary illustration in conjunction with Figure 16 .
[0297] Figure 16 is the second process schematic diagram of a method for detecting the blur degree of a camera module provided by an embodiment of the present application.
[0298] As Figure 16 shows, the method for detecting the blur degree of a camera module includes the following steps:
[0299] Use the camera module to capture first test scenes corresponding to different first angles to obtain corresponding first RAW images. Input the first RAW images into a neural network model for image segmentation. Further, determine the restoration degree, contrast, and brightness of different regions obtained by the image segmentation, obtain corresponding first scores based on the restoration degree, contrast, and brightness, and determine the final comprehensive score based on the first scores of different first angles.
[0300] In summary, by obtaining the first RAW image from different perspectives, the blur degree of the camera module can be comprehensively evaluated to ensure the accuracy of the measurement results. Processing based on the RAW image not only helps to accurately determine the blur degree of the camera module, but also enables in-depth analysis of the impact of the hardware process of the electronic device on the imaging quality, thereby guaranteeing and enhancing the user experience.
[0301] Corresponding to the embodiments of the method for the blur degree of the foregoing camera module, the present application also provides an application example of this method in an actual application scenario. Among them, the application examples of the method for the blur degree of the camera module in an actual application scenario are diverse. Taking one of them as an example, for instance, this method can be used to compare the blur degrees of camera modules in different electronic devices.
[0302] For ease of explanation, the following uses two camera modules in two electronic devices as examples for illustration, namely electronic device M and electronic device N.
[0303] The application example of this method in an actual application scenario includes the following steps:
[0304] Step S6: Construct at least one first test scenario.
[0305] For the specific content of step S6, reference can be made to the above step S1, which will not be elaborated here.
[0306] Exemplarily, for electronic device M, construct a first test scenario S where the first angle (the first included angle) formed by the vertical line of the camera module and the first light source is 0 degrees M1 ; a first test scenario S where the first angle (the second included angle) formed by the vertical line of the camera module and the first light source is 45 degrees M2 ; a first test scenario S where the first angle (the third included angle) formed by the vertical line of the camera module and the first light source is 70 degrees M3 ; a first test scenario S where the first angle (the fourth included angle) formed by the vertical line of the camera module and the first light source is 70 degrees M4 . For electronic device N, construct a first test scenario S where the first angle (the first included angle) formed by the vertical line of the camera module and the first light source is 0 degrees N1 ; a first test scenario S where the first angle (the second included angle) formed by the vertical line of the camera module and the first light source is 45 degrees N2 ; a first test scenario S where the first angle (the third included angle) formed by the vertical line of the camera module and the first light source is 70 degrees N3 ; a first test scenario S where the first angle (the fourth included angle) formed by the vertical line of the camera module and the first light source is 70 degrees N4 .
[0307] Step S100: Obtain at least one first RAW image by capturing a first test scene at different first angles using camera modules in different electronic devices.
[0308] For the specific content of step S100, reference can be made to the above step S2, which will not be elaborated here.
[0309] Continuing with the above example, for electronic device M, obtain the first RAW image I M1 corresponding to the first test scene S M1 ; obtain the first RAW image I M1 corresponding to the first test scene S M2 ; obtain the first RAW image I M1 corresponding to the first test scene S M3 ; obtain the first RAW image I M1 corresponding to the first test scene S M4 . For electronic device N, obtain the first RAW image I M1 corresponding to the first test scene S N1 ; obtain the first RAW image I M1 corresponding to the first test scene S M2 ; obtain the first RAW image I M1 corresponding to the first test scene S N3 ; obtain the first RAW image I M1 corresponding to the first test scene S N4 .
[0310] Step S200: Obtain the first parameter corresponding to each first RAW image, where the first parameter is at least one of the reduction degree, contrast, and brightness corresponding to the first RAW image in the LAB color space.
[0311] For the specific content of step S200, reference can be made to the above step S3, which will not be elaborated here.
[0312] Continuing with the above example, for electronic device M, obtain the first reduction degree of the first region in the first RAW image I M1 ; obtain the first reduction degree of the first region in the first RAW image I ; obtain the first reduction degree of the first region in the first RAW image I M2 ; obtain the first reduction degree of the first region in the first RAW image I ; obtain the first reduction degree of the first region in the first RAW image I M3 ; obtain the first reduction degree of the first region in the first RAW image I ; obtain the first reduction degree of the first region in the first RAW image I M4 ; obtain the first reduction degree of the first region in the first RAW image I ; obtain the first contrast of the third region in the first RAW image I M1 ; obtain the first contrast of the third region in the first RAW image I ; obtain the first contrast of the third region in the first RAW image I M2The first contrast of the third region ; Obtain the first RAW image I M3 The first contrast of the third region ; Obtain the first RAW image I M4 The first contrast of the third region 。Obtain the first RAW image I M1 The first brightness of the second region ; Obtain the first RAW image I M2 The first brightness of the second region ; Obtain the first RAW image I M3 The first brightness of the second region ; Obtain the first RAW image I M4 The first brightness of the second region 。
[0313] For the electronic device N, obtain the first RAW image I N1 The first reduction degree of the first region ; Obtain the first RAW image I N2 The first reduction degree of the first region Obtain the first RAW image I N3 The first reduction degree of the first region ; Obtain the first RAW image I N4 The first reduction degree of the first region 。Obtain the first RAW image I N1 The first contrast of the third region ; Obtain the first RAW image I N2 The first contrast of the third region ; Obtain the first RAW image I N3 The first contrast of the third region ; Obtain the first RAW image I N4 The first contrast of the third region 。Obtain the first RAW image I N1 The first brightness of the second region ; Obtain the first RAW image I N2 The first brightness of the second region ; Obtain the first RAW image I N3 The first brightness of the second region ; Obtain the first RAW image I N4 The first brightness of the second region 。
[0314] Step S300: Determine the first score corresponding to each first parameter.
[0315] For the specific content of step S300, reference can be made to the above step S4, which will not be elaborated here.
[0316] Continuing with the above example, for the electronic device M, determine the first RAW image I M1 The corresponding first score is ; determine the first RAW image I M2 The corresponding first score is ; determine the first RAW image I M3 The corresponding first score is ; determine the first RAW image I M4 The corresponding first score is . For the electronic device N, determine the first RAW image I N1 The corresponding first score is ; determine the first RAW image I N2 The corresponding first score is ; determine the first RAW image I N3 The corresponding first score is ; determine the first RAW image I N4 The corresponding first score is .
[0317] Step S400: Based on all the first scores corresponding to each electronic device, determine the comprehensive score corresponding to each electronic device.
[0318] For the specific content of step S400, reference can be made to the above step S5, which will not be elaborated here.
[0319] Continuing with the above example, for the electronic device M, determine the comprehensive score corresponding to the electronic device M . For the electronic device N, determine the comprehensive score corresponding to the electronic device N .
[0320] Step S500: Compare the comprehensive scores corresponding to each electronic device.
[0321] Continuing with the above example, based on the comprehensive score and the comprehensive score , determine the blur degree of the camera module of the electronic device. For example, if is greater than , it indicates that the blur degree of the camera module of the electronic device N in the first test scenario is greater than that of the electronic device M.
[0322] In another implementation, it is also possible to comprehensively determine the blur degree of the camera module in the electronic device based on the comprehensive score, and the first reduction degree, the first contrast ratio, and the first brightness of different electronic devices.
[0323] The following can be described with reference to Table 1.
[0324] Exemplarily, Table 1 is specifically described in combination with the above embodiments.
[0325] Table 1
[0326] ;
[0327] That is to say, further analysis can be carried out in combination with the blurring degree measurement index of the camera module of the electronic device in Table 1.
[0328] It should be noted that the above camera modules correspond one-to-one with the electronic devices, or may be multiple camera modules in the same electronic device, which is not specifically limited herein.
[0329] In summary, by comparing the blurring degrees of the camera modules in different electronic devices, in-depth analysis of the camera modules in the electronic devices can be carried out to improve the user experience.
[0330] Corresponding to the embodiment of the method for detecting the blurring degree of the camera module described above, the present application also provides an embodiment of a device for detecting the blurring degree of the camera module. The device includes:
[0331] An acquisition module, configured to: acquire at least one first RAW image obtained by the camera module shooting a first test scene at different first angles, where the first angle is the included angle formed by the camera module and the first light source;
[0332] The acquisition module is further configured to: acquire a first parameter corresponding to each first RAW image, where the first parameter is at least one of the reduction degree, contrast, and brightness corresponding to the first RAW image in the LAB color space;
[0333] A determination module, configured to: determine a first score corresponding to each first parameter, where the first score is used to characterize the blurring degree of the first RAW image;
[0334] The determination module is further configured to: determine a comprehensive score based on all the first scores, where the comprehensive score is used to characterize the blurring degree of the camera module.
[0335] It can be understood that, in order to implement the above functions, the electronic device includes the corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should easily realize that, in combination with the steps of an image enhancement method in each example described in the embodiments disclosed in this application, this application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed in the way of hardware or software of the electronic device driving the hardware depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.
[0336] Embodiments of this application provide an electronic device, which may include: a display screen (such as a touch screen or a non-touch screen), a memory, and one or more processors. The display screen, the memory, and the processor are coupled. The memory is used to store computer program code, and the computer program code includes computer instructions. When the processor executes the computer instructions, the electronic device can execute each function or step executed by the electronic device in the above method embodiments. The structure of the electronic device may refer to Figure 3 the structure of the electronic device shown.
[0337] Figure 17 is a structural block diagram of a chip system provided by embodiments of this application.
[0338] Embodiments of this application also provide a chip system 1700, as Figure 17 shown, the chip system 1700 includes at least one processor 1701 and at least one interface circuit 1702. The processor 1701 and the interface circuit 1702 can be interconnected through a line. For example, the interface circuit 1702 can be used to receive signals from other devices (such as the memory of the electronic device). For another example, the interface circuit 1702 can be used to send signals to other devices (such as the processor 1701 or the touch screen of the electronic device). Exemplarily, the interface circuit 1702 can read the instructions stored in the memory and send the instructions to the processor 1701. When the instructions are executed by the processor 1701, the electronic device can execute each step in the above embodiments. Of course, the chip system may also include other discrete devices, and embodiments of this application do not make specific limitations in this regard.
[0339] Embodiments of this application also provide a computer storage medium, which includes computer instructions. When the computer instructions run on the above electronic device, the electronic device is enabled to execute each function or step executed by the electronic device in the above method embodiments.
[0340] The embodiments of the present application also provide a computer program product. When the computer program product runs on a computer, it enables the computer to execute each function or step that the electronic device executes in the above method embodiments.
[0341] From the descriptions of the above embodiments, those skilled in the art can clearly understand that for the convenience and conciseness of description, only the division of the above functional modules is used as an example. In practical applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0342] It is easy to understand that based on the several embodiments provided in the present application, those skilled in the art can combine, split, and reorganize the embodiments of the present application to obtain other embodiments, and these embodiments do not exceed the protection scope of the present application.
[0343] In the several embodiments provided in the present application, it should be understood that the disclosed device and method can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces. The indirect coupling or communication connection of the device or unit can be in electrical, mechanical or other forms.
[0344] The unit described as a separated component may or may not be physically separated. The component displayed as a unit may be a physical unit or multiple physical units, that is, it can be located in one place, or it can be distributed to multiple different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0345] In addition, each functional unit in the various embodiments of the present application can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
[0346] When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiments of the present application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. The software product is stored in a storage medium and includes several instructions for causing a device (which can be a single-chip microcomputer, a chip, etc.) or a processor to execute all or part of the steps of the methods of the various embodiments of the present application. The foregoing storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read only memory (ROM), random access memory (RAM), magnetic disks, or optical discs. It should be noted that those skilled in the art will readily think of other implementation manners of the present application after considering the specification and practicing the application disclosed herein. The present application is intended to cover any variations, uses, or adaptations of the present application, which follow the general principles of the present application and include the well-known common knowledge or conventional technical means in the technical field not disclosed in the present application. The specification and the embodiments are only regarded as exemplary, and the true scope of the present application is pointed out by the claims.
[0347] It should be understood that the present application is not limited to the exact structure already described and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present application is only limited by the appended claims.
Claims
1. A method for detecting blurriness of a camera module, characterized in that: include: The camera module shoots a first test scene at different first angles to obtain a first RAW image corresponding to each first angle, where the first angle is an angle formed by the camera module and a first light source; The first RAW image is an unprocessed original image; Acquire a first parameter corresponding to each of the first RAW images, where the first parameter is at least one of a restoration degree, a contrast, and a brightness corresponding to the first RAW image in a LAB color space; Determine a first score corresponding to each of the first parameters, wherein the first score is used to represent a blur degree of the first RAW image; Determine a comprehensive score based on all of the first scores, wherein the comprehensive score is used to characterize the blur degree of the camera module; The first RAW image includes a target subject; and obtaining a first parameter corresponding to each of the first RAW images includes: Segmenting each of the first RAW images to obtain a first region, a second region, and a third region corresponding to each of the target subjects; Obtain a first restoration degree corresponding to each of the first regions, a first brightness corresponding to each of the second regions, and a first contrast corresponding to each of the third regions in the LAB color space.
2. The method for detecting blurriness of a camera module according to claim 1, characterized in that: The camera module shoots a first test scene at different first angles to obtain a first RAW image corresponding to each first angle, including: Obtaining a target exposure time of the camera module and a sensitivity of the camera module at each of the first angles; Based on the target exposure time and the sensitivity at each first angle, the first RAW image at each first angle is acquired.
3. The method for detecting blurriness of a camera module according to claim 2, characterized in that: The obtaining the target exposure time of the camera module at each of the first angles includes: Acquire the initial exposure time of the camera module and the sensitivity of the camera module at each of the first angles; Determine the exposure amount of the camera module at each first angle based on the initial exposure time at each first angle and the sensitivity of the camera module at each first angle; Based on a preset brightness, adjusting the exposure of the camera module at each of the first angles to obtain a target exposure of the camera module at each of the first angles; Based on the target exposure amount of the camera module at each of the first angles, the target exposure time of the camera module at each of the first angles is determined.
4. The method for detecting blurriness of a camera module according to claim 3, characterized in that: The step of adjusting the exposure of the camera module at each of the first angles based on the preset brightness to obtain a target exposure of the camera module at each of the first angles includes: Based on the exposure at each of the first angles, obtaining a second RAW image captured by the camera module at each of the first angles; Calculating a second brightness of the second RAW image at each of the first angles; the second brightness is the brightness corresponding to the grayscale value of the second RAW image; Based on the second brightness and the preset brightness at each of the first angles, the exposure of the camera module at each of the first angles is adjusted to obtain the target exposure of the camera module at each of the first angles.
5. The method for detecting blurriness of a camera module according to claim 1, characterized in that: The first area includes the face area of the target subject; the second area includes the area corresponding to the forehead of the target subject; and the third area includes the area corresponding to the eyes of the target subject.
6. The method for detecting blurriness of a camera module according to claim 5, characterized in that: The step of segmenting each of the first RAW images to obtain a first region, a second region, and a third region corresponding to each of the target subjects includes: Each of the first RAW images is used as an input of a pre-trained neural network model, and the pre-trained neural network model is used to obtain the first region, the second region and the third region of each of the target subjects.
7. The method for detecting blurriness of a camera module according to claim 1, characterized in that: The obtaining of the first restoration degree corresponding to each of the first regions includes: Acquire a target image, where the target image is an image acquired from at least one preset image and has the same preset area as the first area; Obtaining a fifth brightness corresponding to each of the first regions; the fifth brightness is the brightness corresponding to the grayscale value in the first region; Obtaining a target brightness corresponding to the preset area, wherein the target brightness is the brightness corresponding to the grayscale value in the preset area; Based on each of the fifth brightness and the target brightness, the first restoration degree corresponding to at least one of the first areas is obtained; wherein each of the fifth brightness corresponds to the first restoration degree corresponding to the first area; one of the fifth brightness and one of the target brightness obtains the first restoration degree corresponding to the first area.
8. The method for detecting blurriness of a camera module according to claim 7, characterized in that: The obtaining, based on the fifth brightness and the target brightness, a first restoration degree corresponding to at least one of the first regions, comprises: Based on the first mean of the fifth brightness corresponding to each of the first areas, the second mean of the target brightness and a first constant, determine a first result corresponding to each of the first areas and a second result corresponding to each of the first areas; wherein the first mean corresponds to the first result one-to-one, the first mean corresponds to the second result one-to-one, and one first mean, one second mean and one first constant obtain one first result or one second result; Determine a third result corresponding to each of the first regions based on a covariance between the fifth brightness of each of the first regions and the target brightness and a second constant; Based on each of the first results and each of the third results, determine a first product corresponding to each of the first regions; wherein the first results, the third results and the first products correspond one to one; determining a fourth result corresponding to each of the first regions based on a first variance corresponding to the fifth brightness of each of the first regions, a second variance corresponding to the target brightness, and the second constant; Based on each of the second results and each of the fourth results, determine a second product corresponding to each of the first regions; wherein the second results and the fourth results correspond one to one; and one second result and one fourth result generate one second product; Based on the first product corresponding to each of the first regions and the second product corresponding to each of the first regions, a first restoration degree corresponding to at least one of the first regions is obtained; wherein the first products correspond one to one with the second products, and one first product and one second product obtain one first restoration degree.
9. The method for detecting blurriness of a camera module according to claim 1, characterized in that: The obtaining of the first restoration degree corresponding to each of the first regions includes: Each of the first regions is used as an input of a pre-trained machine learning model, and the pre-trained machine learning model is used to obtain the first degree of restoration corresponding to each of the first regions.
10. The method for detecting blurriness of a camera module according to claim 9, characterized in that: Before taking each of the first regions as an input of a pre-trained machine learning model and obtaining the first degree of restoration corresponding to each of the first regions by using the pre-trained machine learning model, the method further includes: Acquire a training set, wherein the training set includes at least one sample region image and a target restoration degree corresponding to the sample region image; The machine learning model is trained by taking at least one of the sample area images as input of the machine learning model and taking at least one of the target restoration degrees as output of the machine learning model.
11. The method for detecting blurriness of a camera module according to claim 1, characterized in that: The obtaining of the first contrast corresponding to each of the third regions includes: Acquire a third brightness and a fourth brightness of each of the third areas, wherein the fourth brightness is greater than the third brightness; Based on the third brightness and the fourth brightness, the first contrast corresponding to at least one of the third regions is obtained; wherein each of the third brightnesses corresponds to one of the fourth brightnesses, and one of the third brightnesses and one of the fourth brightnesses obtains the first contrast corresponding to one of the third regions.
12. The method for detecting blurriness of a camera module according to claim 1, characterized in that: The determining a first score corresponding to each of the first parameters comprises: Based on each of the first brightness and the first weight, determining at least one first ratio; wherein each of the first brightness corresponds to one first ratio, and one first brightness and the first weight obtain one first ratio; Based on each of the first contrasts and the second weights, at least one second ratio is determined; wherein each of the first contrasts corresponds to one second ratio, and one of the first contrasts and the second weights results in one second ratio; Based on each of the first restoration degrees and the third weight, at least one third ratio is determined; wherein each of the first restoration degrees corresponds to one third ratio, and one first restoration degree and the third weight obtain one third ratio; Based on the first ratio, the second ratio and the third ratio, the first score corresponding to the blur degree of at least one of the first RAW images is determined; wherein the first ratio, the second ratio and the third ratio correspond one-to-one, and one first ratio, one second ratio and one third ratio obtain the first score corresponding to the blur degree of the first RAW image.
13. The method for detecting blurriness of a camera module according to claim 1, characterized in that: Before obtaining at least one first RAW image obtained by photographing the first test scene at different first angles by the camera module, the method further includes: Construct at least one of the first test scenes, where the first test scene is a scene in which the camera module shoots a target subject with its back against the first light source.
14. The method for detecting blurriness of a camera module according to claim 13, characterized in that: The constructing at least one of the first test scenarios comprises: Acquire the first position of the target subject at different first angles; Based on the first positions at different first angles, determining the second positions of the first light source and the third positions of the camera module at different first angles; Based on the first position, the second position and the third position at different first angles, at least one first test scene is obtained; wherein, one camera module and one first light source correspond to one first angle.
15. The method for detecting blurriness of a camera module according to claim 1, characterized in that: The different first angles include at least two of a first angle formed by the camera module and a vertical line of the first light source, a second angle formed by the camera module and a vertical line of the first light source, a third angle formed by the camera module and a vertical line of the first light source, and a fourth angle formed by the camera module and a horizontal line of the first light source; the second angle is greater than the first angle, the third angle is greater than the second angle, and the fourth angle is greater than the second angle.
16. A device for detecting blurriness of a camera module, characterized in that: include: The acquisition module is configured to: the camera module photographs at different first angles to obtain a first RAW image corresponding to each first angle, where the first angle is an angle formed by the camera module and the first light source; the first RAW image is an unprocessed original image; The acquisition module is further configured to: acquire a first parameter corresponding to each of the first RAW images, wherein the first parameter is at least one of brightness, contrast, and restoration degree corresponding to the first RAW image in the color space LAB after the first RAW image is converted into the color space LAB; A determination module is configured to: determine a first score corresponding to each of the first parameters, wherein the first score is used to represent a blur degree of the first RAW image; The determination module is further configured to: determine a comprehensive score based on all of the first scores, wherein the comprehensive score is used to characterize the blur degree of the camera module; The acquisition module is further specifically configured to: segment each of the first RAW images to obtain a first region, a second region, and a third region corresponding to a target subject in each of the first RAW images; Obtain a first restoration degree corresponding to each of the first regions, a first brightness corresponding to each of the second regions, and a first contrast corresponding to each of the third regions in the LAB color space.
17. An electronic device, characterized in that: include: A memory and one or more processors; the memory is coupled to the processor; wherein the memory stores computer program code, the computer program code includes computer instructions, and when the computer instructions are executed by the processor, the electronic device executes the method for detecting the blur degree of the camera module as described in any one of claims 1-15.
18. A computer-readable storage medium, characterized in that: It includes computer instructions, and when the computer instructions are executed on an electronic device, the electronic device executes the method for detecting the blur degree of the camera module as described in any one of claims 1 to 15.
19. A computer program product, characterized in that When the computer program product runs on a computer, the computer executes the method for detecting the blur degree of the camera module as described in any one of claims 1 to 15.
Citation Information
Patent Citations
Ambiguity detection method, electronic equipment and storage medium
CN111953964A