Image clarity determination method, system and image uploading method
By processing images with Gaussian functions and edge operators, a gradient intensity map is obtained, and the number of pixels with gradient intensities greater than a threshold is counted. This solves the problem of devices with low computing resources being unable to accurately judge image clarity, implements quality review before image upload, and reduces server pressure.
Patent Information
- Application Number
- CN202210404558.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-18
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2042-04-18
AI Technical Summary
In the prior art, devices with low computing resources cannot accurately determine the clarity of an image before uploading it, resulting in repeated image uploads and wasting server computing power.
The image is processed using Gaussian function and edge operator to obtain the gradient intensity map of each pixel. The image clarity is determined by counting the number of pixels with gradient intensities greater than different thresholds.
Accurately judge the image clarity before uploading, reduce repeated uploading, and reduce the pressure on the server.
Smart Images

Figure CN114723721B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to an image clarity determination method, system and image uploading method. Background Art
[0002] In recent years, with the continuous development of deep learning algorithms, the theoretical and technical applications of deep learning algorithms in the field of imaging have gradually been implemented. Because these algorithms generally require high computing resources, how to integrate these algorithms with mobile phones, microcontrollers, and other devices with low computing power has become a hot research topic.
[0003] Taking deep learning algorithms related to OCR as an example, a popular deployment method is to deploy the deep learning algorithm on the server side. After taking a photo with a mobile phone (such as a photo of an ID card), it is uploaded to the server. The server uses the algorithm to recognize the text in the image and then performs the next step based on the business logic. However, if the image uploaded by the mobile phone is of poor quality and recognition fails, it must be re-uploaded. This repeated upload of the image wastes the server's computing power. Summary of the Invention
[0004] The purpose of the present invention is to provide a method, system and image uploading method for determining image clarity, which can use a machine with low computing power to more accurately determine the image clarity, so that the image quality can be reviewed before uploading the image to solve the pressure on the server caused by repeated uploading.
[0005] In order to achieve the above-mentioned objectives, the first aspect of the present invention provides a method for determining image clarity, which includes: processing an image using a Gaussian function and an edge operator to obtain a gradient intensity map at each pixel point of the image; determining the number of first pixels and the number of second pixels of the image according to the gradient intensity map at each pixel point, wherein the gradient intensity of the first pixel point is greater than a first threshold, and the gradient intensity of the second pixel point is greater than a second threshold; and determining the clarity of the image according to the number of the first pixel points and the number of the second pixel points.
[0006] Preferably, the image processing using a Gaussian function and an edge operator includes: determining a Gaussian edge operator based on the Gaussian function and the edge operator, wherein the Gaussian function and the edge operator are associated with a first specific parameter; performing weighted averaging processing on the pixel values at each pixel point on each channel of the image; and performing convolution processing on the pixel values at each pixel point of the weighted averaged image using the Gaussian edge operator.
[0007] Preferably, the image processing using the Gaussian function and the edge operator includes: smoothing the image using the Gaussian function, wherein the Gaussian function is associated with a second specific parameter; performing weighted averaging on the pixel values of each pixel point on each channel of the smoothed image; and convolution processing on the pixel values at each pixel point of the weighted averaged image using the edge operator, wherein the edge operator is associated with the second specific parameter.
[0008] Preferably, the edge operator is a Laplace operator.
[0009] Preferably, the first threshold is smaller than the second threshold, and determining the clarity of the image includes: determining the ratio of the number of the second pixel points to the number of the first pixel points as the clarity of the image.
[0010] Preferably, the image is a text image.
[0011] Through the above technical solution, the present invention creatively processes the image by first using a Gaussian function and an edge operator to obtain a gradient intensity map at each pixel of the image; then, based on the gradient intensity map at each pixel, the number of first pixels and the number of second pixels of the image are determined, respectively, wherein the gradient intensity of the first pixel is greater than a first threshold, and the gradient intensity of the second pixel is greater than a second threshold; finally, the clarity of the image is determined based on the number of the first pixel and the number of the second pixel. Therefore, starting from machines with low computing power such as mobile phones and single-chip microcomputers, the present invention designs a method that does not require high computing resources but can relatively accurately judge image clarity, in order to review the image quality before uploading the image to solve the pressure on the server caused by repeated uploading.
[0012] A second aspect of the present invention provides an image clarity determination system, characterized in that the image clarity determination system includes: a processing device for processing an image using a Gaussian function and an edge operator to obtain a gradient intensity map at each pixel point of the image; a first determination device for determining the number of first pixel points and the number of second pixel points of the image based on the gradient intensity map at each pixel point, wherein the gradient intensity of the first pixel point is greater than a first threshold, and the gradient intensity of the second pixel point is greater than a second threshold; and a second determination device for determining the clarity of the image based on the number of the first pixel points and the number of the second pixel points.
[0013] For specific details and benefits of the image clarity determination system provided by the present invention, please refer to the above description of the image clarity determination method, which will not be repeated here.
[0014] A third aspect of the present invention provides an image uploading method, which includes: determining the clarity of the image according to the image clarity determination method; and uploading the image when the clarity of the image is greater than a preset clarity.
[0015] Through the above technical solution, the present invention creatively determines the clarity of an image based on the image clarity determination method; and uploads the image when the clarity of the image is greater than a preset clarity. Therefore, the image quality can be reviewed before uploading the image to solve the pressure on the server caused by repeated uploading.
[0016] A fourth aspect of the present invention further provides a machine-readable storage medium, on which instructions are stored, the instructions being used to enable a machine to execute the above-mentioned image clarity determination method and / or the above-mentioned image uploading method.
[0017] The fifth aspect of the present invention also provides an electronic device, which includes: a processor; a memory for storing executable instructions of the processor; the processor is used to read the executable instructions from the memory and execute the instructions to implement the above-mentioned image clarity determination method and / or the above-mentioned image uploading method.
[0018] A sixth aspect of the present invention provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the above-mentioned image clarity determination method and / or the above-mentioned image uploading method.
[0019] Other features and advantages of the present invention will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The accompanying drawings are used to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the following detailed description, they are used to explain the embodiments of the present invention, but do not constitute a limitation of the embodiments of the present invention. In the accompanying drawings:
[0021] Figure 1 is an example of an image gradient provided by an embodiment of the present invention;
[0022] Figure 2 is a flow chart of a method for determining image clarity provided by one embodiment of the present invention;
[0023] Figure 3A and Figure 3B is an example of a text image provided by an embodiment of the present invention; and
[0024] Figure 4 2 is a two-dimensional schematic diagram of a LoG operator provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0025] The following describes the specific embodiments of the present invention in detail with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only used to illustrate and explain the present invention and are not intended to limit the present invention.
[0026] Convolution is a key technique in computer graphics, widely used in various image processing and image information extraction tasks. Among all image information extraction tasks, edge information extraction is a widely used branch. Typically, edge information is determined using convolution operations related to calculating image gradients, such as the Sobel operator, Scharr operator, and Laplacian operator.
[0027] Taking the Sobel operator as an example, its 3*3 convolution kernel is as follows:
[0028]
[0029] It can be seen that the Sobel operator is composed of two matrices in the x-direction and the y-direction. Figure 1 When performing convolution, since the pixels at point O are bilaterally symmetrical, the Sobel operator in the x-direction equals -1*0.5+1*0.5=0, meaning there is no gradient; while the Sobel operator in the y-direction equals -1*0.5-2*0.5-1*0.5=-2. Therefore, when determining whether a convolution location is an edge, the convolution result and the positive or negative value of the Sobel operator are used to determine whether it changes upward, downward, left, or right.
[0030] If we do not need to know the direction of the edge when judging the edge, but only need to know whether a certain position is an edge, then it is more appropriate to use the Laplace operator, and its 3*3 convolution kernel is as follows:
[0031]
[0032] From the form of the convolution kernel, it is not difficult to imagine that the result is the same for edge information in any direction. If the Laplace operator is applied to a convolution kernel of a larger size, it can be derived from the second-order differential of the image according to the following formula:
[0033]
[0034] In fact, in addition to determining image edge information, the Laplacian operator can also be used to determine image clarity. For example, when calculating whether a convolution center is an "edge," the absolute value of the Laplacian operator's calculation result can be compared with a pre-set threshold. If the absolute value is higher than the threshold, it indicates that the location is an edge; otherwise, it is not an edge.
[0035] Furthermore, when an image is extremely sharp, a large number of locations should be judged as "edges." Conversely, if an image is very blurry and changes very smoothly, the number of pixels judged as edges will be relatively small, or even close to zero. Therefore, in various embodiments of the present invention, the number of "edges" in an image can be used to determine the clarity of an image.
[0036] Figure 2 FIG. 1 is a flow chart of a method for determining image clarity provided by an embodiment of the present invention. Figure 2 As shown, the image clarity determination method may include steps S101-S103.
[0037] Step S101 : Processing an image using a Gaussian function and an edge operator to obtain a gradient intensity map at each pixel point of the image.
[0038] In one embodiment, for step S101, the processing of the image using a Gaussian function and an edge operator may include: smoothing the image using the Gaussian function, wherein the Gaussian function is associated with a second specific parameter; performing convolution processing on the pixel values of each pixel point on each channel of the smoothed image using the edge operator, wherein the edge operator is associated with the second specific parameter; and performing weighted averaging processing on the convolution results of the image at each pixel point on each channel (for example, the ratio of the weights of each channel may be 1:1:1), thereby obtaining a gradient intensity map at each pixel point of the image.
[0039] The image may be Figure 3A or Figure 3B The text image shown in FIG. Wherein, the edge operator may be a Sobel operator, a Scharr operator, a Canny operator or a Laplace operator.
[0040] Specifically, first, a Gaussian filter is used to smooth the image.
[0041] The Laplace operator is a measure of the second-order derivative in the image space on the two-dimensional isotropy. The image processed by the Laplace operator can highlight the area where the derivative intensity changes rapidly. Therefore, the Laplace operator is often used for edge detection. However, due to its sensitivity to changes in the derivative intensity, the Laplace operator is usually more responsive to noise. Therefore, when applying it, it can be first filtered with a Gaussian filter (i.e., Gaussian function). ) smoothes the image to reduce its sensitivity to noise. It is important to note that the strength of the Gaussian filter can be adjusted by increasing the second specific parameter σ2, thereby removing most of the noise while retaining the main information of the image.
[0042] Secondly, using edge operators (e.g., Laplace operators ) compresses image channels and converts them to black and white.
[0043] For multi-channel image data, the edge operator is first used to perform a convolution operation on each channel (for example, red, green, and blue channels), and then a weighted average is performed (for example, the ratio of the weights of each channel can be 1:1:1), thereby obtaining the gradient intensity map at each pixel point. The order of the convolution operation and the weighted average operation (i.e., weighted average first and then convolution, or convolution first and then weighted average) does not affect the final result. However, in order to reduce the amount of calculation, the weighted average operation can be brought forward.
[0044] In one embodiment, for step S101, the processing of the image using the Gaussian function and the edge operator may include: smoothing the image using the Gaussian function, wherein the Gaussian function is associated with the second specific parameter; performing weighted averaging on the pixel values of each pixel point on each channel of the smoothed image; and convolving the pixel values at each pixel point of the weighted averaged image using the edge operator, wherein the edge operator is associated with the second specific parameter.
[0045] That is, first, a weighted average process is performed on each channel (e.g., red, green, and blue channels) (the weight ratio of each channel can be reasonably set according to actual needs, for example, it can be 1:1:1), and then a convolution operation is performed using an edge operator. The specific operation content can be found in the description of the above embodiment and will not be repeated here.
[0046] In addition, to further improve computational efficiency, the Laplacian of Gaussian (LoG) can be calculated in advance as a whole, so that the image only needs to be convolved once to obtain the results of the above two convolutions.
[0047] In one embodiment, for step S101, the image processing using a Gaussian function and an edge operator can also be achieved by the following steps: determining a Gaussian edge operator based on the Gaussian function and the edge operator, wherein the Gaussian function and the edge operator are associated with a first specific parameter; performing weighted averaging processing on the pixel values at each pixel point of the image on each channel; and performing convolution processing on the pixel values at each pixel point of the image obtained by weighted averaging using the Gaussian edge operator, thereby obtaining a gradient intensity map at each pixel point of the image.
[0048] The image may be Figure 3A or Figure 3B The text image shown in FIG. Wherein, the edge operator may be a Sobel operator, a Scharr operator, a Canny operator or a Laplace operator.
[0049] Specifically, first, determine the Gaussian function With the Laplace operator The Gaussian function and the edge operator are associated with a first specific parameter σ1 (which can be reasonably adjusted according to actual conditions, for example, σ1=1). Specifically, for the Gaussian function, the smaller the σ1 value, the sharper the filtering result obtained by the Gaussian function; for the edge operator, the smaller the σ1 value, the larger the convolution result obtained by the edge operator.
[0050] In this embodiment, the following Gaussian Laplacian operator is obtained according to the product of the above Gaussian function and the above Laplacian operator, which can greatly improve the stability of the convolution result and is applicable to smooth scenes or rapidly changing scenes.
[0051]
[0052] Among them, the two-dimensional image corresponding to the above-mentioned Gaussian Laplace operator is as follows: Figure 4 For ease of calculation, the above-mentioned Laplacian of Gaussian operator usually uses the following matrix as the convolution kernel for direct convolution:
[0053]
[0054] Secondly, the pixel values at each pixel point on each channel of the image are weighted averaged (the ratio of each weight can be reasonably set according to actual needs, for example, it can be 1:1:1); and the above-mentioned Gaussian edge operator LoG is used to perform convolution processing on the pixel values at each pixel point of the weighted averaged image, so as to obtain the gradient intensity map at each pixel point.
[0055] As mentioned above, if the Laplacian operator is applied directly to the image, the result of the calculation only represents the gradient intensity of each pixel position, so the number of pixels whose statistical gradient intensity exceeds a certain threshold only represents the texture richness of the image. Figure 3A and Figure 3B As shown, Figure 3A The texture richness is Figure 3B However, the clarity of the two images is actually the same. Therefore, the convolution result of the Laplace operator cannot be directly used as an indicator to measure the clarity of text in the image.
[0056] Step S102 : determining the number of first pixel points and the number of second pixel points of the image respectively according to the gradient intensity map at each pixel point.
[0057] The gradient intensity of the first pixel point is greater than a first threshold, and the gradient intensity of the second pixel point is greater than a second threshold.
[0058] Although the number of "edges" in an image can be used to judge the clarity of an image, compared with an image of equal clarity but with fewer patterns, an image with denser patterns will inevitably have more "edges". If a unified threshold is used, it will inevitably cause a large number of misjudgments.
[0059] To determine the clarity of images with different texture richness, this embodiment proposes to use the division result of two convolution results of Gaussian Laplacian operator as a measurement index. Specifically, first take Figure 3A The absolute value of each element in the Laplace operator convolution result (which is a matrix) is calculated to form a matrix A corresponding to the convolution result (that is, the absolute value of the element in the i-th row and j-th column of the convolution result is equal to the element in the i-th row and j-th column of the matrix A). Figure 3B The corresponding result is the matrix B, where the first threshold t0 is a lower threshold (such as 0.05), and the second threshold t1 is a higher threshold (such as 0.5). For the convolution results of the LoG operator of the two images, the number of pixels exceeding the two thresholds can be counted respectively, and the following calculation can be performed:
[0060]
[0061]
[0062]
[0063]
[0064] The difference between formula (1) and formula (3), and formula (2) and formula (4) is caused by the density of the text (pattern), while the difference between formula (1) and formula (2), and formula (3) and formula (4) is caused by the threshold. Therefore, the calculation results of the following formulas (5)-(6) are proposed as indicators of image text clarity:
[0065]
[0066]
[0067] That is, instead of taking the total number of pixels in the image (∑ a∈A 1 or ∑ b∈B 1) is not used as the base number, but the number of pixels in the image whose gradient exceeds a certain value (for example, t0) is used as the base number to measure the ratio of the statistical results of the two thresholds as the clarity of the text. The advantage of this is that no matter how much text there is in the image, it will not affect the final result. For a blurred image, there will be a large number of pixels exceeding the lower threshold, but at the same time, the parts with no gradient at all (such as large blocks of continuous same color) can be filtered out, and only a small number of pixels exceed the higher threshold. Therefore, the final ratio result is lower. For clear (i.e. sharp) images, the ratio of the two (the number of pixels exceeding the higher threshold to the number of pixels exceeding the lower threshold) should be closer to 1.
[0068] Specifically, for each image processed in step S101, based on the gradient intensity map at each pixel point of the image, the number of pixel points (i.e., first pixel points) with a gradient intensity greater than t0 (e.g., 0.05) and the number of pixel points (i.e., second pixel points) with a gradient intensity greater than t1 (e.g., 0.5) are counted, where t0 <t1。
[0069] Step S103: determining the clarity of the image according to the number of the first pixels and the number of the second pixels.
[0070] Wherein, the first threshold is smaller than the second threshold. Accordingly, determining the clarity of the image includes: determining the ratio of the number of the second pixel points to the number of the first pixel points as the clarity of the image.
[0071] As for the first threshold and the second threshold, in practical applications, since the pixels corresponding to the valid information in text images (such as newspapers, tables and various files) are usually sharper and the corresponding gradient values are relatively large, the effective threshold can be set to a larger value. When using the above-mentioned Lagasse (LoG) operator to perform convolution on a 512*512 image, setting t0 to a value in the range of 0.01 to 0.1 (including the end value) and t1 to a value in the range of 0.1 to 0.5 (including the end value) both have good results. Specifically, a test data set can be used to perform a grid search within the range of the above-mentioned t0 and t1, and a model threshold that can output better results can generally be obtained. However, for a few special scenarios, if better results cannot be output, t0 and t1 can be set to the gradient average of all pixels in the image plus 1 gradient standard deviation of all pixels, and the gradient average plus 3 gradient standard deviations, respectively, based on the gradient statistics of all pixels (that is, the statistical information of the results obtained by convolution using the LoG operator), that is,
[0072] t0=μ+σ
[0073] t1=μ+3σ.
[0074] For other non-text images, a value smaller than the above two thresholds can be reasonably selected as the threshold.
[0075] Specifically, the number of pixels with a gradient strength greater than t1 (e.g., 0.5) (i.e., the second pixel) is divided by the number of pixels with a gradient strength greater than t0 (e.g., 0.05) (i.e., the first pixel) to obtain a ratio between the two, and the obtained ratio is determined as the clarity of the image. Figure 3A , the ratio of the number of pixels (i.e., the second pixel) whose gradient intensity is greater than t1 (e.g., 0.5) to the number of pixels (i.e., the first pixel) whose gradient intensity is greater than t0 (e.g., 0.05) is 0.25; Figure 3B , the ratio of the number of pixels (i.e., the second pixel) whose gradient strength is greater than t1 (e.g., 0.5) to the number of pixels (i.e., the first pixel) whose gradient strength is greater than t0 (e.g., 0.05) is also 0.25. Figure 3A and 3B For example, the clarity of the two is equal, both are 0.25.
[0076] In summary, the present invention creatively processes an image by first using a Gaussian function and an edge operator to obtain a gradient intensity map at each pixel of the image; then, based on the gradient intensity map at each pixel, the number of first pixels and the number of second pixels of the image are determined, respectively, wherein the gradient intensity of the first pixel is greater than a first threshold, and the gradient intensity of the second pixel is greater than a second threshold; finally, the clarity of the image is determined based on the number of the first pixel and the number of the second pixel. Therefore, starting from machines with low computing power such as mobile phones and single-chip microcomputers, the present invention designs a method that does not require high computing resources but can more accurately judge the clarity of an image, in order to review the image quality before uploading the image to solve the pressure on the server caused by repeated uploading.
[0077] An embodiment of the present invention also provides an image clarity determination system, which includes: a processing device for processing an image using a Gaussian function and an edge operator to obtain a gradient intensity map at each pixel point of the image; a first determination device for determining the number of first pixels and the number of second pixels of the image based on the gradient intensity map at each pixel point, wherein the gradient intensity of the first pixel point is greater than a first threshold, and the gradient intensity of the second pixel point is greater than a second threshold; and a second determination device for determining the clarity of the image based on the number of the first pixel points and the number of the second pixel points.
[0078] For specific details and benefits of the image clarity determination system provided by the present invention, please refer to the above description of the image clarity determination method, which will not be repeated here.
[0079] An embodiment of the present invention further provides an image uploading method, which may include: determining the clarity of the image according to the image clarity determination method; and uploading the image when the clarity of the image is greater than a preset clarity.
[0080] In summary, the present invention creatively determines the clarity of an image based on the image clarity determination method; and uploads the image when the clarity of the image is greater than a preset clarity. Thus, the image quality can be reviewed before uploading the image to solve the pressure on the server caused by repeated uploading.
[0081] An embodiment of the present invention further provides a machine-readable storage medium, on which instructions are stored, and the instructions are used to enable a machine to execute the above-mentioned image clarity determination method and / or the above-mentioned image uploading method.
[0082] An embodiment of the present invention also provides an electronic device, comprising: a processor; a memory for storing executable instructions of the processor; the processor for reading the executable instructions from the memory and executing the instructions to implement the above-mentioned image clarity determination method and / or the above-mentioned image uploading method.
[0083] An embodiment of the present invention further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the above-mentioned image clarity determination method and / or the above-mentioned image uploading method.
[0084] The above describes in detail the optional implementation methods of the embodiments of the present invention in conjunction with the accompanying drawings. However, the embodiments of the present invention are not limited to the specific details in the above implementation methods. Within the technical concept of the embodiments of the present invention, various simple modifications can be made to the technical solutions of the embodiments of the present invention, and these simple modifications all fall within the scope of protection of the embodiments of the present invention.
[0085] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any appropriate manner without contradiction. To avoid unnecessary repetition, the embodiments of the present invention will not further describe various possible combinations.
[0086] Those skilled in the art will understand that all or part of the steps in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a program, which is stored in a storage medium and includes a number of instructions for causing a single-chip microcomputer, chip or processor to execute all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program code.
[0087] In addition, various implementations of the embodiments of the present invention may be arbitrarily combined, and as long as they do not violate the concept of the embodiments of the present invention, they should also be regarded as the contents disclosed in the embodiments of the present invention.
Claims
1. A method for determining image clarity, characterized in that: The image clarity determination method comprises: The image is processed using a Gaussian function and an edge operator to obtain a gradient intensity map at each pixel point of the image; determining, based on the gradient intensity map at each pixel point, the number of first pixels and the number of second pixels in the image, respectively, wherein the gradient intensity of the first pixel point is greater than a first threshold, and the gradient intensity of the second pixel point is greater than a second threshold; and determining the clarity of the image according to the number of the first pixels and the number of the second pixels; The first threshold is less than the second threshold; The determining of the definition of the image includes: determining a ratio of the number of the second pixel points to the number of the first pixel points as the definition of the image.
2. The image clarity determination method according to claim 1, wherein: The image processing using the Gaussian function and the edge operator includes: determining a Gaussian edge operator according to the Gaussian function and the edge operator, wherein the Gaussian function and the edge operator are associated with a first specific parameter; Performing weighted averaging processing on the pixel values of each pixel point in each channel of the image; and The Gaussian edge operator is used to perform convolution processing on the pixel value at each pixel point of the weighted average image.
3. The method for determining image clarity according to claim 1, wherein: The image processing using the Gaussian function and the edge operator includes: performing smoothing processing on the image using the Gaussian function, wherein the Gaussian function is associated with a second specific parameter; Performing weighted averaging processing on the pixel values of each pixel point on each channel of the smoothed image; and The edge operator is used to perform convolution processing on the pixel value at each pixel point of the image obtained by weighted averaging, wherein the edge operator is associated with the second specific parameter.
4. The method for determining image clarity according to claim 1, wherein: The edge operator is a Laplace operator.
5. The method for determining image clarity according to claim 1, wherein: The image is a text image.
6. An image clarity determination system, characterized in that: The image clarity determination system comprises: A processing device, configured to process an image using a Gaussian function and an edge operator to obtain a gradient intensity map at each pixel point of the image; a first determining device for determining, based on the gradient intensity map at each pixel point, the number of first pixels and the number of second pixels in the image, respectively, wherein the gradient intensity of the first pixel point is greater than a first threshold value, and the gradient intensity of the second pixel point is greater than a second threshold value; and a second determining device, configured to determine the clarity of the image according to the number of the first pixel points and the number of the second pixel points; The first threshold is less than the second threshold; The determining of the definition of the image includes: determining a ratio of the number of the second pixel points to the number of the first pixel points as the definition of the image.
7. A method for uploading an image, characterized in that: The image uploading method comprises: The image clarity determination method according to any one of claims 1 to 5, determining the clarity of an image; and When the definition of the image is greater than a preset definition, the image is uploaded.
8. A machine-readable storage medium, characterized in that The machine-readable storage medium stores instructions for enabling a machine to execute the image clarity determination method according to any one of claims 1 to 5 and / or the image uploading method according to claim 7.
9. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing instructions executable by the processor; The processor is configured to read the executable instructions from the memory and execute the instructions to implement the image clarity determination method described in any one of claims 1 to 5 and / or the image uploading method described in claim 7.
Citation Information
Patent Citations
Method and server for obtaining test question analysis information
CN104715253A
Character recognition method and character recognition device
CN107403130A
Image recognition method and device and automatic sorting robot
CN113763311A