Method, device and computer storage medium for judging flower screen image

By performing grayscale processing and Fourier transform on a single image, the highlight features in the spectrum diagram are quantified, and a classifier is constructed for judgment, the problem of high error rate of automatic recognition of single image flower screens in the prior art is solved, and a higher judgment accuracy rate is achieved.

CN113496476BActive Publication Date: 2025-03-07北京东舟技术股份有限公司
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202010257759.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-04-02
Publication Date
2025-03-07
Estimated Expiration
2040-04-02

AI Technical Summary

Technical Problem

The lack of effective automatic recognition method for single-image screens in the prior art, resulting in a high misjudgment rate and unable to meet actual work needs.

Method used

By performing grayscale processing and Fourier transform on a single image, the spectrum map is obtained, the highlight features in the spectrum map are quantified, and these features are used to build a weak classifier or a cascade classifier for judgment.

Benefits of technology

The accuracy of judgment of the screen image is improved, and the error judgment rate is significantly reduced compared to judgment in the airspace.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113496476B_ABST
    Figure CN113496476B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device and computer storage medium for judging a flower screen image, the method comprising: grayscale processing a single image to obtain a corresponding grayscale image; Fourier transforming the grayscale image to obtain a corresponding spectrum diagram; quantifying the features of the bright spots in the spectrum diagram to obtain a quantization result; judging whether the single image is a flower screen image according to the quantization result. The flower screen image judgment method provided by the present invention can improve the judgment accuracy of flower screen images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to a method and device for judging a flower screen image, and a computer storage medium. Background Art

[0002] There is currently no feasible identification method for automatic detection of single image distorted images. In actual work, most people rely on manual detection of video conditions to filter out images with distorted images. Manual detection is inefficient and prone to omissions.

[0003] Most of the existing methods for automatically identifying single-image mosaics are based on the changes in adjacent frames of the video in the spatial domain to determine whether the image has mosaics or other problems. Due to the variability and uncertainty of two adjacent images, this method leads to a very high misjudgment rate, usually more than 20%, and cannot be applied to actual work. Summary of the invention

[0004] The purpose of the present invention is to provide a method, device and computer storage medium for judging a distorted screen image, which can improve the accuracy of judging a distorted screen image.

[0005] The technical solution adopted by the method for judging the flower screen image disclosed in the present invention is:

[0006] A method for judging a distorted screen image comprises: performing grayscale processing on a single image to obtain a corresponding grayscale image; performing Fourier transform on the grayscale image to obtain a corresponding spectrum diagram; quantifying the features of bright spots in the spectrum diagram to obtain a quantization result; judging whether the single image is a distorted screen image according to the quantization result.

[0007] As a preferred solution, before the step of performing Fourier transform on the grayscale image to obtain the corresponding spectrum diagram, the method further includes: performing denoising on the grayscale image.

[0008] As a preferred solution, the step of performing Fourier transformation on the grayscale image to obtain a corresponding spectrum diagram further includes: performing logarithmic transformation on the grayscale image after performing Fourier transformation.

[0009] As a preferred embodiment, the step of quantizing the characteristics of the bright spots in the spectrum graph and obtaining the quantization results includes: taking the relationship between the position distribution of the bright spots in the spectrum graph and the brightness as the characteristics of the bright spots; using image invariant moments to describe the distribution density and brightness of the bright spots in the spectrum graph; and obtaining the relationship between the position distribution of the bright spots and the brightness based on the image invariant moments.

[0010] As a preferred solution, the step of quantifying the features of the bright spots in the spectrum graph and obtaining the quantization results further includes: taking the number of bright spots in the imaginary part of the spectrum graph as another feature of the bright spots; and counting the number of corresponding bright spots.

[0011] As a preferred embodiment, the step of quantifying the characteristics of the bright spots in the spectrum graph and obtaining the quantization results also includes: taking the ratio of the number of bright spots in the real part of the spectrum graph to the number of bright spots in its imaginary part as another characteristic of the bright spots; and counting the number of corresponding bright spots respectively to calculate the corresponding ratio.

[0012] As a preferred solution, the step of judging whether the single image is a flower screen image according to the quantization result includes: constructing a weak classifier according to the characteristics of the bright spots; substituting the quantization result into the weak classifier to obtain a judgment result.

[0013] As a preferred scheme, the step of judging whether the single image is a flower screen image according to the quantization result includes: determining multiple features of bright spots; constructing multiple weak classifiers according to the multiple features of bright spots; constructing a cascade classifier according to the multiple weak classifiers; and substituting the quantization results of multiple features into the cascade classifier respectively to obtain a judgment result.

