Evaluation method and device of image processing algorithm, electronic equipment and product

CN122989508APending Publication Date: 2026-10-27BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510528179.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-24
Publication Date
2026-10-27

AI Technical Summary

Benefits of technology

[0021]在本公开中,由于图像的解析力值能够指示图像对细节的呈现能力。因此,图像采集设备在对焦状态下采集的第一图像的解析力值必然大于图像采集设备在离焦状态下采集的第二图像的解析力值。而图像处理能力较强的图像处理算法能够将离焦状态下采集的第二图像的解析力值恢复至与对焦状态下采集的第一图像的解析力值相同或相近。所以,基于通过图像处理算法处理后得到的第三图像的解析力值与第一图像的解析力值之间的差值的大小即可确定出图像处理算法的图像处理能力。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122989508A_ABST
    Figure CN122989508A_ABST
Patent Text Reader

Abstract

The present disclosure relates to an image processing algorithm evaluation method and device, electronic equipment and product. The method comprises: acquiring a first image collected by an image collection device in a focusing state, and a second image collected by the image collection device in a defocusing state; processing the second image through an image processing algorithm to obtain a third image; calculating a difference value between a resolving power value of the third image and a resolving power value of the first image, wherein the resolving power value is used to represent the presentation ability of the image to details, and the size of the difference value is negatively correlated with the image processing ability of the image processing algorithm. Through the method of the present disclosure, the image processing ability of the image processing algorithm can be determined based on the size of the difference value between the resolving power value of the third image obtained after processing by the image processing algorithm and the resolving power value of the first image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of electronic equipment technology, and in particular to an evaluation method, apparatus, electronic equipment, and product for an image processing algorithm. Background Technology

[0002] Image processing algorithms can improve the quality of images acquired by image acquisition devices. However, after developing a new image processing algorithm, determining whether its image processing capabilities meet expectations is a crucial technical problem that needs to be solved. Summary of the Invention

[0003] To overcome the problems existing in related technologies, this disclosure provides an evaluation method, apparatus, electronic device, storage medium, and product for image processing algorithms. The image processing capability of the image processing algorithm can be determined based on the difference between the resolution value of the third image obtained after processing by the image processing algorithm and the resolution value of the first image.

[0004] According to a first aspect of the present disclosure, an evaluation method for an image processing algorithm is provided. The method includes: acquiring a first image acquired by an image acquisition device in a focused state and a second image acquired by the image acquisition device in a defocused state; processing the second image using an image processing algorithm to obtain a third image; and calculating the difference between the resolution value of the third image and the resolution value of the first image, wherein the resolution value is used to characterize the ability of the image to render details, and the magnitude of the difference is negatively correlated with the image processing capability of the image processing algorithm.

[0005] In some embodiments, the resolution value includes the resolution value of the image at each of the plurality of fields of view; wherein, calculating the difference between the resolution value of the third image and the resolution value of the first image includes: calculating the difference between the resolution value of the third image at at least one field of view and the resolution value of the first image at the corresponding field of view.

[0006] In some embodiments, calculating the difference between the resolution value of the third image at at least one field of view and the resolution value of the first image at the corresponding field of view includes at least one of the following: calculating the difference between the average of the resolution values ​​of the third image at multiple fields of view and the average of the resolution values ​​of the first image at multiple fields of view; calculating the difference between the resolution value of the third image at a target field of view and the resolution value of the first image at the target field of view, wherein the target field of view is determined from multiple fields of view based on a user's selection operation.

[0007] In some embodiments, the method further includes: in response to a difference greater than or equal to a first threshold, obtaining the defocus distance of the image acquisition device when acquiring the second image; and outputting an evaluation result based on the difference or the defocus distance.

[0008] In some embodiments, the method further includes: in response to a difference value being less than a first threshold, shortening the defocus distance and re-acquiring a second image; processing the re-acquiring second image using an image processing algorithm to obtain a new third image; calculating the difference between the resolution value of the new third image and the resolution value of the first image to obtain a new difference value; in response to a new difference value being greater than the first threshold, controlling the image acquisition device to shorten the defocus distance and re-acquiring the second image until a difference value less than or equal to the first threshold value is obtained; and in response to a new difference value being greater than or equal to the first threshold value, outputting an evaluation result based on the new difference value or the shortened defocus distance.

[0009] In some embodiments, the method further includes: displaying a plurality of defocus distances and a reference resolution value corresponding to each of the plurality of defocus distances; wherein the reference resolution value is used to characterize the reduction in resolution value of an image acquired by the image acquisition device at the corresponding defocus distance relative to the resolution value of an image acquired in the focusing state; wherein acquiring a first image acquired by the image acquisition device in the focusing state and a second image acquired by the image acquisition device in the defocus state includes: acquiring the first image acquired by the image acquisition device in the focusing state; and acquiring the second image acquired by the image acquisition device at the first defocus distance in response to a user's selection operation for a first defocus distance among the plurality of defocus distances.

[0010] According to a second aspect of the present disclosure, an evaluation apparatus for an image processing algorithm is provided. The apparatus includes: a first acquisition module configured to acquire a first image acquired by an image acquisition device in a focused state and a second image acquired by the image acquisition device in a defocused state; a first processing module configured to process the second image using an image processing algorithm to obtain a third image; and a first calculation module configured to calculate the difference between the resolution value of the third image and the resolution value of the first image, wherein the resolution value is used to characterize the ability of the image to render details, and the magnitude of the difference is negatively correlated with the image processing capability of the image processing algorithm.

