CN117437178A - Image definition measuring method and device - Google Patents

Image definition measuring method and device Download PDF

Info

Publication number
CN117437178A
CN117437178A CN202311227789.XA CN202311227789A CN117437178A CN 117437178 A CN117437178 A CN 117437178A CN 202311227789 A CN202311227789 A CN 202311227789A CN 117437178 A CN117437178 A CN 117437178A
Authority
CN
China
Prior art keywords
image
gray
definition
evaluated
value
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.)
Pending
Application number
CN202311227789.XA
Other languages
Chinese (zh)
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.)
Bank of China Ltd
Original Assignee
Bank of China 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 Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202311227789.XA priority Critical patent/CN117437178A/en
Publication of CN117437178A publication Critical patent/CN117437178A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30168Image quality inspection

Landscapes

  • Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)

Abstract

The application relates to an image definition measuring method and device, wherein the method comprises the following steps: the method comprises the steps of carrying out gray processing on an image to be evaluated to obtain a first gray image, obtaining the definition of the image to be evaluated according to gray values corresponding to pixel points in the first gray image, comparing a definition standard value with the definition of the image to be evaluated, and obtaining a definition measurement result of the image to be evaluated; the method can ensure the accuracy of acquiring the definition and simultaneously realize the quick acquisition of the definition measurement result, and balance the contradiction between the accuracy and the calculated amount.

Description