[0014] As a preferred solution, the step of constructing a cascade classifier based on multiple weak classifiers includes: assigning weights to multiple weak classifiers respectively, and the weights correspond to the accuracy of their flower screen image judgment; multiple weak classifiers judge a single image respectively; and multiplying the judgment result of each weak classifier by the corresponding weight as the output result.

[0015] As a preferred solution, the steps of constructing a weak classifier include: randomly selecting multiple thresholds, each threshold corresponding to constructing a classifier; counting the eigenvalues ​​of all classifiers, and sorting them from large to small according to the correct rate of the classifier's flower screen image judgment; counting the sum t1 of the eigenvalues ​​belonging to the flower screen image and the sum t0 of the eigenvalues ​​belonging to the non-flower screen image; counting the sum s1 of all flower screen images before the i-th sample and the sum s0 of all non-flower screen images; calculating r=min((s1+(t0-s0)),s0+(t1-s1)), and the minimum value r obtained is the required threshold; after determining the threshold, constructing a weak classifier, as shown below:

[0016]

[0017] Among them, x is the quantization result, f is the eigenvalue, p controls the direction of the inequality sign, and θ is the threshold.

[0018] The present solution also provides a device, including a processor and a memory, wherein the memory stores computer instructions, and the computer instructions are suitable for the processor to load and execute the above method.

[0019] The present solution also provides a computer storage medium on which a computer program is stored. The computer program is executed by a processor to implement the above method.

[0020] The beneficial effects of the embodiments disclosed in the present invention are: grayscale processing is performed on a single image to obtain a corresponding grayscale image, the grayscale image is Fourier transformed to obtain a corresponding spectrum diagram, and the image processing is transferred from the spatial domain to the frequency domain, and the frequency domain can better reflect the characteristics of the flower screen image. Then, the characteristics of the bright spots in the spectrum diagram are quantized and a quantization result is obtained. Finally, whether the single image is a flower screen image is determined based on the quantization result, which improves the accuracy of judging the flower screen image compared to judging the image in the spatial domain. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 It is a flow chart of the method for judging the flower screen image in this embodiment.

[0022] Figure 2 is the spectrum of a normal image (rotated 90° counterclockwise).

[0023] Figure 3 It is the spectrum diagram of the flower screen image (rotated 90° counterclockwise).

[0024] Figure 4 yes Figure 1 Step 30 is a flowchart of an implementation method.

[0025] Figure 5 yes Figure 1 Step 30 is a flow chart of another implementation method.

[0026] Figure 6 yes Figure 1 Step 30 is a flowchart of another implementation method.

[0027] Figure 7 It is a schematic diagram of the structure of the device provided in this embodiment. DETAILED DESCRIPTION

[0028] The present invention will be further described and illustrated below in conjunction with specific embodiments and accompanying drawings:

[0029] Please refer to Figure 1 , the method for judging the flower screen image includes:

[0030] S10: grayscale processing is performed on the single image to obtain a corresponding grayscale image;

[0031] The single image may be from a camera or any image frame in a video stream. It is understandable that this step mainly processes a single image and does not limit the type and source of the image.

[0032] After obtaining the image that needs to be judged for screen distortion, the image is first grayscale processed to obtain the corresponding grayscale image. In the RGB model, after the image is grayscaled, its R=G=B, and the color represents a grayscale color, where the value of R=G=B is called the grayscale value. Therefore, each pixel of the grayscale image only needs one byte to store the grayscale value (also known as intensity value, brightness value), and the grayscale range is 0-255.

[0033] S20: Perform Fourier transform on the grayscale image to obtain a corresponding spectrum diagram;

[0034] Please refer to Figure 2 and Figure 3 , the image after the grayscale change changes from three-dimensional RGB to one-dimensional grayscale value, and the image can be Fourier transformed at this time. After the grayscale image is Fourier transformed, the processing of the image changes from spatial domain to frequency domain. In the Fourier spectrum of the grayscale image, many bright spots of varying brightness can be seen. In fact, the strength of the difference in grayscale value between a certain point on the image and the neighboring points, that is, the size of the gradient, is also the size of the frequency of the point (the greater the difference / gradient, the higher the frequency; the smaller the difference / gradient, the lower the frequency). In general, if there are more dark points in the spectrum graph, the actual image is relatively soft (because the difference between each point and the neighboring points is not large, and the gradient is relatively small). On the contrary, if there are many bright points in the spectrum graph, the actual image must be sharp, with clear boundaries and large pixel differences on both sides of the boundary.

