Shooting definition identification method and system based on edge detection

The calculation of blur probability and edge detection through differential images, combined with the importance of edge pixel points, solves the problem of low image clarity recognition accuracy, and achieves higher recognition accuracy and image quality evaluation.

CN120451127AActive Publication Date: 2025-08-08广东九安智能科技股份有限公司
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202510612919.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-13
Publication Date
2025-08-08
Estimated Expiration
2045-05-13

AI Technical Summary

Technical Problem

In the prior art, in image clarity recognition, the edge pixel point information of the image is not effectively utilized, resulting in low accuracy of the clarity recognition result.

Method used

The blur probability is calculated by differential images, combined with edge detection, the importance of edge pixel points is acquired, and the image is weighted, the similarity of the image sequence is calculated, and the standard image is dynamically updated to improve the accuracy of clarity recognition.

Benefits of technology

It improves the accuracy and sensitivity of image clarity recognition, and can adaptively update standard images, which is suitable for photo effect detection and image quality improvement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120451127A_ABST
    Figure CN120451127A_ABST
Patent Text Reader

Abstract

The invention relates to the field of photographing definition recognition, in particular to a photographing definition recognition method and system based on edge detection. The method comprises the steps that a preprocessed target image is acquired, the target image is a current to-be-detected image, difference is carried out on the target image and a standard image to obtain a difference image, and the blurring probability of the target image is calculated according to the difference image; carrying out edge detection on the target image to obtain edge pixel points, and calculating the importance of the edge pixel points according to the edge pixel points and the difference image; after each pixel point in the target image is weighted, the target image is converted into a sequence, the similarity between the sequence of the target image and the sequence of the standard image is calculated, when the similarity is not smaller than a preset threshold value, the target image serves as the updated standard image, and definition recognition continues. According to the technical scheme, the accuracy of the definition recognition result can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of photo clarity recognition, and more particularly to a photo clarity recognition method and system based on edge detection. Background Art

[0002] With the ubiquity of mobile devices such as smartphones and digital cameras, photography has become an essential part of modern life. From social media to e-commerce to digital archive management, image capture technology continues to permeate our lives. However, capturing clear, high-quality images in practical applications still faces many challenges. Factors affecting image quality include lighting conditions, focal length, camera hardware performance, shooting angle, and camera shake. Image clarity is one of the most common factors. Image clarity directly impacts the visual experience and subsequent processing applications, particularly in areas such as image analysis, image recognition, and augmented reality. Poor image clarity not only significantly reduces the visual experience but can also cause image processing algorithms to fail or become inaccurate, impacting the efficiency and accuracy of subsequent tasks.

[0003] The existing Chinese patent application document with publication number CN104394377A discloses a method and device for identifying blur anomalies in surveillance images, including: intercepting a surveillance image of a video stream and smoothing the surveillance image; calculating a blur evaluation value of the original surveillance image and the smoothed surveillance image; comparing the blur evaluation value with a preset blur threshold, and if the blur evaluation value is less than the blur threshold, determining that the surveillance image is a blurred image.

[0004] However, the edge pixels in an image usually correspond to the outline, shape and structural features of an object, and contain a lot of detailed information. The above application document determines whether an image is blurred by analyzing the structural similarity of the two images, and does not take into account the relationship between the edge pixels in the image, which will lead to low accuracy of the clarity recognition results. Summary of the Invention

[0005] In order to solve the problem of low accuracy of clarity recognition results, the present invention proposes a method and system for photographic clarity recognition based on edge detection.

[0006] In a first aspect, the present invention discloses a method for identifying the clarity of a photograph based on edge detection, comprising: obtaining a preprocessed target image, where the target image is the current image to be tested, performing a differential operation on the target image and a standard image to obtain a differential image, and calculating the blur probability of the target image based on the differential image; performing edge detection on the target image to obtain edge pixels, and calculating the importance of the edge pixels based on the edge pixels and the differential image; after weighting each pixel in the target image, converting the target image into a sequence, and calculating the similarity between the sequence of the target image and the sequence of the standard image; when the similarity is not less than a preset threshold, using the target image as an updated standard image and continuing to perform clarity identification; the similarity satisfies the relationship: , A sequence representing the target image and a sequence of standard images The similarity, A sequence representing the target image The mean of Represents a sequence of standard images The mean of Representation sequence and sequence The covariance of and Represents the sequence and sequence The variance of and are two stability constants.

