CN110458789B - Image definition evaluating method and device and electronic equipment - Google Patents

Image definition evaluating method and device and electronic equipment Download PDF

Info

Publication number
CN110458789B
CN110458789B CN201810411295.XA CN201810411295A CN110458789B CN 110458789 B CN110458789 B CN 110458789B CN 201810411295 A CN201810411295 A CN 201810411295A CN 110458789 B CN110458789 B CN 110458789B
Authority
CN
China
Prior art keywords
image
evaluated
value
initial value
determining
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.)
Active
Application number
CN201810411295.XA
Other languages
Chinese (zh)
Other versions
CN110458789A (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.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital 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 Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Priority to CN201810411295.XA priority Critical patent/CN110458789B/en
Priority to PCT/CN2019/071003 priority patent/WO2019210707A1/en
Publication of CN110458789A publication Critical patent/CN110458789A/en
Application granted granted Critical
Publication of CN110458789B publication Critical patent/CN110458789B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • G06T5/73
    • G06T5/77
    • 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

Abstract

The embodiment of the invention provides an image definition evaluating method, an image definition evaluating device and electronic equipment, wherein the method comprises the following steps: acquiring an image to be evaluated; filtering the image to be evaluated by utilizing low-pass filters with different filter coefficients to obtain filtered images corresponding to the different filter coefficients; determining an intermediate frequency image of the image to be evaluated based on the filtered image corresponding to different filtering coefficients and the image to be evaluated, wherein the intermediate frequency image is as follows: an image containing intermediate frequency information of an image to be evaluated; respectively carrying out transverse analysis and longitudinal analysis on the intermediate frequency image to obtain a transverse definition evaluation initial value and a longitudinal definition evaluation initial value; and determining the definition evaluation result of the image to be evaluated based on the transverse definition evaluation initial value and the longitudinal definition evaluation initial value. So as to evaluate the image with higher definition.

Description

Image definition evaluating method and device and electronic equipment
Technical Field
The invention relates to the technical field of image quality evaluation, in particular to an image definition evaluating method and device and electronic equipment.
Background
The image-pushing function of the image to be evaluated is a common function of an intelligent camera, such as face image pushing, license plate image pushing and the like. For the image-pushing function of the intelligent camera, it is important to push out an image with high image quality, and image definition is one of the indexes for measuring the image quality.
Based on the premise that the edge information of a sharp image after filtering changes greatly compared with the edge information of a blurred image after filtering, the related art performs filtering on the obtained image to change the edge information of the obtained image, and further measures the sharpness of the obtained image based on the variation of the edge information of the obtained image, that is, the variation of high-frequency information in the image, wherein the variation of the edge information may include a gradient amplitude variation or an edge width variation. Specifically, the obtained image is filtered to obtain a filtered image, the obtained image is compared with the filtered image, and the variation of the edge information corresponding to the obtained image is determined; and evaluating the definition of the obtained image by using the variation of the edge information.
However, the variation amounts of the edge information determined by the edges with different sharpness degrees are different, and when the scene of the image obtained by shooting has edges with different sharpness degrees and the proportion is relatively stable, the relatively accurate definition can be determined by calculating the variation amount of the edge information corresponding to the image. However, when the proportion of the edges with different sharpness changes greatly in the scene of the captured image, for example, when the person in the image changes from wearing sunglasses to not wearing sunglasses, it is not accurate to measure the image sharpness through the variation of the edge information corresponding to the image.
Disclosure of Invention
The embodiment of the invention aims to provide an image definition evaluating method, an image definition evaluating device and electronic equipment, so as to evaluate the definition of an image with higher accuracy. The specific technical scheme is as follows:
in one aspect, an embodiment of the present invention provides an image sharpness evaluating method, where the method includes:
acquiring an image to be evaluated;
respectively filtering the image to be evaluated by utilizing low-pass filters configured with different filter coefficients to obtain filtered images corresponding to the different filter coefficients;
determining an intermediate frequency image corresponding to the image to be evaluated based on the obtained filtering images corresponding to different filtering coefficients, wherein the intermediate frequency image is as follows: an image containing intermediate frequency information of the image to be evaluated;
respectively carrying out transverse analysis and longitudinal analysis on the intermediate frequency image to obtain a transverse definition evaluation initial value and a longitudinal definition evaluation initial value;
and determining the definition evaluation result of the image to be evaluated based on the transverse definition evaluation initial value and the longitudinal definition evaluation initial value.
Optionally, the step of obtaining the image to be evaluated includes:
acquiring a color image;
converting the color image into a gray image as the image to be evaluated; or the like, or, alternatively,
acquiring a color image;
selecting a local image of the color image, and converting the local image into a gray image to be used as the image to be evaluated; or the like, or, alternatively,
acquiring a color image;
and converting the color image into a gray image, and selecting a local gray image as the image to be evaluated.
Optionally, the different filter coefficients include a first filter coefficient and a second filter coefficient, the first filter coefficient corresponds to a first filter operator, and the second filter coefficient corresponds to a second filter operator;
the step of respectively filtering the image to be evaluated by using the low-pass filters configured with different filter coefficients to obtain filtered images corresponding to the different filter coefficients comprises the following steps:
filtering the image to be evaluated based on a low-pass filter configured with a first filter operator corresponding to the first filter coefficient to obtain a filtered image corresponding to the first filter coefficient;
and filtering the image to be evaluated based on a low-pass filter configured with a second filter operator corresponding to the second filter coefficient to obtain a filtered image corresponding to the second filter coefficient.
Optionally, the different filter coefficients include a first filter coefficient and a second filter coefficient, wherein the first filter coefficient is smaller than the second filter coefficient;
the step of determining the intermediate frequency image corresponding to the image to be evaluated based on the obtained filtering images corresponding to different filtering coefficients comprises the following steps:
calculating a difference image of the filtering image corresponding to the first filtering coefficient and the filtering image corresponding to the second filtering coefficient, and determining the difference image as a first difference image;
determining a medium-frequency image corresponding to the image to be evaluated based on the first difference image;
alternatively, the first and second electrodes may be,
calculating a difference image of the image to be evaluated and the filtering image corresponding to the first filtering coefficient, and determining the difference image as a second difference image;
calculating a difference image of the image to be evaluated and the filtering image corresponding to the second filtering coefficient, and determining the difference image as a third difference image;
calculating a difference image of the third difference image and the second difference image, and determining the difference image as a fourth difference image;
and determining the intermediate frequency image corresponding to the image to be evaluated based on the fourth difference image.
Optionally, the step of performing horizontal analysis and vertical analysis on the intermediate frequency image respectively to obtain an initial value for horizontal sharpness evaluation and an initial value for vertical sharpness evaluation includes:
traversing each line of pixel points of the intermediate frequency image, and determining the pixel point with the maximum corresponding numerical value from each line of pixel points as a first type of pixel point;
determining the numerical values corresponding to all the determined first-class pixel points as the initial value for evaluating the transverse definition;
traversing each row of pixel points of the intermediate frequency image, and determining the pixel point with the maximum corresponding numerical value from each row of pixel points as a second type of pixel point;
and determining the numerical values corresponding to all the second-class pixel points as the initial value for evaluating the longitudinal definition.
Optionally, the step of determining a sharpness evaluation result of the image to be evaluated based on the lateral sharpness evaluation initial value and the longitudinal sharpness evaluation initial value includes:
calculating the average value of all numerical values serving as positive numbers in the transverse definition evaluation initial value as a first average value;
calculating the average value of all numerical values serving as positive numbers in the longitudinal definition evaluation initial value to serve as a second average value;
and taking the maximum value of the first average value and the second average value as the definition evaluation result of the image to be evaluated.
Optionally, the step of determining a sharpness evaluation result of the image to be evaluated based on the lateral sharpness evaluation initial value and the longitudinal sharpness evaluation initial value includes:
sequencing all numerical values in the transverse definition evaluation initial value in an ascending or descending manner to obtain a first sequence;
screening all numerical values within a preset range from the first sequence; calculating the average value of all the screened numerical values serving as positive numbers to serve as a third average value;
sequencing all numerical values in the longitudinal definition evaluation initial value in an ascending or descending manner to obtain a second sequence;
screening all values within the preset range from the second sequence; calculating the average value of all the screened numerical values serving as positive numbers to serve as a fourth average value;
and taking the maximum value of the third average value and the fourth average value as the definition evaluation result of the image to be evaluated.
Optionally, before the step of determining a sharpness evaluation result of the image to be evaluated based on the transverse sharpness evaluation initial value and the longitudinal sharpness evaluation initial value, the method further includes:
acquiring a brightness component value corresponding to each pixel point in the image to be evaluated;
the step of determining the sharpness evaluation result of the image to be evaluated based on the transverse sharpness evaluation initial value and the longitudinal sharpness evaluation initial value includes:
calculating a quotient of each numerical value in the lateral definition evaluation initial value and a brightness component value corresponding to the numerical value as a first quotient, wherein the brightness component value corresponding to the numerical value is as follows: the brightness component value corresponding to the pixel point corresponding to the numerical value;
calculating a quotient of each numerical value in the longitudinal definition evaluation initial value and a brightness component value corresponding to the numerical value as a second quotient, wherein the brightness component value corresponding to the numerical value is as follows: the brightness component value corresponding to the pixel point corresponding to the numerical value;
and determining the definition evaluation result of the image to be evaluated based on the first quotient and the second quotient.
On the other hand, an embodiment of the present invention provides an image sharpness evaluating apparatus, where the apparatus includes:
the first acquisition module is used for acquiring an image to be evaluated;
the filtering module is used for respectively filtering the image to be evaluated by utilizing low-pass filters configured with different filtering coefficients to obtain filtering images corresponding to the different filtering coefficients;
a first determining module, configured to determine, based on the obtained filtered images corresponding to different filter coefficients, an intermediate-frequency image corresponding to the image to be evaluated, where the intermediate-frequency image is: an image containing intermediate frequency information of the image to be evaluated;
the analysis module is used for respectively carrying out transverse analysis and longitudinal analysis on the intermediate frequency image to obtain a transverse definition evaluation initial value and a longitudinal definition evaluation initial value;
and the second determining module is used for determining the definition evaluation result of the image to be evaluated based on the transverse definition evaluation initial value and the longitudinal definition evaluation initial value.
Optionally, the first obtaining module is specifically configured to
Acquiring a color image;
converting the color image into a gray image as the image to be evaluated; or the like, or, alternatively,
acquiring a color image;
selecting a local image of the color image, and converting the local image into a gray image to be used as the image to be evaluated; or the like, or, alternatively,
acquiring a color image;
and converting the color image into a gray image, and selecting a local gray image as the image to be evaluated.
Optionally, the different filter coefficients include a first filter coefficient and a second filter coefficient, the first filter coefficient corresponds to a first filter operator, and the second filter coefficient corresponds to a second filter operator;
the filtering module is particularly used for
Filtering the image to be evaluated based on a low-pass filter configured with a first filter operator corresponding to the first filter coefficient to obtain a filtered image corresponding to the first filter coefficient;
and filtering the image to be evaluated based on a low-pass filter configured with a second filter operator corresponding to the second filter coefficient to obtain a filtered image corresponding to the second filter coefficient.
Optionally, the different filter coefficients include a first filter coefficient and a second filter coefficient, wherein the first filter coefficient is smaller than the second filter coefficient;
the first determining module is specifically used for
Calculating a difference image of the filtering image corresponding to the first filtering coefficient and the filtering image corresponding to the second filtering coefficient, and determining the difference image as a first difference image;
determining a medium-frequency image corresponding to the image to be evaluated based on the first difference image;
alternatively, the first and second electrodes may be,
calculating a difference image of the image to be evaluated and the filtering image corresponding to the first filtering coefficient, and determining the difference image as a second difference image;
calculating a difference image of the image to be evaluated and the filtering image corresponding to the second filtering coefficient, and determining the difference image as a third difference image;
calculating a difference image of the third difference image and the second difference image, and determining the difference image as a fourth difference image;
and determining the intermediate frequency image corresponding to the image to be evaluated based on the fourth difference image.
Optionally, the analysis module, in particular for
Traversing each line of pixel points of the intermediate frequency image, and determining the pixel point with the maximum corresponding numerical value from each line of pixel points as a first type of pixel point;
determining the numerical values corresponding to all the determined first-class pixel points as the initial value for evaluating the transverse definition;
traversing each row of pixel points of the intermediate frequency image, and determining the pixel point with the maximum corresponding numerical value from each row of pixel points as a second type of pixel point;
and determining the numerical values corresponding to all the second-class pixel points as the initial value for evaluating the longitudinal definition.
Optionally, the second determining module is specifically configured to
Calculating the average value of all numerical values serving as positive numbers in the transverse definition evaluation initial value as a first average value;
calculating the average value of all numerical values serving as positive numbers in the longitudinal definition evaluation initial value to serve as a second average value;
and taking the maximum value of the first average value and the second average value as the definition evaluation result of the image to be evaluated.
Optionally, the second determining module is specifically configured to
Sequencing all numerical values in the transverse definition evaluation initial value in an ascending or descending manner to obtain a first sequence;
screening all numerical values within a preset range from the first sequence; calculating the average value of all the screened numerical values serving as positive numbers to serve as a third average value;
sequencing all numerical values in the longitudinal definition evaluation initial value in an ascending or descending manner to obtain a second sequence;
screening all values within the preset range from the second sequence; calculating the average value of all the screened numerical values serving as positive numbers to serve as a fourth average value;
and taking the maximum value of the third average value and the fourth average value as the definition evaluation result of the image to be evaluated.
Optionally, the apparatus further comprises:
a second obtaining module, configured to obtain a brightness component value corresponding to each pixel point in the image to be evaluated before the step of determining a sharpness evaluation result of the image to be evaluated based on the horizontal sharpness evaluation initial value and the longitudinal sharpness evaluation initial value;
the second determining module is specifically configured to:
calculating a quotient of each numerical value in the lateral definition evaluation initial value and a brightness component value corresponding to the numerical value as a first quotient, wherein the brightness component value corresponding to the numerical value is as follows: the brightness component value corresponding to the pixel point corresponding to the numerical value;
calculating a quotient of each numerical value in the longitudinal definition evaluation initial value and a brightness component value corresponding to the numerical value as a second quotient, wherein the brightness component value corresponding to the numerical value is as follows: the brightness component value corresponding to the pixel point corresponding to the numerical value;
and determining the definition evaluation result of the image to be evaluated based on the first quotient and the second quotient.
On the other hand, the embodiment of the invention provides electronic equipment, which comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus;
a memory for storing a computer program;
the processor is configured to implement any of the above-mentioned image sharpness evaluating method steps provided in the embodiments of the present invention when executing the computer program stored in the memory.
On the other hand, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the image sharpness evaluating method described in any of the above are implemented, which are provided by the embodiment of the present invention.
In the embodiment of the invention, an image to be evaluated is obtained; filtering the image to be evaluated by utilizing low-pass filters with different filter coefficients to obtain filtered images corresponding to the different filter coefficients; determining an intermediate frequency image of the image to be evaluated based on the filtered image corresponding to different filtering coefficients and the image to be evaluated, wherein the intermediate frequency image is as follows: an image containing intermediate frequency information of an image to be evaluated; respectively carrying out transverse analysis and longitudinal analysis on the intermediate frequency image to obtain a transverse definition evaluation initial value and a longitudinal definition evaluation initial value; and determining the definition evaluation result of the image to be evaluated based on the transverse definition evaluation initial value and the longitudinal definition evaluation initial value.
In the embodiment of the invention, the intermediate frequency image containing the intermediate frequency information of the image to be evaluated is utilized to determine the definition evaluation result of the image to be evaluated, so that the problem that the image definition evaluation is not accurate enough due to the fact that the proportion of sharp edges in the image to be evaluated is changed greatly can be solved. The medium-frequency information determines the basic structure of the image relative to the high-frequency information determining the edge and the details of the image, forms the main edge structure of the image, can be used as the second-order strong edge of the image, is less susceptible to noise, and is less affected than the high-frequency information when the proportion of the sharp edge is greatly changed, so that the image can still be evaluated with higher accuracy when the proportion of the sharp edge is greatly changed. In the embodiment of the invention, the definition evaluation result of the image to be evaluated is determined by utilizing the transverse definition evaluation initial value and the longitudinal definition evaluation initial value obtained by transversely analyzing and longitudinally analyzing the intermediate-frequency image, so that the definition evaluation result of the image to be evaluated can be determined more comprehensively based on the information of the image to be evaluated, and the image can be evaluated with higher precision. Of course, it is not necessary for any product or method of practicing the invention to achieve all of the above-described advantages at the same time.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flow chart of an image sharpness evaluation method according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of determining an intermediate frequency image of an image to be evaluated according to an embodiment of the present invention;
FIG. 3 is an exemplary diagram of an image to be evaluated, a second difference image, a third difference image, and an intermediate frequency image;
fig. 4 is a schematic flow chart illustrating a process of determining a sharpness evaluation result of an image to be evaluated according to an embodiment of the present invention;
fig. 5A and 5B are schematic diagrams respectively illustrating sorting of images to be evaluated based on a definition evaluation result of the images to be evaluated;
fig. 6 is a schematic structural diagram of an image sharpness evaluating apparatus according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention provides an image definition evaluating method, an image definition evaluating device and electronic equipment, which are used for evaluating the definition of an image with higher accuracy.
As shown in fig. 1, an embodiment of the present invention provides an image sharpness evaluating method, which may include the following steps:
s101: acquiring an image to be evaluated;
it can be understood that the method for evaluating image sharpness provided by the embodiment of the present invention can be applied to any electronic device that can obtain an image, where the electronic device can be a mobile phone, a computer, a video camera, a still camera, and the like. In the embodiment of the present invention, the functional software for implementing the image sharpness evaluation method provided in the embodiment of the present invention may exist in the form of special client software, or may exist in the form of a plug-in of related client software, which is all possible.
In one implementation, the electronic device may directly obtain the image to be evaluated, where the image to be evaluated is an image including an area of interest, the area of interest may be an area including an object of interest, and the object of interest may be: human faces, license plates, animals, etc. When the image to be evaluated is a gray image, a subsequent image definition evaluation process can be directly executed; when the image to be evaluated is a color image, the image to be evaluated can be converted into a gray image, and then a subsequent image definition evaluation process is executed.
In the embodiment of the present invention, the number of the acquired images to be evaluated may be one or more, and when the number of the acquired images to be evaluated is multiple, the electronic device may execute the image definition evaluation method provided in the embodiment of the present invention for each image to be evaluated.
S102: respectively filtering the images to be evaluated by utilizing low-pass filters configured with different filter coefficients to obtain filtered images corresponding to the different filter coefficients;
in the embodiment of the present invention, the low-pass filter configured with different filter coefficients may be prestored in the storage device local to the electronic device or connected to the electronic device. After the electronic equipment acquires the image to be evaluated, the low-pass filters with different filter coefficients are used for filtering the image to be evaluated respectively to obtain filtered images corresponding to the different filter coefficients.
Different filtering images can be obtained by configuring low-pass filters with different filtering coefficients to filter the image to be evaluated, and the information of the images contained in the different filtering images is different. For example: the filtered image may only contain the low-frequency information of the image to be evaluated, or the filtered image may contain the low-frequency information and the intermediate-frequency information of the image to be evaluated, or the filtered image may contain the low-frequency information, the intermediate-frequency information and a part of the high-frequency information of the image to be evaluated. The information contained in the resulting filtered image may be controlled by setting the filter coefficients of the low-pass filter.
It will be appreciated that the larger the value of the filter coefficient, the lower the frequency of the signal allowed to pass through the low pass filter of the filter coefficient is configured.
The value range of the filter coefficient of the low-pass filter may be (0, 1). The filter coefficients of the low-pass filter may be set by an operator according to experience. In one implementation, the low pass filter may be a gaussian filter.
In an implementation manner, a filtering operator corresponding to each filter coefficient is pre-stored in a storage device local to the electronic device or connected to the electronic device, and the electronic device may filter the image to be evaluated based on the filtering operator corresponding to each filter coefficient to obtain filtered images corresponding to different filter coefficients.
S103: determining an intermediate frequency image corresponding to the image to be evaluated based on the obtained filtering images corresponding to different filtering coefficients;
wherein, the intermediate frequency image is: an image containing intermediate frequency information of an image to be evaluated.
It will be appreciated that the mid-frequency information of the image determines the basic structure of the image, forming the main edge structure of the image. In the embodiment of the invention, the information contained in the obtained filtered image can be controlled by setting the filter coefficient of the low-pass filter, and further, the electronic equipment can obtain the intermediate-frequency image corresponding to the image to be evaluated based on the filtered image corresponding to different filter coefficients and the image to be evaluated.
In one implementation, the obtained filtered image corresponding to one type of filter coefficient only contains the low-frequency information of the image to be evaluated, and is called a first type of filtered image for convenience of description; the other type of filtered image corresponding to the filter coefficient includes low-frequency information and medium-frequency information of the image to be evaluated, and is referred to as a second type of filtered image for convenience of description. The first type of filtered image may include one or more images, and the second type of filtered image may include one or more images. Specifically, the number of images included in the first type of filtered image may be the same as the number of images included in the second type of filtered image.
At this time, in one case, an image including intermediate frequency information may be obtained by calculating a difference image between the second type of filtered image and the first type of filtered image, that is, by making a difference between the second type of filtered image and the first type of filtered image pixel by pixel, so as to obtain an intermediate frequency image corresponding to the image to be evaluated. In another case, a difference image including high-frequency information and intermediate-frequency information can be obtained by calculating a difference image between the image to be evaluated and the first-type filtered image, and then a difference image including high-frequency information can be obtained by calculating a difference image between the image to be evaluated and the second-type filtered image, and then a difference image between the difference image including high-frequency information and intermediate-frequency information and the difference image including high-frequency information can be calculated, and an image including intermediate-frequency information can be obtained, that is, an intermediate-frequency image corresponding to the image to be evaluated can be obtained.
In one implementation, the corresponding value of each pixel point in the intermediate frequency image is greater than or equal to 0. For example, when calculating a difference image between the second type of filtered image and the first type of filtered image, when the calculated difference corresponding to the pixel point is a negative number, the difference corresponding to the pixel point needs to be modified to 0, and when the calculated difference corresponding to the pixel point is 0 or a positive number, the difference corresponding to the pixel point is retained, so as to obtain an intermediate frequency image corresponding to the image to be evaluated.
S104: respectively carrying out transverse analysis and longitudinal analysis on the intermediate frequency image to obtain a transverse definition evaluation initial value and a longitudinal definition evaluation initial value;
respectively carrying out transverse analysis and longitudinal analysis on the intermediate-frequency image, namely respectively analyzing each row of pixel points in the intermediate-frequency image to obtain a transverse definition evaluation initial value; and analyzing each row of pixel points in the intermediate frequency image to obtain a longitudinal definition evaluation initial value.
In one case, the process of analyzing each row of pixel points in the intermediate frequency image to obtain the initial value for the lateral sharpness evaluation may be: aiming at each row of pixel points, calculating a corresponding average value by using the pixel points with positive numerical values in the row, and determining to obtain a transverse definition evaluation initial value according to the sequence of each row of the calculated average value; alternatively, it may be: and aiming at each row of pixel points, determining to obtain the pixel point with the maximum corresponding numerical value in the row of pixel points, and determining to obtain a transverse definition evaluation initial value according to the sequence of each row of numerical values corresponding to the pixel point with the maximum corresponding numerical value in each row, and the like.
The process of analyzing each row of pixel points in the intermediate frequency image to obtain the longitudinal definition evaluation initial value may be as follows: aiming at each row of pixel points, calculating a corresponding average value by using the pixel points with positive numerical values in the row, and determining to obtain a longitudinal definition evaluation initial value according to the sequence of each row of the calculated average value; alternatively, it may be: and aiming at each row of pixel points, determining to obtain the pixel point with the maximum corresponding numerical value in the row of pixel points, and determining to obtain a longitudinal definition evaluation initial value according to the sequence of each row of the numerical value corresponding to the pixel point with the maximum corresponding numerical value in each row, and the like.
In one implementation, the intermediate frequency image has a size W × H, and the obtained lateral sharpness evaluation initial value may be identified as RowInf ═ p1,p2,…,pHThe obtained initial value for evaluating the longitudinal definition can be markedIs ColInf ═ q1,q2,…,qW}。
S105: and determining the definition evaluation result of the image to be evaluated based on the transverse definition evaluation initial value and the longitudinal definition evaluation initial value.
And the definition evaluation result is used for representing the definition of the image to be evaluated.
In the embodiment of the invention, after the electronic equipment obtains the transverse definition evaluation initial value and the longitudinal definition evaluation initial value, the definition evaluation result of the image to be evaluated can be determined based on the transverse definition evaluation initial value and the longitudinal definition evaluation initial value.
The definition evaluation result of the determined image to be evaluated can be a specific evaluation value, for example, the evaluation value is represented by a score, wherein the higher the score is, the higher the definition of the image is; but also a level of clarity; for example, by degree adverb, may include: blur, comparative clarity, clearness, and clearness, etc.
In an implementation manner, an average value corresponding to the horizontal sharpness evaluation initial value and an average value corresponding to the longitudinal sharpness evaluation initial value may be respectively calculated, and then a sharpness evaluation result of the evaluation image may be determined based on the average values. When the average value corresponding to the transverse definition evaluation initial value is calculated, the average value corresponding to the transverse definition evaluation initial value is calculated by only using a value which is taken as a positive number in the transverse definition evaluation initial value. And calculating the average value corresponding to the longitudinal definition evaluation initial value by only using the value which is taken as a positive number in the longitudinal definition evaluation initial value.
For example: the definition evaluation result is a specific evaluation value, and the value between the two average values is larger and is used as the definition evaluation value of the evaluation image; or, taking the average value of the two average values as the definition evaluation value of the evaluation image. In another implementation, the following may be: and calculating the average value corresponding to the transverse definition evaluation initial value and the longitudinal definition evaluation initial value together, and taking the calculated average value as the definition evaluation value of the evaluation image. And calculating the average value corresponding to the transverse definition evaluation initial value and the longitudinal definition evaluation initial value by only using the values as positive numbers.
Another example is: the definition evaluation result is a definition grade, wherein each definition grade corresponds to a value range: and determining a larger value from the calculated average value corresponding to the transverse definition evaluation initial value and the calculated average value corresponding to the longitudinal definition evaluation initial value to be used as a reference value, matching the reference value with a value range corresponding to each definition grade, and taking the corresponding value range containing the definition grade of the reference value as a definition evaluation result of an evaluation image.
Subsequently, after the electronic device determines the definition evaluation result of the image to be evaluated, the electronic device can intelligently push a picture for the user based on the definition evaluation result of the image to be evaluated so as to push the image with higher definition to the user. In one case, when the evaluation result of the sharpness is a specific evaluation value, the electronic apparatus may present an image of which the evaluation value is higher than a preset sharpness threshold value to the user, and in one case, when the evaluation result of the sharpness is a sharpness level, the electronic apparatus may present an image of which the sharpness level is sharp and very sharp to the user.
In the embodiment of the invention, the intermediate frequency image containing the intermediate frequency information of the image to be evaluated is utilized to determine the definition evaluation result of the image to be evaluated, so that the problem that the image definition evaluation is not accurate enough due to the fact that the proportion of sharp edges in the image to be evaluated is changed greatly can be solved. The medium-frequency information determines the basic structure of the image relative to the high-frequency information determining the edge and the details of the image, forms the main edge structure of the image, can be used as the second-order strong edge of the image, is less susceptible to noise, and is less affected than the high-frequency information when the proportion of the sharp edge is greatly changed, so that the image can still be evaluated with higher accuracy when the proportion of the sharp edge is greatly changed. In the embodiment of the invention, the definition evaluation result of the image to be evaluated is determined by utilizing the transverse definition evaluation initial value and the longitudinal definition evaluation initial value obtained by transversely analyzing and longitudinally analyzing the intermediate-frequency image, so that the definition evaluation result of the image to be evaluated can be determined more comprehensively based on the information of the image to be evaluated, and the image can be evaluated with higher precision.
In an implementation manner, the step of obtaining the image to be evaluated may include:
acquiring a color image;
converting the color image into a gray image as an image to be evaluated; or the like, or, alternatively,
acquiring a color image;
selecting a local image of a color image, converting the local image into a gray image, and taking the gray image as an image to be evaluated; or the like, or, alternatively,
acquiring a color image;
and converting the color image into a gray image, and selecting a local gray image as an image to be evaluated.
In the embodiment of the present invention, the color image may be an image in any format, such as an RGB (red green blue) format and a YUV format.
When the format of the color image is an RGB format, the color image may be converted into a gray scale image based on a preset conversion formula, where the preset conversion formula may be:
I(i,j)=R(i,j)*a+G(i,j)*b+B(i,j)*c
wherein, I(i,j)Identifying the grey value, R, of a pixel point at (i, j) in the image to be evaluated(i,j)Identifying the Red value, G, of a Pixel at (i, j) in a color image(i,j)Identifying the Green value, B, of a Pixel at (i, j) in a color image(i,j)And (3) identifying the blue value of the pixel point at the position (i, j) in the color image, wherein a, b and c are all preset coefficients. In one case, a is 0.299, and b is 0.587, and c is 0.114.
When the format of the color image is YUV format, the color image may be converted from YUV format to RGB format, and then the color image is converted into a gray image based on the preset conversion formula. Or, the color image is converted into the gray image directly based on the conversion relation between the pixel value and the gray value of the pre-stored pixel point in the YUV format.
It is understood that YUV, also known as YCrCb, is a color coding scheme adopted by european television systems, where "Y" represents Luminance (Luma) or gray scale value; the "U" and "V" represent Chroma (Chroma) and are used to describe the color and saturation of the image for specifying the color of the pixel. "luminance" is established through the RGB (Red Green Blue) input signal by superimposing specific parts of the RGB input signal together. "chroma" defines two aspects of color-hue and saturation, denoted by Cr and Cb, respectively. Where Cr reflects the difference between the red portion of the RGB input signal and the luminance value of the RGB input signal. And Cb reflects the difference between the blue part of the RGB input signal and the luminance value of the RGB input signal.
In one implementation, this may be: only selecting a local image in a color image, such as an image of a user interested area, and converting the selected local image into a gray image as an image to be evaluated; alternatively, it may be: firstly, converting a color image into a gray image, and then selecting a local image from the gray image, for example, an image of a user interested area, as an image to be evaluated.
In one implementation, the different filter coefficients include a first filter coefficient and a second filter coefficient, the first filter coefficient corresponds to a first filter operator, and the second filter coefficient corresponds to a second filter operator;
the step of filtering the image to be evaluated by using the low-pass filters configured with different filter coefficients to obtain the filtered images corresponding to the different filter coefficients may include:
filtering the image to be evaluated based on a low-pass filter configured with a first filter operator corresponding to the first filter coefficient to obtain a filtered image corresponding to the first filter coefficient;
and filtering the image to be evaluated based on the low-pass filter configured with the second filter operator corresponding to the second filter coefficient to obtain a filtered image corresponding to the second filter coefficient.
In order to reduce the amount of computation in the image sharpness evaluation process performed by the electronic device, the different filter coefficients may include a first filter coefficient and a second filter coefficient, wherein the first filter coefficient and the second filter coefficient may be respectively represented by σ1And σ2And (5) identifying. In one implementation, the low-pass filter with different filter coefficients may be a gaussian filter, and may be a gaussian filter with a first filter coefficient and a gaussian filter with a second filter coefficient. The first filter operator corresponding to the first filter coefficient and the second filter operator corresponding to the second filter coefficient may be operators of N × N.
In one case, the first filter coefficient σ is set to be smaller than the second filter coefficient σ1May take 0.5, the first filter coefficient σ1Filter operator K corresponding to 3x31Wherein, in the step (A),
Figure BDA0001648130200000161
the second filter coefficient σ2May take 0.9, the second filter coefficient σ2Filter operator K corresponding to 3x32Wherein, in the step (A),
Figure BDA0001648130200000162
in the above case, the first filter coefficient σ1May take 0.4, the second filter coefficient sigma2May take 0.8 and the electronic device may be based on the first filter coefficient σ1A corresponding filter operator at 0.4, and filtering the image to be evaluated to obtain a first filter coefficient sigma1A corresponding filtered image at 0.4; and based on the second filter coefficient sigma2The corresponding filter operator is 0.8, and the image to be evaluated is filtered to obtain a second filter coefficient sigma2And when the image is 0.8, the corresponding filtered image is obtained, and a subsequent image definition evaluation process is executed based on the two obtained filtered images.
The first filter operator and the second filter operator are operators of 3x3, when the size of the image to be evaluated is M × N, the size of the subsequently obtained intermediate frequency image can be (M-2) × (N-2), and invalid pixel points at the edge in the intermediate frequency image can be removed, so that the definition evaluation result of the image to be evaluated, which is determined based on the intermediate frequency image, is more accurate. This is because there is a possibility that the operator of 3x3 cannot filter the most marginal pixel point of the image to be evaluated.
In one implementation, the different filter coefficients may include a first filter coefficient and a second filter coefficient, where the first filter coefficient is smaller than the second filter coefficient;
in one case, the step of determining the intermediate-frequency image corresponding to the image to be evaluated based on the obtained filtered images corresponding to different filter coefficients may include:
calculating a difference image of a filtering image corresponding to the first filtering coefficient and a filtering image corresponding to the second filtering coefficient, and determining the difference image as a first difference image;
and determining the intermediate frequency image corresponding to the image to be evaluated based on the first difference image.
In another case, as shown in fig. 2, the step of determining the intermediate-frequency image corresponding to the image to be evaluated based on the obtained filtered images corresponding to different filter coefficients may include:
s201: calculating a difference image of the image to be evaluated and the filtering image corresponding to the first filtering coefficient, and determining the difference image as a second difference image;
s202: calculating a difference image of the image to be evaluated and the filtering image corresponding to the second filtering coefficient, and determining the difference image as a third difference image;
s203: calculating a difference image of the third difference image and the second difference image, and determining the difference image as a fourth difference image;
s204: and determining the intermediate frequency image corresponding to the image to be evaluated based on the fourth difference image.
In the embodiment of the invention, the image to be evaluated is filtered through the low-pass filter with the first filter coefficient and the low-pass filter with the second filter coefficient, so that a filtered image containing low-frequency information and medium-frequency information and a filtered image containing low-frequency information can be obtained respectively.
In one implementation, a filtered image including low-frequency information and intermediate-frequency information may be directly used to perform a difference operation with the filtered image including the low-frequency information to obtain an intermediate-frequency image including the intermediate-frequency information, that is, a difference image of the filtered image corresponding to the first filter coefficient and the filtered image corresponding to the second filter coefficient is calculated and determined as a first difference image, and then the intermediate-frequency image is obtained based on the first difference image. The process of obtaining the intermediate frequency image based on the first difference image may be: and aiming at each pixel point in the first difference image, comparing the value of the pixel point in the first difference image with 0, when the value of the pixel point in the first difference image is more than or equal to 0, keeping the value of the pixel point in the first difference image, and when the value of the pixel point in the first difference image is less than 0, replacing the value of the pixel point in the first difference image with 0.
Based on the mode, determining the intermediate frequency image corresponding to the image to be evaluated, wherein the following formula (1) can be adopted;
FCSi,j=max(Ii,j*K1-Ii,j*K2,0)……(1)
wherein the FCSi,jIdentifying a value of a pixel at a (I, j) position in an intermediate frequency image, Ii,jIdentifying the gray value of the pixel point at the (i, j) position in the image to be evaluated, K1Identify a filter operator corresponding to the first filter coefficient, K2And identifying a filter operator corresponding to the second filter coefficient. Max (I) abovei,j*K1-Ii,j*K20) identification of Ii,j*K1-Ii,j*K2And a maximum value between 0.
In another implementation mode, the image to be evaluated and the filtered image containing the low-frequency information and the intermediate-frequency information can be directly used for making a difference to obtain an image containing the high-frequency information, namely a second difference image, and the image to be evaluated and the filtered image containing the low-frequency information are used for making a difference to obtain an image containing the high-frequency information and the intermediate-frequency information, namely a third difference image; and then, the image containing the high-frequency information and the intermediate-frequency information is subjected to difference with the image containing the high-frequency information to obtain an image containing the intermediate-frequency information, namely a fourth difference image, and then the intermediate-frequency image corresponding to the image to be evaluated is obtained based on the fourth difference image. Fig. 3 is an exemplary diagram of an image to be evaluated, a second difference image, a third difference image, and a middle frequency image. In which the "original image" shown in fig. 3 represents the image to be evaluated, the "high frequency map" shown in fig. 3 represents the second difference image, the "medium high frequency map" shown in fig. 3 represents the third difference image, and the "medium frequency map" shown in fig. 3 represents the medium frequency image.
In an embodiment of the present invention, the process of obtaining the intermediate-frequency image corresponding to the image to be evaluated based on the fourth difference image may be: and aiming at each pixel point in the fourth difference image, comparing the value of the pixel point in the fourth difference image with 0, when the value of the pixel point in the fourth difference image is more than or equal to 0, keeping the value of the pixel point in the fourth difference image, and when the value of the pixel point in the fourth difference image is less than 0, replacing the value of the pixel point in the fourth difference image with 0.
Based on the mode, determining the intermediate-frequency image corresponding to the image to be evaluated, wherein the following formula (2) can be adopted;
FCSi,j=max((Ii,j-Ii,j*K2)-(Ii,j-Ii,j*K1),0)……(2)
wherein the FCSi,jIdentifying a value of a pixel at a (I, j) position in an intermediate frequency image, Ii,jIdentifying the gray value of the pixel point at the (i, j) position in the image to be evaluated, K1IdentificationA filter operator corresponding to the first filter coefficient, K2And identifying a filter operator corresponding to the second filter coefficient. Max ((I) abovei,j-Ii,j*K2)-(Ii,j-Ii,j*K1) 0) identification of (I)i,j-Ii,j*K2)-(Ii,j-Ii,j*K1) And a maximum value between 0.
In an implementation manner, in order to better obtain a more accurate definition evaluation result of an image to be evaluated, the intermediate-frequency image may be subjected to transverse analysis and longitudinal analysis respectively to obtain a transverse definition evaluation initial value and a longitudinal definition evaluation initial value. Specifically, the step of performing horizontal analysis and vertical analysis on the intermediate frequency image to obtain a horizontal sharpness evaluation initial value and a vertical sharpness evaluation initial value may include:
traversing each line of pixel points of the intermediate-frequency image, and determining the pixel point with the maximum corresponding numerical value from each line of pixel points as a first-class pixel point;
determining the numerical values corresponding to all the determined first-class pixel points as the initial value for evaluating the transverse definition;
traversing each row of pixel points of the intermediate-frequency image, and determining the pixel point with the maximum corresponding numerical value from each row of pixel points as a second-class pixel point;
and determining the numerical values corresponding to all the second-class pixel points as the initial value for evaluating the longitudinal definition.
In an implementation manner, after the electronic device obtains the horizontal sharpness evaluation initial value and the longitudinal sharpness evaluation initial value, the electronic device may determine the sharpness evaluation result of the image to be evaluated based on average values corresponding to the horizontal sharpness evaluation initial value and the longitudinal sharpness evaluation initial value, respectively. Specifically, the step of determining the sharpness evaluation result of the image to be evaluated based on the horizontal sharpness evaluation initial value and the vertical sharpness evaluation initial value may include:
calculating the average value of all numerical values serving as positive numbers in the transverse definition evaluation initial value as a first average value;
calculating the average value of all numerical values serving as positive numbers in the longitudinal definition evaluation initial value as a second average value;
and taking the maximum value of the first average value and the second average value as the definition evaluation result of the image to be evaluated.
In another implementation manner, in order to better obtain a more accurate definition evaluation result of the image to be evaluated, partial values with higher reliability may be respectively selected from the horizontal definition evaluation initial value and the longitudinal definition evaluation initial value, and then the definition evaluation result of the image to be evaluated is determined based on the selected values with higher reliability. Specifically, as shown in fig. 4, the step of determining the sharpness evaluation result of the image to be evaluated based on the horizontal sharpness evaluation initial value and the vertical sharpness evaluation initial value may include:
s401: sequencing all numerical values in the transverse definition evaluation initial value in an ascending or descending manner to obtain a first sequence;
s402: screening all numerical values within a preset range from the first sequence; calculating the average value of all the screened numerical values serving as positive numbers to serve as a third average value;
s403: sequencing all values in the longitudinal definition evaluation initial value in an ascending or descending manner to obtain a second sequence;
s404: screening all numerical values in a preset range from the second sequence; calculating the average value of all the screened numerical values serving as positive numbers to serve as a fourth average value;
s405: and taking the maximum value of the third average value and the fourth average value as the definition evaluation result of the image to be evaluated.
In an embodiment of the present invention, the preset range may be based on: and setting the sequencing sequence of the transverse definition evaluation initial value and the longitudinal definition evaluation initial value. Specifically, when the horizontal sharpness evaluation initial value and the longitudinal sharpness evaluation initial value are sorted in an ascending order, the corresponding preset ranges may be the same as or different from each other when the horizontal sharpness evaluation initial value and the longitudinal sharpness evaluation initial value are sorted in a descending order. In an implementation manner, the preset range may be set by a worker according to a requirement, or may be a default setting of the electronic device, where the default setting may represent: the setting of the electronic equipment when leaving the factory. For example, the predetermined range may be [ 20%, 80% ], or [0, 95% ], or [ 5%, 100% ], or the like.
The third average value may be identified as RowClarity, and the fourth average value may be identified as ColClarity.
In the embodiment of the present invention, the process of determining the third average value and the process of determining the fourth average value may be executed in parallel, or may be executed sequentially.
In an implementation manner, before the step of determining a sharpness evaluation result of the image to be evaluated based on the horizontal sharpness evaluation initial value and the vertical sharpness evaluation initial value, the method may further include:
acquiring a brightness component value corresponding to each pixel point in an image to be evaluated;
the step of determining the sharpness evaluation result of the image to be evaluated based on the transverse sharpness evaluation initial value and the longitudinal sharpness evaluation initial value may include:
calculating a quotient of each numerical value in the transverse definition evaluation initial value and a brightness component value corresponding to the numerical value as a first quotient, wherein the brightness component value corresponding to the numerical value is as follows: the brightness component value corresponding to the pixel point corresponding to the numerical value;
calculating the quotient of the numerical value and the brightness component value corresponding to the numerical value as a second quotient aiming at each numerical value in the longitudinal definition evaluation initial value, wherein the brightness component value corresponding to the numerical value is as follows: the brightness component value corresponding to the pixel point corresponding to the numerical value;
and determining the definition evaluation result of the image to be evaluated based on the first quotient and the second quotient.
In one implementation, according to the pixel value of each pixel point in the image to be evaluated, the brightness component value of the pixel point, that is, the brightness component value corresponding to the pixel point, can be determined. In order to avoid the influence of the illumination factor on the image definition evaluation, in the embodiment of the invention, each value in the transverse definition evaluation initial value and the longitudinal definition evaluation initial value can be divided by the brightness component value corresponding to the value, so as to remove the influence of the illumination factor, namely the brightness, in the value. And then determining the definition evaluation result of the image to be evaluated based on the obtained quotient so as to obtain a definition evaluation result with higher accuracy. It can be understood that, in one case, the luminance component value corresponding to the pixel point may be represented by a Y component value of a pixel value of the pixel point in a YUV format, and a range of the Y component corresponding to the pixel point is 0 to 255, so as to facilitate a subsequent calculation process, and avoid a case where 0 is used as a denominator. In the embodiment of the present invention, the minimum value of the Y component may be set to 1, that is, the electronic device may set, of the Y component values corresponding to each pixel point in the acquired image to be evaluated, the Y component values smaller than 1 to 1, and retain the original values of the Y component values not smaller than 1.
In an embodiment of the present invention, the process of determining the sharpness evaluation result of the image to be evaluated based on the first quotient and the second quotient may be: and respectively calculating the average value of the first quotient and the average value of the second quotient, and further selecting the larger value of the two average values as a definition evaluation result of the image to be evaluated. Alternatively, it may be: and taking the average value of the two average values as the definition evaluation result of the image to be evaluated. Alternatively, it may be: and taking the larger value of the two average values as a reference value, matching the reference value with a pre-stored value range corresponding to each definition grade, and taking the corresponding value range containing the definition grade of the reference value as a definition evaluation result of the evaluation image.
As shown in fig. 5A and 5B, the diagrams are respectively a schematic diagram of ranking each image to be evaluated based on the definition evaluation result respectively corresponding to each image to be evaluated after evaluating the definition of a series of acquired images to be evaluated by using the image definition evaluating method provided by the embodiment of the present invention. Wherein, the more the ranking order is, the higher the definition of the image to be evaluated is.
Corresponding to the above method embodiment, as shown in fig. 6, an embodiment of the present invention provides an image sharpness evaluating apparatus, where the apparatus includes:
a first obtaining module 610, configured to obtain an image to be evaluated;
the filtering module 620 is configured to filter the image to be evaluated by using low-pass filters configured with different filter coefficients, respectively, to obtain filtered images corresponding to the different filter coefficients;
a first determining module 630, configured to determine, based on the obtained filtered images corresponding to different filter coefficients, an intermediate-frequency image corresponding to the image to be evaluated, where the intermediate-frequency image is: an image containing intermediate frequency information of the image to be evaluated;
the analysis module 640 is configured to perform transverse analysis and longitudinal analysis on the intermediate-frequency image respectively to obtain a transverse sharpness evaluation initial value and a longitudinal sharpness evaluation initial value;
the second determining module 650 is configured to determine a sharpness evaluation result of the image to be evaluated based on the lateral sharpness evaluation initial value and the longitudinal sharpness evaluation initial value.
And the definition evaluation result is used for representing the definition of the image to be evaluated.
In the embodiment of the invention, the intermediate frequency image containing the intermediate frequency information of the image to be evaluated is utilized to determine the definition evaluation result of the image to be evaluated, so that the problem that the image definition evaluation is not accurate enough due to the fact that the proportion of sharp edges in the image to be evaluated is changed greatly can be solved. The medium-frequency information determines the basic structure of the image relative to the high-frequency information determining the edge and the details of the image, forms the main edge structure of the image, can be used as the second-order strong edge of the image, is less susceptible to noise, and is less affected than the high-frequency information when the proportion of the sharp edge is greatly changed, so that the image can still be evaluated with higher accuracy when the proportion of the sharp edge is greatly changed. In the embodiment of the invention, the definition evaluation result of the image to be evaluated is determined by utilizing the transverse definition evaluation initial value and the longitudinal definition evaluation initial value obtained by transversely analyzing and longitudinally analyzing the intermediate-frequency image, so that the definition evaluation result of the image to be evaluated can be determined more comprehensively based on the information of the image to be evaluated, and the image can be evaluated with higher precision.
In an implementation manner, the first obtaining module 610 is specifically configured to
Acquiring a color image;
converting the color image into a gray image as the image to be evaluated; or the like, or, alternatively,
acquiring a color image;
selecting a local image of the color image, and converting the local image into a gray image to be used as the image to be evaluated; or the like, or, alternatively,
acquiring a color image;
and converting the color image into a gray image, and selecting a local gray image as the image to be evaluated.
In one implementation, the different filter coefficients include a first filter coefficient and a second filter coefficient, the first filter coefficient corresponds to a first filter operator, and the second filter coefficient corresponds to a second filter operator;
the filtering module 620 is specifically used for
Filtering the image to be evaluated based on a low-pass filter configured with a first filter operator corresponding to the first filter coefficient to obtain a filtered image corresponding to the first filter coefficient;
and filtering the image to be evaluated based on a low-pass filter configured with a second filter operator corresponding to the second filter coefficient to obtain a filtered image corresponding to the second filter coefficient.
In one implementation, the different filter coefficients include a first filter coefficient and a second filter coefficient, wherein the first filter coefficient is smaller than the second filter coefficient;
the first determining module 630 is specifically configured to
Calculating a difference image of the filtering image corresponding to the first filtering coefficient and the filtering image corresponding to the second filtering coefficient, and determining the difference image as a first difference image;
determining a medium-frequency image corresponding to the image to be evaluated based on the first difference image;
alternatively, the first and second electrodes may be,
calculating a difference image of the image to be evaluated and the filtering image corresponding to the first filtering coefficient, and determining the difference image as a second difference image;
calculating a difference image of the image to be evaluated and the filtering image corresponding to the second filtering coefficient, and determining the difference image as a third difference image;
calculating a difference image of the third difference image and the second difference image, and determining the difference image as a fourth difference image;
and determining the intermediate frequency image corresponding to the image to be evaluated based on the fourth difference image.
In one implementation, the analysis module 640 is specifically configured to
Traversing each line of pixel points of the intermediate frequency image, and determining the pixel point with the maximum corresponding numerical value from each line of pixel points as a first type of pixel point;
determining the numerical values corresponding to all the determined first-class pixel points as the initial value for evaluating the transverse definition;
traversing each row of pixel points of the intermediate frequency image, and determining the pixel point with the maximum corresponding numerical value from each row of pixel points as a second type of pixel point;
and determining the numerical values corresponding to all the second-class pixel points as the initial value for evaluating the longitudinal definition.
In one implementation, the second determining module 650 is specifically configured to
Calculating the average value of all numerical values serving as positive numbers in the transverse definition evaluation initial value as a first average value;
calculating the average value of all numerical values serving as positive numbers in the longitudinal definition evaluation initial value to serve as a second average value;
and taking the maximum value of the first average value and the second average value as the definition evaluation result of the image to be evaluated.
In one implementation, the second determining module 650 is specifically configured to
Sequencing all numerical values in the transverse definition evaluation initial value in an ascending or descending manner to obtain a first sequence;
screening all numerical values within a preset range from the first sequence; calculating the average value of all the screened numerical values serving as positive numbers to serve as a third average value;
sequencing all numerical values in the longitudinal definition evaluation initial value in an ascending or descending manner to obtain a second sequence;
screening all values within the preset range from the second sequence; calculating the average value of all the screened numerical values serving as positive numbers to serve as a fourth average value;
and taking the maximum value of the third average value and the fourth average value as the definition evaluation result of the image to be evaluated.
In one implementation, the apparatus further comprises:
a second obtaining module, configured to obtain a brightness component value corresponding to each pixel point in the image to be evaluated before the step of determining a sharpness evaluation result of the image to be evaluated based on the horizontal sharpness evaluation initial value and the longitudinal sharpness evaluation initial value;
the second determining module 650 is specifically configured to:
calculating a quotient of each numerical value in the lateral definition evaluation initial value and a brightness component value corresponding to the numerical value as a first quotient, wherein the brightness component value corresponding to the numerical value is as follows: the brightness component value corresponding to the pixel point corresponding to the numerical value;
calculating a quotient of each numerical value in the longitudinal definition evaluation initial value and a brightness component value corresponding to the numerical value as a second quotient, wherein the brightness component value corresponding to the numerical value is as follows: the brightness component value corresponding to the pixel point corresponding to the numerical value;
and determining the definition evaluation result of the image to be evaluated based on the first quotient and the second quotient.
Corresponding to the above method embodiments, the embodiment of the present invention further provides an electronic device, as shown in fig. 7, including a processor 710, a communication interface 720, a memory 730, and a communication bus 740, where the processor 710, the communication interface 720, and the memory 730 communicate with each other through the communication bus 740,
a memory 730 for storing a computer program;
the processor 710 is configured to implement any one of the image sharpness evaluation methods provided in the embodiments of the present invention when executing the computer program stored in the memory 730, and may include the steps of:
acquiring an image to be evaluated;
respectively filtering the image to be evaluated by utilizing low-pass filters configured with different filter coefficients to obtain filtered images corresponding to the different filter coefficients;
determining an intermediate frequency image corresponding to the image to be evaluated based on the obtained filtering images corresponding to different filtering coefficients, wherein the intermediate frequency image is as follows: an image containing intermediate frequency information of the image to be evaluated;
respectively carrying out transverse analysis and longitudinal analysis on the intermediate frequency image to obtain a transverse definition evaluation initial value and a longitudinal definition evaluation initial value;
and determining the definition evaluation result of the image to be evaluated based on the transverse definition evaluation initial value and the longitudinal definition evaluation initial value.
And the definition evaluation result is used for representing the definition of the image to be evaluated.
In the embodiment of the invention, the intermediate frequency image containing the intermediate frequency information of the image to be evaluated is utilized to determine the definition evaluation result of the image to be evaluated, so that the problem that the image definition evaluation is not accurate enough due to the fact that the proportion of sharp edges in the image to be evaluated is changed greatly can be solved. The medium-frequency information determines the basic structure of the image relative to the high-frequency information determining the edge and the details of the image, forms the main edge structure of the image, can be used as the second-order strong edge of the image, is less susceptible to noise, and is less affected than the high-frequency information when the proportion of the sharp edge is greatly changed, so that the image can still be evaluated with higher accuracy when the proportion of the sharp edge is greatly changed. In the embodiment of the invention, the definition evaluation result of the image to be evaluated is determined by utilizing the transverse definition evaluation initial value and the longitudinal definition evaluation initial value obtained by transversely analyzing and longitudinally analyzing the intermediate-frequency image, so that the definition evaluation result of the image to be evaluated can be determined more comprehensively based on the information of the image to be evaluated, and the image can be evaluated with higher precision.
In one implementation, the acquiring the image to be evaluated includes:
acquiring a color image;
converting the color image into a gray image as the image to be evaluated; or the like, or, alternatively,
acquiring a color image;
selecting a local image of the color image, and converting the local image into a gray image to be used as the image to be evaluated; or the like, or, alternatively,
acquiring a color image;
and converting the color image into a gray image, and selecting a local gray image as the image to be evaluated.
In one implementation, the different filter coefficients include a first filter coefficient and a second filter coefficient, the first filter coefficient corresponds to a first filter operator, and the second filter coefficient corresponds to a second filter operator;
the filtering the image to be evaluated by using the low-pass filters configured with different filter coefficients to obtain filtered images corresponding to the different filter coefficients includes:
filtering the image to be evaluated based on a low-pass filter configured with a first filter operator corresponding to the first filter coefficient to obtain a filtered image corresponding to the first filter coefficient;
and filtering the image to be evaluated based on a low-pass filter configured with a second filter operator corresponding to the second filter coefficient to obtain a filtered image corresponding to the second filter coefficient.
In one implementation, the different filter coefficients include a first filter coefficient and a second filter coefficient, wherein the first filter coefficient is smaller than the second filter coefficient;
determining the intermediate frequency image corresponding to the image to be evaluated based on the obtained filtering images corresponding to different filtering coefficients, wherein the determining comprises the following steps:
calculating a difference image of the filtering image corresponding to the first filtering coefficient and the filtering image corresponding to the second filtering coefficient, and determining the difference image as a first difference image;
determining a medium-frequency image corresponding to the image to be evaluated based on the first difference image;
alternatively, the first and second electrodes may be,
calculating a difference image of the image to be evaluated and the filtering image corresponding to the first filtering coefficient, and determining the difference image as a second difference image;
calculating a difference image of the image to be evaluated and the filtering image corresponding to the second filtering coefficient, and determining the difference image as a third difference image;
calculating a difference image of the third difference image and the second difference image, and determining the difference image as a fourth difference image;
and determining the intermediate frequency image corresponding to the image to be evaluated based on the fourth difference image.
In one implementation, the performing the horizontal analysis and the vertical analysis on the intermediate frequency image respectively to obtain a horizontal sharpness evaluation initial value and a vertical sharpness evaluation initial value includes:
traversing each line of pixel points of the intermediate frequency image, and determining the pixel point with the maximum corresponding numerical value from each line of pixel points as a first type of pixel point;
determining the numerical values corresponding to all the determined first-class pixel points as the initial value for evaluating the transverse definition;
traversing each row of pixel points of the intermediate frequency image, and determining the pixel point with the maximum corresponding numerical value from each row of pixel points as a second type of pixel point;
and determining the numerical values corresponding to all the second-class pixel points as the initial value for evaluating the longitudinal definition.
In one implementation, the determining a sharpness evaluation result of the image to be evaluated based on the lateral sharpness evaluation initial value and the longitudinal sharpness evaluation initial value includes:
calculating the average value of all numerical values serving as positive numbers in the transverse definition evaluation initial value as a first average value;
calculating the average value of all numerical values serving as positive numbers in the longitudinal definition evaluation initial value to serve as a second average value;
and taking the maximum value of the first average value and the second average value as the definition evaluation result of the image to be evaluated.
In one implementation, the determining a sharpness evaluation result of the image to be evaluated based on the lateral sharpness evaluation initial value and the longitudinal sharpness evaluation initial value includes:
sequencing all numerical values in the transverse definition evaluation initial value in an ascending or descending manner to obtain a first sequence;
screening all numerical values within a preset range from the first sequence; calculating the average value of all the screened numerical values serving as positive numbers to serve as a third average value;
sequencing all numerical values in the longitudinal definition evaluation initial value in an ascending or descending manner to obtain a second sequence;
screening all values within the preset range from the second sequence; calculating the average value of all the screened numerical values serving as positive numbers to serve as a fourth average value;
and taking the maximum value of the third average value and the fourth average value as the definition evaluation result of the image to be evaluated.
In one implementation manner, before determining a sharpness evaluation result of the image to be evaluated based on the lateral sharpness evaluation initial value and the longitudinal sharpness evaluation initial value, the method further includes:
acquiring a brightness component value corresponding to each pixel point in the image to be evaluated;
determining a definition evaluation result of the image to be evaluated based on the transverse definition evaluation initial value and the longitudinal definition evaluation initial value, wherein the definition evaluation result comprises the following steps:
calculating a quotient of each numerical value in the lateral definition evaluation initial value and a brightness component value corresponding to the numerical value as a first quotient, wherein the brightness component value corresponding to the numerical value is as follows: the brightness component value corresponding to the pixel point corresponding to the numerical value;
calculating a quotient of each numerical value in the longitudinal definition evaluation initial value and a brightness component value corresponding to the numerical value as a second quotient, wherein the brightness component value corresponding to the numerical value is as follows: the brightness component value corresponding to the pixel point corresponding to the numerical value;
and determining the definition evaluation result of the image to be evaluated based on the first quotient and the second quotient.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
Corresponding to the foregoing method embodiments, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the computer-readable storage medium implements any one of the image sharpness evaluation methods provided in the embodiments of the present invention, where the method includes:
acquiring an image to be evaluated;
respectively filtering the image to be evaluated by utilizing low-pass filters configured with different filter coefficients to obtain filtered images corresponding to the different filter coefficients;
determining an intermediate frequency image corresponding to the image to be evaluated based on the obtained filtering images corresponding to different filtering coefficients, wherein the intermediate frequency image is as follows: an image containing intermediate frequency information of the image to be evaluated;
respectively carrying out transverse analysis and longitudinal analysis on the intermediate frequency image to obtain a transverse definition evaluation initial value and a longitudinal definition evaluation initial value;
and determining the definition evaluation result of the image to be evaluated based on the transverse definition evaluation initial value and the longitudinal definition evaluation initial value.
And the definition evaluation result is used for representing the definition of the image to be evaluated.
In the embodiment of the invention, the intermediate frequency image containing the intermediate frequency information of the image to be evaluated is utilized to determine the definition evaluation result of the image to be evaluated, so that the problem that the image definition evaluation is not accurate enough due to the fact that the proportion of sharp edges in the image to be evaluated is changed greatly can be solved. The medium-frequency information determines the basic structure of the image relative to the high-frequency information determining the edge and the details of the image, forms the main edge structure of the image, can be used as the second-order strong edge of the image, is less susceptible to noise, and is less affected than the high-frequency information when the proportion of the sharp edge is greatly changed, so that the image can still be evaluated with higher accuracy when the proportion of the sharp edge is greatly changed. In the embodiment of the invention, the definition evaluation result of the image to be evaluated is determined by utilizing the transverse definition evaluation initial value and the longitudinal definition evaluation initial value obtained by transversely analyzing and longitudinally analyzing the intermediate-frequency image, so that the definition evaluation result of the image to be evaluated can be determined more comprehensively based on the information of the image to be evaluated, and the image can be evaluated with higher precision.
In one implementation, the acquiring the image to be evaluated includes:
acquiring a color image;
converting the color image into a gray image as the image to be evaluated; or the like, or, alternatively,
acquiring a color image;
selecting a local image of the color image, and converting the local image into a gray image to be used as the image to be evaluated; or the like, or, alternatively,
acquiring a color image;
and converting the color image into a gray image, and selecting a local gray image as the image to be evaluated.
In one implementation, the different filter coefficients include a first filter coefficient and a second filter coefficient, the first filter coefficient corresponds to a first filter operator, and the second filter coefficient corresponds to a second filter operator;
the filtering the image to be evaluated by using the low-pass filters configured with different filter coefficients to obtain filtered images corresponding to the different filter coefficients includes:
filtering the image to be evaluated based on a low-pass filter configured with a first filter operator corresponding to the first filter coefficient to obtain a filtered image corresponding to the first filter coefficient;
and filtering the image to be evaluated based on a low-pass filter configured with a second filter operator corresponding to the second filter coefficient to obtain a filtered image corresponding to the second filter coefficient.
In one implementation, the different filter coefficients include a first filter coefficient and a second filter coefficient, wherein the first filter coefficient is smaller than the second filter coefficient;
determining the intermediate frequency image corresponding to the image to be evaluated based on the obtained filtering images corresponding to different filtering coefficients, wherein the determining comprises the following steps:
calculating a difference image of the filtering image corresponding to the first filtering coefficient and the filtering image corresponding to the second filtering coefficient, and determining the difference image as a first difference image;
determining a medium-frequency image corresponding to the image to be evaluated based on the first difference image;
alternatively, the first and second electrodes may be,
calculating a difference image of the image to be evaluated and the filtering image corresponding to the first filtering coefficient, and determining the difference image as a second difference image;
calculating a difference image of the image to be evaluated and the filtering image corresponding to the second filtering coefficient, and determining the difference image as a third difference image;
calculating a difference image of the third difference image and the second difference image, and determining the difference image as a fourth difference image;
and determining the intermediate frequency image corresponding to the image to be evaluated based on the fourth difference image.
In one implementation, the performing the horizontal analysis and the vertical analysis on the intermediate frequency image respectively to obtain a horizontal sharpness evaluation initial value and a vertical sharpness evaluation initial value includes:
traversing each line of pixel points of the intermediate frequency image, and determining the pixel point with the maximum corresponding numerical value from each line of pixel points as a first type of pixel point;
determining the numerical values corresponding to all the determined first-class pixel points as the initial value for evaluating the transverse definition;
traversing each row of pixel points of the intermediate frequency image, and determining the pixel point with the maximum corresponding numerical value from each row of pixel points as a second type of pixel point;
and determining the numerical values corresponding to all the second-class pixel points as the initial value for evaluating the longitudinal definition.
In one implementation, the determining a sharpness evaluation result of the image to be evaluated based on the lateral sharpness evaluation initial value and the longitudinal sharpness evaluation initial value includes:
calculating the average value of all numerical values serving as positive numbers in the transverse definition evaluation initial value as a first average value;
calculating the average value of all numerical values serving as positive numbers in the longitudinal definition evaluation initial value to serve as a second average value;
and taking the maximum value of the first average value and the second average value as the definition evaluation result of the image to be evaluated.
In one implementation, the determining a sharpness evaluation result of the image to be evaluated based on the lateral sharpness evaluation initial value and the longitudinal sharpness evaluation initial value includes:
sequencing all numerical values in the transverse definition evaluation initial value in an ascending or descending manner to obtain a first sequence;
screening all numerical values within a preset range from the first sequence; calculating the average value of all the screened numerical values serving as positive numbers to serve as a third average value;
sequencing all numerical values in the longitudinal definition evaluation initial value in an ascending or descending manner to obtain a second sequence;
screening all values within the preset range from the second sequence; calculating the average value of all the screened numerical values serving as positive numbers to serve as a fourth average value;
and taking the maximum value of the third average value and the fourth average value as the definition evaluation result of the image to be evaluated.
In one implementation manner, before determining a sharpness evaluation result of the image to be evaluated based on the lateral sharpness evaluation initial value and the longitudinal sharpness evaluation initial value, the method further includes:
acquiring a brightness component value corresponding to each pixel point in the image to be evaluated;
determining a definition evaluation result of the image to be evaluated based on the transverse definition evaluation initial value and the longitudinal definition evaluation initial value, wherein the definition evaluation result comprises the following steps:
calculating a quotient of each numerical value in the lateral definition evaluation initial value and a brightness component value corresponding to the numerical value as a first quotient, wherein the brightness component value corresponding to the numerical value is as follows: the brightness component value corresponding to the pixel point corresponding to the numerical value;
calculating a quotient of each numerical value in the longitudinal definition evaluation initial value and a brightness component value corresponding to the numerical value as a second quotient, wherein the brightness component value corresponding to the numerical value is as follows: the brightness component value corresponding to the pixel point corresponding to the numerical value;
and determining the definition evaluation result of the image to be evaluated based on the first quotient and the second quotient.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (11)

