Image validity analysis method, system and device and storage medium

By performing partitioning and weight calculation on the image, the problem of high local area error judgment rate in the prior art is solved, the accuracy of image effectiveness analysis and the efficiency of AI analysis are improved, and the misjudgment rate is reduced.

CN118941521APending Publication Date: 2024-11-12WUHAN XINGHUAN HENGYU INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410978278.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-19
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

The existing image validity evaluation method has a high misjudgment rate when evaluating images with effective local areas, resulting in the missed or incorrectly screened, affecting the accuracy of AI analysis and computing power consumption.

Method used

By partitioning the image, the weights of each area are calculated, and the validity of the image is obtained based on the weights, avoiding only evaluating the image in an overall manner, thereby improving accuracy and reducing the misjudgment rate. The specific steps include preprocessing and removing abnormal images, dividing rectangular areas, calculating and normalizing the mean and variance of grayscale values, combining them into weights, obtaining valid reference values ​​after sorting, and judging the validity of the image based on the threshold.

Benefits of technology

It improves the accuracy of image effectiveness analysis, reduces the misjudgment rate of effective image screening, ensures that effective feature information in local areas is not missed, and improves the accuracy and processing efficiency of AI analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118941521A_ABST
    Figure CN118941521A_ABST
Patent Text Reader

Abstract

The invention provides an image validity analysis method, which comprises the following steps of: acquiring acquired image data, and removing abnormal image data in the acquired image data through preprocessing; dividing the image into a plurality of areas, and calculating the weight of each area; obtaining an effective reference value of the current image according to the weight of each area; and judging whether the effective reference value of the current image is smaller than a threshold value, if so, judging that the image is an effective image, and otherwise, judging that the image is an invalid image. According to the method, the image is subjected to partition processing, each region of the image can be covered, and the image can be judged as an effective image even if effective feature information exists in a local region of the image, so that the image of which only the local region contains the effective feature information is prevented from being missed, and the accuracy of image validity analysis is improved; and the misjudgment rate of effective image screening is reduced.
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 an image validity analysis method, system, device and storage medium. Background Art

[0002] When the aircraft is conducting reconnaissance work on the ground environment during flight, it needs to use video acquisition equipment to shoot the ground at a certain angle, and analyze the captured video to detect some suspicious targets. The analysis of suspicious targets in the video currently uses AI technology, which can detect suspicious targets better and more intelligently. The entire AI analysis process is a fully automatic analysis mode, which obtains the video of the video acquisition device, uses the neural network model to analyze suspicious targets, and then records or pushes the results out.

[0003] However, during the flight of the aircraft, affected by various factors such as the environment, the collected video image data contains many invalid images (images that do not contribute to subsequent AI feature extraction). If the video image data collected by the video acquisition device is not screened, and AI analysis is directly performed on all the collected video images, on the one hand, the accuracy of the AI ​​analysis will be reduced, and on the other hand, the computing power consumption of the AI ​​processor will be increased.

[0004] A Chinese patent with publication number CN114782731A discloses a method for evaluating the effectiveness of an image data set. The method converts sample data into feature vectors to intuitively display the feature differences between sample data. Then, based on the spatial distribution of feature vectors, the sample data corresponding to discretely distributed feature vectors are screened as invalid sample data. The patent has the following defects: when there is feature information in a local area of ​​the image that contributes to subsequent AI feature extraction, the image is also valid. However, when the patent uses the method of making an overall judgment on the image to evaluate the image, the misjudgment rate is high. Summary of the invention

[0005] The present invention provides an image validity analysis method, system, device and storage medium, which solve the problems of high misjudgment rate when evaluating images with local area validity in existing image validity evaluation methods.

[0006] The technical solution of the present invention is achieved in this way:

[0007] A first aspect of the present invention provides an image validity analysis method, comprising the following steps:

[0008] Acquire the collected image data and remove abnormal image data therein through preprocessing;

[0009] Divide the image into several regions and calculate the weight of each region;

[0010] Obtaining effective reference values ​​of the current image according to the weights of each region;

[0011] It is determined whether the effective reference value of the current image is less than a threshold value. If so, the image is determined to be a effective image; otherwise, the image is determined to be an invalid image.

[0012] The present invention can cover all areas of the image by partitioning the image. Even if there is valid feature information in a local area of ​​the image, it can be judged as a valid image, thereby avoiding the omission of images that only have valid feature information in the local area, thereby improving the accuracy of image validity analysis and reducing the misjudgment rate of valid image screening.

