Method and device for determining clarity of sharpened image

By detecting and removing overshoot edges on the image difference image, the problem of inaccurate image clarity calculation in the prior art is solved, and the accuracy of the clarity evaluation of the sharpened image is improved.

CN117173030BActive Publication Date: 2025-09-12SHENZHEN TCL NEW-TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211243232.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-11
Publication Date
2025-09-12
Estimated Expiration
2042-10-11

AI Technical Summary

Technical Problem

The accuracy of image definition calculation in the prior art is low. In particular, when the image is over-sharpened, the overshoot edge affects the accuracy of definition calculation.

Method used

By obtaining the target sharpened image and reference image of the same scene, determining the difference image, detecting and removing the target overshoot edges on the difference image, and obtaining the image after removing the overshoot edges, the clarity of the sharpened image is calculated using the full-reference clarity scoring algorithm.

Benefits of technology

The accuracy of image clarity calculation is improved, errors caused by over-sharpening are avoided, and the reliability of image clarity evaluation is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117173030B_ABST
    Figure CN117173030B_ABST
Patent Text Reader

Abstract

The present application provides a method and device for determining the clarity of a sharpened image. The method includes: obtaining a target sharpened image and a reference image corresponding to the same scene; determining a difference image between the target sharpened image and the reference image based on the target sharpened image and the reference image; detecting target overshoot edges on the difference image; removing target overshoot edges from the target sharpened image and the reference image to obtain a target sharpened image and reference image after removing the overshoot edges; and determining the clarity of the target sharpened image based on the target sharpened image and the reference image after removing the overshoot edges. The present application detects target overshoot edges on the difference image and performs clarity calculation after removing the target overshoot edges from the target sharpened image and the reference image, thereby improving the accuracy of image clarity calculation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application mainly relates to the field of image processing technology, and specifically to a method and device for determining the clarity of a sharpened image. Background Art

[0002] Current image clarity evaluation algorithms only evaluate the transition from blurry to sharp images, without considering oversharpening. Consequently, oversharpened images often receive higher clarity ratings than unsharpened ones, which is illogical. Oversharpening creates overshooting edges, which can affect the accuracy of clarity calculations.

[0003] That is, the accuracy of image definition calculation in the prior art is low. Summary of the Invention

[0004] The present application provides a method and device for determining the clarity of a sharpened image, aiming to solve the problem of low accuracy in image clarity calculation in the prior art.

[0005] In a first aspect, the present application provides a method for determining the clarity of a sharpened image, the method comprising:

[0006] Obtain the target sharpened image and reference image corresponding to the same scene;

[0007] determining a difference image between the target sharpened image and the reference image according to the target sharpened image and the reference image;

[0008] Detect target overshoot edges on the difference image;

[0009] Eliminating target overshoot edges on the target sharpened image and the reference image to obtain the target sharpened image and the reference image after overshoot edges are eliminated;

[0010] The clarity of the target sharpened image is determined according to the target sharpened image after removing the overshoot edge and the reference image.

[0011] Optionally, detecting an overshoot edge of a target on the difference image includes:

[0012] Determine a pixel point on the difference image as a target pixel point;

[0013] Obtain multiple area pixels adjacent to the target pixel;

[0014] Determine the pixel with the largest pixel value among the multiple field pixels as the traversal pixel;

[0015] Determine whether the traversed pixel point is greater than the preset pixel value;

[0016] If the pixel value of the traversed pixel point is greater than the preset pixel value, the traversed pixel point is determined as the target pixel point and traversed multiple times to obtain multiple traversed pixel points corresponding to the target pixel point;

[0017] The target overshoot edge is determined according to a plurality of traversed pixel points corresponding to the target pixel point.

[0018] Optionally, determining the target overshoot edge according to the multiple traversed pixel points corresponding to the target pixel point includes:

[0019] Determining a pixel point that meets a preset overshoot condition among the multiple traversed pixel points as a first overshoot point;

[0020] Determine whether the number of traversed pixel points between the two first overshoot points exceeds a preset traversal value;

[0021] If the number of traversed pixel points between the two first overshoot points does not exceed the preset traversal value, determining the traversed pixel points between the two first overshoot points as second overshoot points;

[0022] Determine a continuous edge formed by the first overshoot point and the second overshoot point as a first overshoot edge;

[0023] A target overshoot edge is determined according to the first overshoot edge.

[0024] Optionally, determining a pixel point satisfying a preset overshoot condition among the plurality of traversed pixel points as a first overshoot point includes:

[0025] Obtaining the first pixel point and the second pixel point corresponding to the traversed pixel point on the target sharpened image and the reference image;

[0026] If the pixel value of the first pixel point belongs to the preset range and the pixel value of the second pixel point is not greater than the first preset pixel value, or the pixel value of the first pixel point is equal to the second preset pixel value and the pixel value of the second pixel point is not greater than the third preset pixel value, it is determined that the traversed pixel points meet the preset overshoot condition.

[0027] Optionally, determining a target overshoot edge according to the first overshoot edge includes:

[0028] Get the length of each first overshoot edge;

[0029] determining, among the first overshoot edges, first overshoot edges having a length greater than a preset length as a plurality of second overshoot edges;

[0030] A target overshoot edge is determined based on the plurality of second overshoot edges.

[0031] Optionally, determining a target overshoot edge according to the plurality of second overshoot edges includes:

[0032] Get the target overshoot point on the second overshoot edge;

[0033] Acquire a plurality of first longitudinal pixel points whose longitudinal coordinates are greater than the longitudinal coordinate of the target overshoot point;