1. An image definition evaluating method is characterized by comprising the following steps:
acquiring an image to be evaluated;
respectively filtering the image to be evaluated by utilizing low-pass filters configured with different filter coefficients to obtain filtered images corresponding to the different filter coefficients;
determining an intermediate frequency image corresponding to the image to be evaluated based on the obtained filtering images corresponding to different filtering coefficients, wherein the intermediate frequency image is as follows: an image containing intermediate frequency information of the image to be evaluated;
respectively carrying out transverse analysis and longitudinal analysis on the intermediate frequency image to obtain a transverse definition evaluation initial value and a longitudinal definition evaluation initial value;
determining a definition evaluation result of the image to be evaluated based on the transverse definition evaluation initial value and the longitudinal definition evaluation initial value;
the method for obtaining the horizontal definition evaluation initial value by performing horizontal analysis on the intermediate frequency image comprises the following steps:
traversing each line of pixel points of the intermediate frequency image, and determining the pixel point with the maximum corresponding numerical value from each line of pixel points as a first type of pixel point;
determining the numerical values corresponding to all the determined first-class pixel points as the initial value for evaluating the transverse definition;
or
Calculating the average value of the values corresponding to the pixels with the positive values aiming at each row of pixels;
determining the calculated average value as an initial value for evaluating the transverse definition according to the sequence of each row;
the method for longitudinally analyzing the intermediate frequency image to obtain a longitudinal definition evaluation initial value comprises the following steps: traversing each row of pixel points of the intermediate frequency image, and determining the pixel point with the maximum corresponding numerical value from each row of pixel points as a second type of pixel point;
determining the numerical values corresponding to all the second-class pixel points as initial values for longitudinal definition evaluation;
or
Calculating the average value of the values corresponding to the pixels with the positive values aiming at each row of pixels;
and determining the calculated average value as an initial value for longitudinal definition evaluation according to the sequence of each row.
2. The method according to claim 1, wherein the step of obtaining an image to be evaluated comprises:
acquiring a color image;
converting the color image into a gray image as the image to be evaluated; or the like, or, alternatively,
acquiring a color image;
selecting a local image of the color image, and converting the local image into a gray image to be used as the image to be evaluated; or the like, or, alternatively,
acquiring a color image;
and converting the color image into a gray image, and selecting a local gray image as the image to be evaluated.
3. The method of claim 1, wherein the different filter coefficients comprise a first filter coefficient and a second filter coefficient, the first filter coefficient corresponding to a first filter operator, and the second filter coefficient corresponding to a second filter operator;
the step of respectively filtering the image to be evaluated by using the low-pass filters configured with different filter coefficients to obtain filtered images corresponding to the different filter coefficients comprises the following steps:
filtering the image to be evaluated based on a low-pass filter configured with a first filter operator corresponding to the first filter coefficient to obtain a filtered image corresponding to the first filter coefficient;
and filtering the image to be evaluated based on a low-pass filter configured with a second filter operator corresponding to the second filter coefficient to obtain a filtered image corresponding to the second filter coefficient.
4. The method of claim 1, wherein the different filter coefficients comprise a first filter coefficient and a second filter coefficient, wherein the first filter coefficient is smaller than the second filter coefficient;
the step of determining the intermediate frequency image corresponding to the image to be evaluated based on the obtained filtering images corresponding to different filtering coefficients comprises the following steps:
calculating a difference image of the filtering image corresponding to the first filtering coefficient and the filtering image corresponding to the second filtering coefficient, and determining the difference image as a first difference image;
determining a medium-frequency image corresponding to the image to be evaluated based on the first difference image;
alternatively, the first and second electrodes may be,
calculating a difference image of the image to be evaluated and the filtering image corresponding to the first filtering coefficient, and determining the difference image as a second difference image;
calculating a difference image of the image to be evaluated and the filtering image corresponding to the second filtering coefficient, and determining the difference image as a third difference image;
calculating a difference image of the third difference image and the second difference image, and determining the difference image as a fourth difference image;
and determining the intermediate frequency image corresponding to the image to be evaluated based on the fourth difference image.
5. The method according to any one of claims 1 to 4, wherein the step of performing a horizontal analysis and a vertical analysis on the intermediate frequency image to obtain an initial value for horizontal sharpness evaluation and an initial value for vertical sharpness evaluation respectively comprises:
traversing each line of pixel points of the intermediate frequency image, and determining the pixel point with the maximum corresponding numerical value from each line of pixel points as a first type of pixel point;
determining the numerical values corresponding to all the determined first-class pixel points as the initial value for evaluating the transverse definition;
traversing each row of pixel points of the intermediate frequency image, and determining the pixel point with the maximum corresponding numerical value from each row of pixel points as a second type of pixel point;
and determining the numerical values corresponding to all the second-class pixel points as the initial value for evaluating the longitudinal definition.
6. The method according to claim 5, wherein the step of determining the sharpness evaluation result of the image to be evaluated based on the lateral sharpness evaluation initial value and the longitudinal sharpness evaluation initial value comprises:
calculating the average value of all numerical values serving as positive numbers in the transverse definition evaluation initial value as a first average value;
calculating the average value of all numerical values serving as positive numbers in the longitudinal definition evaluation initial value to serve as a second average value;
and taking the maximum value of the first average value and the second average value as the definition evaluation result of the image to be evaluated.
7. The method according to claim 5, wherein the step of determining the sharpness evaluation result of the image to be evaluated based on the lateral sharpness evaluation initial value and the longitudinal sharpness evaluation initial value comprises:
sequencing all numerical values in the transverse definition evaluation initial value in an ascending or descending manner to obtain a first sequence;
screening all numerical values within a preset range from the first sequence; calculating the average value of all the screened numerical values serving as positive numbers to serve as a third average value;
sequencing all numerical values in the longitudinal definition evaluation initial value in an ascending or descending manner to obtain a second sequence;
screening all values within the preset range from the second sequence; calculating the average value of all the screened numerical values serving as positive numbers to serve as a fourth average value;
and taking the maximum value of the third average value and the fourth average value as the definition evaluation result of the image to be evaluated.
8. The method according to claim 5, wherein before the step of determining a sharpness evaluation result of the image to be evaluated based on the lateral sharpness evaluation initial value and the longitudinal sharpness evaluation initial value, the method further comprises:
acquiring a brightness component value corresponding to each pixel point in the image to be evaluated;
the step of determining the sharpness evaluation result of the image to be evaluated based on the transverse sharpness evaluation initial value and the longitudinal sharpness evaluation initial value includes:
calculating a quotient of each numerical value in the lateral definition evaluation initial value and a brightness component value corresponding to the numerical value as a first quotient, wherein the brightness component value corresponding to the numerical value is as follows: the brightness component value corresponding to the pixel point corresponding to the numerical value;
calculating a quotient of each numerical value in the longitudinal definition evaluation initial value and a brightness component value corresponding to the numerical value as a second quotient, wherein the brightness component value corresponding to the numerical value is as follows: the brightness component value corresponding to the pixel point corresponding to the numerical value;
and determining the definition evaluation result of the image to be evaluated based on the first quotient and the second quotient.
9. An image sharpness evaluating apparatus, characterized by comprising:
the first acquisition module is used for acquiring an image to be evaluated;
the filtering module is used for respectively filtering the image to be evaluated by utilizing low-pass filters configured with different filtering coefficients to obtain filtering images corresponding to the different filtering coefficients;
a first determining module, configured to determine, based on the obtained filtered images corresponding to different filter coefficients, an intermediate-frequency image corresponding to the image to be evaluated, where the intermediate-frequency image is: an image containing intermediate frequency information of the image to be evaluated;
the analysis module is used for respectively carrying out transverse analysis and longitudinal analysis on the intermediate frequency image to obtain a transverse definition evaluation initial value and a longitudinal definition evaluation initial value;
the second determination module is used for determining the definition evaluation result of the image to be evaluated based on the transverse definition evaluation initial value and the longitudinal definition evaluation initial value;
the method for obtaining the horizontal definition evaluation initial value by performing horizontal analysis on the intermediate frequency image comprises the following steps:
traversing each line of pixel points of the intermediate frequency image, and determining the pixel point with the maximum corresponding numerical value from each line of pixel points as a first type of pixel point;
determining the numerical values corresponding to all the determined first-class pixel points as the initial value for evaluating the transverse definition;
or
Calculating the average value of the values corresponding to the pixels with the positive values aiming at each row of pixels;
determining the calculated average value as an initial value for evaluating the transverse definition according to the sequence of each row;
the method for longitudinally analyzing the intermediate frequency image to obtain a longitudinal definition evaluation initial value comprises the following steps: traversing each row of pixel points of the intermediate frequency image, and determining the pixel point with the maximum corresponding numerical value from each row of pixel points as a second type of pixel point;
determining the numerical values corresponding to all the second-class pixel points as initial values for longitudinal definition evaluation;
or
Calculating the average value of the values corresponding to the pixels with the positive values aiming at each row of pixels;
and determining the calculated average value as an initial value for longitudinal definition evaluation according to the sequence of each row.
10. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the steps of the method for image sharpness evaluation according to any one of claims 1 to 8 when executing the computer program stored in the memory.
11. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, carries out the method steps of image sharpness evaluation according to any one of claims 1 to 8.
CN201810411295.XA 2018-05-02 2018-05-02 Image definition evaluating method and device and electronic equipment Active CN110458789B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201810411295.XA CN110458789B (en) 2018-05-02 2018-05-02 Image definition evaluating method and device and electronic equipment
PCT/CN2019/071003 WO2019210707A1 (en) 2018-05-02 2019-01-09 Image sharpness evaluation method, device and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810411295.XA CN110458789B (en) 2018-05-02 2018-05-02 Image definition evaluating method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN110458789A CN110458789A (en) 2019-11-15
CN110458789B true CN110458789B (en) 2022-04-05