[0013] Specifically, the method for preprocessing an image includes: detecting the brightness, contrast or clarity of the image, and eliminating images with abnormal brightness, contrast or clarity.

[0014] Specifically, the image is divided into the following 7 regions:

[0015] rect(1)={0, 0, width, height}

[0016]

[0017] Among them, rect(i) = {x, y, w, h} represents the i-th rectangular area, (x, y) represents the starting point coordinates of the i-th rectangular area; w and h represent the width and height of the i-th rectangular area respectively; width and height represent the width and height of the entire image respectively.

[0018] Specifically, the method for calculating the weight of each region is:

[0019] The mean and variance of the grayscale values ​​in each rectangular area are calculated respectively, and the mean and variance of the grayscale values ​​in each rectangular area are normalized. The normalization formula is as follows:

[0020] NormMean rect (i) = Mean rect(i) / 100

[0021] NormVar rect(i) =Var rect(i) / 60

[0022] Among them, Mean rect(i) 、Var rect(i) Respectively represent the mean and variance of the grayscale value in the i-th rectangular area, NormMeann rect(i) 、NormVar rect(i)Respectively represent the normalized mean and variance of the i-th rectangular area;

[0023] The normalized mean and variance of the i-th region are combined into weights. The combination formula is as follows:

[0024] W rect(i) =0.3×NormVar rect(i) +0.7×NormMean rect(i)

[0025] Among them, W rect(i) represents the weight of the ith region.

[0026] Specifically, the method for obtaining the effective reference value of the current image is as follows:

[0027] Sort the weights of each area in the current image from small to large;

[0028] Take the weight value of sequence number 3 as the minimum value, denoted as SortW rect(3) ; Take the weight value of sequence number 5 as the maximum value, denoted as SortW rect(5) ;

[0029] The effective reference value of the current image is calculated by the following formula:

[0030] Valid=SortW rect(3) / SortW rect(5)

[0031] Wherein, Valid represents the valid reference value of the current image.

[0032] Specifically, the threshold is obtained by the following method:

[0033] Obtain a large amount of image data to build a sample set, of which valid images account for 3 / 5 of the sample set;

[0034] Calculate the effective reference value of each image sample in the sample set respectively, and sort the effective reference value of each image sample in ascending order;

[0035] The effective reference value corresponding to the 3 / 5 position is taken as the threshold.

[0036] A second aspect of the present invention provides an image validity analysis system, comprising:

[0037] An image acquisition module, used for acquiring image data;

[0038] A preprocessing module, used to remove abnormal image data;

[0039] A region division module is used to divide the image into several regions;

[0040] Weight calculation module, used to calculate the weight of each area;

[0041] An acquisition module, used for acquiring a valid reference value of the current image according to the weight of each area;

[0042] The judging module is used to judge whether the effective reference value of the current image is less than a threshold value. If so, the image is judged to be a valid image; otherwise, the image is judged to be an invalid image.

[0043] A third aspect of the present invention provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and wherein the processor implements the steps of the above-mentioned image validity analysis method when executing the computer program.

[0044] A fourth aspect of the present invention provides a computer-readable storage medium, wherein the storage medium stores a computer program, and wherein the computer program implements the steps of the above-mentioned image validity analysis method when executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0046] Figure 1 A schematic diagram of a flow chart of an image validity analysis method of the present invention;

[0047] Figure 2 This is a diagram showing the effect of dividing an image into regions in an embodiment of the present invention. DETAILED DESCRIPTION

[0048] The technical solution of the present invention will be clearly and completely described below in conjunction with the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0049] Reference Figure 1 According to a first aspect of an embodiment of the present invention, there is provided an image validity analysis method, comprising the following steps:

[0050] Acquire the collected image data and remove abnormal image data therein through preprocessing;

[0051] Divide the image into several regions and calculate the weight of each region;

[0052] Obtaining effective reference values ​​of the current image according to the weights of each region;

[0053] It is determined whether the effective reference value of the current image is less than a threshold value. If so, the image is determined to be a effective image; otherwise, the image is determined to be an invalid image.

[0054] The present invention can cover all areas of the image by partitioning the image. Even if there is valid feature information in a local area of ​​the image, it can be judged as a valid image, thereby avoiding the omission of images that only have valid feature information in the local area, thereby improving the accuracy of image validity analysis and reducing the misjudgment rate of valid image screening.