[0034] Acquire a plurality of second longitudinal pixel points whose longitudinal coordinates are smaller than the longitudinal coordinate of the target overshoot point;

[0035] Calculating a first pixel mean value of a plurality of first longitudinal pixel points and a second pixel mean value of a plurality of second longitudinal pixel points;

[0036] Calculating a first difference between the target overshoot point and the first pixel mean and a second difference between the target overshoot point and the second pixel mean;

[0037] If the smaller value of the first difference and the second difference is smaller than the preset difference, the second overshoot edge is determined to be the target overshoot edge.

[0038] Optionally, the method for determining the clarity of the sharpened image further includes:

[0039] Obtaining judgment results of multiple target overshoot points, wherein the judgment result is that the second overshoot edge is the target overshoot edge or the second overshoot edge is not the target overshoot edge;

[0040] If the proportion of the determination results that the second overshoot edge is the target overshoot edge in the determination results of the plurality of target overshoot points exceeds a preset proportion, the second overshoot edge is determined to be the target overshoot edge.

[0041] In a second aspect, the present application provides a device for determining the clarity of a sharpened image, the device comprising:

[0042] An acquisition unit, used for acquiring a target sharpened image and a reference image corresponding to the same scene;

[0043] A first determining unit, configured to determine a difference image between the target sharpened image and the reference image according to the target sharpened image and the reference image;

[0044] a detection unit, configured to detect an overshoot edge of a target on a difference image;

[0045] A culling unit, configured to remove target overshoot edges from the target sharpened image and the reference image, thereby obtaining the target sharpened image and the reference image after the overshoot edges are removed;

[0046] The second determining unit is configured to determine the clarity of the target sharpened image according to the target sharpened image after removing the overshoot edge and the reference image.

[0047] Optionally, the detection unit is used to:

[0048] Determine a pixel point on the difference image as a target pixel point;

[0049] Obtain multiple area pixels adjacent to the target pixel;

[0050] Determine the pixel with the largest pixel value among the multiple field pixels as the traversal pixel;

[0051] Determine whether the traversed pixel point is greater than the preset pixel value;

[0052] If the pixel value of the traversed pixel point is greater than the preset pixel value, the traversed pixel point is determined as the target pixel point and traversed multiple times to obtain multiple traversed pixel points corresponding to the target pixel point;

[0053] The target overshoot edge is determined according to a plurality of traversed pixel points corresponding to the target pixel point.

[0054] Optionally, the detection unit is configured to detect an overshoot edge of a target on the difference image:

[0055] Determining a pixel point that meets a preset overshoot condition among the multiple traversed pixel points as a first overshoot point;

[0056] Determine whether the number of traversed pixel points between the two first overshoot points exceeds a preset traversal value;

[0057] If the number of traversed pixel points between the two first overshoot points does not exceed the preset traversal value, determining the traversed pixel points between the two first overshoot points as second overshoot points;

[0058] Determine a continuous edge formed by the first overshoot point and the second overshoot point as a first overshoot edge;

[0059] A target overshoot edge is determined according to the first overshoot edge.

[0060] Optionally, the detection unit is configured to detect an overshoot edge of a target on the difference image:

[0061] Obtaining the first pixel point and the second pixel point corresponding to the traversed pixel point on the target sharpened image and the reference image;

[0062] If the pixel value of the first pixel point belongs to the preset range and the pixel value of the second pixel point is not greater than the first preset pixel value, or the pixel value of the first pixel point is equal to the second preset pixel value and the pixel value of the second pixel point is not greater than the third preset pixel value, it is determined that the traversed pixel points meet the preset overshoot condition.

[0063] Optionally, the detection unit is configured to detect an overshoot edge of a target on the difference image:

[0064] Get the length of each first overshoot edge;

[0065] determining, among the first overshoot edges, first overshoot edges having a length greater than a preset length as a plurality of second overshoot edges;

[0066] A target overshoot edge is determined based on the plurality of second overshoot edges.

[0067] Optionally, the detection unit is configured to detect an overshoot edge of a target on the difference image:

[0068] Get the target overshoot point on the second overshoot edge;

[0069] Acquire a plurality of first longitudinal pixel points whose longitudinal coordinates are greater than the longitudinal coordinate of the target overshoot point;

[0070] Acquire a plurality of second longitudinal pixel points whose longitudinal coordinates are smaller than the longitudinal coordinate of the target overshoot point;

[0071] Calculating a first pixel mean value of a plurality of first longitudinal pixel points and a second pixel mean value of a plurality of second longitudinal pixel points;

[0072] Calculating a first difference between the target overshoot point and the first pixel mean and a second difference between the target overshoot point and the second pixel mean;

[0073] If the smaller value of the first difference and the second difference is smaller than the preset difference, the second overshoot edge is determined to be the target overshoot edge.

[0074] Optionally, the detection unit is configured to detect an overshoot edge of a target on the difference image:

[0075] Obtaining judgment results of multiple target overshoot points, wherein the judgment result is that the second overshoot edge is the target overshoot edge or the second overshoot edge is not the target overshoot edge;

[0076] If the proportion of the determination results that the second overshoot edge is the target overshoot edge in the determination results of the plurality of target overshoot points exceeds a preset proportion, the second overshoot edge is determined to be the target overshoot edge.

[0077] In a third aspect, the present application provides a smart device, comprising:

[0078] one or more processors;

[0079] Memory; and

[0080] One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the method for determining the clarity of a sharpened image according to any one of the first aspects.