[0035] Furthermore, in the test of the image with a distorted screen in the frequency domain, it can be observed that there are many bright spots in the mid-high frequency part of the spectrum graph, and the distance between the bright spots is dense and distributed like scattered sand. This means that the edges of the image are very many and very close, and the edges of the image are messy and disordered, which is exactly the characteristic of the distorted screen image. This spectrum distribution shape is significantly different from that of a normal image, because the shape of the image distorted screen appears randomly, so the disordered image edges are more in line with the characteristics of the distorted screen.

[0036] In another embodiment, before the grayscale image is subjected to Fourier transform, the grayscale image is denoised using the Gaussian method. Since the characteristics of the flower screen image are disordered edges and large gradients, the image noise will affect the edge details of the flower screen image in the frequency domain, resulting in insufficient or incorrect edge reflection of the flower screen, thereby causing an erroneous judgment of the flower screen image. Therefore, after the grayscale image is denoised, the flower screen portion of the flower screen image can be fully reflected in its spectrum diagram.

[0037] Furthermore, since the value of the frequency domain after Fourier transformation is very large, a logarithmic transformation is performed after the transformation to clearly reflect the distribution characteristics of the spectrum.

[0038] After the grayscale image is Fourier transformed, its corresponding spectrum graph is divided into two parts, the left half of the spectrum graph represents the real part of the frequency domain, and the right half of the spectrum graph represents the imaginary part of the frequency domain. The characteristics of the grayscale image are mainly reflected in the left half of the spectrum graph.

[0039] S30: quantifying the features of the bright spots in the spectrum graph and obtaining a quantification result;

[0040] After determining the corresponding relationship between the distorted screen image and its spectrum graph, the bright spots on the spectrum graph are statistically quantified to determine whether the image is a distorted screen image or not.

[0041] Please refer to Figure 4 In this embodiment, step 30 specifically includes:

[0042] S322: taking the relationship between the position distribution and brightness of the bright spot in the spectrum graph as the feature of the bright spot;

[0043] The bright spots in the left half of the spectrum are quantitatively counted, and the relationship between the position of the bright spots in this area and the brightness is used as a feature. Specifically, when the image is a flower screen image, because the shape of the flower screen appears randomly, the edges of the flower screen image are very many and very close to each other, and the edges of the flower screen image are disordered. In the corresponding spectrum, the number of bright spots in the high-frequency part will increase, and the distance between the extra bright spots will be densely distributed like scattered sand. Therefore, the relationship between the position distribution of the bright spots and the brightness can well reflect the characteristics of the flower screen image.

[0044] S324: using image invariant moments to describe the distribution density and brightness of bright spots in the spectrum graph;

[0045] The image invariant moment (first-order hu moment) is used to describe the density of the bright spot distribution and the intensity of the brightness in the area, because this image feature can well characterize the relationship between the position distribution and brightness of these bright spots in the two-dimensional space of the image.

[0046] S326: Obtaining the relationship between the bright spot position distribution and the brightness intensity according to the image invariant moment;

[0047] Then, based on the relationship between the position distribution of bright spots and the brightness intensity as the main feature, it is judged whether a single image is a flower screen image.

[0048] Please refer to Figure 5 In another embodiment, step 30 specifically includes:

[0049] S342: taking the number of bright spots in the imaginary part of the spectrum graph as a feature of the bright spot;

[0050] The bright spots in the right half of the spectrum are quantitatively counted, and the number of bright spots in the imaginary part is used as a feature. Specifically, the right half of the spectrum represents the imaginary part of the frequency domain. Whether it is a flower screen image or a normal image, the number of bright spots in the imaginary part is much smaller than the number of bright spots in the real part, and the number is generally very small. Although the number of bright spots in the imaginary part is smaller than the number of bright spots in the real part in the same image, by comparing the imaginary part of the flower screen image with the imaginary part of the normal image, it is found that the number of bright spots in the imaginary part of the flower screen image is significantly increased compared with the normal image. Therefore, although the number of bright spots in the imaginary part is small, the distribution morphological characteristics of the flower screen image are not very obvious, but the number of bright spots in the imaginary part can be used as an auxiliary feature to improve the accuracy of flower screen image judgment.

[0051] S344: Count the number of corresponding bright spots.

[0052] Then, according to the number of bright spots in the imaginary part, it is judged whether the single image is a flower screen image.

[0053] Please refer to Figure 6 In another embodiment, step 30 specifically includes:

[0054] S362: taking the ratio of the number of bright spots in the real part of the spectrum graph to the number of bright spots in the imaginary part as the feature of the bright spot;