[0055] Specifically, the aircraft (manned / unmanned aerial vehicle) used for inspection will have a photoelectric ball installed in the pod of the aircraft, which is responsible for collecting infrared or color images. When flying, the photoelectric ball will tilt 45° to shoot the ground to collect ground image data information.

[0056] Specifically, the method for preprocessing the image includes: detecting the brightness, contrast or clarity of the image, and eliminating images with abnormal brightness, contrast or clarity. This method of coarse filtering of images is a conventional method in the art and will not be repeated in this embodiment.

[0057] Specifically, considering the environmental impact during the shooting process, some local areas may be clear. From the application point of view, this is also a valid image. Therefore, the present invention adopts a full coverage partitioning method to divide the image into the following 7 areas:

[0058] rect(1)={0,0,width,height}

[0059]

[0060] Among them, rect(i) = {x, y, w, h} represents the i-th rectangular area, (x, y) represents the coordinates of the starting point of the i-th rectangular area (the lower left corner of the rectangular area is used as the starting point in this embodiment); w and h represent the width and height of the i-th rectangular area respectively; width and height represent the width and height of the entire image respectively. The area with sequence number 1 covers the entire image, and the sizes and positions of the 7 areas on the image are different. Figure 2 As shown in the figure, the rectangular areas marked with numbers 1 to 7 correspond to the seven rectangular areas rect(1) to rect(7) respectively.

[0061] The purpose of dividing the image into 7 rectangular areas in this embodiment is to cover all areas of the image. If there is a relatively clear image in a local area, the image can also be considered as a valid image, so that the image data that only captures local features can be retained as a valid image.

[0062] During the specific implementation process, when dividing the image into regions, the number, position and size of the divided regions can be flexibly adjusted according to actual conditions, and are not limited to the number, position and size specified in this embodiment.

[0063] Specifically, the method for calculating the weight of each region is:

[0064] The mean and variance of the grayscale values ​​in each rectangular area are calculated respectively, and the mean and variance of the grayscale values ​​in each rectangular area are normalized. The normalization formula is set according to the empirical value as follows:

[0065] NormMean rect(i) =Mean rect(i) / 100

[0066] NormVar rect(i) =Var rect(i) / 60

[0067] Among them, Mean rect(i) 、Var rect(i) Respectively represent the mean and variance of the grayscale value in the i-th rectangular area, NormMean rect(i) 、NormVar rect(i) They represent the normalized mean and variance of the ith rectangular area respectively; 60 and 100 are empirical values ​​and can be flexibly adjusted according to actual conditions.

[0068] The normalized mean and variance of the i-th region are combined into weights. The combination formula is as follows:

[0069] W rect(i) =0.3×NormVar rect(i) +0.7×NormMean rect(i)

[0070] Among them, W rect(i) Represents the weight of the ith region. The parameters 0.3 and 0.7 can be flexibly adjusted according to actual conditions.

[0071] Specifically, the method for obtaining the effective reference value of the current image is as follows:

[0072] Sort the weights of each area in the current image from small to large;

[0073] Take the weight value of sequence number 3 as the minimum value, denoted as SortWrect(3) ; Take the weight value of sequence number 5 as the maximum value, denoted as SortW rect(5) The reason for taking the weight values ​​of positions 3 and 5 as the minimum and maximum values ​​is to remove the influence of high-frequency data and low-frequency data and find the part that can better represent the image quality as the basis for judgment, so that the effectiveness of the image can be evaluated more accurately.

[0074] The effective reference value of the current image is calculated by the following formula:

[0075] Valid=SortW rect(3) / SortW rect(5)

[0076] Wherein, Valid represents the valid reference value of the current image.

[0077] Specifically, the threshold is obtained by the following method:

[0078] A large amount of image data is obtained to construct a sample set (a total of 1 million image samples are obtained in this embodiment), wherein valid images account for 3 / 5 of the sample set, namely, 600,000 valid images and 400,000 invalid images;

[0079] Calculate the valid reference value Valid for each image sample in the sample set sample , and sort the valid reference values ​​of each image sample in ascending order;

[0080] The effective reference value corresponding to the 3 / 5 position is taken as the threshold T.

[0081] AI analysis is performed after obtaining valid images. Currently, AI analysis uses the classic yolov5 target detection model, which is fast and easy to deploy. After target detection, the detection information will be uploaded to the host, which will make the final decision.