[0081] In a fourth aspect, the present application provides a computer-readable storage medium storing a plurality of instructions, wherein the instructions are suitable for loading by a processor to execute the steps in the method for determining the clarity of a sharpened image described in any one of the first aspects.

[0082] The present application provides a method and device for determining the clarity of a sharpened image. The method includes: obtaining a target sharpened image and a reference image corresponding to the same scene; determining a difference image between the target sharpened image and the reference image based on the target sharpened image and the reference image; detecting target overshoot edges on the difference image; removing target overshoot edges from the target sharpened image and the reference image to obtain a target sharpened image and reference image after removing the overshoot edges; and determining the clarity of the target sharpened image based on the target sharpened image and the reference image after removing the overshoot edges. The present application detects target overshoot edges on the difference image and performs clarity calculation after removing the target overshoot edges from the target sharpened image and the reference image, thereby improving the accuracy of image clarity calculation. BRIEF DESCRIPTION OF THE DRAWINGS

[0083] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0084] Figure 1 A schematic diagram of a scenario for a system for sharpening image clarity provided in an embodiment of the present application;

[0085] Figure 2 1 is a flow chart of an embodiment of a method for determining the clarity of a sharpened image provided in an embodiment of the present application;

[0086] Figure 3 is a schematic diagram of an overshoot edge of a target detected in the method for determining the clarity of a sharpened image provided in an embodiment of the present application;

[0087] Figure 4 1 is a schematic structural diagram of an embodiment of a device for determining the clarity of a sharpened image provided in an embodiment of the present application;

[0088] Figure 5 This is a schematic diagram of the structure of an embodiment of the smart device provided in the embodiments of the present application. DETAILED DESCRIPTION

[0089] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without making creative efforts are within the scope of protection of this application.

[0090] In the description of the present application, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present application. In addition, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more features. In the description of the present application, "multiple" means two or more, unless otherwise clearly and specifically defined.

[0091] In this application, the word "exemplary" is used to mean "serving as an example, illustration, or illustration." Any embodiment described in this application as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments. The following description is given to enable any person skilled in the art to implement and use the present application. In the following description, details are listed for the purpose of explanation. It should be understood that one of ordinary skill in the art can recognize that the present application can be implemented without using these specific details. In other instances, well-known structures and processes are not elaborated in detail to avoid obscuring the description of the present application with unnecessary details. Therefore, the present application is not intended to be limited to the embodiments shown, but is consistent with the widest scope consistent with the principles and features disclosed in this application.

[0092] The embodiments of the present application provide a method and device for determining the clarity of a sharpened image, which are described in detail below.

[0093] See also Figure 1 , Figure 1 This is a scene diagram of a system for sharpening the clarity of an image provided in an embodiment of the present application. The system for sharpening the clarity of an image may include a smart device 100, in which a device for determining the clarity of a sharpened image is integrated.

[0094] In the embodiment of the present application, the smart device 100 can be a general-purpose computer device or a dedicated computer device. In a specific implementation, the smart device 100 can be a desktop computer, a portable computer, a network server, a personal digital assistant (PDA), a mobile phone, a tablet computer, a wireless terminal device, a communication device, an embedded device, etc. This embodiment does not limit the type of the smart device 100.

[0095] Those skilled in the art will understand that Figure 1 The application environment shown in the figure is only one application scenario of the present application solution and does not constitute a limitation on the application scenario of the present application solution. Other application environments may also include Figure 1 More or fewer smart devices as shown in Figure 1 Only one smart device is shown in the figure. It can be understood that the system for sharpening the clarity of an image can also include one or more other smart devices that can process data, which is not limited here.

[0096] In addition, if Figure 1 As shown, the system for sharpening image clarity may further include a memory 200 for storing data.

[0097] It should be noted that Figure 1 The scene diagram of the image sharpening clarity system shown is only an example. The image sharpening clarity system and scene described in the embodiment of the present application are intended to more clearly illustrate the technical solution of the embodiment of the present application, and do not constitute a limitation on the technical solution provided by the embodiment of the present application. Ordinary technicians in this field can know that with the evolution of the image sharpening clarity system and the emergence of new business scenarios, the technical solution provided by the embodiment of the present application is also applicable to similar technical problems.

[0098] First, an embodiment of the present application provides a method for determining the clarity of a sharpened image, which includes: obtaining a target sharpened image and a reference image corresponding to the same scene; determining a difference image between the target sharpened image and the reference image based on the target sharpened image and the reference image; detecting a target overshoot edge on the difference image; removing the target overshoot edge on the target sharpened image and the reference image to obtain a target sharpened image and a reference image after removing the overshoot edge; and determining the clarity of the target sharpened image based on the target sharpened image and the reference image after removing the overshoot edge.

[0099] like Figure 2 As shown, Figure 2 1 is a flow chart of an embodiment of a method for determining the clarity of a sharpened image provided in an embodiment of the present application. The method for determining the clarity of a sharpened image includes the following steps S201 to S205:

[0100] S201: Acquire a target sharpened image and a reference image corresponding to the same scene.

[0101] In the embodiment of the present application, a target sharpened image target and a reference image ref are obtained. The target sharpened image target is a sharpened image, which may be over-sharpened.

[0102] S202: Determine a difference image between the target sharpened image and the reference image according to the target sharpened image and the reference image.