[0011] In some embodiments, the resolution value includes the resolution value of the image at each of the multiple fields of view; wherein, the first calculation module is configured to: calculate the difference between the resolution value of the third image at at least one field of view and the resolution value of the first image at the corresponding field of view.

[0012] In some embodiments, the first calculation module is configured to: calculate the difference between the average of the resolution values ​​of the third image at multiple fields of view and the average of the resolution values ​​of the first image at multiple fields of view; calculate the difference between the resolution value of the third image at a target field of view and the resolution value of the first image at the target field of view, wherein the target field of view is determined from multiple fields of view based on a user's selection operation.

[0013] In some embodiments, the device further includes: a second acquisition module configured to acquire the defocus distance of the image acquisition device when acquiring the second image in response to a difference greater than or equal to a first threshold; and a first output module configured to output an evaluation result based on the difference or the defocus distance.

[0014] In some embodiments, the device further includes: an acquisition module configured to shorten the defocus distance and re-acquire a second image in response to a difference value being less than a first threshold; a second processing module configured to process the re-acquired second image using an image processing algorithm to obtain a new third image; a second calculation module configured to calculate the difference between the resolution value of the new third image and the resolution value of the first image to obtain a new difference value; a control module configured to control the image acquisition device to shorten the defocus distance and re-acquire the second image in response to a new difference value being greater than the first threshold until a difference value less than or equal to the first threshold value is obtained; and a second output module configured to output an evaluation result based on the new difference value or the shortened defocus distance in response to a new difference value being greater than or equal to the first threshold value.

[0015] In some embodiments, the device further includes: a display module configured to display a plurality of defocus distances and a reference resolution value corresponding to each of the plurality of defocus distances; wherein the reference resolution value is used to characterize the reduction in resolution value of an image acquired by the image acquisition device at a corresponding defocus distance relative to the resolution value of an image acquired in a focused state; wherein the first acquisition module is configured to: acquire a first image acquired by the image acquisition device in a focused state; and, in response to a user's selection operation for a first defocus distance among the plurality of defocus distances, acquire a second image acquired by the image acquisition device at the first defocus distance.

[0016] According to a third aspect of the present disclosure, a second device is provided, comprising:

[0017] A processor; a memory for storing computer programs or instructions; wherein the processor executes the computer programs or instructions to implement the steps of the method described in the first aspect above.

[0018] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, which stores executable instructions or a computer program that, when executed by a processor, implements the steps of the method described in the first aspect.

[0019] According to a fifth aspect of the present disclosure, a computer program product is provided, including a computer program or instructions that, when executed by a processor, implement the steps of the method described in the first aspect.

[0020] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects:

[0021] In this disclosure, since the resolution value of an image indicates its ability to render details, the resolution value of the first image acquired by the image acquisition device in focused mode is necessarily greater than the resolution value of the second image acquired by the same device in defocused mode. A powerful image processing algorithm can restore the resolution value of the second image acquired in defocused mode to be the same as or close to the resolution value of the first image acquired in focused mode. Therefore, the image processing capability of the image processing algorithm can be determined based on the difference between the resolution value of the third image obtained after processing by the image processing algorithm and the resolution value of the first image.

[0022] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

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

[0024] Figure 1 This is a flowchart illustrating an evaluation method for an image processing algorithm according to an exemplary embodiment.

[0025] Figure 2 This is a schematic diagram illustrating a scenario for acquiring a first image and a second image according to an exemplary embodiment.

[0026] Figure 3 This is a schematic diagram illustrating a second and a third image according to an exemplary embodiment.

[0027] Figure 4 This is a schematic diagram illustrating the correspondence between a defocus distance and a reference resolution value according to an exemplary embodiment.

[0028] Figure 5 This is a schematic diagram illustrating a resolving force value according to an exemplary embodiment.

[0029] Figure 6 This is a block diagram illustrating an evaluation apparatus for an image processing algorithm according to an exemplary embodiment.

[0030] Figure 7 This is a block diagram illustrating an electronic device according to an exemplary embodiment. Detailed Implementation

[0031] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.

[0032] To address the aforementioned problems, this disclosure provides an evaluation method for image processing algorithms. Figure 1 This is a flowchart illustrating an evaluation method for an image processing algorithm according to an exemplary embodiment. The image processing algorithm evaluation method provided in this disclosure can be executed by an electronic device. Exemplarily, the electronic device may include a mobile terminal and a fixed terminal. The mobile terminal may include: a mobile phone, tablet computer, laptop computer, vehicle terminal, camera, and wearable electronic device, etc. The fixed terminal may include a desktop computer, all-in-one computer, etc.

[0033] In the following text, electronic devices will be used as the execution subject, and references will be made. Figure 1 The steps shown illustrate an evaluation method for an image processing algorithm provided in this disclosure. The method includes:

[0034] In step 101, a first image acquired by the image acquisition device in the focused state and a second image acquired by the image acquisition device in the defocused state are obtained.

[0035] Understandably, electronic devices can control image acquisition devices to acquire images when in focus to obtain a first image. Additionally, electronic devices can also control image acquisition devices to acquire images when out of focus to obtain a second image.

[0036] In some embodiments, the image acquisition device may be a camera, camera, or the like that is capable of establishing a communication connection with electronic devices.