[0055] The number of bright spots in the imaginary part and the number of bright spots in the real part of the spectrum are quantitatively counted, and the ratio of the two is used as a feature. Specifically, in the spectrum of the flower screen image, the number of bright spots in the imaginary area and the number of bright spots in the real area show a certain regularity, that is, the number of bright spots in the real part is a power function of the number of bright spots in the imaginary part. Therefore, the ratio of the number of bright spots in the real part and the imaginary part can be used as an auxiliary feature to improve the accuracy of flower screen image judgment.

[0056] S364: Count the number of corresponding bright spots respectively and calculate the corresponding ratio.

[0057] Then, according to the ratio of the number of bright spots in the real part to the number of bright spots in the imaginary part, it is judged whether the single image is a flower screen image.

[0058] The three features mentioned in step S30 can all be used as the basis for judging the flower screen image. These features can be used to judge the flower screen image alone or in any combination. At the same time, these features do not affect each other, and can respectively reflect the different characteristics of the flower screen image.

[0059] S40: judging whether the single image is a distorted screen image according to the quantization result.

[0060] After the features in step S30 are quantified, it can be determined whether a single image is a distorted image based on the quantization result.

[0061] In this embodiment, one of the features in step S30 can be used as the basis for judgment. By setting a threshold, when the quantized result is greater than the set threshold, the single image is judged to be a distorted image, otherwise the single image is judged to be a normal image. The threshold can be obtained by constructing a weak classifier, and the specific process is as follows:

[0062] (1) Randomly select multiple thresholds, and construct a classifier for each threshold;

[0063] (2) Count the feature values ​​of all classifiers and sort them from large to small according to the correct rate of the weak classifiers in judging the flower screen image;

[0064] (3) Count the sum of the eigenvalues ​​t1 belonging to the flower screen image and the sum of the eigenvalues ​​t0 belonging to the non-flower screen image;

[0065] (4) Count the sum s1 of all the images belonging to the flower screen and the sum s0 of all the images belonging to the non-flower screen before the i-th sample;

[0066] (5) Calculate r = min((s1 + (t0 - s0)), s0 + (t1 - s1)), and the minimum value r is the required threshold. After determining the threshold, a weak classifier can be constructed as shown below:

[0067]

[0068] Among them, x is the image, f is the eigenvalue, p controls the direction of the inequality sign, and θ is the threshold.

[0069] In another embodiment, the above-mentioned threshold can also be obtained based on the statistics of big data. Specifically, statistics can be performed on a large number of normal images and flower screen images for corresponding features, and then an average value of the feature can be obtained respectively. Then, a threshold is set based on the average value of the two, and the threshold can be used to distinguish normal pictures from flower screen images.

[0070] In another embodiment, at least two features in step S30 are used as judgment basis, a weak classifier is constructed corresponding to each feature, and the method of constructing the weak classifier is consistent with the above, and then multiple weak classifiers are constructed into a cascade classifier (Adaboost algorithm).

[0071] Specifically, different weights are assigned to weak classifiers according to the correct rate of sample judgment of each weak classifier, that is, a larger weight is assigned to a weak classifier with a high correct rate, otherwise a smaller weight is assigned. For example, the weight ratio between weak classifiers can be the same as the correct rate ratio between them. When it is necessary to judge the flower screen image, each weak classifier is allowed to make a judgment and then vote (i.e., judge whether it is or not), and then the final voting result is calculated according to their respective weights. If the weight of the flower screen image is judged to be greater than the weight of the non-flower screen image, it is judged to be a flower screen image, otherwise it is judged to be a non-flower screen image. After using multiple features to judge a single image, the probability of misjudgment can be reduced to a certain extent. When the above three features are used as a judgment method through the method of this embodiment, after verification of a large number of images, its false detection rate is 0.6%, which greatly improves the accuracy of flower screen image judgment.

[0072] This embodiment performs grayscale processing on a single image to obtain a corresponding grayscale image, performs Fourier transform on the grayscale image to obtain a corresponding spectrum diagram, and transfers the image processing from the spatial domain to the frequency domain, and the frequency domain can better reflect the characteristics of the flower screen image. Then, the characteristics of the bright spots in the spectrum diagram are quantized, and a quantization result is obtained. Finally, whether the single image is a flower screen image is determined based on the quantization result. Compared with judging the image in the spatial domain, the judgment accuracy of the flower screen image is improved.

[0073] Please refer to Figure 7 This embodiment also provides a device, including a processor 50 and a memory 60, wherein the memory stores computer instructions, and the computer instructions are suitable for the processor to load and execute the above method.