[0103] Specifically, the pixel values ​​of the target sharpened image and the pixel values ​​of the pixel points at the corresponding positions of the reference image are subtracted to obtain the difference image sub between the target sharpened image and the reference image. In other embodiments, the difference image sub between the target sharpened image and the reference image can be obtained by image subtraction. Image subtraction can detect the difference information between the two images, so this technology is widely used in the fields of industry, medicine, meteorology and military. There are many technologies for realizing image subtraction, such as speckle interferometry, holographic filtering, interference filtering and grating coding. These methods have one thing in common, that is, they need to place an appropriate filter on the spectrum plane of the system to separate the spectrum items of the image difference part, so the filter needs to be adjusted according to different situations in the application. However, filtering will lose some high-frequency information of the image difference or mix in other spectrum items to cause interference, which has a certain impact on the detection of two images with small differences.

[0104] S203: Detect target overshoot edges on the difference image.

[0105] Among them, the target overshoot edge can be observed by human eyes or detected by a trained neural network model.

[0106] In order to improve the recognition accuracy of the target overshoot edge, detecting the target overshoot edge on the difference image may include:

[0107] (1) A pixel point on the difference image is determined as the target pixel point.

[0108] For example, the target pixel is (x0, y0).

[0109] (2) Obtain multiple area pixels adjacent to the target pixel.

[0110] Specifically, a plurality of neighboring pixels adjacent to the target pixel are obtained based on a preset third-order matrix. Specifically, the center value of the third-order matrix is ​​placed at the target pixel (x0, y0), and the pixels corresponding to the edge values ​​of the preset third-order matrix are determined as the neighboring pixels. The edge values ​​of the preset third-order matrix are multiplied by the corresponding pixel values ​​to obtain the image value of each neighboring pixel.

[0111] Furthermore, in order to improve the traversal and ensure that the traversal is performed from top to bottom and from left to right, the multiple domain pixel points are specifically five domain pixel points, namely, the upper pixel point adjacent to the target pixel point, the upper right corner pixel point adjacent to the target pixel point, the right pixel point adjacent to the target pixel point, the lower right corner pixel point adjacent to the target pixel point, and the lower pixel point adjacent to the target pixel point.

[0112] The preset third-order matrix has directionality. For example, the preset third-order matrix is:

[0113]

[0114] The center value of the preset third-order matrix is ​​0, the edge value of the upper left corner is 0, the edge value of the left corner is 0, the edge value of the lower left corner is 0, the edge value of the bottom corner is 1, the edge value of the lower right corner is 1, the edge value of the right corner is 1, the edge value of the upper right corner is 1, and the edge value of the top is 1.

[0115] (3) The pixel with the largest pixel value among the multiple field pixels is determined as the traversal pixel.

[0116] (4) Determine whether the traversed pixel point is greater than the preset pixel value.

[0117] Specifically, the preset pixel value is 40. In other embodiments, the preset pixel value can be set according to specific circumstances. If the traversed pixel point is not greater than the preset pixel value th, it means that no point in that direction is a high-frequency signal. The target pixel point (x0, y0) is updated to (x0, y0+1), thereby traversing each pixel point in the difference image. Experimental results show that the preset pixel value th of 40 is more effective.

[0118] (5) If the pixel value of the traversed pixel point is greater than the preset pixel value, the traversed pixel point is determined as the target pixel point and traversed multiple times to obtain multiple traversed pixel points corresponding to the target pixel point.

[0119] If the pixel value of the traversed pixel point is greater than the preset pixel value, the traversed pixel point is determined as the target pixel point and traversed multiple times to obtain multiple traversed pixel points corresponding to the target pixel point.

[0120] For example, if the pixel value of the upper right corner pixel (x0+1, y0+1) of the target pixel (x0, y0) is greater than the preset pixel value of the traversal pixel point, multiple neighboring pixel points of the upper right corner pixel (x0+1, y0+1) are obtained and iteratively traversed to obtain multiple traversal pixel points corresponding to the target pixel point. For example, the traversal pixel points are: (x0, y0), (x0+1, y0+1), (x0+1, y0+2), (x0, y0+2).

[0121] Furthermore, if the pixel value of the traversed pixel point is greater than the preset pixel value, the traversed pixel point is determined as the target pixel point for multiple iterative traversals, and the value of the target pixel point is set to 0. That is, the value of the previous traversed pixel point of the current traversed pixel point is set to 0, to avoid the situation where the first two maximum values ​​in the five directions are the coordinates of the previous traversed pixel point and the current traversed pixel point, respectively, resulting in repeated traversal at these two points.

[0122] (6) Determine the target overshoot edge based on the multiple traversed pixel points corresponding to the target pixel point.

[0123] In a specific embodiment, a plurality of continuous edges formed by a plurality of traversed pixel points corresponding to a target pixel point are determined as target overshoot edges. Figure 3 As shown, Figure 3 The white edge in the middle is the detected overshoot edge of the target.

[0124] In another specific embodiment, in order to improve the recognition accuracy of the target overshoot edge, determining the target overshoot edge according to multiple traversed pixel points corresponding to the target pixel point may include:

[0125] (1) A pixel point that meets a preset overshoot condition among a plurality of traversed pixel points is determined as a first overshoot point.

[0126] Specifically, the first pixel point and the second pixel point corresponding to the traversed pixel point on the target sharpened image and the reference image are obtained; if the pixel value of the first pixel point belongs to a preset range and the pixel value of the second pixel point is not greater than the first preset pixel value, or the pixel value of the first pixel point is equal to the second preset pixel value and the pixel value of the second pixel point is not greater than the third preset pixel value, it is determined that the traversed pixel point meets the preset overshoot condition.