[0037] In some embodiments, the image acquisition device may also be an image acquisition module within an electronic device.

[0038] In some embodiments, the first image and the second image may be images of the same target object acquired by an image acquisition device.

[0039] For example, the first image and the second image can be images of a checkerboard calibration board, a bevel calibration board, a sinusoidal stripe calibration board, a random texture calibration board, etc., acquired by an image acquisition device.

[0040] Figure 2 This is a schematic diagram illustrating a scenario for acquiring a first image and a second image according to an exemplary embodiment. An electronic device can control an image acquisition device 201 to acquire images from a checkerboard calibration board 202 to obtain a first image and a second image.

[0041] In some embodiments, the second image acquired by the image acquisition device in a defocused state can be an out-of-focus image.

[0042] In step 102, the second image is processed using an image processing algorithm to obtain the third image.

[0043] Understandably, after obtaining the second image, the electronic device can process the second image using the image processing algorithm to be evaluated, and use the image processed by the image processing algorithm as the third image. At this point, the electronic device can obtain the third image.

[0044] In some embodiments, the image processing algorithm to be evaluated can be any type of image processing algorithm, and this disclosure does not limit this.

[0045] For example, the image processing algorithms to be evaluated include, but are not limited to, image enhancement algorithms, image restoration algorithms, and image repair algorithms.

[0046] For example, image enhancement algorithms include, but are not limited to: contrast adjustment algorithms, chroma adjustment algorithms, color saturation adjustment algorithms, sharpening algorithms, etc.

[0047] Figure 3 This is a schematic diagram illustrating a second and a third image according to an exemplary embodiment. Figure 3 Part 'a' in the image is the second image. Figure 3 Part b in the image is the third image obtained by processing the second image in part a using the image processing algorithm to be evaluated. Figure 3 The 16code in the image acquisition device is the code value of the motor used to drive the lens movement when the image acquisition device acquires the first image. This code value is used to indicate the position of the lens on the image acquisition device. Figure 3 ISO in this context refers to the sensor parameters used by the image acquisition device when acquiring images.

[0048] In step 103, the difference between the resolution value of the third image and the resolution value of the first image is calculated.

[0049] Understandably, after acquiring the third image, the electronic device can obtain its resolution value. The electronic device can also obtain the resolution value of the first image. Then, the electronic device can calculate the difference between the resolution value of the third image and the resolution value of the first image.

[0050] In some embodiments, the resolution value is used to indicate an image's ability to render details.

[0051] For example, resolution values ​​include, but are not limited to: the modulation transfer function (MTF) value, resolution, and spatial frequency response (SFR) value of the image.

[0052] In some embodiments, when the resolution value is the MTF value, the electronic device can obtain the MTF value of the first image and the MTF value of the third image using methods including but not limited to: edge method, bevel method, sinusoidal target method, point spread function method, etc.

[0053] In some embodiments, the difference between the resolution of the third image and the resolution of the first image is negatively correlated with the image processing capability of the image processing algorithm.

[0054] For example, if the difference between the resolution value of the third image and the resolution value of the first image is greater than or equal to 0, it means that the resolution value of the second image acquired by the image acquisition device in the defocus state can be improved to the same level as the resolution value of the first image acquired in the focus state through the image processing algorithm.

[0055] In this embodiment, since the resolution value of an image indicates its ability to render details, the resolution value of the first image acquired by the image acquisition device in focused mode is necessarily greater than the resolution value of the second image acquired by the same device in defocused mode. A powerful image processing algorithm can restore the resolution value of the second image acquired in defocused mode to be the same as or close to the resolution value of the first image acquired in focused mode. Therefore, the image processing capability of the image processing algorithm can be determined based on the difference between the resolution value of the third image obtained after processing by the image processing algorithm and the resolution value of the first image.

[0056] In some embodiments, the resolution value includes the resolution value of the image at each of the multiple fields of view. Step 103 includes: calculating the difference between the resolution value of the third image at at least one field of view and the resolution value of the first image at the corresponding field of view.

[0057] Understandably, the resolution value of the first image acquired by the electronic device may include the resolution values ​​of the first image at multiple fields of view. Similarly, the resolution value of the third image acquired by the electronic device may also include the resolution values ​​of the third image at multiple fields of view. Based on this, the electronic device can calculate the difference between the resolution value of the third image at at least one field of view and the resolution value of the first image at the corresponding field of view.

[0058] In some embodiments, the resolution of the first image includes, but is not limited to: the resolution of the first image at a 0 field of view, the resolution of the first image at a 3 field of view, the resolution of the first image at a 5 field of view, and the resolution of the first image at an 8 field of view. Similarly, the resolution of the third image includes, but is not limited to: the resolution of the third image at a 0 field of view, the resolution of the third image at a 3 field of view, the resolution of the third image at a 5 field of view, and the resolution of the third image at an 8 field of view.

[0059] In some embodiments, field of view 0 is the center of the image, field of view 8 is the edge of the image, and field of view 3 and field of view 5 are two different positions between the center of the image and the edge of the image.

[0060] For example, a field of view of 3 can be a position where the image height is 30% of the image, and a field of view of 5 can be a position where the image height is 50% of the image.

[0061] In some embodiments, the electronic device may calculate the difference between the resolution value of the third image at 0 field of view and the resolution value of the first image at 0 field of view, and use the obtained difference as the difference between the resolution value of the third image and the resolution value of the first image.