[0082] A second aspect of an embodiment of the present invention provides an image validity analysis system, including:

[0083] An image acquisition module, used for acquiring image data;

[0084] A preprocessing module, used to remove abnormal image data;

[0085] A region division module is used to divide the image into several regions;

[0086] Weight calculation module, used to calculate the weight of each area;

[0087] An acquisition module, used for acquiring a valid reference value of the current image according to the weight of each area;

[0088] The judging module is used to judge whether the effective reference value of the current image is less than a threshold value. If so, the image is judged to be a valid image; otherwise, the image is judged to be an invalid image.

[0089] A third aspect of an embodiment of the present invention provides an electronic device, including a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and is characterized in that when the processor executes the computer program, the steps of the above-mentioned image validity analysis method are implemented.

[0090] A fourth aspect of an embodiment of the present invention provides a computer-readable storage medium, wherein the storage medium stores a computer program, and wherein the computer program implements the steps of the above-mentioned image validity analysis method when executed by a processor.

[0091] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for analyzing image validity, characterized in that: The following steps are involved: Acquire the collected image data and remove abnormal image data therein through preprocessing; Divide the image into several regions and calculate the weight of each region; Obtaining effective reference values ​​of the current image according to the weights of each region; It is determined whether the effective reference value of the current image is less than a threshold value. If so, the image is determined to be a effective image; otherwise, the image is determined to be an invalid image.

2. The image validity analysis method according to claim 1, characterized in that: The method of preprocessing the image includes: detecting the brightness, contrast or clarity of the image, and eliminating images with abnormal brightness, contrast or clarity.

3. The image validity analysis method according to claim 1, characterized in that: The image is divided into the following 7 regions: rect(1)={0, 0, width, height} Among them, rect(i) = {x, y, w, h} represents the i-th rectangular area, (x, y) represents the starting point coordinates of the i-th rectangular area; w and h represent the width and height of the i-th rectangular area respectively; width and height represent the width and height of the entire image respectively.

4. The image validity analysis method according to claim 1, characterized in that: The method for calculating the weight of each region is: The mean and variance of the grayscale values ​​in each rectangular area are calculated respectively, and the mean and variance of the grayscale values ​​in each rectangular area are normalized. The normalization formula is as follows: NormMean rect(i) =Mean rect(i) / 100 NormVar rect(i) =Was rect(i) / 60 Among them, Mean rect(i) 、Var rect(i) Respectively represent the mean and variance of the grayscale value in the i-th rectangular area, NormMean rect(i) 、NormVar rect(i) Respectively represent the normalized mean and variance of the i-th rectangular area; The normalized mean and variance of the i-th region are combined into weights. The combination formula is as follows: IN rect(i) =0.3×NormVar rect(i) +0.7NormMean rect(i) Among them, W rect(i) represents the weight of the ith region.

5. The image validity analysis method according to claim 4, characterized in that: The method to obtain the effective reference value of the current image is as follows: Sort the weights of each area in the current image from small to large; Take the weight value of sequence number 3 as the minimum value, denoted as SortW rect(3) ; Take the weight value of sequence number 5 as the maximum value, denoted as SortW rect(5) ; The effective reference value of the current image is calculated by the following formula: Valid=SortW rect(3) / SortW rect(5) Wherein, Valid represents the valid reference value of the current image.

6. The image validity analysis method according to claim 1, characterized in that: The threshold is obtained by the following method: Obtain a large amount of image data to build a sample set, of which valid images account for 3 / 5 of the sample set; Calculate the effective reference value of each image sample in the sample set respectively, and sort the effective reference value of each image sample in ascending order; The effective reference value corresponding to the 3 / 5 position is taken as the threshold.

7. An image validity analysis system, based on the image validity analysis method according to any one of claims 1 to 6, characterized in that: include: An image acquisition module, used for acquiring image data; A preprocessing module, used to remove abnormal image data; A region division module is used to divide the image into several regions; Weight calculation module, used to calculate the weight of each area; An acquisition module, used for acquiring a valid reference value of the current image according to the weight of each area; The judging module is used to judge whether the effective reference value of the current image is less than a threshold value. If so, the image is judged to be a valid image; otherwise, the image is judged to be an invalid image.

8. An electronic device comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, characterized in that: When the processor executes the computer program, the steps of the image validity analysis method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the image validity analysis method according to any one of claims 1 to 6 are implemented.