[0127] For example, the traversed pixel point (x, y) corresponds to the first pixel point tatget(x, y) on the target sharpened image, and the traversed pixel point (x, y) corresponds to the first pixel point ref(x, y) on the reference image. The preset range is 210≤tatget(x, y)<255, the first preset pixel value is 190, the second preset pixel value is 255, and the third preset pixel value is 220, as shown in the following formula:

[0128]

[0129] (2) Determine whether the number of traversal pixels between the two first overshoot points exceeds a preset traversal value.

[0130] Specifically, the preset traversal value is 20, which can be recorded as the error value. During the traversal process, the error value is used to indicate the number of deviations allowed. In this proposal, error = 20. This value is used for the following reasons: To avoid an oversimplified method for finding overshoot points, which may result in discontinuous edges formed by the found overshoot points, the preset traversal value is used to replace those ignored overshoot points.

[0131] Determine whether the number of traversed pixel points between the two first overshoot points exceeds the preset traversal value. If the number of traversed pixel points between the two first overshoot points exceeds the preset traversal value, the traversed pixel point between the two first overshoot points can be determined as the second overshoot point. If the number of traversed pixel points between the two first overshoot points does not exceed the preset traversal value, the later traversed first overshoot point of the two first overshoot points will be eliminated.

[0132] (3) If the number of traversed pixel points between the two first overshoot points does not exceed the preset traversal value, the traversed pixel points between the two first overshoot points are determined as second overshoot points.

[0133] If the number of traversed pixels between the two first overshoot points exceeds the preset traversal value, the traversed pixel points between the two first overshoot points are determined to be the second overshoot points. That is, if a point (n,m) can be found within 20 points of traversal, and point (n,m) is the first overshoot point, then the currently traversed points are considered to be overshoot points. The preset traversal value is 20. If a point (n,m) can be found within 20 points of traversal such that point (n,m) meets the preset overshoot condition, then the currently traversed points are considered to be overshoot points, and the error is reset to 20. If a point (n,m) cannot be found within 20 points such that point (n,m) meets the preset overshoot condition, then the overshoot edge is considered to end here.

[0134] (4) The continuous edge formed by the first overshoot point and the second overshoot point is determined as the first overshoot edge.

[0135] (5) Determine the target overshoot edge based on the first overshoot edge.

[0136] In a specific embodiment, the first overshoot edge is determined as the target overshoot edge.

[0137] In order to improve the recognition accuracy of the target overshoot edge, in another specific embodiment, determining the target overshoot edge according to the first overshoot edge may include:

[0138] (1) Obtain the length of each first overshoot edge.

[0139] The length of the first overshoot edge is the number of pixels traversed by the first overshoot edge.

[0140] (2) Determine the first overshoot edges whose lengths are greater than a preset length among the first overshoot edges as a plurality of second overshoot edges.

[0141] For example, the preset length is 15. If the length of the first overshoot edge is not greater than the preset length, it may be an overshoot edge invisible to the naked eye, and only the first overshoot edges greater than the preset length are retained as the plurality of second overshoot edges.

[0142] (3) Determine a target overshoot edge based on the plurality of second overshoot edges.

[0143] In a specific embodiment, a plurality of second overshoot edges are determined as target overshoot edges.

[0144] In another specific embodiment, determining the plurality of second overshoot edges as target overshoot edges may include:

[0145] (1) Obtain the target overshoot point on the second overshoot edge.

[0146] In a specific embodiment, any pixel point on the second overshoot edge is determined as the target overshoot point.

[0147] (2) Acquire a plurality of first longitudinal pixel points whose longitudinal coordinates are greater than the longitudinal coordinate of the target overshoot point.

[0148] For example, five first longitudinal pixel points whose longitudinal coordinates are greater than the longitudinal coordinate of the target overshoot point are obtained.

[0149] (3) Acquire multiple second longitudinal pixel points whose longitudinal coordinates are smaller than the longitudinal coordinate of the target overshoot point.

[0150] For example, five second longitudinal pixel points whose longitudinal coordinates are smaller than the longitudinal coordinate of the target overshoot point are obtained.

[0151] (4) Calculate the first pixel mean of the plurality of first longitudinal pixel points and the second pixel mean of the plurality of second longitudinal pixel points.

[0152] (5) Calculate a first difference between the target overshoot point and the first pixel mean and a second difference between the target overshoot point and the second pixel mean.

[0153] (6) If the smaller value of the first difference and the second difference is smaller than the preset difference, the second overshoot edge is determined to be the target overshoot edge.

[0154] The preset difference th2 may be 15. If the smaller value of the first difference and the second difference is smaller than the preset difference, it indicates that the second overshoot edge where the target overshoot point is located can be identified, and the second overshoot edge is determined to be the target overshoot edge; otherwise, it is considered that it cannot be identified.

[0155] Furthermore, in order to improve the overshoot edge recognition accuracy, if both the first difference and the second difference are smaller than a preset difference, the second overshoot edge is determined to be the target overshoot edge, and then the following steps are included:

[0156] (1) Obtaining judgment results of multiple target overshoot points, wherein the judgment result is that the second overshoot edge is the target overshoot edge or the second overshoot edge is not the target overshoot edge.

[0157] Among them, if the smaller value of the first difference and the second difference is smaller than the preset difference, the judgment result is that the second overshoot edge is the target overshoot edge; if the smaller value of the first difference and the second difference is not smaller than the preset difference, the judgment result is that the second overshoot edge is not the target overshoot edge.

[0158] (2) If the proportion of the judgment results that the second overshoot edge is the target overshoot edge in the judgment results of the multiple target overshoot points exceeds a preset proportion, the second overshoot edge is determined to be the target overshoot edge.

[0159] Among them, the preset proportion can be 50%, 60%, etc.