Image definition measuring method and device
Technical Field
The present disclosure relates to the field of image analysis technologies, and in particular, to a method and an apparatus for measuring image sharpness.
Background
In the financial industry, for example, in the scene of proving materials such as uploading a certificate, the definition of the image is often required to a certain extent.
However, in the existing sharpness measurement method, the accuracy and the calculation amount are contradictory, the higher the accuracy is, the smaller the error is, but the larger the calculation amount is, the more time is consumed, the smaller the calculation amount is, the less time is consumed, and the lower the accuracy is, the larger the error is. In practical application, there is a problem that it is difficult to balance the contradiction between the precision and the calculated amount because the precision and the calculated amount are required.
Disclosure of Invention
In view of the above, it is necessary to provide an image sharpness measuring method and apparatus capable of balancing the contradiction between accuracy and calculation amount.
In a first aspect, the present application provides an image sharpness measurement method, the method comprising:
carrying out gray scale processing on the image to be evaluated to obtain a first gray scale image;
sequentially obtaining gray values corresponding to all pixel points in a first gray image;
obtaining the definition of the image to be evaluated according to the gray value corresponding to each pixel point in the first gray image;
comparing the definition standard value with the definition of the image to be evaluated to obtain a definition measurement result of the image to be evaluated.
In one embodiment, obtaining the sharpness of the image to be evaluated according to the gray value corresponding to each pixel point in the first gray image includes:
acquiring a gray variance value of the first gray image based on gray values corresponding to pixel points in the first gray image;
and taking the gray variance value of the first gray image as the definition of the image to be evaluated.
In one embodiment, the method further comprises:
gray processing is carried out on the plurality of candidate images, and corresponding second gray images are obtained;
sequentially obtaining gray values corresponding to pixel points in each second gray image;
obtaining the definition of the alternative image according to the gray value corresponding to each pixel point in the second gray image;
based on the screening criteria, the sharpness of the corresponding candidate image is identified as a sharpness standard value.
In one embodiment, obtaining the sharpness of the candidate image according to the gray value corresponding to each pixel point in the second gray image includes:
acquiring a gray variance value of the second gray image based on the gray value corresponding to each pixel point in the second gray image;
and taking the gray variance value of the second gray image as the definition of the image to be evaluated.
In one embodiment, identifying the sharpness of the corresponding candidate image as a sharpness standard value based on the screening criteria includes:
determining a standard image from the candidate images according to the screening standard;
the minimum value in the definition of the standard image is determined as a definition standard value.
In one embodiment, the gray variance value is obtained based on the following equation:
D(f)=∑ yx (|f(x,y)-f(x,y-1)|+|f(x,y)-f(x+1,y)|) 2
wherein D (f) is a gray variance value; f (x, y) is a gray value corresponding to the pixel point (x, y).
In one embodiment, the sharpness metric includes a valid metric and an invalid metric; comparing the definition standard value with the definition of the image to be evaluated to obtain a definition measurement result of the image to be evaluated, wherein the definition measurement result comprises the following steps:
taking an image corresponding to the image to be evaluated with the definition exceeding the definition standard value as an effective measurement result;
and taking the image of which the definition of the image to be evaluated does not exceed the definition standard value as an invalid measurement result.
In a second aspect, the present application further provides an image sharpness measurement apparatus, the apparatus comprising:
the preprocessing module is used for carrying out gray processing on the image to be evaluated to obtain a first gray image;
the gray level calculation module is used for sequentially acquiring gray level values corresponding to all pixel points in the first gray level image;
the definition acquisition module is used for acquiring the definition of the image to be evaluated according to the gray values corresponding to the pixel points in the first gray image;
and the result generation module is used for comparing the definition standard value with the definition of the image to be evaluated to obtain a definition measurement result of the image to be evaluated.
In a third aspect, the present application also provides a computer device comprising a memory storing a computer program and a processor implementing the steps of the method described above when the processor executes the computer program.
In a fourth aspect, the present application also provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the above-described method.
According to the image definition measuring method and device, the first gray level image is obtained through gray level processing of the image to be evaluated, definition of the image to be evaluated is obtained according to gray level values corresponding to all pixel points in the obtained first gray level image, and definition measuring results of the image to be evaluated are obtained by comparing definition standard values with definition of the image to be evaluated; according to the method and the device, the definition can be obtained according to the gray value corresponding to each pixel point, the definition and the definition standard value are compared, the definition measurement result is obtained, the accuracy of obtaining the definition is guaranteed, meanwhile, the rapid obtaining of the definition measurement result is realized, and the contradiction between the accuracy and the calculated amount is balanced.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the related art, the drawings that are required to be used in the embodiments or the related technical descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to the drawings without inventive effort for a person having ordinary skill in the art.
FIG. 1 is a flow chart of an image sharpness metric method according to one embodiment;
FIG. 2 is a flow chart of determining a sharpness criterion value in one embodiment;
FIG. 3 is a schematic illustration of a portion of an alternative image in one embodiment;
FIG. 4 is a graph showing the sharpness corresponding to a portion of an alternative image in one embodiment;
FIG. 5 is a block diagram of an image sharpness metric arrangement in one embodiment;
FIG. 6 is an internal block diagram of a computer device in one embodiment;
fig. 7 is an internal structural view of a computer device in another embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of the present application only and is not intended to be limiting of the present application.
It should be appreciated that terms such as "first," "second," and the like in this application are used merely to distinguish similar objects and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. The "connection" in the embodiments of the present application refers to various connection manners such as direct connection or indirect connection, so as to implement communication between devices, which is not limited in any way in the embodiments of the present application.
It is understood that "at least one" means one or more and "a plurality" means two or more.
As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," and/or the like, specify the presence of stated features, integers, steps, operations, elements, components, or groups thereof, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, or groups thereof. Also, the term "and/or" as used in this specification includes any and all combinations of the associated listed items.
With the rapid development of the information age, images as a high-quality information carrier are becoming more and more widely used in daily life, and many problems are accompanying. How to screen out useful information in a plurality of images. In this respect, sharpness is an important parameter, and in general, the clearer the image, the more obvious the information contained. In the financial industry, the most common application scenario is uploading evidence materials such as evidence, and in these scenarios, there is a certain requirement on the definition of the image, and at this time, a method capable of describing or quantifying the definition of the image is needed to determine whether the definition of the uploaded image meets the requirement.
The existing definition measurement method has the defects of large calculated amount, higher precision, small calculated amount and low precision, and is not good in the processing process, for example, gray variance product functions are used for obtaining results by multiplying lateral and longitudinal variances, the calculated amount and the precision are combined to a certain extent, and certain defects still exist in the precision.
In addition, most of the existing methods still have certain defects in accuracy near the sharpness peak, and the distinction near the peak is not obvious, however, in the actual practice process, the near the peak is the most focused point, and the closer to the peak, the more obvious distinction is required.
The image definition measuring method provided by the embodiment of the application can be applied to a terminal or a server, and the server is taken as an example for explanation. The server can perform gray processing on the image to be evaluated to obtain a first gray image, sequentially obtain gray values corresponding to all pixel points in the first gray image, obtain the definition of the image to be evaluated according to the gray values corresponding to all pixel points in the first gray image, and compare the definition standard value with the definition of the image to be evaluated to obtain a definition measurement result of the image to be evaluated; it should be noted that the terminal may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, bank cabinets, internet of things devices and portable wearable devices, and the internet of things devices may be smart speakers, smart televisions, smart air conditioners, smart vehicle devices, and the like. The portable wearable device may be a smart watch, smart bracelet, headset, or the like. The server may be implemented as a stand-alone server or a server cluster composed of a plurality of servers, and the server may refer to a server provided in a banking system.
In one exemplary embodiment, as shown in fig. 1, there is provided an image sharpness metric method, the method comprising:
s102, carrying out gray scale processing on the image to be evaluated to obtain a first gray scale image.
The image to be evaluated may be set according to actual situations, which is not limited in the embodiment of the present application.
Specifically, the image to be evaluated can be subjected to gray processing to obtain the first gray image, wherein the sharpness of the image does not need to pay attention to the problem in terms of color, and after the image is converted into the gray image, the calculated amount can be greatly reduced, and the calculation time is shortened.
For example, the gradation processing may refer to converting an image of an RGB channel of an image to be evaluated into a gradation image.
It should be noted that the first gray-scale image may refer to a monochrome image having a 256-level gray-scale gamut from black to white, which has only one channel, instead of the three channels of RGB of a general color image.
S104, sequentially acquiring gray values corresponding to all pixel points in the first gray image.
Specifically, values of all pixel points in the first gray image can be traversed, and gray values corresponding to all pixel points in the first gray image are obtained.
It should be noted that, the gray value may refer to a brightness value of each pixel in the image, and is generally an integer of 0-255.
S106, obtaining the definition of the image to be evaluated according to the gray value corresponding to each pixel point in the first gray image.
Specifically, the quantized sharpness may be obtained according to the gray value corresponding to each pixel point in the first gray image.
In one embodiment, obtaining the sharpness of the image to be evaluated according to the gray value corresponding to each pixel point in the first gray image includes:
acquiring a gray variance value of the first gray image based on gray values corresponding to pixel points in the first gray image;
and taking the gray variance value of the first gray image as the definition of the image to be evaluated.
The gray variance value may refer to a sum of squares of differences between gray values of all pixels of the image and gray values of average pixels.
Specifically, the gray variance value of the first gray image can be obtained based on the gray value corresponding to each pixel point in the first gray image, the obtained gray variance value can be used as the definition of the image to be evaluated, and the accuracy of obtaining the definition is ensured and meanwhile the rapid definition obtaining is realized.
Illustratively, the gray variance value can be determined through an image processing function, and the image definition is quantitatively evaluated according to the gray variance value, so that a clearer image can be conveniently screened out in the image processing process.
It should be noted that the gray variance value may be used to reflect the sharpness of an image, and is specifically based on the principle that if the sharpness of an image is higher, the brightness change of the image is more obvious, so that the image variance value is larger, and conversely, the image variance value is smaller, and the image variance value is smaller.
In the embodiment of the application, the gray variance value of the first gray image is obtained based on the gray value corresponding to each pixel point in the first gray image, and is determined to be the definition of the image to be evaluated, so that the clearer image is conveniently screened out in the image processing process, and the definition is rapidly obtained while the accuracy of the definition is ensured.
In one embodiment, the gray variance value is obtained based on the following equation:
D(f)=Σ yx (|f(x,y)-f(x,y-1)|+|f(x,y)-f(x+1,y)|) 2
wherein D (f) is a gray variance value; f (x, y) is a gray value corresponding to the pixel point (x, y).
Specifically, under the condition of no reference image, an image processing function can be designed, as shown in the above formula, so as to obtain the gray variance value of the image, and the gray variance value is determined to be definition, and the higher the gray variance value is, the clearer the image is, so that the definition of the image is quantitatively evaluated, and further, in the image processing process, the clearer image is conveniently screened out.
Illustratively, the above equation for obtaining the gray variance value can improve the accuracy near the peak value of the sharpness by taking the difference and the square, reduce the burden on the calculation amount as much as possible, and improve the sensitivity to the variation near the peak value while improving the sharpness of the quantization.
In the embodiment of the application, the gray variance value of the whole image is calculated by designing the formula for obtaining the gray variance value and traversing the gray value of the image, so that the definition is determined, the definition precision is improved, and the calculated amount is reduced.
S108, comparing the definition standard value with the definition of the image to be evaluated to obtain a definition measurement result of the image to be evaluated.
Specifically, the definition measurement result of the image to be evaluated can be obtained according to the comparison result by comparing the definition standard value with the definition of the image to be evaluated.
In one embodiment, as shown in fig. 2, the method further comprises:
s202, gray scale processing is carried out on the plurality of candidate images, and corresponding second gray scale images are obtained.
The number of the candidate images and the number of the candidate images may be set according to actual situations, which is not limited in the embodiment of the present application.
Specifically, the manner of performing the gray scale processing on the plurality of candidate images is the same as the manner of performing the gray scale processing on the image to be evaluated, which is not described herein.
S204, sequentially acquiring gray values corresponding to the pixel points in each second gray image.
Specifically, values of all pixel points in the second gray level image can be traversed, and gray level values corresponding to all pixel points in the second gray level image are obtained.
S206, obtaining the definition of the alternative image according to the gray value corresponding to each pixel point in the second gray image.
Specifically, the definition of the plurality of candidate images may be obtained according to the gray value corresponding to each pixel point in the second gray image.
In one embodiment, obtaining the sharpness of the candidate image according to the gray value corresponding to each pixel point in the second gray image includes:
acquiring a gray variance value of the second gray image based on the gray value corresponding to each pixel point in the second gray image;
and taking the gray variance value of the second gray image as the definition of the image to be evaluated.
Specifically, the gray variance value of the second gray image can be obtained based on the gray value corresponding to each pixel point in the second gray image, and the obtained gray variance value can be used as the definition of the alternative image, so that the definition can be obtained quickly while the definition accuracy is ensured.
Illustratively, the gray variance value may be determined by an image processing function, and the image sharpness may be quantitatively evaluated according to the gray variance value, where the gray variance value of the second gray image may be determined according to the above equation for obtaining the gray variance value.
According to the method and the device, the gray variance value of the second gray image is obtained based on the gray value corresponding to each pixel point in the second gray image and is determined to be the definition of the alternative image, and further the definition standard value is conveniently and subsequently determined in the image processing process.
And S208, confirming the definition of the corresponding alternative image as a definition standard value based on the screening standard.
The screening criteria may be set according to actual situations, and are not limited in the embodiments of the present application.
Specifically, the sharpness of the corresponding candidate image passing the screening criteria may be confirmed as a sharpness standard value.
In one embodiment, identifying the sharpness of the corresponding candidate image as a sharpness standard value based on the screening criteria includes:
determining a standard image from the candidate images according to the screening standard;
the minimum value in the definition of the standard image is determined as a definition standard value.
Specifically, an alternative image that passes the screening criteria may be determined as a standard image, and the sharpness of each standard image may be compared, and the minimum value in the sharpness of the standard image may be determined as a sharpness standard value.
For example, a more suitable reference value can be obtained by respectively performing sharpness calculation on a plurality of alternative images according to a screening standard, and the value is used as a standard (sharpness standard value) for measuring whether the sharpness of the uploaded image meets the requirement.
In the embodiment of the application, the minimum definition value in the standard image passing through the screening standard is determined as the definition standard value, so that in the image processing process, the minimum requirement for measuring the definition of the uploaded image (the image to be evaluated) is provided, the accuracy of the definition is improved, and the calculated amount is reduced.
For the convenience of understanding of those skilled in the art, the following description will explain the definition standard value determination process in conjunction with a specific example:
as shown in fig. 3, a part of the candidate images are exemplarily shown in fig. 3, the sharpness of each candidate image may be determined using the above equation for obtaining the gray variance value, as shown in fig. 4, the ordinate in fig. 4 may be represented as an evaluation function value, that is, the gray variance value, and the abscissa in fig. 4 may be represented as a number corresponding to each candidate image, a standard image may be determined from the candidate images according to a screening standard, and a minimum value in the sharpness of the standard image may be determined as a sharpness standard value.
In one embodiment, the sharpness metric includes a valid metric and an invalid metric; comparing the definition standard value with the definition of the image to be evaluated to obtain a definition measurement result of the image to be evaluated, wherein the definition measurement result comprises the following steps:
taking an image corresponding to the image to be evaluated with the definition exceeding the definition standard value as an effective measurement result;
and taking the image of which the definition of the image to be evaluated does not exceed the definition standard value as an invalid measurement result.
Specifically, the valid measurement result may indicate that the image to be evaluated passes the screening of the definition, that is, the definition exceeds the definition standard value, and the subsequent operation may be continued, and the invalid measurement result may indicate that the image to be evaluated fails the screening of the definition, that is, the definition does not exceed the definition standard value, and a new image to be evaluated needs to be uploaded again.
In the embodiment of the application, the definition standard value is compared with the definition of the image to be evaluated, so that whether the definition of the image to be evaluated meets the requirement is judged, proper calculated amount is selected, satisfactory accuracy is provided, and when the image to be evaluated is uploaded by a user, the definition of the image to be evaluated is initially screened, so that follow-up operation is facilitated.
For ease of understanding to those skilled in the art, the image sharpness metric method is described below in connection with one specific example:
step one: obtaining a definition standard value; the step is to process a large number of images (alternative images) to obtain definition values of a plurality of images, and select the lowest definition value meeting the requirements from the definition values as a definition standard value (definition standard value) for comparing with the definition value of the image uploaded by the user (image to be evaluated).
The first step may be a preparation step, in which a suitable standard value (definition standard value) is selected for comparison with the definition value of the image (image to be evaluated) uploaded by the user.
Step two: preprocessing an image; and receiving an image (to-be-evaluated image) input by a user, converting the image (to-be-evaluated image) into a gray image, and then calculating the gray value of the image.
Step three: calculating the definition of the image; after the gray value processed in the last step is received, variance calculation is carried out on each pixel value in the image according to a formula, and the sum is carried out, and finally a numerical value is returned and used for representing definition, and the higher the numerical value is, the clearer the image is. And (3) comparing the value with the definition standard value selected in the first step, if the value is larger than the standard value (definition standard value), the value is expressed as meeting the definition requirement, and if the value is smaller than the standard value (definition standard value), the value is expressed as that the image (the image to be evaluated) is too fuzzy, and the user is prompted to upload the image again.
In the image definition measuring method, definition can be obtained according to the gray value corresponding to each pixel point, definition and definition standard values are compared, a definition measuring result is obtained, accuracy of obtaining definition is guaranteed, meanwhile, the fact that the definition measuring result is obtained rapidly is achieved, and contradiction between accuracy and calculated amount is balanced.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides an image definition measuring device for realizing the above mentioned image definition measuring method. The implementation of the solution provided by the device is similar to that described in the above method, so the specific limitation of the embodiment of the image sharpness measuring device or devices provided below may be referred to as the limitation of the image sharpness measuring method hereinabove, and will not be repeated here.
In one exemplary embodiment, as shown in FIG. 5, an image sharpness metric apparatus 500 is provided, the apparatus 500 comprising:
the preprocessing module 501 is configured to perform gray processing on an image to be evaluated to obtain a first gray image;
the gray level calculating module 502 is configured to sequentially obtain gray level values corresponding to each pixel point in the first gray level image;
a definition obtaining module 503, configured to obtain the definition of the image to be evaluated according to the gray value corresponding to each pixel point in the first gray image;
and the result generating module 504 is configured to compare the sharpness standard value with the sharpness of the image to be evaluated, and obtain a sharpness measurement result of the image to be evaluated.
In one embodiment, the gray level calculating module 502 is further configured to obtain a gray level variance value of the first gray level image based on the gray level values corresponding to the pixels in the first gray level image;
and taking the gray variance value of the first gray image as the definition of the image to be evaluated.
In one embodiment, the apparatus 500 further includes a standard confirmation module, configured to perform gray processing on the plurality of candidate images to obtain corresponding second gray images;
sequentially obtaining gray values corresponding to pixel points in each second gray image;
obtaining the definition of the alternative image according to the gray value corresponding to each pixel point in the second gray image;
based on the screening criteria, the sharpness of the corresponding candidate image is identified as a sharpness standard value.
In one embodiment, the standard confirmation module is further configured to obtain a gray variance value of the second gray image based on a gray value corresponding to each pixel point in the second gray image;
and taking the gray variance value of the second gray image as the definition of the image to be evaluated.
In one embodiment, the standard confirming module is further configured to determine a standard image from the candidate images according to the screening standard;
the minimum value in the definition of the standard image is determined as a definition standard value.
In one embodiment, the gray variance value is obtained based on the following equation:
D(f)=Σ y Σ x (|f(x,y)-f(x,y-1)|+|f(x,y)-f(x+1,y)|) 2
wherein D (f) is a gray variance value; f (x, y) is a gray value corresponding to the pixel point (x, y).
In one embodiment, the sharpness metric includes a valid metric and an invalid metric; the result generating module 504 is further configured to use an image corresponding to the image to be evaluated with the sharpness exceeding the sharpness standard value as an effective measurement result;
and taking the image of which the definition of the image to be evaluated does not exceed the definition standard value as an invalid measurement result.
The various modules in the image sharpness measuring apparatus described above may be implemented in whole or in part by software, hardware, or a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one exemplary embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 6. The computer device includes a processor, a memory, an Input/Output interface (I/O) and a communication interface. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used to store the sharpness criterion values. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement an image sharpness metric method.
In one exemplary embodiment, a computer device is provided, which may be a terminal, and an internal structure diagram thereof may be as shown in fig. 7. The computer device includes a processor, a memory, an input/output interface, a communication interface, a display unit, and an input means. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement an image sharpness metric method. The display unit of the computer device is used for forming a visual picture, wherein the visual picture can be used for displaying the effective measurement result and the ineffective measurement result to prompt a user, and the visual picture can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be a key, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structures shown in fig. 6 and 7 are block diagrams of only some of the structures associated with the present application and are not intended to limit the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one exemplary embodiment, a computer device is provided that includes a memory having a computer program stored therein and a processor that implements the image sharpness metric method described above when the computer program is executed.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor implements the image sharpness metric method described above.
In one embodiment, a computer program product is provided comprising a computer program which, when executed by a processor, implements the image sharpness metric method described above.
It should be noted that, the user information (including but not limited to the image to be evaluated uploaded by the user) and the data (including but not limited to the candidate image for analysis, etc.) related to the application are both information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data are required to meet the related regulations.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the various embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the various embodiments provided herein may include at least one of relational databases and non-relational databases. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic units, quantum computing-based data processing logic units, etc., without being limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples only represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application shall be subject to the appended claims.

