Image definition evaluation method and device, equipment, storage medium and program product
By performing multi-scale decomposition and multi-directional gradient calculation on the image, the problem of inaccurate image sharpness evaluation results in the existing technology is solved, and a comprehensive evaluation of image details and global features is achieved, thereby improving the evaluation accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-26
- Publication Date
- 2026-04-10
AI Technical Summary
Existing technologies struggle to take into account different details in an image when evaluating image sharpness, resulting in low accuracy in sharpness evaluation results.
The image to be evaluated is processed by multi-scale decomposition to obtain multiple sub-images of different scales, and the sharpness evaluation result is determined by multi-directional gradient calculation and weighted fusion.
It effectively improves the accuracy of image sharpness evaluation, taking into account both the coarse structure and fine texture of the image, thus enhancing the accuracy and robustness of the evaluation results.
Smart Images

Figure CN121837210A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image sharpness evaluation, and in particular to an image sharpness evaluation method, device, equipment, storage medium and program product. BACKGROUND
[0002] In the related art, a sharpness algorithm can be used to process an image to be evaluated to obtain a sharpness evaluation value corresponding to the image to be evaluated, and the sharpness evaluation result of the image can be determined according to the sharpness evaluation value.
[0003] However, the above method is usually performed on a single image scale, and for some images containing both coarse structures and fine textures, the processing on a single scale cannot take into account different details of the image, resulting in difficulty in improving the accuracy of the sharpness evaluation result. SUMMARY
[0004] The main purpose of the present application is to provide an image sharpness evaluation method, device, equipment, storage medium and program product, aiming to solve the technical problem of low accuracy of the image sharpness evaluation result in the related art.
[0005] To achieve the above purpose, the present application provides an image sharpness evaluation method, which comprises: performing multi-scale decomposition processing on an image to be evaluated to obtain a plurality of sub-images of different scales; determining a sharpness evaluation value of each sub-image; determining a sharpness evaluation result of the image to be evaluated according to all the sharpness evaluation values.
[0006] In some embodiments, the step of determining the sharpness evaluation value of each sub-image comprises: determining a sharpness gradient of each sub-image in at least three preset directions; for each sub-image, determining a sharpness evaluation value according to all the sharpness gradients.
[0007] In some embodiments, the step of determining the sharpness gradient of each sub-image in at least three preset directions comprises: for each preset direction, taking the sum of squares of gray level differences between all pixels and adjacent pixels in the preset direction as the sharpness gradient.
[0008] In some embodiments, the at least three preset directions include at least three of a horizontal direction, a vertical direction, a first diagonal direction and a second diagonal direction.
[0009] In some embodiments, the step of determining the sharpness evaluation value according to all the sharpness gradients comprises: According to each preset direction, a direction weight of each sharpness gradient is determined. A sum of products of all sharpness gradients and corresponding direction weights is determined as a sharpness evaluation value.
[0010] In some embodiments, according to all sharpness evaluation values, the step of determining a sharpness evaluation result of the image to be evaluated includes: A scale weight of each sharpness evaluation value is determined; the scale weight is positively correlated with a resolution of the sub-image under the corresponding scale; A sum of products of all sharpness evaluation values and corresponding scale weights is determined as the sharpness evaluation result of the image to be evaluated.
[0011] In addition, to achieve the above-mentioned purpose, the present application also provides an image sharpness evaluation device, which includes: A multi-scale processing module is configured to perform multi-scale decomposition processing on the image to be evaluated to obtain a plurality of sub-images of different scales; An evaluation value determination module is configured to determine sharpness evaluation values of the sub-images; An evaluation result determination module is configured to determine a sharpness evaluation result of the image to be evaluated according to all sharpness evaluation values.
[0012] In addition, to achieve the above-mentioned purpose, the present application also provides an image sharpness evaluation device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the image sharpness evaluation method as described above.
[0013] In addition, to achieve the above-mentioned purpose, the present application also provides a storage medium, which is a computer readable storage medium, and the storage medium stores a computer program, the computer program being executed by a processor to implement the steps of the image sharpness evaluation method as described above.
[0014] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, the computer program being executed by a processor to implement the steps of the image sharpness evaluation method as described above.
[0015] The one or more technical solutions provided by the present application have at least the following technical effects: The application can perform multi-scale decomposition processing on the image to be evaluated, obtain sub-images at multiple scales, and comprehensively determine the sharpness evaluation result of the image to be evaluated according to the sharpness evaluation values of the multiple scale sub-images. The sub-images of multiple different scales can effectively capture the details and global features in the image to be evaluated, and can take into account the coarse structure and fine texture of the image to be evaluated. Compared with the related art, the method of determining the sharpness evaluation result of the image by processing the image to be evaluated at a single image scale can effectively improve the accuracy of the sharpness evaluation result. BRIEF DESCRIPTION OF DRAWINGS
[0016] The accompanying drawings incorporated in and forming a part of the specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the application.
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related art, the accompanying drawings needed to be used in the embodiments or related art description will be briefly introduced. Obviously, for those skilled in the art, other drawings can also be obtained without creative labor based on these drawings.
[0018] Figure 1 The flowchart provided for the image sharpness evaluation method embodiment one of the present application; Figure 2 The flowchart provided for the image sharpness evaluation method embodiment one of the present application in another specific embodiment; Figure 3 The brief flowchart of the sharpness evaluation method provided by the present application; Figure 4 The module structure diagram of the sharpness evaluation device of the embodiment of the present application; Figure 5 The device structure diagram of the hardware running environment involved in the sharpness evaluation method in the embodiment of the present application.
[0019] The implementation of the present application, functional characteristics and advantages will be further described with reference to the accompanying drawings. DETAILED DESCRIPTION
[0020] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application, and are not used to limit the present application.
[0021] In order to better understand the technical solutions of the present application, the following will be described in detail in combination with the drawings and specific embodiments of the specification.
[0022] In the related art, a sharpness algorithm can be used to process the image to be evaluated to obtain a sharpness evaluation value corresponding to the image to be evaluated, and the sharpness evaluation result of the image can be determined according to the sharpness evaluation value.
[0023] However, the above method is usually performed on a single image scale, and for some images containing both coarse structures and fine textures, the processing on a single scale cannot take into account different details of the image, resulting in difficulty in improving the accuracy of the sharpness evaluation result.
[0024] Therefore, the present application provides a solution, which can perform multi-scale decomposition processing on the image to be evaluated to obtain a plurality of sub-images at different scales, and comprehensively determine the sharpness evaluation result of the image to be evaluated according to the sharpness evaluation values of the multi-scale sub-images. The sub-images of multiple different scales can effectively capture the details and global features in the image to be evaluated, and can take into account the coarse structures and fine textures of the image to be evaluated. Compared with the method of processing the image to be evaluated on a single image scale to determine the sharpness evaluation result of the image in the related art, the accuracy of the sharpness evaluation result can be effectively improved.
[0025] In order to better understand and illustrate the scheme of the embodiments of the present application, some technical terms involved in the embodiments of the present application are simply explained as follows.
[0026] Multi-scale decomposition: refers to analyzing and processing an image at different spatial scales; wherein a smaller scale can retain more image details, and a larger scale can help to obtain the global structure of the image. Common multi-scale decomposition methods include wavelet transform, Laplacian pyramid, Gaussian pyramid, etc. These algorithms can convert the original image into multiple decomposition levels, so that each level of sub-image can contain image features at a specific scale.
[0027] Brenner Gradient Focus Measure (Brenner Gradient Focus Measure): a classic sharpness evaluation method based on image gradient; this method quantifies the high-frequency information of the image by calculating the sum of squares of the gray level difference between adjacent pixels, and is widely used due to its simple calculation and fast speed.
[0028] Based on this, the embodiments of the present application provide an image sharpness evaluation method, which refers to Figure 1 , Figure 1 is a flowchart of the first embodiment of the image sharpness evaluation method of the present application.
[0029] In the present embodiment, the above image sharpness evaluation method comprises steps S100-S300: Step S100, performing multi-scale decomposition processing on the image to be evaluated to obtain a plurality of sub-images at different scales.
[0030] Step S200, determine the sharpness evaluation value of each sub-image.
[0031] Step S300, according to all the sharpness evaluation value, determine the sharpness evaluation result of the image to be evaluated.
[0032] It should be noted that the execution subject of the embodiment is an image sharpness evaluation device. The image sharpness evaluation device can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, etc., or an electronic device capable of realizing the above functions, etc.
[0033] Specifically, the image to be evaluated can be processed by using wavelet transform, Laplacian pyramid or Gaussian pyramid algorithm for multi-scale decomposition, so as to extract a plurality of sub-images of different scales from the image to be evaluated. The plurality of sub-images of different scales usually contain sub-images from small scale to large scale, which contain image information of the image to be evaluated at different levels (scales); for example, a sub-image of a smaller scale has a higher resolution and usually contains more high-frequency information such as details, edges and textures; these details are very important for analyzing small changes in the image, feature extraction and object recognition. While a sub-image of a larger scale may focus more on low-frequency information in the image, such as overall shape and structure, which is usually a global feature of the image and helps to understand the overall layout of the image.
[0034] Through multi-scale decomposition processing, sub-images that can effectively balance the details and global features of the image to be evaluated can be obtained, providing a basis for subsequent sharpness evaluation. Before multi-scale decomposition of the image to be evaluated, the image to be evaluated can also be preprocessed, and the image to be evaluated can be smoothed by Gaussian blur or the like to reduce the influence of noise in the image on the multi-scale decomposition result.
[0035] For each scale sub-image, a sharpness evaluation value corresponding to each sub-image can be calculated; the sharpness evaluation value is a quantitative index of image quality, which can help to evaluate the sharpness of each sub-image.
[0036] In some specific embodiments, step S200 can include calculating the sharpness evaluation value of each sub-image by using Laplace algorithm: using Laplace operator to evaluate the second derivative change of the image, and taking the response value output by the operator as the sharpness evaluation value of the corresponding sub-image. Generally speaking, the higher the response value, the more dramatic the second derivative change of the image, the sharper the image edge, and the better the sharpness of the corresponding sub-image.
[0037] Alternatively, in some other specific embodiments, the sharpness evaluation value of each sub-image can be determined by using gradient calculation, such asFigure 2 As shown, step S200 can specifically include steps S210-S220: In step S210, the sharpness gradients of each sub-image in at least three preset directions are determined.
[0038] In step S220, for each sub-image, a sharpness evaluation value is determined according to all the sharpness gradients.
[0039] For each sub-image obtained after multi-scale decomposition, the sharpness gradient of the sub-image in a preset direction can be calculated to obtain more comprehensive sharpness information. In related technologies, the gradient algorithm used in the calculation of the sharpness gradient usually only considers the sharpness gradient in a single direction of horizontal or vertical, ignoring the edge information in other directions, which leads to a significant decrease in the accuracy and sensitivity of the sharpness evaluation value when the main edge direction in the image is inconsistent with the calculation direction of the algorithm.
[0040] Therefore, the embodiment proposes a multi-direction gradient calculation method to determine the sharpness gradients of each sub-image in at least three preset directions. The sharpness gradients in different directions can reveal the information of different details and structures in the image, and the multi-direction gradient calculation can effectively capture various edges and texture patterns that may exist in the sub-image, thereby obtaining a more accurate sharpness evaluation value. The at least three preset directions can include at least three of the horizontal direction, the vertical direction, the first diagonal direction, and the second diagonal direction; wherein the horizontal direction is the 0° direction, the vertical direction is the 90° direction, the first diagonal direction is the 45° direction, and the second diagonal direction is the 135° direction; these directions can cover the main edge direction of the image to a large extent, which helps to capture more comprehensive sub-image edges.
[0041] The above-mentioned sharpness gradient is usually determined by calculating the gray difference between each pixel in the sub-image and its adjacent pixel in the preset direction, and taking the sum of the gray differences of all pixels in the sub-image as the sharpness gradient of the sub-image.
[0042] As an option, step S210 can be a gradient amplitude type calculation. That is, the gray difference is represented by the difference between the pixel and its adjacent pixel; for each preset direction, the sum of the absolute values of the gray differences between all pixels and their adjacent pixels in the preset direction is taken as the sharpness gradient.
[0043] Alternatively, as another option, step S210 specifically includes step S211: In step S211, for each preset direction, the sum of the squares of the gray differences between all pixels and their adjacent pixels in the preset direction is taken as the sharpness gradient.
[0044] In this selection, the sharpness gradient is calculated using gradient energy. The following expression illustrates the sharpness gradient calculation shown in step S211:
[0045] In the above formula, For sub-images I l In the preset direction d The sharpness gradient on the surface, For pixels ( x , y The grayscale value of ) For pixels ( x , y Adjacent pixels in the preset direction ( x ’ , y’ The grayscale value of ).
[0046] It should be noted that the above-mentioned adjacent pixels ( x ’ , y’ ) can be along a preset direction and ( x , y ) directly adjacent pixels that differ by one pixel, or pixels along a preset direction and ( x , y Indirectly adjacent pixels that differ by a few pixels, such as 2 or 3 pixels. Calculating the grayscale difference between a pixel and its direct adjacent pixels is more sensitive to noise in the image; while calculating the grayscale difference between a pixel and its indirect adjacent pixels can overcome small noise and capture edge differences with large width or spatial span.
[0047] As shown in Expression 1, the grayscale difference between pixels is mainly represented by the square of the grayscale difference between the pixel and its neighboring pixels. The sum of the squares of the grayscale differences of all pixels in a sub-image is used as the sharpness gradient of that sub-image; this method can amplify the differences between pixels, is stronger for strong edge responses, and the sharpness gradient obtained is more accurate.
[0048] For each sub-image, after determining its sharpness gradient in all preset directions, the sharpness evaluation value corresponding to the sub-image can be determined by combining all sharpness gradients. Specifically, step S220 may include steps S221~S222: Step S221: Determine the direction weight of each sharpness gradient according to each preset direction.
[0049] Step S222: The sum of the products of all sharpness gradients and their corresponding orientation weights is determined as the sharpness evaluation value.
[0050] The sharpness gradient of the sub-image in each preset direction is fused into a single sharpness evaluation value which can comprehensively represent the overall sharpness of the sub-image by means of weighted average. As shown in Expression Two, Expression Two is the weighted average calculation shown in step S222:
[0051] wherein, is the sharpness evaluation value of the sub-image I l , is the direction weight of the sharpness gradient in the preset direction d .
[0052] It should be noted that the above direction weight can be a fixed weight ratio preset according to the actual application scene of the image. For example, for a microscopic imaging scene, the observation target is mostly fine texture and microstructure, the edge direction is mainly “diagonal, irregular direction” (such as cell contour, part surface texture), and there are fewer strong edges in horizontal / vertical direction, and the sharpness requirement for fine details is extremely high; therefore, a higher direction weight can be configured in two diagonal directions (45° and 135°), and a direction weight lower than that in the diagonal direction can be configured in the horizontal direction (0°) and the vertical direction (90°). For a long-range monitoring scene, the target is mostly large-size objects (such as vehicles, buildings, pedestrians), the edge direction is mainly “horizontal, vertical direction” (such as road lines, building contours, power poles), the diagonal direction is mostly background interference (such as tree branches and leaves), and the clear identification of the target contour needs to be ensured first; therefore, a higher direction weight can be pre-configured in the horizontal direction (0°) and the vertical direction (90°), and a lower direction weight can be configured in the diagonal direction.
[0053] Or the above direction weight can also be dynamically adjusted. For example, the proportion or intensity of the edges in each direction in the current processed sub-image can be counted, and the direction weight can be dynamically allocated according to the principle that the higher the edge proportion, the greater the weight, so that the direction with more edges in the sub-image can have more power in the fusion. According to the real-time allocation of the weight according to the texture distribution of the current sub-image, stronger adaptability can be achieved.
[0054] After determining the sharpness evaluation values of the sub-images of multiple scales, the sharpness evaluation result of the image to be evaluated can be comprehensively determined according to all the sharpness evaluation values. The average of the multiple sharpness evaluation values can be taken, and the average value can be taken as the sharpness evaluation result of the image to be evaluated; or, in order to take into account the sharpness of the fine texture and coarse structure corresponding to the multiple scale sub-images, the scale weight corresponding to each sub-image scale can be determined for the fusion of the sharpness evaluation values; as an option, step S300 can include steps S310-S320: Step S310: Determine the scale weight of each sharpness evaluation value; the scale weight is positively correlated with the resolution of the sub-image at the corresponding scale.
[0055] Step S320: The sum of the products of all sharpness evaluation values and their corresponding scale weights is determined as the sharpness evaluation result of the image to be evaluated.
[0056] Understandably, the smaller the scale of a sub-image, the higher its corresponding image resolution and the more detailed information it contains. To reflect the importance of details at different scales, lower-level scales (smaller scales) containing richer information can be assigned higher scale weights. That is, the higher the resolution of a sub-image, the higher its corresponding scale weight. The sharpness evaluation result of the image to be evaluated is determined by summing the products of the sharpness evaluation values at all scales and their corresponding scale weights. As shown in Expression 3, Expression 3 illustrates the calculation of the sharpness evaluation result shown in step S320:
[0057] in, The image sharpness evaluation result is shown below. For the first l Scale weights of individual sub-images L This represents the total number of sub-images. (The above...) It is a weighted fusion result across multiple scales, exhibiting higher accuracy, robustness, and versatility, which contributes to more accurate sharpness evaluation.
[0058] It is easy to understand that the image sharpness evaluation method provided in this application can perform multi-scale decomposition processing on the image to be evaluated, obtain sub-images at multiple scales, and comprehensively determine the sharpness evaluation result of the image to be evaluated based on the sharpness evaluation values of the sub-images at multiple scales. Multiple sub-images at different scales can effectively capture the details and global features in the image to be evaluated, taking into account both the coarse structure and fine texture of the image. Compared with related technologies that process the image to be evaluated at a single image scale to determine the image sharpness evaluation result, this method can effectively improve the accuracy of the sharpness evaluation result.
[0059] For example, to help understand the implementation process of the image sharpness evaluation method in Embodiment 1, please refer to... Figure 3 , Figure 3 A simplified flowchart of an image sharpness evaluation method in an autofocus system is provided, specifically: Autofocus systems can adjust focus based on image sharpness evaluation results. However, because related technologies calculate at a single scale, they struggle to simultaneously consider both coarse structures (low-frequency information) and fine textures (high-frequency information) in an image. This results in inconsistent sensitivity of the focusing system's measurement algorithms to details at different image sizes, affecting the versatility and accuracy of focusing. Therefore, this example uses an image input to the focusing system. I (i.e., the image to be evaluated) L Multiscale decomposition of level 1 yields L Sub-images at different scales Preferably, the Laplacian pyramid can be used to image processing. I The above-mentioned sub-images are obtained by performing multi-scale decomposition.
[0060] Then for each sub-image I l Multi-gradient direction calculation: The sharpness gradient of a sub-image in at least four directions can be calculated using the Brenner gradient focus metric. This example calculates the sharpness gradient in four preset directions: 0°, 45°, 90°, and 135°. The adjacent pixels involved in the calculation are (…). x , y Adjacent pixels separated by a two-pixel interval along the aforementioned preset direction. Wherein, sub-image I l The sharpness gradient in the 0° direction is represented as: Sub-image I l The sharpness gradient along the 45° diagonal direction is represented as follows: Sub-image I l The sharpness gradient in the 90° direction is represented as: Sub-image I l The sharpness gradient along the 135° diagonal direction is represented as follows: .
[0061] For each sub-image at each scale, the weighted calculation method shown in Expression 2 above is used to weight and fuse multiple sharpness gradients to obtain the sharpness evaluation value at that scale. By fusing sharpness gradients from multiple directions, this method addresses the issue that gradient algorithms such as Brenner's algorithm heavily rely on gradients in a single horizontal or vertical direction. This enhances the robustness of gradient algorithms like Brenner's and ensures accurate sharpness evaluation values for images across various texture scenarios.
[0062] Sharpness ratings at all scales By applying a weighted sum using the aforementioned expression three, the final image sharpness evaluation result can be obtained. By employing multi-scale decomposition and weighted fusion, the method achieves independent capture and weighting of detail information at different scales in the image; simultaneously capturing both coarse structures and fine textures in the image to be evaluated, which helps improve the versatility and accuracy of the focusing system. Furthermore, the introduction of different scale weights and orientation weights allows the image sharpness evaluation method in this example to be flexibly optimized and adaptively adjusted according to different imaging systems and application scenarios (such as microscopic imaging and long-range surveillance), demonstrating strong adaptability.
[0063] Autofocus systems often rely on focus curves generated from sharpness evaluation results to find the optimal focus. However, in complex scenes or low-contrast environments, the unidirectional, single-scale calculations in related technologies are easily affected by local image noise or false edges, resulting in poor single-peak performance of the focus curve and impacting the reliability of autofocus. The image sharpness evaluation method in this example systematically integrates multi-scale and multi-directional sharpness, taking into account more scale details and image edge information. It can eliminate noise interference, and the resulting focus curve exhibits better single-peak performance, helping the autofocus system to quickly find the optimal focus and improving focusing accuracy, robustness, and versatility.
[0064] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the image sharpness evaluation method of this application. Any simple modifications based on this technical concept are within the protection scope of this application.
[0065] This application also provides an image sharpness evaluation device; please refer to... Figure 4 The image sharpness evaluation device includes: The multi-scale processing module 10 is used to perform multi-scale decomposition processing on the image to be evaluated to obtain multiple sub-images of different scales. Evaluation value determination module 20 is used to determine the sharpness evaluation value of each sub-image; The evaluation result determination module 30 is used to determine the sharpness evaluation result of the image to be evaluated based on all sharpness evaluation values.
[0066] The image sharpness evaluation device provided in this application, employing the image sharpness evaluation method described in the above embodiments, can solve the technical problem of low accuracy in image sharpness evaluation results in related technologies. Compared with related technologies, the beneficial effects of the image sharpness evaluation device provided in this application are the same as those of the image sharpness evaluation method provided in the above embodiments, and other technical features in the above image sharpness evaluation device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.
[0067] The application provides an image definition evaluation device, which comprises at least one processor and a memory connected with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the image definition evaluation method in the embodiment I.
[0068] Reference will be made to the following description Figure 5 which shows a structural schematic diagram of the image definition evaluation device suitable for implementing the embodiments of the application. The image definition evaluation device in the embodiments of the application can include, but is not limited to, mobile terminals such as mobile phones, notebook computers, PAD (Portable Application Description: tablet computer) and the like, and fixed terminals such as desktop computers and the like. Figure 5 The image definition evaluation device shown is only an example, and should not bring any limitation to the functions and use range of the embodiments of the application.
[0069] As Figure 5 shown, the image definition evaluation device can include a processing apparatus 1001 (for example, a central processing unit, a graphic processing unit and the like), which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 1002 or programs loaded from a storage apparatus 1003 to a random access memory (RAM) 1004. In the random access memory 1004, various programs and data required for the operation of the image definition evaluation device are also stored. The processing apparatus 1001, the read-only memory 1002 and the random access memory 1004 are connected with each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the input / output interface 1006: input apparatuses 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope and the like; output apparatuses 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator and the like; the storage apparatus 1003 including, for example, a magnetic tape, a hard disk and the like; and a communication apparatus 1009. The communication apparatus 1009 can allow the image definition evaluation device to communicate with other devices wirelessly or by wire to exchange data. Although the image definition evaluation device with various systems is shown in the figure, it should be understood that all the systems shown are not required to be implemented or possessed. More or less systems can be alternatively implemented or possessed.
[0070] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product comprising a computer program carried on a computer readable medium, the computer program containing program codes for executing the method shown in the flowchart. In such embodiments, the computer program can be downloaded and installed from a network through a communication device, or installed from the storage device 1003, or installed from the read-only memory 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiments disclosed in the present application are executed.
[0071] The image sharpness evaluation device provided by the present application adopts the image sharpness evaluation method in the above-mentioned embodiments, and can solve the technical problem of low accuracy of image sharpness evaluation results in the related art. Compared with the related art, the beneficial effects of the image sharpness evaluation device provided by the present application are the same as those of the image sharpness evaluation method provided by the above-mentioned embodiments, and other technical features in the image sharpness evaluation device are the same as those disclosed in the previous embodiment method, which will not be repeated here.
[0072] It should be understood that parts of the present application can be realized by hardware, software, firmware or a combination thereof. In the description of the above-mentioned embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0073] The above is merely specific embodiments of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
[0074] The present application provides a computer readable storage medium having stored thereon computer readable program instructions (i.e. computer program) for executing the image sharpness evaluation method in the above-mentioned embodiments.
[0075] The computer readable storage medium provided in the present application may, for example, be a U disk, but is not limited to an electric, magnetic, optical, electromagnetic, infrared, or semiconductor system or device, or any combination thereof. More specific examples of the computer readable storage medium may include, but are not limited to, an electric connection with one or more conductive wires, a portable computer disk, a hard disk, a random access memory (RAM), a read only memory (ROM), an erasable programmable read only memory (EPROM or flash memory), an optical fiber, a portable compact disk read only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present embodiment, the computer readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system or device. The program code contained on the computer readable storage medium can be transmitted by any suitable medium, including but not limited to an electric wire, an optical cable, an RF (Radio Frequency), and the like, or any suitable combination thereof.
[0076] The computer readable storage medium described above may be contained in the image sharpness evaluation device, or may exist separately without being assembled into the image sharpness evaluation device.
[0077] The computer readable storage medium described above carries one or more programs, which, when executed by the image sharpness evaluation device, cause the image sharpness evaluation device to: perform a multi-scale decomposition process on the image to be evaluated to obtain a plurality of sub-images of different scales; determine the sharpness evaluation values of the sub-images; and determine the sharpness evaluation result of the image to be evaluated according to all the sharpness evaluation values.
[0078] Computer program code for carrying out operations of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).
[0079] The flow diagrams and the block diagrams in the drawings are illustrations of architectures, functionalities, and operations of possible implementations of systems, methods, and computer program products according to various embodiments of present application. In this regard, each block in the flow diagrams or block diagrams can represent a module, a segment, or a portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the block can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or the blocks may
[0080] The modules involved in the embodiments of the present application can be implemented in the form of software or in the form of hardware. In some cases, the name of the module does not constitute a limitation on the module itself.
[0081] The readable storage medium provided by the present application is a computer readable storage medium, which stores computer readable program instructions (i.e., a computer program) for executing the image definition evaluation method described above, and can solve the technical problem of low accuracy of image definition evaluation results in the related art. Compared with the related art, the computer readable storage medium provided by the present application has the same beneficial effects as the image definition evaluation method provided by the above embodiments, and will not be described here.
[0082] The application further provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of the image sharpness evaluation method as described above.
[0083] The computer program product provided by the application can solve the technical problem of low accuracy of image sharpness evaluation results in the related art. Compared with the related art, the computer program product provided by the application has the same beneficial effects as the image sharpness evaluation method provided by the above-mentioned embodiments, and will not be described here.
[0084] The above only describes some embodiments of the application, and does not limit the protection scope, and any equivalent structure transformation made by using the content of the application specification and drawings, or direct / indirect application in other related technical fields is included in the protection scope.
Claims
1. A method for evaluating image sharpness, characterized in that, The image sharpness evaluation method includes: The image to be evaluated is decomposed into multiple sub-images at different scales. Determine the sharpness evaluation value for each of the sub-images; Based on all the aforementioned sharpness evaluation values, the sharpness evaluation result of the image to be evaluated is determined.
2. The image sharpness evaluation method as described in claim 1, characterized in that, The step of determining the sharpness evaluation value of each of the sub-images includes: Determine the sharpness gradient of each of the sub-images in at least three preset directions; For each of the sub-images, a sharpness evaluation value is determined based on all the sharpness gradients.
3. The image sharpness evaluation method as described in claim 2, characterized in that, The step of determining the sharpness gradient of each of the sub-images in at least three preset directions includes: For each preset direction, the sum of the squares of the grayscale differences between all pixels and their adjacent pixels in that preset direction is taken as the sharpness gradient.
4. The image sharpness evaluation method as described in claim 2, characterized in that, The at least three preset directions include at least three of the following: horizontal direction, vertical direction, first diagonal direction, and second diagonal direction.
5. The image sharpness evaluation method as described in claim 2, characterized in that, The step of determining the sharpness evaluation value based on all the sharpness gradients includes: Based on each of the preset directions, the directional weights of each of the sharpness gradients are determined; The sum of the products of all the sharpness gradients and their corresponding directional weights is determined as the sharpness evaluation value.
6. The image sharpness evaluation method according to any one of claims 1 to 5, characterized in that, The step of determining the sharpness evaluation result of the image to be evaluated based on all the sharpness evaluation values includes: The scale weights of each of the aforementioned sharpness evaluation values are determined; the scale weights are positively correlated with the resolution of the sub-image at the corresponding scale. The sum of the products of all the sharpness evaluation values and their corresponding scale weights is determined as the sharpness evaluation result of the image to be evaluated.
7. An image sharpness evaluation device, characterized in that, The image sharpness evaluation device includes: The multi-scale processing module is used to perform multi-scale decomposition processing on the image to be evaluated, resulting in multiple sub-images of different scales. The evaluation value determination module is used to determine the sharpness evaluation value of each of the sub-images; The evaluation result determination module is used to determine the sharpness evaluation result of the image to be evaluated based on all the sharpness evaluation values.
8. An image sharpness evaluation device, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the image sharpness evaluation method as described in any one of claims 1 to 6.
9. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the image sharpness evaluation method as described in any one of claims 1 to 6.
10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the steps of the image sharpness evaluation method as described in any one of claims 1 to 6.