[0160] S204 , removing target overshoot edges on the target sharpened image and the reference image to obtain the target sharpened image and the reference image after removing the overshoot edges.

[0161] S205 , determining the clarity of the target sharpened image by comparing the target sharpened image after removing the overshoot edges with the reference image.

[0162] In an embodiment of the present application, the clarity of the target sharpened image is determined based on the target sharpened image and the reference image after removing the overshoot edges using a full-reference clarity scoring algorithm. The full-reference clarity score can be peak signal-to-noise ratio PSNR, structural similarity SSIM, mean square error MSE, etc. The full-reference evaluation can only be performed when there is an undistorted original image, and the difficulty is relatively low. The core idea is to compare the amount of information or feature similarity of the two images. Since there is sufficient information, the research is relatively sufficient and various evaluation indicators are relatively mature. Preferably, the full-reference clarity score is a structural similarity SSIM score. SSIM (Structural Similarity): SSIM is an indicator for measuring the similarity between two images, and is an evaluation algorithm for full-reference image quality evaluation.

[0163] The method for determining the clarity of a sharpened image provided in the present application includes: obtaining a target sharpened image and a reference image corresponding to the same scene; determining a difference image between the target sharpened image and the reference image based on the target sharpened image and the reference image; detecting target overshoot edges on the difference image; removing target overshoot edges from the target sharpened image and the reference image to obtain a target sharpened image and reference image after removing the overshoot edges; and determining the clarity of the target sharpened image based on the target sharpened image and the reference image after removing the overshoot edges. The present application detects target overshoot edges on the difference image and performs clarity calculation after removing the target overshoot edges from the target sharpened image and the reference image, which can improve the accuracy of image clarity calculation.

[0164] In order to better implement the method for determining the clarity of a sharpened image in the embodiment of the present application, based on the method for determining the clarity of a sharpened image, the embodiment of the present application further provides a device for determining the clarity of a sharpened image. The device for determining the clarity of a sharpened image is integrated into a smart device, such as Figure 4 As shown, the sharpening image clarity determination device 400 includes:

[0165] An acquisition unit 401 is configured to acquire a target sharpened image and a reference image corresponding to the same scene;

[0166] A first determining unit 402 is configured to determine a difference image between the target sharpened image and the reference image according to the target sharpened image and the reference image;

[0167] A detection unit 403 is used to detect an overshoot edge of a target on the difference image;

[0168] The elimination unit 404 is used to eliminate the target overshoot edges on the target sharpened image and the reference image to obtain the target sharpened image and the reference image after the overshoot edges are eliminated;

[0169] The second determining unit 405 is configured to determine the clarity of the target sharpened image according to the target sharpened image after removing the overshoot edges and the reference image.

[0170] Optionally, the detection unit 404 is configured to:

[0171] Determine a pixel point on the difference image as a target pixel point;

[0172] Obtain multiple area pixels adjacent to the target pixel;

[0173] Determine the pixel with the largest pixel value among the multiple field pixels as the traversal pixel;

[0174] Determine whether the traversed pixel point is greater than the preset pixel value;

[0175] If the pixel value of the traversed pixel point is greater than the preset pixel value, the traversed pixel point is determined as the target pixel point and traversed multiple times to obtain multiple traversed pixel points corresponding to the target pixel point;

[0176] The target overshoot edge is determined according to a plurality of traversed pixel points corresponding to the target pixel point.

[0177] Optionally, the detection unit 404 is configured to detect an overshoot edge of a target on the difference image:

[0178] Determining a pixel point that meets a preset overshoot condition among the multiple traversed pixel points as a first overshoot point;

[0179] Determine whether the number of traversed pixel points between the two first overshoot points exceeds a preset traversal value;

[0180] If the number of traversed pixel points between the two first overshoot points does not exceed the preset traversal value, determining the traversed pixel points between the two first overshoot points as second overshoot points;

[0181] Determine a continuous edge formed by the first overshoot point and the second overshoot point as a first overshoot edge;

[0182] A target overshoot edge is determined according to the first overshoot edge.

[0183] Optionally, the detection unit 404 is configured to detect an overshoot edge of a target on the difference image:

[0184] Obtaining the first pixel point and the second pixel point corresponding to the traversed pixel point on the target sharpened image and the reference image;

[0185] If the pixel value of the first pixel point belongs to the preset range and the pixel value of the second pixel point is not greater than the first preset pixel value, or the pixel value of the first pixel point is equal to the second preset pixel value and the pixel value of the second pixel point is not greater than the third preset pixel value, it is determined that the traversed pixel points meet the preset overshoot condition.

[0186] Optionally, the detection unit 404 is configured to detect an overshoot edge of a target on the difference image:

[0187] Get the length of each first overshoot edge;

[0188] determining, among the first overshoot edges, first overshoot edges having a length greater than a preset length as a plurality of second overshoot edges;

[0189] A target overshoot edge is determined based on the plurality of second overshoot edges.

[0190] Optionally, the detection unit 404 is configured to detect an overshoot edge of a target on the difference image:

[0191] Get the target overshoot point on the second overshoot edge;

[0192] Acquire a plurality of first longitudinal pixel points whose longitudinal coordinates are greater than the longitudinal coordinate of the target overshoot point;

[0193] Acquire a plurality of second longitudinal pixel points whose longitudinal coordinates are smaller than the longitudinal coordinate of the target overshoot point;

[0194] Calculating a first pixel mean value of a plurality of first longitudinal pixel points and a second pixel mean value of a plurality of second longitudinal pixel points;