[0062] In some embodiments, the electronic device may also calculate the difference between the resolution value of the third image at the 3-field-of-view and the resolution value of the first image at the 3-field-of-view, and use the obtained difference as the difference between the resolution value of the third image and the resolution value of the first image.

[0063] In this embodiment of the disclosure, the electronic device can calculate the differences between the resolution values ​​of the third image at multiple fields of view and the resolution values ​​of the first image at multiple fields of view to obtain multiple differences. Based on these multiple differences, the electronic device can determine the processing capability of the image processing algorithm for multiple locations (center, edge, etc.) of the third image, thereby improving the accuracy of the evaluation of the image processing algorithm.

[0064] In some embodiments, calculating the difference between the resolution value of the third image at at least one field of view and the resolution value of the first image at the corresponding field of view includes at least one of the following: calculating the difference between the average of the resolution values ​​of the third image at multiple fields of view and the average of the resolution values ​​of the first image at multiple fields of view; calculating the difference between the resolution value of the third image at a target field of view and the resolution value of the first image at the target field of view; wherein the target field of view is determined from multiple fields of view based on the user's selection operation.

[0065] Understandably, the electronic device can calculate the average resolution value of the third image across multiple fields of view and use this average as the first average. The electronic device can also calculate the average resolution value of the first image across multiple fields of view and use this average as the second average. Then, the electronic device can calculate the difference between the first and second averages and use this difference as the difference between the resolution value of the third image and the resolution value of the first image. The electronic device can also, based on the user's selection of a target field of view among the multiple fields of view, obtain the resolution value of the third image in the target field of view and the resolution value of the first image in the target field of view. Then, the electronic device can calculate the difference between the resolution value of the third image in the target field of view and the resolution value of the first image in the target field of view, and use this difference as the difference between the resolution value of the third image and the resolution value of the first image.

[0066] In some embodiments, the electronic device may acquire the resolution values ​​of the first image at 0 field of view, 3 field of view, 5 field of view, and 8 field of view, and calculate the average of the resolution values ​​of the first image at 0 field of view, 3 field of view, 5 field of view, and 8 field of view to obtain a second average value.

[0067] In some embodiments, the electronic device may also acquire the resolution values ​​of the third image at 0 field of view, 3 field of view, 5 field of view, and 8 field of view, and calculate the average of the resolution values ​​of the third image at 0 field of view, 3 field of view, 5 field of view, and 8 field of view to obtain a first average value.

[0068] In some embodiments, the target field of view can be at least one of a plurality of fields of view.

[0069] For example, if a user needs to evaluate the processing capability of an image processing algorithm for the central region of an image, they can select 0 field of view as the target field of view. Based on this, the electronic device can calculate the difference between the resolution value of the third image at 0 field of view and the resolution value of the first image at 0 field of view, and use the obtained difference as the difference between the resolution value of the third image and the resolution value of the first image.

[0070] For example, if a user needs to evaluate the processing capability of an image processing algorithm for edge regions of an image, they can select an 8-field-of-view as the target field of view. Based on this, the electronic device can calculate the difference between the resolution value of the third image at the 8-field-of-view and the resolution value of the first image at the 8-field-of-view, and use the obtained difference as the difference between the resolution value of the third image and the resolution value of the first image.

[0071] For example, if a user needs to evaluate the processing capability of an image processing algorithm for the entire image, they can select 0, 3, 5, and 8 fields of view as target fields of view. Based on this, the electronic device can calculate the differences between the resolution values ​​of the third image at 0, 3, 5, and 8 fields of view and the resolution values ​​of the first image at the corresponding fields of view. The electronic device can then obtain four differences and determine the image processing capability of the image processing algorithm based on these four differences.

[0072] In some embodiments, after obtaining the difference between the resolution value of the third image and the resolution value of the first image, the electronic device can output an evaluation result of the image processing algorithm based on the obtained difference.

[0073] In some embodiments, the electronic device may output the obtained difference as an evaluation result.

[0074] In some embodiments, when an electronic device obtains multiple differences, it can output multiple evaluation results based on the multiple differences and indicate the field of view corresponding to each evaluation result.

[0075] For example, an electronic device can output multiple differences as multiple evaluation results.

[0076] In some embodiments, when an electronic device obtains multiple differences, it can output an evaluation result based on the average of the multiple differences.

[0077] For example, an electronic device can output the average of multiple differences as the evaluation result.

[0078] In this embodiment of the disclosure, based on the user's selection of the target field of view, the processing capability of the image processing algorithm for different regions of the image can be determined, thereby making it easier for the user to confirm whether the image processing algorithm is the one they need.

[0079] In some embodiments, step 103 includes: in response to a difference greater than or equal to a first threshold, obtaining the defocus distance of the image acquisition device when acquiring the second image; and outputting an evaluation result based on the difference or the defocus distance.

[0080] Understandably, after obtaining the difference between the resolution value of the third image and the resolution value of the first image, the electronic device can determine whether the obtained difference is greater than or equal to a first threshold. If the electronic device determines that the obtained difference is greater than or equal to the first threshold, the electronic device can output an evaluation result based on the defocus distance when the image acquisition device acquires the second image, or the electronic device can output an evaluation result based on the obtained difference.