[0007] First, by calculating the difference between the target image and the standard image, the blur probability is obtained, which provides a preliminary basis for the subsequent clarity assessment. Next, edge detection not only extracts the structural information of the image, but also evaluates the importance of edge pixels by combining the difference image, thereby avoiding erroneous attention to irrelevant areas. After weighting, the influence of each pixel in the target image is more accurately assessed, which helps to highlight the key areas of the image. By calculating the similarity between the target image and the standard image, it is further verified whether the target image has met the preset clarity standard. If the similarity meets the requirements, the target image is updated to the new standard image and continuously iterated and optimized. It can not only dynamically track changes in image clarity, but also accurately evaluate image quality by integrating multiple information.

[0008] Preferably, the preprocessing includes: denoising the target image using Gaussian filtering, improving the brightness distribution of the target image using histogram equalization, and enhancing edge information in the target image using an edge enhancement algorithm.

[0009] Preferably, the blur probability includes: counting the number of non-zero pixels in the differential image, calculating the ratio of the total number of pixels in the differential image to the number of non-zero pixels, and using the result of negative correlation mapping of the ratio as the blur probability.

[0010] When the ratio of non-zero pixels in the difference image is high, it means that there are more variations or irregularities in the image, which usually indicates that the image may be blurry or noisy.

[0011] Preferably, the fuzzy probability further comprises: dividing the differential image into a grid to obtain a plurality of sub-regions, and counting the number of non-zero pixels in each sub-region; the fuzzy probability satisfies the relationship: , represents the fuzzy probability, Indicates sub-area The number of non-zero pixels in Represents the mean number of non-zero pixels in the sub-region, represents the total number of sub-regions, Represents the exponential function.

[0012] By exponentially processing the difference between the number of non-zero pixels in each sub-region and the mean of the region, the uneven distribution of pixels between regions is emphasized, which helps to highlight the significant change areas in the image and suppress the influence of noise.

[0013] Preferably, the importance includes: for any edge pixel point, calculating the gradient value of the edge pixel point; the importance satisfies the relationship: , Indicates the position is Rank The importance of the edge pixels of the column, Indicates the position is Rank The gradient value of the edge pixel of the column, is a vector function, Indicates the first Rank The pixel value of the column, represents the fuzzy probability.

[0014] The gradient value of an edge reflects the intensity of grayscale changes in an image, revealing details of the image structure. The pixel values of the differential image provide information about image changes under different states, helping to identify dynamic features. By combining these three factors, the algorithm not only considers edge clarity and image changes, but also adjusts for the impact of image quality through blur probability, thus avoiding misjudgment of irrelevant information in blurred or low-quality images.

[0015] Preferably, the importance further includes: for any edge pixel point, calculating the cumulative difference between the pixel value of the edge pixel and the pixel values of its eight neighboring pixels; the importance satisfies the relationship: , Indicates the position is Rank The importance of the edge pixels of the column, Indicates the position is Rank The accumulated difference value of the edge pixels of the column, is a vector function, Indicates the first Rank The pixel value of the column, represents the fuzzy probability.

[0016] Preferably, the weighting of each pixel in the target image includes: setting the weight of non-edge pixels in the target image to 1, and taking the sum of 1 and importance as the weight of edge pixels in the target image; traversing to obtain the weight of each pixel in the target image to obtain a weighted target image.

[0017] For non-edge pixels, a uniform weight of 1 is assigned to ensure that the smooth areas of the image are not disturbed after weighting; for edge pixels, the weighted importance of each edge pixel is calculated by combining its gradient value, pixel information of the differential image, and blur probability, thereby enhancing the representation of key structures in the image.

[0018] In a second aspect, the present invention discloses a photo clarity recognition system based on edge detection, comprising: a processor; and a memory, wherein the memory stores computer instructions. When the computer instructions are executed by the processor, the system executes the above-mentioned photo clarity recognition method based on edge detection.

[0019] Beneficial effects of the present invention: The image clarity is accurately evaluated by utilizing the difference between the target image and the standard image and the edge information in the image. The present invention first improves the image quality and reduces noise through preprocessing techniques such as Gaussian filtering, histogram equalization and edge enhancement, thereby extracting clearer edge features. By calculating the blur probability of the image and combining the gradient of the edge pixels and the correlation of the differential image, the blur degree of the image can be effectively judged, especially in the edge part of the image. By weighting the target image and converting it into a sequence, and then calculating the similarity between the image and the standard image, the standard image can be adaptively updated and the recognition accuracy can be gradually improved. This method not only enhances the accuracy of image quality assessment, but also optimizes the sensitivity of clarity detection through the guidance of edge information. It is suitable for practical application scenarios such as photographic effect detection and image quality improvement, and can provide more stable and reliable clarity judgment results. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood by reading the following detailed description with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present invention are shown in an illustrative and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein: Figure 1 This is a flow chart of a method for identifying photographic clarity based on edge detection according to an embodiment of the present invention. DETAILED DESCRIPTION

[0021] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work shall fall within the scope of protection of the present invention.

[0022] It should be understood that when the terms "first," "second," and the like are used in the claims, description, and drawings of the present invention, they are merely used to distinguish between different objects, rather than to describe a specific order. The terms "comprise" and "comprising" used in the description and claims of the present invention indicate the presence of the described features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or combinations thereof.

[0023] The present invention provides a method for identifying the clarity of a photograph based on edge detection. Figure 1 As shown, the method for identifying the clarity of a photograph based on edge detection includes steps S1 to S3, which are described in detail below.

[0024] S1, obtain the preprocessed target image, which is the current image to be tested, and perform a differential analysis between the target image and the standard image to obtain a differential image. Calculate the blur probability of the target image based on the differential image.

[0025] In one embodiment, in a scenario where the clarity of an image is detected, first, real-time video data is acquired from a camera, and the video is extracted frame by frame as an image for processing. In order to improve the accuracy of subsequent clarity detection, Gaussian filtering denoising is first applied to each frame of the image to remove high-frequency noise in the image and ensure the accuracy of the edge information. Next, histogram equalization is used to enhance the brightness distribution of the target image, thereby improving the details in low-contrast areas, making the brightness of the image more uniform and the details more clearly visible. Finally, an edge enhancement algorithm, such as Laplace filtering or high-pass filtering technology, is used to strengthen the edge information in the image, highlight the outline and structure of the object, and further improve the clarity of the image. These preprocessing steps effectively enhance the quality of the image, ensure that the clarity detection algorithm can better identify the details and quality of the image, and provide a clearer and more reliable input for subsequent clarity evaluation.

[0026] The current image to be detected is used as the target image, and the target image is differentiated from the standard image to obtain a differential image.

[0027] Exemplarily, the video is extracted into images frame by frame, the first frame image is a clear image, that is, a standard image, then the target image is the second frame image; if the target image is any frame image, then the standard image is the image in the history before the target image that is closest to the target image and has a clear detection result.

[0028] The fuzzy probability of the target image is calculated according to the differential image, including: counting the number of non-zero pixels in the differential image, calculating the ratio of the total number of pixels in the differential image to the number of non-zero pixels, and using the result of negative correlation mapping of the ratio as the fuzzy probability.

[0029] When the ratio of non-zero pixels in the difference image is high, it means that there are more variations or irregularities in the image, which usually indicates that the image may be blurry or noisy.

[0030] In another embodiment, the fuzzy probability further includes: dividing the differential image into grids to obtain a plurality of sub-regions, and counting the number of non-zero pixels in each sub-region.

[0031] The fuzzy probability satisfies the relationship: , represents the fuzzy probability, Indicates sub-area The number of non-zero pixels in Represents the mean number of non-zero pixels in the sub-region, represents the total number of sub-regions, Represents the exponential function.

[0032] By exponentially calculating the difference between the number of non-zero pixels in each subregion and the region's mean, the uneven distribution of pixels across regions is emphasized. This helps highlight areas of significant change in the image and suppresses the effects of noise. This approach improves the ability to capture detail in image processing, particularly in identifying areas of change, thereby enhancing the accuracy and robustness of image analysis in practical applications.

[0033] S2, performing edge detection on the target image to obtain edge pixels, and calculating the importance of the edge pixels based on the edge pixels and the differential image.

[0034] It's important to note that the primary purpose of edge detection is to identify and locate areas within an image where grayscale or color changes significantly, known as image "edges." These edges typically correspond to the outlines of objects, structural boundaries, or transitions between different regions, often representing the locations of important information within the image. Edge detection can capture the most representative and meaningful parts of an image, which is crucial for subsequent image analysis and understanding.

[0035] Edge detection can suppress noise in images because edges typically correspond to prominent, real structures in an image, while noise typically manifests as small, irregular changes. Edge detection can focus the image on these meaningful areas, reducing the interference of irrelevant information, thereby improving the accuracy and efficiency of image analysis.

[0036] In one embodiment, the importance includes: for any edge pixel point, calculating the gradient value of the edge pixel point.

[0037] Importance satisfies the relationship: , Indicates the position is Rank The importance of the edge pixels of the column, Indicates the position is Rank The gradient value of the edge pixel of the column, is a vector function, Indicates the first Rank The pixel value of the column, represents the fuzzy probability.

[0038] when When it is not zero, it means that the target image has changed compared to the standard image. The overall value is 1; when When it is zero, it means that the target image has not changed compared to the standard image. The overall value is 0.

[0039] The fact that the difference value of a pixel in the difference image between the target image and the standard image is not zero does not mean that the pixel is more important. Therefore, the probability of image blur is calculated. The greater the probability of image blur, the lower the importance of the pixel.

[0040] In another embodiment, importance also includes: For any edge pixel, calculate the cumulative difference between the pixel value of the edge pixel and the pixel values of its eight neighboring pixels.

[0041] Importance satisfies the relationship: , Indicates the position is Rank The importance of the edge pixels of the column, Indicates the position is Rank The accumulated difference value of the edge pixels of the column, is a vector function, Indicates the first Rank The pixel value of the column, represents the fuzzy probability.

[0042] S3, after weighting each pixel in the target image, convert the target image into a sequence, calculate the similarity between the sequence of the target image and the sequence of the standard image, and when the similarity is not less than a preset threshold, use the target image as the updated standard image and continue to perform clarity recognition.

[0043] In one embodiment, the weight of non-edge pixels in the target image is set to 1, and the sum of 1 and the importance is used as the weight of edge pixels in the target image; the weight of each pixel in the target image is traversed to obtain a weighted target image.

[0044] The similarity satisfies the relationship: , A sequence representing the target image and a sequence of standard images The similarity, A sequence representing the target image The mean of Represents a sequence of standard images The mean of Representation sequence and sequence The covariance of and Represents the sequence and sequence The variance of and are two stability constants.

[0045] , ,in Represents the range of pixel values in the image. For example, , .

[0046] The greater the similarity between the two images, the lower the possibility that one of the two images is blurry and the other is clear, that is, the two images are clearer, because the detection result of the standard image is clear; when the similarity between the two images is low, it means that one of the two images is blurry and the other is not blurry, that is, the target image is blurry.

[0047] When the similarity is not less than the preset threshold, the target image is used as the updated standard image to continue the clarity recognition.

[0048] An embodiment of the present invention further discloses a photo clarity recognition system based on edge detection, comprising a processor and a memory, wherein the memory stores computer program instructions. When the computer program instructions are executed by the processor, a photo clarity recognition method based on edge detection according to the present invention is implemented.

[0049] The above system also includes other components well known to those skilled in the art, such as a communication bus and a communication interface. The configuration and functions of these components are known in the art and will not be described in detail here.

[0050] In the present invention, the aforementioned memory may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, a computer-readable storage medium may be any suitable magnetic storage medium or magneto-optical storage medium, such as Resistive Random Access Memory (RRAM), Dynamic Random Access Memory (DRAM), Static Random Access Memory (SRAM), Enhanced Dynamic Random Access Memory (EDRAM), High-Bandwidth Memory (HBM), Hybrid Memory Cube (HMC), or any other medium that can be used to store the required information and can be accessed by an application, module, or both. Any such computer storage medium may be part of, accessible to, or connectable to a device.

