An image detection method, device and computer readable storage medium
By acquiring chromaticity information through an image processor and calculating the chromaticity variance of image sub-blocks using a variance network, the robustness and efficiency issues of image quality assessment in video surveillance systems are solved, and efficient image anomaly detection is achieved.
Patent Information
- Application Number
- CN202310291317.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-17
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2043-03-17
AI Technical Summary
In existing technologies, video surveillance systems have poor generalization effects on texture and edge features when assessing image quality, resulting in a high false alarm rate and a lack of effective real-time intelligent analysis methods.
An image processor is used to acquire the chromaticity information of the detected image, and a variance network is used to calculate the chromaticity variance of the image sub-blocks. Mean pooling is performed using the first and second branch networks, and the abnormality ratio is combined to determine the abnormality of the image.
It improves the robustness and efficiency of image detection, reduces the impact of noise on algorithm performance, and achieves efficient image quality assessment.
Smart Images

Figure CN116596839B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image detection technology, and in particular to an image detection method, device, and computer-readable storage medium. Background Technology
[0002] With the nationwide promotion of smart city construction, the number of surveillance cameras and image sensors in cities exceeds tens of thousands, spanning over a decade, resulting in inconsistent video quality. Meanwhile, video data, as a crucial resource for efficient and intelligent analysis, presents a pressing issue: how to assess the quality of this collected video data. Currently, most video surveillance systems face a contradiction between real-time intelligent analysis and inefficient, lagging manual diagnosis. Surveillance video clarity detection algorithms can provide an effective solution. However, existing technologies utilizing texture and edge features have poor generalization effects when judging black-and-white levels, easily leading to false alarms. Summary of the Invention
[0003] The main technical problem solved by this invention is to provide an image detection method, device and computer-readable storage medium that can evaluate the detected image using color information and has strong robustness.
[0004] To solve the above-mentioned technical problems, one technical solution adopted by the present invention is to provide an image detection method, which includes: an image processor acquiring chromaticity information of a detection image; inputting the chromaticity information of the detection image into a variance network, and obtaining at least one sub-block chromaticity variance of the detection image through the variance network; and determining anomalies in the detection image based on the at least one sub-block chromaticity variance.
[0005] The process involves inputting the chromaticity information of the detected image into a variance network, and obtaining the chromaticity variance of at least one sub-block in the detected image through the variance network. This includes: determining multiple image sub-blocks by the processing size of the variance network; and determining the sub-block chromaticity variance corresponding to each image sub-block based on the chromaticity information of each pixel in each image sub-block.
[0006] The variance network includes a first branch network and a second branch network. The first branch network is used to obtain the square of the pixel mean of each image sub-block, and the second branch network is used to obtain the mean of the square of each pixel of each image sub-block. Determining the sub-block chromaticity variance corresponding to each image sub-block includes subtracting the mean of the square of each pixel of the corresponding image sub-block from the square of the pixel mean of each image sub-block to obtain the sub-block chromaticity variance corresponding to each image sub-block.
[0007] The step of obtaining the square of the pixel mean of each image sub-block includes: inputting the detected image into a first branch network; using the processing size of the pooling layer of the first branch network to determine multiple image sub-blocks; and performing mean pooling on the chromaticity information of each pixel in the multiple image sub-blocks to obtain the mean of each pixel in the multiple image sub-blocks; wherein the pooling layer includes processing units of a predetermined size to determine multiple image sub-blocks of a preset size at input; and calculating the square of the mean of each pixel in the multiple image sub-blocks to obtain the square of the pixel mean of each image sub-block.
[0008] The process of obtaining the mean square of each pixel in each image sub-block includes: inputting the detection image into the second branch network, using the second branch network to calculate the square of the chromaticity information of the detection image pixel by pixel; using the processing size of the pooling layer of the second branch network to determine the square of each pixel in multiple image sub-blocks, and performing mean pooling on the squares of each pixel in multiple image sub-blocks to obtain the mean square of each pixel in each image sub-block; wherein the pooling layer includes processing units of a predetermined size to determine multiple image sub-blocks of a preset size at input.
[0009] The image processor obtains the chromaticity information of the detection image by: obtaining the chromaticity components of the color channels of the detection image; assigning the chromaticity components of the color channels of the detection image to the luminance channel, obtaining the component values of the luminance channel of the detection image, and thus obtaining the chromaticity information of the detection image.
[0010] Specifically, assigning the chromaticity components of the color channels of the detected image to the luminance channel includes: assigning the chromaticity components of the U channel and / or Y channel of the detected image to the luminance channel to obtain the chromaticity information of the detected image.
[0011] The method of determining the abnormality of the detected image based on the chromaticity variance of at least one sub-block includes: determining the abnormal region in the image region corresponding to the chromaticity variance of each sub-block according to the relationship between the chromaticity variance of each sub-block and the variance threshold; and determining the abnormality of the detected image based on the abnormal region.
[0012] Among them, the abnormality of the detected image is determined based on the abnormal region, including: the ratio of the number of abnormal regions to the total number of image regions corresponding to the sub-block chromaticity variance; and the abnormality of the detected image is determined based on the ratio.
[0013] The abnormal regions include black and white regions. Based on the relationship between the chromaticity variance of each sub-block and the variance threshold, the abnormal regions in the image regions corresponding to the chromaticity variance of each sub-block are determined, including: determining the image regions corresponding to the chromaticity variance of sub-blocks that are less than the variance threshold as black and white regions; determining the abnormal situation of the detected image, including: if the ratio is greater than a preset value, determining the detected image as a black and white image.
[0014] To solve the above-mentioned technical problems, another technical solution adopted by the present invention is to provide an image detection device, which includes a processor for executing the above-mentioned image detection method.
[0015] To solve the above-mentioned technical problems, another technical solution adopted by the present invention is to provide a computer-readable storage medium for storing instruction / program data, which can be executed to implement the above-mentioned image detection method.
[0016] The beneficial effects of this invention are as follows: Unlike the prior art, this invention utilizes an image processor to detect images, enabling the algorithm to run at high speed on a GPU without the need for a CPU, thus exhibiting strong robustness and detection rate. Furthermore, a variance network is constructed, which incorporates block-based logic. Using this variance network, the image can be divided into blocks based on the variance of the detected image, significantly reducing the impact of noise on the algorithm's performance and improving detection efficiency. Attached Figure Description
[0017] Figure 1 This is a flowchart illustrating one embodiment of the image detection method of this application;
[0018] Figure 2 This is a flowchart illustrating another embodiment of the image detection method of this application;
[0019] Figure 3 This is a flowchart illustrating another embodiment of the image detection method of this application;
[0020] Figure 4 This is a schematic diagram of the variance network structure of the image detection method of this application;
[0021] Figure 5 This is a schematic diagram of the structure of the image detection device in the embodiments of this application;
[0022] Figure 6 This is a schematic diagram of the structure of the image detection device in the embodiments of this application;
[0023] Figure 7 This is a schematic diagram of the structure of a computer-readable storage medium in an embodiment of this application. Detailed Implementation
[0024] To make the objectives, technical solutions, and effects of the present invention clearer and more explicit, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments.
[0025] This application provides an image detection method that utilizes an image processor to detect images, enabling the algorithm to run at high speed on a GPU without requiring a CPU. This results in strong robustness and high detection rate. Furthermore, a variance network is constructed with built-in block-segmentation logic. Using this variance network, the image can be segmented based on the variance of the detected image, greatly reducing the impact of noise on the algorithm's performance and improving detection efficiency.
[0026] Please see Figure 1 , Figure 1 This is a flowchart illustrating one embodiment of the image detection method of this application. It should be noted that if substantially the same result is obtained, this embodiment does not necessarily reflect that result. Figure 1 The illustrated process sequence is limited. For example... Figure 1 As shown, this embodiment includes:
[0027] S110: The image processor acquires the chromaticity information of the detected image.
[0028] Image processing equipment extracts chromaticity information from the detected image. For RGB format detected images, chromaticity information is extracted from the red, green, and blue channels; for YUV format detected images, chromaticity information is extracted from the U and V channels.
[0029] S130: Input the chromaticity information of the detected image into the variance network, and obtain the chromaticity variance of at least one sub-block in the detected image through the variance network.
[0030] This application establishes a variance network to obtain the sub-block chromaticity variance of each image sub-block. Different sub-block chromaticity variances correspond to different regions in the detection image. The variance network can divide the detection image into blocks while calculating the chromaticity variance, or it can set a certain processing size, processing only a certain size of image information at a time, thus determining image sub-blocks of a certain size, and determining the sub-block chromaticity variance of each image sub-block based on the chromaticity information of each pixel in the image sub-block. Specifically, the sub-block chromaticity variance corresponding to at least one sub-block of equal or unequal area can be determined according to a preset division method, or a sliding window method can be used to process image sub-blocks of a certain area at a time to obtain the sub-block chromaticity variance corresponding to each sub-block.
[0031] S150: Detect anomalies in the image based on the color variance of at least one sub-block.
[0032] The entire detection image is evaluated based on the sub-block chromaticity variance of multiple image sub-blocks. The difference between the sub-block chromaticity variances can be used to determine whether the detection image is abnormal, or the difference between the sub-block chromaticity variances and preset values can be used to determine whether the detection image is abnormal.
[0033] In this embodiment, by utilizing an image processor to detect the image, the algorithm of the present invention can run at high speed on a GPU without the need for a CPU, exhibiting strong robustness and detection rate. Simultaneously, a variance network is constructed, which incorporates block-segmentation logic. Using the variance network of this application, the image can be segmented into blocks based on the variance of the detected image, greatly reducing the impact of noise on the algorithm's performance and improving detection efficiency.
[0034] The variance network includes a first branch network and a second branch network. See also... Figure 2 , Figure 2 This is a flowchart illustrating another embodiment of the image detection method of this application. It should be noted that if substantially the same result is obtained, this embodiment does not necessarily reflect that outcome. Figure 2 The illustrated process sequence is limited. For example... Figure 2 As shown, this embodiment includes:
[0035] S210: The image processor acquires the chromaticity information of the detected image.
[0036] First, obtain the chromaticity information of the detection image. For example, a detection image in YUV format includes three channels: the Y channel for luminance and the U and V channels for chromaticity. The U and V channels contain the chromaticity information of the detection image.
[0037] S230: Calculate the square of the pixel mean of each image sub-block using the first branch network.
[0038] The first and second branches of the variance network are used to process the chromaticity information. The detection image is input into the first branch network, and the processing size of the pooling layer of the first branch network is used to determine multiple image sub-blocks of the detection image. Mean pooling is then performed on the chromaticity information of multiple image sub-blocks to calculate the mean value of each pixel in the multiple image sub-blocks. Therefore, a pixel mean value is calculated for each image sub-block. Then, the pixel mean values of the multiple image sub-blocks are squared to obtain the square of the pixel mean value of the multiple image sub-blocks. The mean pooling layer includes processing units of a predetermined size and can only process images of a predetermined size at a time. Therefore, during mean pooling, the image sub-block of each predetermined size is determined according to the processing size of the pooling layer. For example, if the pooling layer has a processing size of n×n, the detection image is divided into multiple image sub-blocks of size n×n.
[0039] S250: Use the second branch network to obtain the mean of the squares of each pixel in each image sub-block.
[0040] The detected image is input into the second branch network. First, the second branch network squares the chromaticity information of the detected image pixel by pixel, obtaining the square of each pixel value. Then, the pooling layer of the second branch network determines multiple image sub-blocks of the detected image, and average pooling is performed on the squares of each pixel in multiple image sub-blocks to obtain the average of the squares of each pixel in multiple image sub-blocks. That is, the average of the squares of each pixel is calculated for each image sub-block. The pooling layer of the second branch network is similar to the pooling layer of the first branch network, determining each image sub-block of a preset size according to the processing size of the pooling layer.
[0041] S270: Subtract the mean of the squares of the pixels of the corresponding image sub-block from the square of the mean of the pixel values of the image sub-block to obtain the sub-block chromaticity variance of each image sub-block.
[0042] The difference between the outputs of the first and second branches of the variance network is calculated to obtain the chromaticity variance of the detected image. Specifically, the mean square of the pixel mean of the image sub-block output by the first branch network is subtracted from the mean square of the pixel mean of the corresponding image sub-block output by the second branch network to calculate the sub-block chromaticity variance of each image sub-block.
[0043] S290: Determine anomalies in the detected image based on the sub-block chromaticity variance of the image sub-blocks.
[0044] In this implementation, a variance network with two branches is constructed, and block-segmentation logic is set in the pooling layers of the two branches respectively. The mean square and mean square of the chromaticity information of multiple image sub-blocks are obtained in the two branches respectively, so that the blocks are segmented while calculating the variance, which greatly reduces the impact of noise on the algorithm effect and improves the detection efficiency.
[0045] Please see Figure 3 , Figure 3 This is a flowchart illustrating another embodiment of the image detection method of this application. It should be noted that if substantially the same result is obtained, this embodiment does not necessarily reflect that result. Figure 3 The illustrated process sequence is limited. For example... Figure 3 As shown, this embodiment includes:
[0046] S310: Obtain the chromaticity components of the color channels of the detected image.
[0047] The color channels of the detected image include the U channel and the V channel. The color components of the U channel of the detected image are obtained, or the color components of the V channel of the detected image are obtained, or the color components of the U channel and the V channel of the detected image are obtained.
[0048] S330: Assign the chromaticity components of the color channels of the detected image to the luminance channels, obtain the luminance channel component values of the detected image, and obtain the chromaticity information of the detected image.
[0049] The chromaticity components of the U channel and / or V channel of the detected image are assigned to the luminance channel. That is, they are assigned to the Y channel, and the component values of the Y channel are obtained as the chromaticity information of the detected image.
[0050] S350: Input the chromaticity information of the detected image into the variance network to obtain the sub-block chromaticity variance of the image sub-blocks of the detected image using the variance network.
[0051] The chromaticity information of the detected image is input into the variance network. The first branch of the variance network is used to obtain the square of the pixel mean of multiple image sub-blocks. The second branch of the variance network is used to obtain the mean of the square of the chromaticity information of multiple image sub-blocks. The mean of the square of the pixel mean of the corresponding image sub-block is subtracted from the square of the mean of the chromaticity information of each image sub-block output by the first branch network to calculate the sub-block chromaticity variance of each image sub-block.
[0052] S370: Based on the relationship between the chromaticity variance and the variance threshold of each sub-block, determine the abnormal regions in the image region corresponding to the chromaticity variance of each sub-block; based on the abnormal regions, detect the abnormalities in the detected image.
[0053] A variance threshold is set, and the chromaticity variance of each image sub-block is compared with the variance threshold to determine the abnormal regions in the image region corresponding to the chromaticity variance of each sub-block. Based on the abnormal regions, the abnormality of the detected image is detected. That is, when there are many abnormal regions, the image is detected as abnormal.
[0054] Specifically, regions with sub-block chromaticity variance greater than a variance threshold are identified as abnormal regions. The proportion of abnormal regions with sub-block chromaticity variance greater than a variance threshold to all image regions is obtained. When the proportion is greater than a proportion threshold, the current detected image is determined to be abnormal.
[0055] In this embodiment, the detected image is evaluated using the calculated sub-block chromaticity variance of each image sub-block, and the quality of the entire image is measured by the proportion of image sub-blocks that are greater than a certain threshold, thereby improving detection efficiency.
[0056] In some large-scale projects, due to incorrect camera settings or other reasons, black and white images may appear in the surveillance footage to varying degrees, which greatly affects the quality of the surveillance video. Therefore, by using a black and white video detection system to inspect surveillance videos, abnormalities in monitoring equipment can be detected in a timely manner, facilitating timely repairs by troubleshooting personnel. Therefore, in one specific implementation, targeting the YUV data format commonly used in the surveillance field, an appropriate algorithm is designed to detect black and white images and determine the quality of the current image by analyzing the UV channels containing color information.
[0057] Specifically, the detection image is first preprocessed. Since only chromaticity information is needed when detecting a black and white image, the chromaticity information of the detection image is obtained first. Specifically, the chromaticity components of the U channel, the V channel, or both are obtained. The chromaticity components of the color channels are then assigned to the luminance channel, and the luminance channel component values are obtained to obtain the chromaticity information of the detection image. In one embodiment, the chromaticity components of the U channel are assigned to the Y channel, and the chromaticity components of the V channel are assigned to the U channel, leaving the V channel unchanged. In another embodiment, the chromaticity components of the V channel are assigned to the Y channel, and the chromaticity components of the U channel are assigned to the V channel, leaving the U channel unchanged.
[0058] Input the preprocessed detection image into the variance network, please refer to [link / reference]. Figure 4 , Figure 4 This is a schematic diagram of the variance network structure of the image detection method of this application. The first and second branches of the variance network process the chromaticity information respectively. The pooling layer of the first branch network performs mean pooling on the chromaticity information of the detected image. Convolution is used to implement the mean pooling operation, obtaining the pixel mean of the chromaticity information of multiple image sub-blocks. Specifically, a 176×144 detection image is input, and an 11×11 mean pooling layer is input. The mean of the chromaticity information of each 11×11 image sub-block is calculated each time. Then, the pixel mean of the chromaticity information of multiple image sub-blocks is squared to obtain the square of the pixel mean of the chromaticity information of each image sub-block.
[0059] Similarly, the second branch network first calculates the square of the chromaticity information of the detected image pixel by pixel. Then, the pooling layer of the second branch network performs mean pooling on the square of the chromaticity components pixel by pixel to obtain the mean of the square of the chromaticity information of each image sub-block. The pooling layer of the second branch network is similar to that of the first branch network, dividing the 176×144 detected image into multiple image sub-blocks of size 11×11, and calculating the mean of the square of the chromaticity information of multiple image sub-blocks, directly outputting the mean of the square of the chromaticity information of multiple image sub-blocks.
[0060] The difference between the outputs of the first and second branches of the variance network is calculated to obtain the chromaticity variance of the detected image. Specifically, the mean of the squared pixel values of the chromaticity information of each image sub-block output by the first branch network is subtracted from the mean of the squared pixel values of the chromaticity information of the corresponding image sub-block output by the second branch network to calculate the sub-block chromaticity variance of each image sub-block.
[0061] Post-processing is performed on the chromaticity variance of each image sub-block. Based on the variance calculation results, the image regions where the chromaticity variance of the image sub-blocks is less than a variance threshold are recorded as black and white regions. The proportion of black and white regions in all image regions is calculated to determine whether the image is a black and white image. In one specific embodiment, the variance threshold is 1. The image regions where the chromaticity variance of the image sub-blocks is less than 1 are recorded as black and white regions. When the proportion of black and white regions to all image sub-block regions is greater than a preset value, the detected image is determined to be a black and white image.
[0062] In video surveillance, due to installation errors or line faults, the captured video footage may lack color information, resulting in a black and white image. Therefore, in this implementation, the chromaticity information of the detection image is extracted, and targeted image preprocessing effectively highlights the color features required for black and white detection while relatively minimizing the influence of texture features. A variance network is constructed, and the model has built-in block-division logic. While detecting the image variance information, the image is divided into blocks, greatly reducing the impact of noise on the algorithm's performance. Simultaneously, the proportion of black and white sub-blocks among all image sub-blocks is used as the detection value for the black and white image, improving detection efficiency. This application presents a highly sensitive, robust, and fast black and white image detection method suitable for complex scenes.
[0063] Please see Figure 5 , Figure 5 This is a schematic diagram of the image detection device according to an embodiment of this application. In this embodiment, the image detection device includes an acquisition module 51, a variance module 52, and an evaluation module 53.
[0064] The image detection device comprises the following modules: an acquisition module 51, which uses an image processor to acquire chromaticity information of the detection image; a variance module 52, which inputs the chromaticity information of the detection image into a variance network to acquire the chromaticity variance of at least one sub-block in the detection image; and an evaluation module 53, which determines anomalies in the detection image based on the chromaticity variance of at least one sub-block. This image detection device utilizes an image processor to detect images, enabling the algorithm of this invention to run at high speed on a GPU without requiring a CPU, exhibiting strong robustness and detection rate. Furthermore, the construction of a variance network with built-in block-segmentation logic allows for image segmentation based on the variance of the detection image, significantly reducing the impact of noise on the algorithm's performance and improving detection efficiency.
[0065] Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of an image detection device according to an embodiment of this application. In this embodiment, the image detection device 61 includes a processor 62.
[0066] Processor 62 can also be referred to as a CPU (Central Processing Unit). Processor 62 may be an integrated circuit chip with signal processing capabilities. Processor 62 can 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, or discrete hardware components. A general-purpose processor can be a microprocessor, or processor 62 can be any conventional processor.
[0067] The image inspection device 61 may further include a memory (not shown) for storing instructions and data required for the processor 62 to run.
[0068] The processor 62 is used to execute instructions to implement the method provided by any embodiment of the image detection method of this application and any non-conflicting combination thereof.
[0069] Please see Figure 7 , Figure 7 This is a schematic diagram of the structure of a computer-readable storage medium in an embodiment of this application. The computer-readable storage medium 71 in this embodiment stores instruction / program data 72. When executed, this instruction / program data 72 implements the method provided by any embodiment of the image detection method of this application and any non-conflicting combination thereof. The instruction / program data 72 can be formed into a program file and stored in the storage medium 71 in the form of a software product, so that a computer device (which may be a personal computer, server, or network device, etc.) or processor can execute all or part of the steps of the methods in various embodiments of this application. The aforementioned storage medium 71 includes various media capable of storing program code, such as a USB flash drive, portable hard drive, read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk, or terminal devices such as computers, servers, mobile phones, and tablets.
[0070] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, or indirect coupling or communication connection between apparatuses or units, and may be electrical, mechanical, or other forms.
[0071] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0072] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. An image detection method characterized by, The method comprises: The image processor acquires chrominance information of the detection image; The chrominance information of the detection image is input into a variance network, and at least one sub-block chrominance variance in the detection image is acquired through the variance network, wherein different sub-block chrominance variances correspond to different regions in the detection image, the variance network comprises a first branch network and a second branch network, the first branch network is used to acquire squares of pixel means of each image sub-block, the second branch network is used to acquire means of squares of each pixel of each image sub-block, and the sub-block chrominance variance is obtained by subtracting an output of the second branch network from an output of the first branch network. An abnormal situation of the detection image is determined based on the at least one sub-block chrominance variance.
2. The image detection method according to claim 1, characterized in that, The chrominance information of the detection image is input into a variance network, and at least one sub-block chrominance variance in the detection image is acquired through the variance network, wherein different sub-block chrominance variances correspond to different regions in the detection image, the variance network comprises a first branch network and a second branch network, the first branch network is used to acquire squares of pixel means of each image sub-block, the second branch network is used to acquire means of squares of each pixel of each image sub-block, and the sub-block chrominance variance is obtained by subtracting an output of the second branch network from an output of the first branch network. A plurality of image sub-blocks are determined through a processing size of the variance network. The sub-block chrominance variance corresponding to each image sub-block is determined according to the chrominance information of each pixel of each image sub-block.
3. The image detection method according to claim 2, wherein The sub-block chrominance variance corresponding to each image sub-block is determined according to the chrominance information of each pixel of each image sub-block. The square of the pixel mean of each image sub-block is acquired by:
4. The image detection method according to claim 3, characterized in that, The detection image is input into the first branch network, a plurality of image sub-blocks are determined through a processing size of a pooling layer of the first branch network, and mean pooling is performed on the chrominance information of each pixel of the plurality of image sub-blocks to obtain the mean of each pixel of the plurality of image sub-blocks; wherein the pooling layer comprises processing units of a predetermined size to determine the plurality of image sub-blocks of the predetermined size when input; The square of the pixel mean of each image sub-block is acquired by: The detection image is input into the second branch network, and the square of each pixel of the detection image is calculated pixel by pixel through the second branch network; 5. The image detection method according to claim 3, wherein A plurality of image sub-blocks are determined through a processing size of a pooling layer of the second branch network, and mean pooling is performed on the squares of each pixel of the plurality of image sub-blocks to obtain the mean of the squares of each pixel of each image sub-block; wherein the pooling layer comprises processing units of a predetermined size to determine the plurality of image sub-blocks of the predetermined size when input. The image processor acquires chrominance information of the detection image comprises: The chrominance component of the color channel of the detection image is acquired; 6. The image detection method of claim 1, wherein, The chrominance component of the color channel of the detection image is assigned to the luminance channel, the component value of the luminance channel of the detection image is acquired, and the chrominance information of the detection image is obtained. The chrominance component of the color channel of the detection image is assigned to the luminance channel comprises: 7. The image detection method according to claim 6, wherein assigning a chroma component of a U channel and / or a chroma component of a Y channel of the detection image to the luminance channel to obtain chroma information of the detection image.
8. The image detection method of claim 1, wherein, The determining of the abnormal condition of the detection image based on the at least one sub-block chroma variance comprises: determining an abnormal region in an image region corresponding to each sub-block chroma variance according to a relationship between each sub-block chroma variance and a variance threshold value; determining the abnormal condition of the detection image based on the abnormal region.
9. The image detection method of claim 8, wherein, The determining of the abnormal condition of the detection image based on the abnormal region comprises: a ratio of a number of the abnormal region to a total number of the image regions corresponding to the sub-block chroma variances; determining the abnormal condition of the detection image according to the ratio.
10. The image detection method of claim 9, wherein, The abnormal region comprises a black-and-white region, and the determining of the abnormal region in the image region corresponding to each sub-block chroma variance according to the relationship between each sub-block chroma variance and the variance threshold value comprises: determining the image region corresponding to a sub-block chroma variance less than the variance threshold value as the black-and-white region. The determining of the abnormal condition of the detection image comprises: if the ratio is greater than a preset value, determining that the detection image is a black-and-white image.
11. An image detection device, characterized by, An image processing device, wherein the device comprises an image processor configured to execute instructions to implement the image detection method according to any one of claims 1-10.
12. A computer-readable storage medium, characterized in that, A computer readable storage medium configured to store instructions / program data executable to implement the image detection method according to any one of claims 1-10.
Citation Information
Patent Citations
High-speed monitoring video quality detection method
CN112804520A
Corrosion imaging method based on ultrasonic guided waves and convolutional neural network
CN113848252A
Background color estimation for scanned images
US20050129310A1