[0081] In some embodiments, the electronic device may output the obtained difference as an evaluation result of the image processing algorithm. The image processing capability of the image processing algorithm is negatively correlated with the magnitude of the difference.

[0082] In some embodiments, the electronic device may output a first evaluation result if the difference between the resolution value of the third image and the resolution value of the first image is greater than or equal to a second threshold, and output a second evaluation result if the difference between the resolution value of the third image and the resolution value of the first image is less than the second threshold. The first evaluation result indicates that the image processing algorithm has strong image processing capabilities, and the second evaluation result indicates that the image processing algorithm has weak image processing capabilities.

[0083] In some embodiments, the size of the second threshold can be determined as needed, and this disclosure does not limit this.

[0084] For example, the second threshold can be any value from -0.001 to 0.005. For example, the second threshold can be -0.001, -0.002, -0.003, -0.004, -0.005, 0, 0.001, 0.002, 0.003, 0.004, 0.005, etc.

[0085] In some embodiments, if the difference between the resolution value of the third image and the resolution value of the first image is less than a first threshold, the electronic device can output the defocus distance when the image acquisition device acquires the second image as an evaluation result. The image processing capability of the image processing algorithm is positively correlated with the magnitude of the defocus distance when the image acquisition device acquires the second image.

[0086] For example, the evaluation result output by the electronic device can be the code value of the motor used to drive the lens on the image acquisition device when the image acquisition device acquires the second image.

[0087] For example, the evaluation result output by the electronic device can be the difference between the motor code value when the image acquisition device acquires the second image and the motor code value when the image acquisition device acquires the first image.

[0088] In some embodiments, the size of the first threshold can be determined as needed, and this disclosure does not limit this.

[0089] For example, the value of the first threshold can be any value from 0 to 0.001. For example, the first threshold can be 0, 0.0002, 0.0005, 0.0008, 0.001, etc.

[0090] In this embodiment, if the difference between the resolution value of the third image and the resolution value of the first image is greater than or equal to a first threshold, it indicates that processing the second image using the image processing algorithm can improve the resolution value of the second image to be the same as or higher than the resolution value of the image acquired in the focused state. Therefore, if the difference between the resolution value of the third image and the resolution value of the first image is greater than or equal to the first threshold, it indicates that the image processing algorithm has good recovery capability for the image acquired at the second defocus distance (the defocus distance at which the image acquisition device acquires the second image). In this case, outputting the second defocus distance allows the user to know that the image processing algorithm has the ability to process the image acquired at the second defocus distance.

[0091] In some embodiments, step 103 further includes: in response to a difference greater than a first threshold, shortening the defocus distance and re-acquiring a second image; processing the re-acquiring second image using an image processing algorithm to obtain a new third image; calculating the difference between the resolution value of the new third image and the resolution value of the first image to obtain a new difference; in response to a new difference less than the first threshold, controlling the image acquisition device to shorten the defocus distance and re-acquiring the second image until a difference less than or equal to the first threshold is obtained; and in response to a new difference greater than or equal to the first threshold, outputting an evaluation result based on the new difference or the shortened defocus distance.

[0092] Understandably, if the difference between the resolution of the third image and the resolution of the first image is less than a first threshold, it means that the image processing algorithm cannot process the resolution of the second image acquired by the image acquisition device in defocused state to be the same as or close to the resolution of the first image acquired in focused state. In this case, the electronic device can shorten the defocus distance and acquire the second image again after shortening the defocus distance to obtain a new second image. After obtaining the new second image, the electronic device can process the new second image using the image processing algorithm to obtain a new third image. Then, the electronic device can calculate the difference between the resolution of the new third image and the resolution of the first image to obtain a new difference. After obtaining the new difference, the electronic device can determine whether the new difference is less than the first threshold. If the new difference is greater than or equal to the first threshold, the electronic device can output an evaluation result based on the shortened defocus distance or based on the new difference. If the new difference is still less than the first threshold, the electronic device can control the image acquisition device to shorten the defocus distance again and acquire a new second image again until a difference less than or equal to the first threshold is obtained.

[0093] In some embodiments, the electronic device may shorten the defocus distance by a preset step before each acquisition of a second image.

[0094] In some embodiments, the size of the preset step can be set as needed, and the disclosed embodiments do not limit this.

[0095] For example, the preset step value can be any value from 1 code to 10 code.

[0096] For example, the preset step value can be 1code, 2code, 4code, 6code, 8code, 10code, etc.

[0097] For example, if the electronic device determines that the difference between the resolution value of the second image acquired by the image acquisition device when the motor's code value is 782 and the resolution value of the first image is less than a first threshold, it can control the image acquisition device to adjust the motor's code value to 778 and acquire the second image again to obtain a new second image.

[0098] In some embodiments, the step of the electronic device shortening the defocus distance and re-acquiring the second image can be performed after determining that the difference obtained in the previous acquisition is less than a first threshold.