[0195] Calculating a first difference between the target overshoot point and the first pixel mean and a second difference between the target overshoot point and the second pixel mean;

[0196] If the smaller value of the first difference and the second difference is smaller than the preset difference, the second overshoot edge is determined to be the target overshoot edge.

[0197] Optionally, the detection unit 404 is configured to detect an overshoot edge of a target on the difference image:

[0198] Obtaining judgment results of multiple target overshoot points, wherein the judgment result is that the second overshoot edge is the target overshoot edge or the second overshoot edge is not the target overshoot edge;

[0199] If the proportion of the determination results that the second overshoot edge is the target overshoot edge in the determination results of the plurality of target overshoot points exceeds a preset proportion, the second overshoot edge is determined to be the target overshoot edge.

[0200] The present application obtains a target sharpened image and a reference image corresponding to the same scene; determines a difference image between the target sharpened image and the reference image based on the target sharpened image and the reference image; detects target overshoot edges on the difference image; removes the target overshoot edges on the target sharpened image and the reference image to obtain a target sharpened image and a reference image after removing the overshoot edges; and determines the clarity of the target sharpened image based on the target sharpened image and the reference image after removing the overshoot edges. The present application detects target overshoot edges on the difference image and performs clarity calculation after removing the target overshoot edges on the target sharpened image and the reference image, which can improve the accuracy of image clarity calculation.

[0201] The present application also provides an intelligent device that integrates any one of the sharpened image clarity determination devices provided in the present application. The intelligent device includes:

[0202] one or more processors;

[0203] Memory; and

[0204] One or more applications, wherein the one or more applications are stored in the memory and configured to execute, by the processor, the steps of the method for determining the clarity of a sharpened image in any of the embodiments of the method for determining the clarity of a sharpened image.

[0205] like Figure 5 , which shows a schematic diagram of the structure of the smart device involved in the embodiment of the present application, specifically:

[0206] The smart device may include one or more processing cores (processors 501), one or more computer-readable storage media (memory 502), a power supply 503, an input unit 504, and other components. Those skilled in the art will appreciate that the smart device structure shown in the figure does not limit the smart device, and may include more or fewer components than shown, or combine certain components, or arrange the components differently. Among them:

[0207] The processor 501 is the control center of the smart device. It connects the various parts of the smart device using various interfaces and lines. By running or executing software programs and / or modules stored in the memory 502 and accessing data stored in the memory 502, it performs various functions of the smart device and processes data, thereby monitoring the smart device as a whole. Optionally, the processor 501 may include one or more processing cores. The processor 501 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor. Preferably, the processor 501 may integrate an application processor and a modem processor, wherein the application processor primarily processes the operating system, physical interface, and application programs, and the modem processor primarily processes wireless communications. It is understood that the modem processor may not be integrated into the processor 501.

[0208] The memory 502 can be used to store software programs and modules. The processor 501 executes various functional applications and data processing by running the software programs and modules stored in the memory 502. The memory 502 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created based on the use of the smart device, etc. In addition, the memory 502 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage device. Accordingly, the memory 502 may also include a memory controller to provide the processor 501 with access to the memory 502.

[0209] The smart device also includes a power supply 503 for supplying power to various components. Preferably, the power supply 503 can be logically connected to the processor 501 via a power management system, thereby enabling the power management system to manage charging, discharging, and power consumption. The power supply 503 can also include one or more DC or AC power supplies, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and other arbitrary components.

[0210] The smart device may further include an input unit 504, which may be configured to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to physical settings and function controls.

[0211] Although not shown, the smart device may further include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 501 in the smart device will load the executable files corresponding to one or more application processes into the memory 502 according to the following instructions, and the processor 501 will run the application stored in the memory 502 to implement various functions as follows:

[0212] A target sharpened image and a reference image corresponding to the same scene are obtained; a difference image between the target sharpened image and the reference image is determined based on the target sharpened image and the reference image; target overshoot edges are detected on the difference image; target overshoot edges are eliminated from the target sharpened image and the reference image to obtain target sharpened images and reference images after overshoot edges are eliminated; and the clarity of the target sharpened image is determined based on the target sharpened image and the reference image after overshoot edges are eliminated.

[0213] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be accomplished by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0214] To this end, embodiments of the present application provide a computer-readable storage medium, which may include a read-only memory (ROM), random access memory (RAM), a disk, or an optical disk. A computer program is stored on the computer-readable storage medium, which is loaded by a processor to execute the steps of any of the methods for determining the sharpness of a sharpened image provided in embodiments of the present application. For example, the computer program loaded by the processor may execute the following steps:

[0215] A target sharpened image and a reference image corresponding to the same scene are obtained; a difference image between the target sharpened image and the reference image is determined based on the target sharpened image and the reference image; target overshoot edges are detected on the difference image; target overshoot edges are eliminated from the target sharpened image and the reference image to obtain target sharpened images and reference images after overshoot edges are eliminated; and the clarity of the target sharpened image is determined based on the target sharpened image and the reference image after overshoot edges are eliminated.

[0216] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, please refer to the detailed description of other embodiments above and will not be repeated here.

[0217] In specific implementation, the above units or structures can be implemented as independent entities, or can be arbitrarily combined to implement as the same or several entities. The specific implementation of the above units or structures can refer to the previous method embodiments and will not be repeated here.

[0218] The specific implementation of the above operations can be found in the previous embodiments and will not be repeated here.