Family

ID=68386234

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810411295.XA Active CN110458789B (en) 2018-05-02 2018-05-02 Image definition evaluating method and device and electronic equipment

Country Status (2)

Country Link
CN (1) CN110458789B (en)
WO (1) WO2019210707A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111179259B (en) * 2019-12-31 2023-09-26 北京灵犀微光科技有限公司 Optical definition testing method and device
CN113542796B (en) * 2020-04-22 2023-08-08 腾讯科技(深圳)有限公司 Video evaluation method, device, computer equipment and storage medium
CN116506719B (en) * 2023-06-21 2023-09-15 深圳华强电子网集团股份有限公司 Transmission management method based on photodiode CMOS image sensor
CN117252783A (en) * 2023-11-06 2023-12-19 上海为旌科技有限公司 Definition computing method, device and equipment for defocus blurred image

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102881003A (en) * 2012-08-30 2013-01-16 暨南大学 Method for removing cosmic rays in charge-coupled device (CCD) astronomic image
CN106127775A (en) * 2016-06-28 2016-11-16 乐视控股(北京)有限公司 Measurement for Digital Image Definition and device
US9552506B1 (en) * 2004-12-23 2017-01-24 Cognex Technology And Investment Llc Method and apparatus for industrial identification mark verification
CN106548468A (en) * 2016-10-13 2017-03-29 广州酷狗计算机科技有限公司 The method of discrimination and device of image definition
CN106934804A (en) * 2017-03-13 2017-07-07 重庆贝奥新视野医疗设备有限公司 Approach for detecting image sharpness and device
CN107507173A (en) * 2017-08-15 2017-12-22 上海交通大学 A kind of full slice image without refer to intelligibility evaluation method and system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2590135A1 (en) * 2010-06-30 2013-05-08 Nec Corporation Color image processing method, color image processing device, and color image processing program
CN103034979B (en) * 2012-11-30 2015-03-25 声泰特(成都)科技有限公司 Ultrasonic image definition improving method
US20150363916A1 (en) * 2014-06-12 2015-12-17 Samsung Electronics Co., Ltd. Low power demosaic with intergrated chromatic aliasing repair

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9552506B1 (en) * 2004-12-23 2017-01-24 Cognex Technology And Investment Llc Method and apparatus for industrial identification mark verification
CN102881003A (en) * 2012-08-30 2013-01-16 暨南大学 Method for removing cosmic rays in charge-coupled device (CCD) astronomic image
CN106127775A (en) * 2016-06-28 2016-11-16 乐视控股(北京)有限公司 Measurement for Digital Image Definition and device
CN106548468A (en) * 2016-10-13 2017-03-29 广州酷狗计算机科技有限公司 The method of discrimination and device of image definition
CN106934804A (en) * 2017-03-13 2017-07-07 重庆贝奥新视野医疗设备有限公司 Approach for detecting image sharpness and device
CN107507173A (en) * 2017-08-15 2017-12-22 上海交通大学 A kind of full slice image without refer to intelligibility evaluation method and system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Algorithm of Image Definition Evaluation Based on Lifting Scheme;Jing Zhang 等;《CMES》;20150430;第667-670页 *
基于点锐度和平方梯度的图像清晰度评价方法;薛万勋 等;《电子设计工程》;20170430;第163-167页 *

