CN118135381A - Image blurring detection method, device, equipment and medium - Google Patents

Image blurring detection method, device, equipment and medium Download PDF

Info

Publication number
CN118135381A
CN118135381A CN202410544219.1A CN202410544219A CN118135381A CN 118135381 A CN118135381 A CN 118135381A CN 202410544219 A CN202410544219 A CN 202410544219A CN 118135381 A CN118135381 A CN 118135381A
Authority
CN
China
Prior art keywords
image
area
target
microcosmic
detection result
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202410544219.1A
Other languages
Chinese (zh)
Other versions
CN118135381B (en
Inventor
姚庆源
程烨
宁毅鹏
赖鹏旭
杜宗飞
程礼邦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Quantum Cloud Code Fujian Technology Co ltd
Shenzhen Qianhai Quantum Cloud Code Technology Co ltd
Original Assignee
Quantum Cloud Code Fujian Technology Co ltd
Shenzhen Qianhai Quantum Cloud Code Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Quantum Cloud Code Fujian Technology Co ltd, Shenzhen Qianhai Quantum Cloud Code Technology Co ltd filed Critical Quantum Cloud Code Fujian Technology Co ltd
Priority to CN202410544219.1A priority Critical patent/CN118135381B/en
Publication of CN118135381A publication Critical patent/CN118135381A/en
Application granted granted Critical
Publication of CN118135381B publication Critical patent/CN118135381B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Processing (AREA)

Abstract

The invention discloses a fuzzy detection method, a device, equipment and a medium for an image, and relates to the technical field of image fuzzy detection, wherein the method comprises the following steps: identifying at least one coding pattern area in the target microcosmic coding image, and determining an external connection area and a background area of each coding pattern area; according to each coding pattern area and the external connection area of each coding pattern area, carrying out shake blur detection on the target microcosmic coding image to obtain a shake blur detection result; performing defocus blur detection on the target microcosmic coded image according to each external connection region and the background region to obtain defocus blur detection results; and determining a fuzzy detection result of the target microcosmic coded image according to the jitter fuzzy detection result and the defocus fuzzy detection result. According to the technical scheme provided by the embodiment of the invention, the accuracy of the fuzzy detection of the target microcosmic coded image is improved.

Description

Image blurring detection method, device, equipment and medium
Technical Field
The present invention relates to the field of image blur detection technologies, and in particular, to a method, an apparatus, a device, and a medium for image blur detection.
Background
The microcosmic coded image can be a tiny image formed by a plurality of 30-50 micron coded points which are arranged according to a certain rule, has the characteristics of high-density information storage, concealment, safety and the like, and is widely applied in a plurality of fields. However, in the process of processing the microcoded image, if the photographed microcoded image has blurring, the subsequent procedure cannot be performed normally.
Most of the image blurring detection methods in the prior art have better blurring detection effect on images with normal sizes, and have poorer blurring detection effect on microcosmic coded images.
Disclosure of Invention
The invention provides a fuzzy detection method, device, equipment and medium for an image, which are used for improving the accuracy of fuzzy detection on a target microcosmic coded image.
In a first aspect, the present invention provides a blur detection method for an image, including:
Identifying at least one coding pattern area in the target microcosmic coding image, and determining an external connection area and a background area of each coding pattern area;
According to each coding pattern area and the external connection area of each coding pattern area, carrying out shake blur detection on the target microcosmic coding image to obtain a shake blur detection result;
performing defocus blur detection on the target microcosmic coded image according to each external connection region and the background region to obtain defocus blur detection results;
Determining the fuzzy detection result of the target microcosmic coded image according to the jitter fuzzy detection result and the defocus fuzzy detection result
In a second aspect, the present invention also provides an image blur detection apparatus, including:
The region identification module is used for identifying at least one coding pattern region in the target microcosmic coding image and determining the circumscribed region and the background region of each coding pattern region;
The shake blur detection module is used for performing shake blur detection on the target microcosmic coded image according to each coding pattern area and the external area of each coding pattern area to obtain a shake blur detection result;
The defocus blur detection module is used for performing defocus blur detection on the target microcosmic coded image according to each external area and the background area to obtain defocus blur detection results;
And the detection result determining module is used for determining the fuzzy detection result of the target microcosmic coded image according to the jitter fuzzy detection result and the defocus fuzzy detection result.
In a third aspect, an embodiment of the present invention further provides an electronic device, including:
at least one processor; and
A memory communicatively coupled to the at least one processor; wherein the method comprises the steps of
The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the blur detection method of an image provided by any one of the embodiments of the present invention.
In a fourth aspect, embodiments of the present invention further provide a computer readable storage medium storing computer instructions for causing a processor to execute the blur detection method for an image according to any one of the embodiments of the present invention.
The embodiment of the invention identifies at least one coding pattern area in the target microcosmic coding image and determines the circumscribed area and the background area of each coding pattern area; according to each coding pattern area and the external connection area of each coding pattern area, carrying out shake blur detection on the target microcosmic coding image to obtain a shake blur detection result; performing defocus blur detection on the target microcosmic coded image according to each external connection region and the background region to obtain defocus blur detection results; and determining a fuzzy detection result of the target microcosmic coded image according to the jitter fuzzy detection result and the defocus fuzzy detection result. According to the technical scheme, through identifying each coding pattern area, each external connection area and a background area in the target microcosmic coding image, shake blur detection and defocus blur detection are respectively carried out on the target microcosmic coding image; and comprehensively determining whether the target microcosmic coded image is blurred according to the shake blur detection result and the defocus blur detection result of the target microcosmic coded image, thereby improving the accuracy of blur detection.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1A is a flowchart of a method for detecting blurring of an image according to a first embodiment of the present invention;
FIG. 1B is a schematic diagram of a blurred image with dithering according to a first embodiment of the present invention;
FIG. 1C is a schematic diagram of a defocus blur image according to a first embodiment of the present invention;
FIG. 1D is a schematic view of a clear image according to a first embodiment of the present invention;
fig. 2A is a flowchart of a blur detection method for an image according to a second embodiment of the present invention;
FIG. 2B is a schematic illustration of an circumscribed area of a coding pattern area according to a second embodiment of the present application;
fig. 3 is a flowchart of a method for detecting blurring of an image according to a third embodiment of the present invention;
fig. 4 is a flowchart of a method for detecting blurring of an image according to a fourth embodiment of the present invention;
Fig. 5 is a schematic structural diagram of an image blur detection device according to a fifth embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device implementing a blur detection method of an image according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first" and "second" and the like in the description and the claims of the present invention and the above drawings are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In the technical scheme of the embodiment of the invention, the acquisition, storage, application and the like of the related target microcosmic coded images and the like all meet the requirements of related laws and regulations, and the related target microcosmic coded images and the like do not violate the popular regulations of the public order.
Example 1
Fig. 1A is a flowchart of an image blur detection method according to an embodiment of the present invention, where the method may be applied to a case of performing blur detection on a microcoded image, and the method may be performed by an image blur detection device, where the image blur detection device may be implemented in hardware and/or software, and specifically configured in an electronic device, for example, a server.
Referring to fig. 1A, the blur detection method of an image includes:
S101, identifying at least one coding pattern area in the target microcosmic coding image, and determining the circumscribed area and the background area of each coding pattern area.
In this embodiment, the target microcoded image may be a microcoded image to be subjected to blur detection. The coding pattern region may be a corresponding region in the coding pattern target microcoded image. The encoding pattern may include at least one microscopic encoding point; for example, the coding pattern may include a micro coding point, that is, the micro coding point is the coding pattern; the coding pattern may further comprise at least two micro-coding points, each micro-coding point comprised by the coding pattern being in communication, i.e. each micro-coding point in the coding pattern is connected to at least one other micro-coding point in the coding pattern. The circumscribed area may be a smallest circular area including the corresponding coding pattern. The background region may be a region other than each coding pattern region in the target microcoded image.
Specifically, a certain algorithm is adopted to identify the outline of at least one coding pattern in the target microcosmic coding image, and the area surrounded by each outline is used as a coding pattern area; for each coding pattern region, determining a minimum circular region including the coding pattern region, and taking the determined minimum circular region as an external region of the coding pattern region; and taking the area except for each coding pattern area in the target microcosmic coding image as a background area. It should be noted that at least one prior art technique may be used to identify the outline of the coding pattern, which is not limited in this regard.
S102, performing shake blur detection on the target microcosmic coded image according to each coding pattern area and the circumscribed area of each coding pattern area to obtain a shake blur detection result.
In this embodiment, the shake blur may be understood as a blur generated by a photographed target microcoded image due to a lens movement of a photographing apparatus or due to a movement of an object having microcoded points when photographing the object having microcoded points. The shake blur detection result includes, but is not limited to, shake blur, sharpness, and the like.
Specifically, a certain algorithm is adopted, and shake blur detection is carried out on the target microcosmic coded image according to each coding pattern area and the external connection area of each coding pattern area, so that a shake blur detection result is obtained.
S103, performing out-of-focus blur detection on the target microcosmic coded image according to each external connection area and the background area to obtain an out-of-focus blur detection result.
In this embodiment, the defocus blur may be a blur generated by a captured target microcoded image due to defocus of a lens of the capturing apparatus. The defocus blur detection result may include, but is not limited to, defocus blur, sharpness, and the like.
Specifically, a certain algorithm is adopted, and defocus blur detection is carried out on the target microcosmic coded image according to each circumscribed area and the background area, so that defocus blur detection results are obtained.
S104, determining a fuzzy detection result of the target microcosmic coded image according to the jitter fuzzy detection result and the defocus fuzzy detection result.
In this embodiment, the blur detection result may be a result of characterizing whether the target microcosmic encoded image is blurred; the blur detection result may include, but is not limited to, blur and sharpness, and the like. Specifically, a certain algorithm is adopted, and a fuzzy detection result of the target microcosmic coded image is determined according to the jitter fuzzy detection result and the defocus fuzzy detection result.
Optionally, determining the blur detection result of the target microcosmic encoded image according to the shake blur detection result and the defocus blur detection result includes: if the shake blur detection result is clear and the defocus blur detection result is clear, determining that the blur detection result of the target microcosmic coded image is clear; otherwise, determining the blurring detection result of the target microcosmic coded image as blurring.
It can be understood that by adopting the technical scheme, under the condition that the shake blur detection result and the defocus blur detection result are clear, the blur detection result of the target microcosmic coded image is determined to be clear; otherwise, the fuzzy detection result of the target microcosmic coded image is determined to be fuzzy, so that the accuracy of determining the fuzzy detection result is improved.
Alternatively, FIG. 1B is a schematic illustration of a dithered blurred image; as shown in fig. 1B, which is a microscopically encoded image with jitter blur.
Alternatively, FIG. 1C is a schematic illustration of an out-of-focus blur image; as shown in fig. 1C, which is a microscopically encoded image with out-of-focus blur.
Alternatively, FIG. 1D is a schematic illustration of a sharp image; as shown in fig. 1D, which is a clear microscopic coded image.
The embodiment of the invention identifies at least one coding pattern area in the target microcosmic coding image and determines the circumscribed area and the background area of each coding pattern area; according to each coding pattern area and the external connection area of each coding pattern area, carrying out shake blur detection on the target microcosmic coding image to obtain a shake blur detection result; performing defocus blur detection on the target microcosmic coded image according to each external connection region and the background region to obtain defocus blur detection results; and determining a fuzzy detection result of the target microcosmic coded image according to the jitter fuzzy detection result and the defocus fuzzy detection result. According to the technical scheme, through identifying each coding pattern area, each external connection area and a background area in the target microcosmic coding image, shake blur detection and defocus blur detection are respectively carried out on the target microcosmic coding image; and comprehensively determining whether the target microcosmic coded image is blurred according to the shake blur detection result and the defocus blur detection result of the target microcosmic coded image, thereby improving the accuracy of blur detection.
Example two
Fig. 2A is a flowchart of a method for detecting blurring of an image according to a second embodiment of the present invention, where the determining operation of the blurring detection result is optimized and improved based on the technical solution of the foregoing embodiment according to the embodiment of the present invention.
Further, the shake blur detection is carried out on the target microcosmic coded image according to the coding pattern areas and the circumscribed areas of the coding pattern areas, so that a shake blur detection result is obtained and is thinned into the shake blur detection result of the coding pattern areas according to the areas of the coding pattern areas and the circumscribed areas of the coding pattern areas for each coding pattern area; counting the first number of the coding pattern areas and the second number of the coding pattern areas, wherein the jitter detection result is jitter; and determining a shake blur detection result' of the target microcosmic coded image according to the first quantity and the second quantity so as to perfect the determination operation of the shake blur detection result.
In the embodiments of the present invention, the details are not described, and reference may be made to the description of the foregoing embodiments.
Referring to fig. 2A, the blur detection method of an image includes:
S201, identifying at least one coding pattern area in the target microcosmic coding image, and determining the circumscribed area and the background area of each coding pattern area.
S202, for each coding pattern area, determining a jitter detection result of the coding pattern area according to the area of the coding pattern area and the area of an circumscribing area of the coding pattern area.
In this embodiment, the jitter detection result may be used to characterize whether or not the coding pattern region has jitter. Specifically, for each coding pattern region, determining an area ratio between the area of the coding pattern region and the area of the corresponding circumscribed region of the coding pattern region; if the area ratio is smaller than a preset area ratio threshold, determining that the jitter detection result of the coding pattern area is jitter; if the area ratio is greater than or equal to a preset area ratio threshold, determining that the jitter detection result of the coding pattern area is not jittered. It should be noted that, the preset area ratio threshold may be set by a technician according to actual needs or practical experience, which is not limited by the present invention.
S203, counting the first number of the jittered encoding pattern areas and the second number of the encoding pattern areas as the jittered detection result.
In this embodiment, the first number is the number of encoding pattern areas where the jitter detection result is jitter; the second number is the total number of coding pattern areas.
S204, determining a jitter-blur detection result of the target microcosmic coded image according to the first quantity and the second quantity.
Specifically, determining a quantity ratio between the first quantity and the second quantity; if the quantity ratio is greater than or equal to a preset quantity ratio threshold, determining that the shake blur detection result of the target microcosmic coded image is clear; if the quantity ratio is smaller than a preset quantity ratio threshold, determining that the jitter-blur detection result of the target microcosmic coded image is jitter-blur. It should be noted that the preset quantity ratio threshold may be set by a technician according to actual needs or practical experience, which is not limited by the present invention.
Alternatively, fig. 2B is a schematic diagram of an circumscribed area of the coding pattern area. As shown in fig. 2B, the target microcoded image is a microcoded image composed of black code points and a white background; the circular areas in the figure are circumscribed areas of the coding pattern; the pattern area formed by the black coding points in the circular area is a coding pattern area; the coding pattern area corresponding to the red round area is a coding pattern area with jitter detection result being jitter; the coding pattern area corresponding to the green circular area is a coding pattern area where the jitter detection result is not jittered.
S205, performing out-of-focus blur detection on the target microcosmic coded image according to each external connection area and the background area to obtain an out-of-focus blur detection result.
S206, determining a fuzzy detection result of the target microcosmic coded image according to the jitter fuzzy detection result and the defocus fuzzy detection result.
According to the embodiment of the invention, for each coding pattern region, a jitter detection result of the coding pattern region is determined according to the area of the coding pattern region and the area of an external connection region of the coding pattern region; counting the first number of the coding pattern areas and the second number of the coding pattern areas, wherein the jitter detection result is jitter; according to the first quantity and the second quantity, a shake blur detection result of the target microcosmic coded image is determined, and accurate detection of shake blur of the target microcosmic coded image is achieved; the jitter-blur detection result is determined by the area and the number of the jittered encoding pattern areas, so that the data calculation amount required for determining the jitter-blur detection result is reduced, and the efficiency of determining the jitter-blur detection result is improved.
Example III
Fig. 3 is a flowchart of an image blur detection method according to a third embodiment of the present invention, where the determining operation of the defocus blur detection result is optimized and improved based on the technical solution of the foregoing embodiment.
Further, performing defocus blur detection on the target microcosmic coded image according to each circumscribed area and the background area to obtain defocus blur detection results, wherein the defocus blur detection results are thinned into pixel difference values between the circumscribed area and the background area according to pixel values of pixel points in the circumscribed area and pixel values of pixel points in the background area for each circumscribed area; and determining the defocus blur detection result of the target microcosmic coded image according to the pixel difference value between each external connection area and the background area so as to perfect the determining operation of the defocus blur detection result.
In the embodiments of the present invention, the details are not described, and reference may be made to the description of the foregoing embodiments.
Referring to the blur detection method of the image shown in fig. 3, the blur detection method includes:
S301, identifying at least one coding pattern area in the target microcosmic coding image, and determining the circumscribed area and the background area of each coding pattern area.
S302, performing shake blur detection on the target microcosmic coded image according to each coding pattern area and the circumscribed area of each coding pattern area to obtain a shake blur detection result.
S303, for each circumscribed area, determining a pixel difference value between the circumscribed area and the background area according to the pixel value of the pixel point in the circumscribed area and the pixel value of the pixel point in the background area.
Specifically, a certain algorithm is adopted, and a pixel difference value between the circumscribed area and the background area is determined according to the pixel value of the pixel point in the circumscribed area and the pixel value of the pixel point in the background area.
Optionally, determining the pixel difference between the circumscribed area and the background area according to the pixel value of the pixel point in the circumscribed area and the pixel value of the pixel point in the background area of the target microcosmic coded image includes: determining a difference value between a pixel value of a central pixel point of the external connection region and a pixel mean value of each pixel point in a background region of the target microcosmic coding image; the difference is determined as the pixel difference between the circumscribed area and the background area.
It can be appreciated that by adopting the above technical scheme, the difference between the pixel value of the central pixel point of the external connection region and the pixel mean value of each pixel point in the background region of the target microcosmic coded image is determined as the pixel difference between the external connection region and the background region, so that the data calculation amount in the process of determining the pixel difference is reduced, and the efficiency of determining the pixel difference is improved.
In an alternative embodiment, if the pixel values of the pixel points in the background area are the same, a difference value between the pixel value of the central pixel point of the external connection area and the pixel value of any pixel point in the background area of the target microcosmic coding image can be determined; the difference is determined as the pixel difference between the circumscribed area and the background area.
S304, determining a defocus blur detection result of the target microcosmic coded image according to pixel difference values between the circumscribed areas and the background areas.
Specifically, determining the average value of pixel difference values between each circumscribed area and the background area; if the determined average value is larger than a preset average value threshold value, determining that the defocus blur detection result of the target microcosmic coded image is clear; if the determined average value is smaller than a preset average value threshold value, determining that the defocus blur detection result of the target microcosmic coded image is blur.
S305, determining a fuzzy detection result of the target microcosmic coded image according to the jitter fuzzy detection result and the defocus fuzzy detection result.
According to the embodiment of the invention, for each external connection region, the pixel difference value between the external connection region and the background region is determined according to the pixel value of the pixel point in the external connection region and the pixel value of the pixel point in the background region; and determining the defocus blur detection result of the target microcosmic coded image according to the pixel difference value between each circumscribed area and the background area. According to the technical scheme, the out-of-focus blur of the target microcosmic coded image is accurately detected; by determining the pixel difference between the external connection area and the background area, the defocus blur detection result is further determined, the data calculation amount required for determining the defocus blur detection result is reduced, and the efficiency of determining the defocus blur detection result is improved.
Example IV
Fig. 4 is a flowchart of a method for detecting blurring of an image according to a fourth embodiment of the present invention, where additional optimization is performed based on the technical solution of the foregoing embodiment.
Further, before the identification of at least one coding pattern area and the circumscribed area of each coding pattern area in the target microcosmic coding image, the original microcosmic coding image is additionally acquired; performing format conversion on the original microcosmic coded image to obtain a converted image; and performing binarization processing on the converted image to obtain a target microcoded image.
In the embodiments of the present invention, the details are not described, and reference may be made to the description of the foregoing embodiments.
Referring to fig. 4, the blur detection method of an image includes:
s401, acquiring an original microcosmic coded image.
In this embodiment, the original microcoded image may be an unprocessed microcoded image directly acquired by the image acquisition device.
S402, performing format conversion on the original microcosmic coded image to obtain a converted image.
In this embodiment, the converted image is an image obtained by performing format conversion on the original microcoded. Specifically, a certain algorithm is adopted to perform format conversion on the original microcosmic coded image, and a converted image is obtained.
Optionally, performing format conversion on the original microcosmic coded image to obtain a converted image, including: converting the original microcosmic coded image into a gray image; carrying out Laplacian transformation on the gray level image to obtain a transformed image; and cutting off pixel values of all pixel points in the converted image to obtain the converted image.
Specifically, converting an original microcosmic coded image into a gray color space to obtain a gray image; carrying out Laplace transformation on the gray level image, and taking the gray level image after the Laplace transformation as a transformation image; for each pixel point in the transformed image, checking whether the pixel value of the pixel point is greater than a first pixel threshold; if the pixel value of the pixel point is larger than the first pixel threshold value, updating the pixel value of the pixel point into the first pixel threshold value; if the pixel value of the pixel point is smaller than or equal to the first pixel threshold value, checking whether the pixel value of the pixel point is smaller than the second pixel threshold value; if the pixel value of the pixel point is smaller than the second pixel threshold value, updating the pixel value of the pixel point into the second pixel threshold value; otherwise, each pixel point in the transformed image is not processed by the pixel value of the pixel point, and then a transformed image is obtained. Wherein the first pixel threshold is greater than the second pixel threshold. It should be noted that, the first pixel threshold value and the second pixel threshold value may be set independently by a technician according to actual requirements and practical experience, which is not limited by the present invention. In a preferred embodiment, the first pixel threshold is 255 and the second pixel threshold is 0.
It can be appreciated that by adopting the above technical scheme, the original micro-coded image is converted into the gray image, and the three-dimensional pixel values of each pixel point in the original micro-coded image are converted into one-dimensional gray values, so that the data size of the original micro-coded image is reduced, the efficiency of identifying the coding pattern area and the external area is improved, and the efficiency of performing defocus blur detection is improved; carrying out Laplacian transformation on the gray level image to obtain a transformed image; the pixel value of each pixel point in the converted image is cut off, so that the contour edge of the coding pattern in the gray image can be enhanced, and the accuracy of identifying the coding pattern area is further improved.
S403, performing binarization processing on the converted image to obtain a target microcoded image.
Specifically, for each pixel point in the converted image, if the pixel value of the pixel point is greater than a preset first pixel threshold value, determining the pixel value of the pixel point as a preset second pixel threshold value; if the pixel value of the pixel point is smaller than the preset first pixel threshold value, determining the pixel value of the pixel point as a preset third pixel threshold value; the preset second pixel threshold value is larger than the preset first pixel threshold value, and the preset first pixel threshold value is larger than the preset third pixel threshold value. In a preferred embodiment, the preset first pixel threshold may be 128, the preset second pixel threshold may be 255, and the preset third pixel threshold may be 0.
S404, identifying at least one coding pattern area in the target microcosmic coding image, and determining the circumscribing area and the background area of each coding pattern area.
S405, performing shake blur detection on the target microcosmic coded image according to each coding pattern area and the circumscribed area of each coding pattern area to obtain a shake blur detection result.
S406, performing out-of-focus blur detection on the target microcosmic coded image according to the external connection areas and the background areas to obtain an out-of-focus blur detection result.
S407, determining a fuzzy detection result of the target microcosmic coded image according to the jitter fuzzy detection result and the defocus fuzzy detection result.
The method comprises the steps of obtaining an original microcosmic coded image; performing format conversion on the original microcosmic coded image to obtain a converted image; the converted image is subjected to binarization processing to obtain a target microcoded image, the original microcoded image can be converted into the target microcoded image in a binary form, the noise influence in the microcoded image and the illumination influence in the shooting process can be reduced, and the definition of the microcoded image is improved; the data volume of the microcosmic coded image can be reduced, and the efficiency of carrying out fuzzy detection on the microcosmic coded image is improved; the contrast between the coding pattern area and the background area in the micro coding image can be enhanced, and the accuracy of identifying the coding pattern area from the target micro coding image is improved.
Example five
Fig. 5 is a schematic structural diagram of an image blur detection device according to a fifth embodiment of the present invention. The embodiment is applicable to the case of performing blur detection on a microcoded image, the device may perform a blur detection method of an image, the blur detection device of the image may be implemented in hardware and/or software, and the device may be configured in an electronic device, for example, in a server.
Referring to the blurring detection device of the image shown in fig. 5, it includes a region recognition module 501, a shake blurring detection module 502, a defocus blurring detection module 503, and a detection result determination module 504, wherein,
The region identifying module 501 is configured to identify at least one coding pattern region in the target microcosmic coding image, and determine an circumscribed region and a background region of each coding pattern region;
The shake blur detection module 502 is configured to perform shake blur detection on the target microcosmic encoded image according to each encoding pattern area and the circumscribed area of each encoding pattern area, to obtain a shake blur detection result;
The defocus blur detection module 503 is configured to perform defocus blur detection on the target microcosmic encoded image according to each external area and the background area, to obtain a defocus blur detection result;
the detection result determining module 504 is configured to determine a blur detection result of the target microcosmic encoded image according to the shake blur detection result and the defocus blur detection result.
According to the embodiment of the invention, at least one coding pattern area in the target microcosmic coding image is identified through the area identification module, and the circumscribed area and the background area of each coding pattern area are determined; the method comprises the steps that through a shake blur detection module, shake blur detection is carried out on a target microcosmic coded image according to each coding pattern area and an external area of each coding pattern area, and a shake blur detection result is obtained; carrying out defocus blur detection on the target microcosmic coded image according to each external area and the background area by using a defocus blur detection module to obtain defocus blur detection results; and determining a fuzzy detection result of the target microcosmic coded image according to the jitter fuzzy detection result and the defocus fuzzy detection result through a detection result determination module. According to the technical scheme, through identifying each coding pattern area, each external connection area and a background area in the target microcosmic coding image, shake blur detection and defocus blur detection are respectively carried out on the target microcosmic coding image; and comprehensively determining whether the target microcosmic coded image is blurred according to the shake blur detection result and the defocus blur detection result of the target microcosmic coded image, thereby improving the accuracy of blur detection.
Wherein the detection result determining module 504 includes:
The first result determining unit is used for determining that the fuzzy detection result of the target microcosmic coded image is clear if the jittering fuzzy detection result is clear and the defocus fuzzy detection result is clear;
And the second result determining unit is used for determining that the blurring detection result of the target microcosmic coded image is blurring if the target microcosmic coded image is not blurring.
Optionally, the shake blur detection module 502 includes:
a first jitter detection unit configured to determine, for each encoding pattern region, a jitter detection result of the encoding pattern region according to an area of the encoding pattern region and an area of an circumscribed region of the encoding pattern region;
a number determination unit for counting a first number of encoding pattern areas whose shake detection result is shake, and a second number of encoding pattern areas;
and the second jitter detection unit is used for determining a jitter-blur detection result of the target microcosmic coded image according to the first quantity and the second quantity.
Optionally, the defocus blur detection module 503 includes:
The pixel difference value determining unit is used for determining the pixel difference value between the external connection area and the background area according to the pixel value of the pixel point in the external connection area and the pixel value of the pixel point in the background area for each external connection area;
and the defocus blur detection unit is used for determining a defocus blur detection result of the target microcosmic coded image according to the pixel difference value between each external connection area and the background area.
Optionally, the pixel difference determining unit is specifically configured to:
Determining a difference value between a pixel value of a central pixel point of the external connection region and a pixel mean value of each pixel point in a background region of the target microcosmic coding image;
The difference is determined as the pixel difference between the circumscribed area and the background area.
Optionally, the apparatus further comprises:
The image acquisition module is used for acquiring an original microcosmic coded image;
the image conversion module is used for carrying out format conversion on the original microcosmic coded image to obtain a converted image;
and the image processing module is used for carrying out binarization processing on the converted image to obtain a target microcosmic coded image.
Optionally, the image conversion module includes:
a gray conversion unit for converting the original microcosmic coded image into a gray image;
the image transformation unit is used for carrying out Laplace transformation on the gray level image to obtain a transformed image;
and the pixel truncation unit is used for truncating the pixel value of each pixel point in the converted image to obtain the converted image.
The image blurring detection device provided by the embodiment of the invention can execute the image blurring detection method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of executing the image blurring detection method.
Example six
Fig. 6 shows a schematic diagram of an electronic device 600 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 6, the electronic device 600 includes at least one processor 601, and a memory, such as a Read Only Memory (ROM) 602, a Random Access Memory (RAM) 603, etc., communicatively connected to the at least one processor 601, in which the memory stores a computer program executable by the at least one processor, and the processor 601 may perform various suitable actions and processes according to the computer program stored in the Read Only Memory (ROM) 602 or the computer program loaded from the storage unit 608 into the Random Access Memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 can also be stored. The processor 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
A number of components in the electronic device 600 are connected to the I/O interface 605, including: an input unit 606 such as a keyboard, mouse, etc.; an output unit 607 such as various types of displays, speakers, and the like; a storage unit 608, such as a magnetic disk, optical disk, or the like; and a communication unit 609 such as a network card, modem, wireless communication transceiver, etc. The communication unit 609 allows the electronic device 600 to exchange information/data with other devices through a computer network, such as the internet, and/or various telecommunication networks.
The processor 601 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 601 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 601 performs the various methods and processes described above, such as a blur detection method of an image.
In some embodiments, the blur detection method of an image may be implemented as a computer program, which is tangibly embodied on a computer-readable storage medium, such as the storage unit 608. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 600 via the ROM 602 and/or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the processor 601, one or more steps of the blur detection method of an image described above may be performed. Alternatively, in other embodiments, the processor 601 may be configured to perform the blur detection method of the image in any other suitable way (e.g., by means of firmware).
Various implementations of the systems and techniques described here above can be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), complex Programmable Logic Devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable image blur detection device, such that the computer programs, when executed by the processor, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so as to solve the defects of high management difficulty and weak service expansibility in the traditional physical host and Virtual private server (VPS PRIVATE SERVER) service.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. A method for blur detection of an image, the method comprising:
Identifying at least one coding pattern area in the target microcosmic coding image, and determining the circumscribed area and the background area of each coding pattern area;
according to each coding pattern region and the external connection region of each coding pattern region, performing shake blur detection on the target microcosmic coding image to obtain a shake blur detection result;
Performing defocus blur detection on the target microcosmic coded image according to the external connection areas and the background areas to obtain defocus blur detection results;
and determining a blurring detection result of the target microcosmic coded image according to the blurring detection result and the defocus blurring detection result.
2. The method of claim 1, wherein the determining the blur detection result of the target microcoded image based on the shake blur detection result and the defocus blur detection result comprises:
if the shake blur detection result is clear and the defocus blur detection result is clear, determining that the blur detection result of the target microcosmic coded image is clear;
Otherwise, determining the blurring detection result of the target microcosmic coded image as blurring.
3. The method according to claim 1, wherein the performing the shake blur detection on the target microcosmic encoded image according to each of the encoding pattern regions and the circumscribed region of each of the encoding pattern regions to obtain a shake blur detection result includes:
Determining a jitter detection result of each coding pattern region according to the area of the coding pattern region and the area of an external connection region of the coding pattern region;
counting a first number of coding pattern areas and a second number of coding pattern areas, wherein the dithering detection result is dithering;
And determining a jitter-blur detection result of the target microcosmic coded image according to the first quantity and the second quantity.
4. The method according to claim 1, wherein the performing defocus blur detection on the target microcoded image according to each of the circumscribed region and the background region to obtain defocus blur detection results includes:
determining a pixel difference value between the circumscribed area and the background area according to the pixel value of the pixel point in the circumscribed area and the pixel value of the pixel point in the background area for each circumscribed area;
and determining the defocus blur detection result of the target microcosmic coded image according to the pixel difference value between each circumscribed area and the background area.
5. A method according to claim 3, wherein said determining a pixel difference between said circumscribed area and said background area based on pixel values of pixel points in said circumscribed area and pixel values of pixel points in a background area of said target microcoded image comprises:
Determining a difference value between a pixel value of a central pixel point of the circumscribed area and a pixel average value of each pixel point in a background area of the target microcosmic coding image;
the difference is determined as a pixel difference between the circumscribed area and the background area.
6. The method of any of claims 1-5, further comprising, prior to identifying at least one coding pattern region in the target microcoded image and circumscribed regions of each of the coding pattern regions:
acquiring an original microcosmic coded image;
Performing format conversion on the original microcosmic coded image to obtain a converted image;
And performing binarization processing on the converted image to obtain a target microcoded image.
7. The method of claim 6, wherein said format converting said original microcoded image to a converted image comprises:
converting the original microcosmic coded image into a gray scale image;
Carrying out Laplacian transformation on the gray level image to obtain a transformed image;
And cutting off pixel values of all pixel points in the transformed image to obtain a transformed image.
8. An image blur recognition device, the device comprising:
The region identification module is used for identifying at least one coding pattern region in the target microcosmic coding image and determining the circumscribed region and the background region of each coding pattern region;
The shake blur detection module is used for performing shake blur detection on the target microcosmic coded image according to each coding pattern area and the external area of each coding pattern area to obtain a shake blur detection result;
The defocus blur detection module is used for performing defocus blur detection on the target microcosmic coded image according to the external connection region and the background region to obtain defocus blur detection results;
And the detection result determining module is used for determining the fuzzy detection result of the target microcosmic coded image according to the jitter fuzzy detection result and the defocus fuzzy detection result.
9. An electronic device, the electronic device comprising:
at least one processor; and
A memory communicatively coupled to the at least one processor; wherein,
The memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the blur detection method of an image according to any one of claims 1-7.
10. A computer readable storage medium storing computer instructions for causing a processor to perform the blur detection method of an image according to any one of claims 1-7.
CN202410544219.1A 2024-05-06 2024-05-06 Image blurring detection method, device, equipment and medium Active CN118135381B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410544219.1A CN118135381B (en) 2024-05-06 2024-05-06 Image blurring detection method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410544219.1A CN118135381B (en) 2024-05-06 2024-05-06 Image blurring detection method, device, equipment and medium