[0099] In some embodiments, the electronic device can further control the image acquisition device to shorten the defocus distance multiple times according to a preset step, and acquire a second image after each shortening of the defocus distance, until the defocus distance of the image acquisition device is 0. At this time, the electronic device can obtain multiple second images acquired by the image acquisition device. Then, the electronic device can process the first second image acquired by the image acquisition device using an image processing algorithm to obtain a first third image. Then, the electronic device can calculate the difference between the resolution value of the first third image and the resolution value of the first image to obtain a first difference value. If the first difference value is greater than or equal to a first threshold, the electronic device can output an evaluation result based on the defocus distance when acquiring the first second image. If the first difference value is less than the first threshold, the electronic device can process the second second image using an image processing algorithm to obtain a second third image. Then, the electronic device can calculate the difference between the resolution value of the second third image and the resolution value of the first image to obtain a second difference value. If the second difference value is greater than or equal to the first threshold, the electronic device can output an evaluation result based on the defocus distance when acquiring the second second image. If the second difference is less than the first threshold, the electronic device can process the third second image using an image processing algorithm and repeat the above steps until a difference less than the first threshold is obtained.

[0100] In some embodiments, the method further includes: displaying a plurality of defocus distances and a reference resolution value corresponding to each of the plurality of defocus distances; wherein step 101 includes: acquiring a first image acquired by the image acquisition device in a focusing state; and in response to a user's selection operation for a first defocus distance among the plurality of defocus distances, acquiring a second image acquired by the image acquisition device at the first defocus distance.

[0101] In some embodiments, the reference resolution value is used to characterize the reduction in resolution of an image acquired by the image acquisition device at a corresponding defocus distance relative to the resolution of an image acquired in focus.

[0102] Understandably, electronic devices can display multiple defocus distances and their corresponding reference resolution values ​​on the screen. Based on this, users can select a defocus distance from the multiple defocus distances and their corresponding reference resolution values. The electronic device can then detect the user's selection, use the selected defocus distance as the first defocus distance, control the image acquisition device to acquire an image at the first defocus distance, and use the image acquired at the first defocus distance as the second image.

[0103] It should be noted that the processing of the second image acquired by the image acquisition device at the first defocus distance by the electronic device can refer to the above-described processing of the second image, and will not be repeated here in the embodiments of this disclosure.

[0104] In some embodiments, each defocus distance displayed on the electronic device can be a relative code value. The relative code value can be understood as the difference between the motor's code value when the image acquisition device is in defocus state and the motor's code value when it is in focus state.

[0105] For example, each defocus distance and the corresponding reference resolution value displayed on the electronic device can be as shown in Table 1:

[0106] Table 1. Statistical Table of Reference Analytical Force Values

[0107]

[0108] For example, Figure 4 This is a schematic diagram illustrating the correspondence between a defocus distance and a reference resolution value according to an exemplary embodiment. Based on this, the defocus distance displayed on the electronic device and the reference resolution value corresponding to each defocus distance can be as follows: Figure 4 As shown. Figure 4 The 0 on the horizontal axis is used to represent the relative code value of the motor when the image acquisition device is in the focusing state. Figure 4 The vertical axis in the table represents the average of the reference resolution values ​​corresponding to the 0 field of view, the 3 field of view, the 5 field of view, and the 8 field of view in Table 1.

[0109] In some embodiments, the electronic device can acquire the resolution values ​​of a first reference image acquired by the image acquisition device in a focused state at various fields of view, and acquire the resolution values ​​of a second reference image acquired by the image acquisition device at multiple different defocus distances at various fields of view. Then, the electronic device can use the difference between the resolution value of the second reference image acquired by the image acquisition device at each defocus distance and the resolution value of the first reference image as the reference resolution value corresponding to each defocus distance.

[0110] For example, the resolution values ​​of the first reference image acquired by the image acquisition device in each field of view and the resolution values ​​of the second reference image in each field of view can be shown in Table 2:

[0111] Table 2 Statistical Table of Analytical Force Values

[0112]

[0113] The image acquired by the image acquisition device when the motor's code value is 758 is the first reference image. Therefore, the resolution values ​​for each field of view corresponding to code value 758 in Table 1 are the resolution values ​​of the first reference image. The images acquired by the image acquisition device when the motor's code value is other than 758 are the second reference images. Therefore, the resolution values ​​corresponding to code values ​​other than 758 are the resolution values ​​of the second reference image.

[0114] Figure 5 This is a schematic diagram illustrating a resolving force value according to an exemplary embodiment. Figure 5 It was drawn according to Table 2 above. The resolving power value indicated by line 501 is the resolving power value of the first reference image. Figure 5 Other resolution values ​​in the image are the resolution values ​​of the second reference image. From Figure 5 As can be seen, the resolution of the first reference image at the 0 field of view is greater than the resolution of all second reference images at the 0 field of view. Furthermore, when the motor's code value is less than 758, the resolution of the second reference image acquired by the image acquisition device at each field of view is less than the resolution of the first reference image at the corresponding field of view. Therefore, based on the difference between the resolution of the second reference image and the resolution of the first reference image acquired by the image acquisition device when the motor's code values ​​are 722, 726, 730, 734, 738, 742, 746, 750, and 754, the reference resolution values ​​in Table 1 can be obtained. The code value (-4) in Table 1 is the difference between 754 and 758; that is, the reference resolution value corresponding to the code value (-4) is the difference between the resolution of the second reference image and the resolution of the first reference image acquired when the motor's code value is 754. The code value (-8) in Table 1 is the difference between 750 and 758. The reference resolution value corresponding to code (-8) is the difference between the resolution value of the second reference image and the resolution value of the first reference image when the motor's code value is 750. Similarly, the electronic device can obtain the reference resolution values ​​in Table 1.