Also Published As

Publication number Publication date
CN110458789A (en) 2019-11-15
WO2019210707A1 (en) 2019-11-07

Similar Documents

Publication Publication Date Title
CN110458789B (en) Image definition evaluating method and device and electronic equipment
CN107507173B (en) No-reference definition evaluation method and system for full-slice image
CN108206917B (en) Image processing method and device, storage medium and electronic device
CN110969170B (en) Image theme color extraction method and device and electronic equipment
US11526962B2 (en) Image processing apparatus, image processing method, and storage medium
JP7212554B2 (en) Information processing method, information processing device, and program
CN109903265B (en) Method and system for setting detection threshold value of image change area and electronic device thereof
CN107454285A (en) Image noise estimation method and device and image extraction device
CN109584175B (en) Image processing method and device
CN111369486A (en) Image fusion processing method and device
CN108961209B (en) Pedestrian image quality evaluation method, electronic device and computer readable medium
CN111415304A (en) Underwater vision enhancement method and device based on cascade deep network
CN112053302A (en) Denoising method and device for hyperspectral image and storage medium
CN110855876B (en) Image processing method, terminal and computer storage medium
CN108805144A (en) Shell hole recognition methods based on morphology correction and system, indication of shots equipment
Fry et al. Bridging the gap between imaging performance and image quality measures
Russo et al. A vector approach to quality assessment of color images
CN108805852B (en) Method and device for evaluating image spatial noise
CN112950509B (en) Image processing method and device and electronic equipment
Ganesh et al. Development of image fusion algorithm for impulse noise removal in digital images using the quality assessment in spatial domain
CN112634166A (en) Image processing method and device, electronic equipment and storage medium
CN112712004B (en) Face detection system, face detection method and device and electronic equipment
CN117392009B (en) Automatic fog penetrating processing method, system, terminal and storage medium for image
CN115239685A (en) Quality comparison method, device and equipment for video cloud image and storage medium
CN111080565B (en) Exposure fusion method, device and storage medium based on image quality change rule

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
GR01 Patent grant