Claims (10)

1. A method of image sharpness measurement, the method comprising:
carrying out gray scale processing on the image to be evaluated to obtain a first gray scale image;
sequentially acquiring gray values corresponding to all pixel points in the first gray image;
obtaining the definition of the image to be evaluated according to the gray value corresponding to each pixel point in the first gray image;
comparing the definition standard value with the definition of the image to be evaluated to obtain a definition measurement result of the image to be evaluated.
2. The method according to claim 1, wherein the obtaining the sharpness of the image to be evaluated according to the gray values corresponding to the pixels in the first gray image includes:
acquiring a gray variance value of the first gray image based on gray values corresponding to pixel points in the first gray image;
and taking the gray variance value of the first gray image as the definition of the image to be evaluated.
3. The method according to claim 1, wherein the method further comprises:
gray processing is carried out on the plurality of candidate images, and corresponding second gray images are obtained;
sequentially obtaining gray values corresponding to all pixel points in each second gray image;
obtaining the definition of the alternative image according to the gray value corresponding to each pixel point in the second gray image;
and based on the screening standard, confirming the definition of the corresponding alternative image as the definition standard value.
4. A method according to claim 3, wherein obtaining the sharpness of the candidate image according to the gray value corresponding to each pixel in the second gray image comprises:
acquiring a gray variance value of the second gray image based on gray values corresponding to all pixel points in the second gray image;
and taking the gray variance value of the second gray image as the definition of the image to be evaluated.
5. A method according to claim 3, wherein said identifying the sharpness of the respective candidate image as the sharpness criterion value based on a screening criterion comprises:
determining a standard image from the candidate images according to the screening standard;
and determining the minimum value in the definition of the standard image as the definition standard value.
6. The method according to claim 2 or 4, wherein the gray variance value is obtained based on the following equation:
D(f)=∑ yx (|f(x,y)-f(x,y-1)|+|f(x,y)-f(x+1,y)|) 2
wherein D (f) is a gray variance value; and f (x, y) is a gray value corresponding to the pixel point (x, y).
7. The method of claim 1, wherein the sharpness metric results include valid metric results and invalid metric results; comparing the definition standard value with the definition of the image to be evaluated to obtain a definition measurement result of the image to be evaluated, wherein the definition measurement result comprises the following steps:
taking an image corresponding to the image to be evaluated with the definition exceeding the definition standard value as the effective measurement result;
and taking the image of which the definition of the image to be evaluated does not exceed the definition standard value as the invalid measurement result.
8. An image sharpness metric apparatus, the apparatus comprising:
the preprocessing module is used for carrying out gray processing on the image to be evaluated to obtain a first gray image;
the gray level calculation module is used for sequentially acquiring gray level values corresponding to all pixel points in the first gray level image;
the definition acquisition module is used for acquiring the definition of the image to be evaluated according to the gray value corresponding to each pixel point in the first gray image;
and the result generation module is used for comparing the definition standard value with the definition of the image to be evaluated to obtain a definition measurement result of the image to be evaluated.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 7 when the computer program is executed.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 7.
CN202311227789.XA 2023-09-21 2023-09-21 Image definition measuring method and device Pending CN117437178A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311227789.XA CN117437178A (en) 2023-09-21 2023-09-21 Image definition measuring method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311227789.XA CN117437178A (en) 2023-09-21 2023-09-21 Image definition measuring method and device