[0115] Figure 6 This is a block diagram illustrating an evaluation apparatus for an image processing algorithm according to an exemplary embodiment. Figure 6As shown, the device includes: a first acquisition module 601, configured to acquire a first image acquired by the image acquisition device in a focused state and a second image acquired by the image acquisition device in a defocused state; a first processing module 602, configured to process the second image using an image processing algorithm to obtain a third image; and a first calculation module 603, configured to calculate the difference between the resolution value of the third image and the resolution value of the first image, wherein the resolution value is used to characterize the image's ability to render details, and the magnitude of the difference is negatively correlated with the image processing capability of the image processing algorithm.

[0116] In some embodiments, the resolution value includes the resolution value of the image at each of the multiple fields of view; wherein, the first calculation module 603 is configured to: calculate the difference between the resolution value of the third image at at least one field of view and the resolution value of the first image at the corresponding field of view.

[0117] In some embodiments, the first calculation module 603 is configured to: calculate the difference between the average of the resolution values ​​of the third image at multiple fields of view and the average of the resolution values ​​of the first image at multiple fields of view; calculate the difference between the resolution value of the third image at a target field of view and the resolution value of the first image at the target field of view, wherein the target field of view is determined from multiple fields of view based on a user's selection operation.

[0118] In some embodiments, the device further includes: a second acquisition module configured to acquire the defocus distance of the image acquisition device when acquiring the second image in response to a difference greater than or equal to a first threshold; and a first output module configured to output an evaluation result based on the difference or the defocus distance.

[0119] In some embodiments, the device further includes: an acquisition module configured to shorten the defocus distance and re-acquire a second image in response to a difference value being less than a first threshold; a second processing module configured to process the re-acquired second image using an image processing algorithm to obtain a new third image; a second calculation module configured to calculate the difference between the resolution value of the new third image and the resolution value of the first image to obtain a new difference value; a control module configured to control the image acquisition device to shorten the defocus distance and re-acquire the second image in response to a new difference value being greater than the first threshold until a difference value less than or equal to the first threshold value is obtained; and a second output module configured to output an evaluation result based on the new difference value or the shortened defocus distance in response to a new difference value being greater than or equal to the first threshold value.

[0120] In some embodiments, the device further includes: a display module configured to display a plurality of defocus distances and a reference resolution value corresponding to each of the plurality of defocus distances; wherein the reference resolution value is used to characterize the reduction in resolution value of an image acquired by the image acquisition device at a corresponding defocus distance relative to the resolution value of an image acquired in a focused state; wherein the first acquisition module 601 is configured to: acquire a first image acquired by the image acquisition device in a focused state; and, in response to a user's selection operation for a first defocus distance among the plurality of defocus distances, acquire a second image acquired by the image acquisition device at the first defocus distance.

[0121] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0122] Figure 7 This is a structural block diagram illustrating an electronic device 700 according to an exemplary embodiment. Exemplarily, the electronic device 700 may be the first device in the above embodiments. For example, the electronic device 700 may be a mobile phone, tablet computer, smartwatch, in-vehicle device, or other communication device.

[0123] Reference Figure 7 The electronic device 700 may include one or more of the following components: processing component 702, memory 704, power supply component 706, multimedia component 708, audio component 710, input / output (I / O) interface 712, sensor component 714, and communication component 716.

[0124] Processing component 702 typically controls the overall operation of electronic device 700, such as operations associated with at least one of display, telephone call, data communication, camera operation, and recording operation. Processing component 702 may include one or more processors 720 to execute instructions to complete all or part of the steps of the methods performed by the electronic device described above. Furthermore, processing component 702 may include one or more modules to facilitate interaction between processing component 702 and other components. For example, processing component 702 may include a multimedia module to facilitate interaction between multimedia component 708 and processing component 702.

[0125] Memory 704 is configured to store various types of data to support operation on electronic device 700. Examples of such data include at least one of the following: instructions for any application or method operating on electronic device 700, contact data, phonebook data, messages, pictures, and videos. Memory 704 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0126] Power supply component 706 provides power to various components of electronic device 700. Power supply component 706 may include at least one of the following: a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 700.

[0127] Multimedia component 708 includes a screen that provides an output interface between electronic device 700 and user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a Touch Panel, the screen may be implemented as a touchscreen to receive input signals from the user. The Touch Panel includes one or more touch sensors to sense touches, swipes, and gestures on the Touch Panel. The touch sensors may sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 708 includes a front-facing camera and / or a rear-facing camera. When electronic device 700 is in an operating mode, such as a shooting mode or video mode, the front-facing camera and / or rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.

[0128] Audio component 710 is configured to output and / or input audio signals. For example, audio component 710 includes a microphone (MIC) configured to receive external audio signals when electronic device 700 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 704 or transmitted via communication component 716. In some embodiments, audio component 710 also includes a speaker for outputting audio signals.

[0129] I / O interface 712 provides an interface between processing component 702 and peripheral interface modules, such as keyboards, click wheels, and buttons. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.

[0130] Sensor assembly 714 includes one or more sensors for providing state assessments of various aspects of electronic device 700. For example, sensor assembly 714 may detect the on / off state of electronic device 700, the relative positioning of components such as the display and keypad of electronic device 700, changes in position of electronic device 700 or one of its components, the presence or absence of user contact with electronic device 700, orientation or acceleration / deceleration of electronic device 700, and temperature changes of electronic device 700. Sensor assembly 714 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 714 may also include an optical sensor, such as a complementary metal-oxide-semiconductor (CMOS) or charge-coupled device (CCD) image sensor, for use in imaging applications. In some embodiments, sensor assembly 714 may also include, but is not limited to, at least one of the following: an accelerometer, a gyroscope, a magnetometer, a pressure sensor, and a temperature sensor.