[0074] The processor may also be referred to as a CPU (Central Processing Unit). The processor may be an integrated circuit chip with signal processing capabilities. The processor may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, but is not limited thereto.

[0075] This embodiment also provides a computer storage medium on which a computer program is stored. The computer program is executed by a processor to implement the above method.

[0076] The storage medium can be a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, or other media that can store program codes, or a terminal device such as a computer, a server, a mobile phone, or a tablet.

[0077] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention, rather than to limit the scope of protection of the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the essence and scope of the technical solution of the present invention.

Claims

1. A method for judging a distorted screen image, characterized in that: include: Perform grayscale processing on a single image to obtain a corresponding grayscale image; Performing Fourier transformation on the grayscale image to obtain a corresponding spectrum diagram; Quantifying the characteristics of the bright spots in the spectrum graph and obtaining a quantification result; According to the quantification result, determining whether the single image is a flower screen image; The step of quantifying the features of the bright spots in the spectrum graph and obtaining the quantization results comprises: The relationship between the position distribution and brightness of the bright spot in the spectrum graph is used as the feature of the bright spot; Image invariant moments are used to describe the distribution density and brightness of bright spots in the spectrum graph; The relationship between the bright spot position distribution and the brightness is obtained based on the image invariant moment; The step of judging whether the single image is a distorted screen image according to the quantization result comprises: Construct a weak classifier based on the characteristics of the bright spot; Substitute the quantization result into the weak classifier to obtain the judgment result.

2. The method for judging a distorted screen image according to claim 1, wherein: Before the step of performing Fourier transform on the grayscale image to obtain the corresponding spectrum graph, the step further includes: The grayscale image is subjected to denoising processing.

3. The method for judging a distorted screen image according to claim 1, wherein: The step of performing Fourier transform on the grayscale image to obtain a corresponding spectrum diagram also includes: The grayscale image is logarithmically transformed after being Fourier transformed.

4. The method for judging a distorted screen image according to claim 1, wherein: The step of quantifying the features of the bright spots in the spectrum graph and obtaining the quantization results also includes: The number of bright spots in the imaginary part of the spectrum graph is used as another feature of the bright spots; Count the number of corresponding bright spots.

5. The method for judging a distorted screen image according to claim 1, wherein: The step of quantifying the features of the bright spots in the spectrum graph and obtaining the quantization results also includes: The ratio of the number of bright spots in the real part of the spectrum to the number of bright spots in its imaginary part is used as another feature of the bright spots; The number of corresponding bright spots is counted respectively, and the corresponding ratio is calculated.

6. The method for judging a distorted screen image according to claim 1, wherein: The step of judging whether the single image is a distorted screen image according to the quantization result comprises: Determine multiple characteristics of bright spots; Construct multiple weak classifiers according to the multiple features of the bright spots; Construct a cascade classifier based on multiple weak classifiers; Substitute the quantization results of multiple features into the cascade classifier respectively to obtain the judgment results.

7. The method for determining a distorted screen image according to claim 6, wherein: The step of constructing a cascade classifier according to a plurality of weak classifiers comprises: Assigning weights to the multiple weak classifiers respectively, wherein the weights correspond to the correct rates of the flower screen image judgments; Multiple weak classifiers judge a single image separately; The judgment result of each weak classifier is multiplied by the corresponding weight as the output result.

8. The method for determining a distorted screen image according to claim 1 or 6, wherein: The steps to construct a weak classifier include: Randomly select multiple thresholds, and build a classifier for each threshold; Count the feature values ​​of all classifiers and sort them from large to small according to the correct rate of the classifiers in judging the flower screen image; Count the sum of the eigenvalues ​​t1 belonging to the flower screen image and the sum of the eigenvalues ​​t0 belonging to the non-flower screen image; Count the sum s1 of all the distorted images and the sum s0 of all the non-distorted images before the i-th sample; Calculate r = min((s1 + (t0 - s0)), s0 + (t1 - s1)), and the minimum value r obtained is the required threshold; After determining the threshold, construct a weak classifier as follows: Among them, x is the quantization result, f is the eigenvalue, p controls the direction of the inequality sign, and θ is the threshold.

9. A device for judging a distorted screen image, characterized in that: The method comprises a processor and a memory, wherein the memory stores computer instructions, and the computer instructions are suitable for the processor to load and execute the method according to any one of claims 1 to 8.

10. A computer storage medium having a computer program stored thereon, characterized in that: The computer program is executed by a processor to implement the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • A monitoring video stripe rapid detection method

    CN109712107A