[0219] The above is a detailed introduction to a method and device for determining the clarity of a sharpened image provided in an embodiment of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those skilled in the art, based on the ideas of the present application, there may be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for determining the clarity of a sharpened image, characterized in that: The clarity determination method comprises: Obtain the target sharpened image and reference image corresponding to the same scene; determining a difference image between the target sharpened image and the reference image according to the target sharpened image and the reference image; detecting an overshoot edge of a target on the difference image; Eliminating target overshoot edges on the target sharpened image and the reference image to obtain a target sharpened image and a reference image after overshoot edges are eliminated; Determining the clarity of the target sharpened image according to the target sharpened image after removing overshoot edges and the reference image; The method for determining the clarity of the sharpened image further includes: Determining a pixel point that meets a preset overshoot condition among the multiple traversed pixel points as a first overshoot point; Determining whether the number of traversed pixel points between two first overshoot points exceeds a preset traversal value; If the number of the traversed pixel points between the two first overshoot points does not exceed a preset traversal value, determining the traversed pixel points between the two first overshoot points as second overshoot points; determining a continuous edge formed by the first overshoot point and the second overshoot point as a first overshoot edge; Obtaining the length of each of the first overshoot edges; determining, among the first overshoot edges, first overshoot edges having a length greater than a preset length as a plurality of second overshoot edges; Obtaining a target overshoot point on the second overshoot edge; Obtaining a plurality of determination results of the target overshoot points, wherein the determination result is that the second overshoot edge is the target overshoot edge or the second overshoot edge is not the target overshoot edge; If the proportion of the judgment results that the second overshoot edge is the target overshoot edge in the judgment results of the plurality of target overshoot points exceeds a preset proportion, the second overshoot edge is determined to be the target overshoot edge.

2. The method for determining the clarity of a sharpened image according to claim 1, wherein: The multiple traversal pixel points are determined based on the following method: Determine a pixel point on the difference image as a target pixel point; Acquire a plurality of area pixels adjacent to the target pixel; Determine the pixel with the largest pixel value among the plurality of field pixels as the traversal pixel; Determine whether the traversed pixel point is greater than a preset pixel value; If the pixel value of the traversed pixel point is greater than the preset pixel value, the traversed pixel point is determined as the target pixel point and traversed multiple times to obtain multiple traversed pixel points corresponding to the target pixel point.

3. The method for determining the clarity of a sharpened image according to claim 1, wherein: The step of determining a pixel point satisfying a preset overshoot condition among the plurality of traversed pixel points as a first overshoot point includes: Obtaining a first pixel point and a second pixel point corresponding to the traversed pixel point on the target sharpened image and the reference image; If the pixel value of the first pixel point belongs to a preset range and the pixel value of the second pixel point is not greater than the first preset pixel value, or the pixel value of the first pixel point is equal to the second preset pixel value and the pixel value of the second pixel point is not greater than the third preset pixel value, then it is determined that the traversed pixel point meets the preset overshoot condition.

4. The method for determining the clarity of a sharpened image according to claim 1, wherein: After obtaining the target overshoot point on the second overshoot edge, the method further includes: Acquire a plurality of first longitudinal pixel points whose longitudinal coordinates are greater than the longitudinal coordinate of the target overshoot point; Acquire a plurality of second longitudinal pixel points whose longitudinal coordinates are smaller than the longitudinal coordinate of the target overshoot point; Calculating a first pixel mean of a plurality of the first longitudinal pixel points and a second pixel mean of a plurality of the second longitudinal pixel points; Calculating a first difference between the target overshoot point and a first pixel mean and a second difference between the target overshoot point and a second pixel mean; If the smaller value of the first difference and the second difference is smaller than a preset difference, the second overshoot edge is determined to be the target overshoot edge.

5. A device for determining the clarity of a sharpened image, characterized in that: The sharpening image clarity determination device comprises: An acquisition unit, used for acquiring a target sharpened image and a reference image corresponding to the same scene; a first determining unit, configured to determine a difference image between the target sharpened image and the reference image according to the target sharpened image and the reference image; a detection unit, configured to detect an overshoot edge of a target on the difference image; a culling unit, configured to remove target overshoot edges from the target sharpened image and the reference image, to obtain the target sharpened image and the reference image after the overshoot edges are removed; A second determining unit is used to determine the clarity of the target sharpened image according to the target sharpened image after removing the overshoot edge and the reference image; The detection unit is used for: Determining a pixel point that meets a preset overshoot condition among the multiple traversed pixel points as a first overshoot point; Determining whether the number of traversed pixel points between two first overshoot points exceeds a preset traversal value; If the number of the traversed pixel points between the two first overshoot points does not exceed a preset traversal value, determining the traversed pixel points between the two first overshoot points as second overshoot points; determining a continuous edge formed by the first overshoot point and the second overshoot point as a first overshoot edge; Obtaining the length of each of the first overshoot edges; determining, among the first overshoot edges, first overshoot edges having a length greater than a preset length as a plurality of second overshoot edges; Obtaining a target overshoot point on the second overshoot edge; Obtaining a plurality of determination results of the target overshoot points, wherein the determination result is that the second overshoot edge is the target overshoot edge or the second overshoot edge is not the target overshoot edge; If the proportion of the judgment results that the second overshoot edge is the target overshoot edge in the judgment results of the plurality of target overshoot points exceeds a preset proportion, the second overshoot edge is determined to be the target overshoot edge.

6. A smart device, characterized in that: The smart device includes: one or more processors; Memory; and One or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the processor to implement the method for determining the sharpness of a sharpened image according to any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps of the method for determining the clarity of a sharpened image according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Apparatus and method for determining image sharpness

    CN111311533A

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

    CN114782279A