[0131] Communication component 716 is configured to facilitate wired or wireless communication between electronic device 700 and other devices. Electronic device 700 can access wireless networks based on communication standards, such as Wi-Fi, 4G, 5G, or combinations thereof. In one exemplary embodiment, communication component 716 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 716 also includes a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID), Infrared Data Association (IrDA), Ultra Wide Band (UWB), Bluetooth (BT), and other technologies.

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

[0133] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 704 including executable instructions or a computer program, which can be executed by a processor 720 of an electronic device 700 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), a compact disc read-only memory (CD-ROM), magnetic tape, floppy disk, and optical data storage device, etc.

[0134] A non-transitory computer-readable storage medium, wherein instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform an evaluation method for any of the image processing algorithms described in the embodiments of this disclosure.

[0135] For example, the method includes:

[0136] The system acquires a first image captured by the image acquisition device in a focused state and a second image captured by the image acquisition device in a defocused state; it processes the second image using an image processing algorithm to obtain a third image; and it calculates the difference between the resolution value of the third image and the resolution value of the first image, where the resolution value is used to characterize the image's ability to render details, and the magnitude of the difference is negatively correlated with the image processing capability of the image processing algorithm.

[0137] This disclosure provides a computer program product comprising a computer program or executable instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer program or executable instructions from the computer-readable storage medium and executes the computer program or executable instructions, causing the computer device to perform an evaluation method for any of the image processing algorithms described in this disclosure.

[0138] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.

[0139] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

Claims

1. A method for evaluating an image processing algorithm, characterized in that, The method includes: Acquire a first image captured by the image acquisition device in a focused state, and a second image captured by the image acquisition device in a defocused state; The second image is processed using an image processing algorithm to obtain the third image; Calculate the difference between the resolution value of the third image and the resolution value of the first image, wherein the resolution value is used to characterize the image's ability to render details, and the magnitude of the difference is negatively correlated with the image processing capability of the image processing algorithm.

2. The method according to claim 1, characterized in that, The resolution value includes the resolution value of the image at each of the multiple fields of view; The step of calculating the difference between the resolution value of the third image and the resolution value of the first image includes: Calculate the difference between the resolution value of the third image at at least one field of view and the resolution value of the first image at the corresponding field of view.

3. The method according to claim 2, characterized in that, The calculation of the difference between the resolution value of the third image at at least one field of view and the resolution value of the first image at the corresponding field of view includes at least one of the following: Calculate the difference between the average resolution value of the third image at multiple fields of view and the average resolution value of the first image at multiple fields of view; Calculate the difference between the resolution value of the third image at the target field of view and the resolution value of the first image at the target field of view; wherein the target field of view is determined from the plurality of fields of view based on the user's selection operation.

4. The method according to any one of claims 1 to 3, characterized in that, The method further includes: In response to the difference being greater than or equal to a first threshold, the defocus distance of the image acquisition device when acquiring the second image is obtained; Based on the difference or the defocus distance, the evaluation result is output.

5. The method according to claim 4, characterized in that, The method further includes: In response to the difference being less than the first threshold, the defocus distance is shortened, and a second image is reacquired; The image processing algorithm is used to process the re-acquired second image to obtain a new third image; Calculate the difference between the resolution value of the new third image and the resolution value of the first image to obtain a new difference; In response to the new difference being less than the first threshold, the image acquisition device is controlled to shorten the defocus distance and re-acquire the second image until a difference less than or equal to the first threshold is obtained; In response to the new difference being greater than or equal to the first threshold, the evaluation result is output based on the new difference or the shortened defocus distance.

6. The method according to claim 1, characterized in that, The method further includes: Displays a plurality of defocus distances and a reference resolution value corresponding to each of the plurality of defocus distances; wherein, the reference resolution value is used to characterize the reduction in the resolution value of the image acquired by the image acquisition device at the corresponding defocus distance relative to the resolution value of the image acquired in the focus state; The first image acquired by the image acquisition device in the focusing state and the second image acquired by the image acquisition device in the defocusing state include: Acquire the first image captured by the image acquisition device in focusing mode; In response to the user's selection of a first defocus distance among the plurality of defocus distances, the image acquisition device acquires a second image at the first defocus distance.

7. An evaluation device for an image processing algorithm, characterized in that, The device includes: The first acquisition module is configured to acquire a first image acquired by the image acquisition device in a focused state, and a second image acquired by the image acquisition device in a defocused state; The first processing module is configured to process the second image using an image processing algorithm to obtain a third image; The first calculation module is configured to calculate the difference between the resolution value of the third image and the resolution value of the first image, wherein the resolution value is used to characterize the image's ability to render details, and the magnitude of the difference is negatively correlated with the image processing capability of the image processing algorithm.

8. An electronic device, characterized in that, include: processor; Memory used to store computer programs or instructions; The processor executes the computer program or instructions to implement the steps of the method according to any one of claims 1 to 6.

9. A non-transitory computer-readable storage medium storing a computer program or instructions, characterized in that, When the computer program or instructions in the storage medium are executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method according to any one of claims 1 to 6.