Publications (1)

Publication Number Publication Date
CN117437178A true CN117437178A (en) 2024-01-23

Family

ID=89552488

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311227789.XA Pending CN117437178A (en) 2023-09-21 2023-09-21 Image definition measuring method and device

Country Status (1)

Country Link
CN (1) CN117437178A (en)

Similar Documents

Publication Publication Date Title
Li et al. Content-partitioned structural similarity index for image quality assessment
US20130294698A1 (en) Image quality assessment
CN116843566A (en) Tone mapping method, tone mapping device, display device and storage medium
CN117035980A (en) Resource borrowing evaluation method, device, computer equipment and storage medium
CN116012841A (en) Open set image scene matching method and device based on deep learning
CN117437178A (en) Image definition measuring method and device
CN114925153A (en) Service-based geographic information data quality detection method, device and equipment
CN115439384A (en) Ghost-free multi-exposure image fusion method and device
CN114743075A (en) Point cloud model detection method and device, electronic equipment and readable storage medium
CN114764771A (en) Image quality evaluation method, device, equipment, chip and storage medium
CN114549849A (en) Image recognition method and device, computer equipment and storage medium
CN112232125A (en) Key point detection method and key point detection model training method
CN116977154B (en) Visible light image and infrared image fusion storage method, device, equipment and medium
CN117522749B (en) Image correction method, apparatus, computer device, and storage medium
CN116933107B (en) Data distribution boundary determination method, device, computer equipment and storage medium
CN116659520B (en) Matching positioning method, device and equipment based on bionic polarization vision enhancement
CN117379033B (en) Skin pigment detection method, device, computer equipment and storage medium
CN116935767A (en) Accuracy determination method, apparatus and computer readable storage medium for vision system
CN117036209B (en) Image contrast enhancement method, image contrast enhancement device, computer equipment and storage medium
CN118015102A (en) Image processing method, apparatus, electronic device, and computer-readable storage medium
CN116739936A (en) Tone mapping method, tone mapping device, display device and storage medium
CN117541525A (en) Image processing method, apparatus, electronic device, and computer-readable storage medium
CN116739937A (en) Tone mapping method, tone mapping device, display device and storage medium
CN116342242A (en) Abnormality detection method, abnormality detection device, computer device, and storage medium
CN116912348A (en) Pseudo color image generation method, pseudo color image generation device, computer apparatus, 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