[0051] While this specification has shown and described several embodiments of the present invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Numerous modifications, variations, and alternatives will occur to those skilled in the art without departing from the concept and spirit of the present invention. It should be understood that various alternatives to the embodiments of the present invention described herein may be employed in practicing the present invention.

[0052] The above are all preferred embodiments of the present invention, and are not intended to limit the scope of protection of the present invention. Therefore, any equivalent changes made based on the structure, shape, and principle of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for identifying the clarity of a photograph based on edge detection, characterized in that: include: Obtain the preprocessed target image, which is the current image to be tested, and perform differential analysis on the target image and the standard image to obtain a differential image. Calculate the blur probability of the target image based on the differential image. Perform edge detection on the target image to obtain edge pixels, and calculate the importance of edge pixels based on the edge pixels and the differential image; After weighting each pixel in the target image, the target image is converted into a sequence, and the similarity between the target image sequence and the standard image sequence is calculated. When the similarity is not less than a preset threshold, the target image is used as the updated standard image and the clarity recognition is continued; The similarity satisfies the relationship: , A sequence representing the target image and a sequence of standard images The similarity, A sequence representing the target image The mean of Represents a sequence of standard images The mean of Representation sequence and sequence The covariance of and Represents the sequence and sequence The variance of and are two stability constants.

2. The method for identifying the clarity of a photograph based on edge detection according to claim 1, wherein: The pretreatment includes: Gaussian filtering is used to denoise the target image, histogram equalization is used to improve the brightness distribution of the target image, and edge enhancement algorithm is used to enhance the edge information in the target image.

3. The method for identifying the clarity of a photograph based on edge detection according to claim 1, wherein: The fuzzy probability includes: The number of non-zero pixels in the difference image is counted, and the ratio of the total number of pixels in the difference image to the number of non-zero pixels is calculated. The result of the ratio through negative correlation mapping is used as the fuzzy probability.

4. The method for identifying the clarity of a photograph based on edge detection according to claim 1, wherein: The fuzzy probability also includes: Divide the differential image into several sub-regions by gridding, and count the number of non-zero pixels in each sub-region; The fuzzy probability satisfies the relationship: , represents the fuzzy probability, Indicates sub-area The number of non-zero pixels in Represents the mean number of non-zero pixels in the sub-region, represents the total number of sub-regions, Represents the exponential function.

5. The method for identifying the clarity of a photograph based on edge detection according to claim 1, wherein: The importance includes: For any edge pixel, calculate the gradient value of the edge pixel; Importance satisfies the relationship: , Indicates the position is Rank The importance of the edge pixels of the column, Indicates the position is Rank The gradient value of the edge pixel of the column, is a vector function, Indicates the first Rank The pixel value of the column, represents the fuzzy probability.

6. The method for identifying the clarity of a photograph based on edge detection according to claim 1, wherein: The importance also includes: For any edge pixel, calculate the cumulative difference between the pixel value of the edge pixel and the pixel values of its eight neighboring pixels; Importance satisfies the relationship: , Indicates the position is Rank The importance of the edge pixels of the column, Indicates the position is Rank The accumulated difference value of the edge pixels of the column, is a vector function, Indicates the first Rank The pixel value of the column, represents the fuzzy probability.

7. The method for identifying the clarity of a photograph based on edge detection according to claim 1, wherein: The weighting of each pixel in the target image includes: The weight of non-edge pixels in the target image is set to 1, and the sum of 1 and importance is used as the weight of edge pixels in the target image; Traverse to obtain the weight of each pixel in the target image and obtain the weighted target image.

8. The edge detection-based photo clarity recognition system is characterized by: include: processor; and A memory storing computer instructions, wherein when the computer instructions are executed by the processor, the system executes the method for identifying photographic clarity based on edge detection according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Monitoring image blurring abnormity identification method and device

    CN104394377A

  • Image definition determining method and device

    CN110827254A

  • Saturated image deblurring method based on nonlinear degradation model

    CN111047544A

  • Image definition recognition method based on edge features

    CN113052794A

  • Image sharpening processing system based on ambiguity identification

    CN118134804A