Publications (2)

Publication Number Publication Date
CN118135381A true CN118135381A (en) 2024-06-04
CN118135381B CN118135381B (en) 2024-07-02

Family

ID=91232713

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410544219.1A Active CN118135381B (en) 2024-05-06 2024-05-06 Image blurring detection method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN118135381B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023094870A1 (en) * 2021-11-29 2023-06-01 Weta Digital Limited Increasing dynamic range of a virtual production display
CN117975360A (en) * 2024-01-26 2024-05-03 湖北省楚建易网络科技有限公司 Deep learning-based stacked object distinguishing method and system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023094870A1 (en) * 2021-11-29 2023-06-01 Weta Digital Limited Increasing dynamic range of a virtual production display
CN117975360A (en) * 2024-01-26 2024-05-03 湖北省楚建易网络科技有限公司 Deep learning-based stacked object distinguishing method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王萍;: "基于局部失焦模糊的拼接图像盲检测研究", 软件工程, no. 02, 5 February 2017 (2017-02-05), pages 16 - 18 *

Also Published As

Publication number Publication date
CN118135381B (en) 2024-07-02

Similar Documents

Publication Publication Date Title
CN110008809B (en) Method and device for acquiring form data and server
CN112949767B (en) Sample image increment, image detection model training and image detection method
CN112488060B (en) Target detection method, device, equipment and medium
CN113643260A (en) Method, apparatus, device, medium and product for detecting image quality
CN116559177A (en) Defect detection method, device, equipment and storage medium
CN116703925B (en) Bearing defect detection method and device, electronic equipment and storage medium
CN112785650B (en) Camera parameter calibration method and device
CN115205163B (en) Method, device and equipment for processing identification image and storage medium
CN118135381B (en) Image blurring detection method, device, equipment and medium
CN116208853A (en) Focusing angle determining method, device, equipment and storage medium
CN115019057A (en) Image feature extraction model determining method and device and image identification method and device
CN114581711A (en) Target object detection method, apparatus, device, storage medium, and program product
CN115965776A (en) SFR (Small form-factor rating) graph card identification method and device, electronic equipment and storage medium
CN113628192A (en) Image blur detection method, device, apparatus, storage medium, and program product
CN113344064A (en) Event processing method and device
CN114219744B (en) Image generation method, device, equipment and storage medium
CN117275006A (en) Image processing method and device, electronic equipment and storage medium
CN114581890B (en) Method and device for determining lane line, electronic equipment and storage medium
CN113643266B (en) Image detection method and device and electronic equipment
CN114708592B (en) Seal security level judging method, device, equipment and computer readable storage medium
CN117557777A (en) Sample image determining method and device, electronic equipment and storage medium
CN117725614A (en) License plate desensitizing method and device, electronic equipment and storage medium
CN117456157A (en) Electronic signature method and device and electronic equipment
CN114037865A (en) Image processing method, apparatus, device, storage medium, and program product
CN117541552A (en) Image processing method, device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant