CN110211096B - Haze image detection method - Google Patents
Haze image detection method Download PDFInfo
- Publication number
- CN110211096B CN110211096B CN201910377719.XA CN201910377719A CN110211096B CN 110211096 B CN110211096 B CN 110211096B CN 201910377719 A CN201910377719 A CN 201910377719A CN 110211096 B CN110211096 B CN 110211096B
- Authority
- CN
- China
- Prior art keywords
- image
- detected
- block
- blocks
- normal
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/213—Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods
- G06F18/2135—Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods based on approximation criteria, e.g. principal component analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10016—Video; Image sequence
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20021—Dividing image into blocks, subimages or windows
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30168—Image quality inspection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30232—Surveillance
Landscapes
- Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Artificial Intelligence (AREA)
- Life Sciences & Earth Sciences (AREA)
- Quality & Reliability (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Evolutionary Biology (AREA)
- Evolutionary Computation (AREA)
- General Engineering & Computer Science (AREA)
- Image Processing (AREA)
- Image Analysis (AREA)
Abstract
The invention relates to the technical field of image processing, in particular to a haze image detection method, which comprises the steps of calculating an average vector and a covariance matrix of a normal image and an average vector and a covariance matrix of an image to be detected, inputting the average vector and the covariance matrix of the normal image and the average vector and the covariance matrix of the image to be detected into a Pasteur distance formula, calculating the quality score of each image block to be detected, calculating the average value of the quality scores of the image to be detected, namely the image quality evaluation score of the image to be detected according to the quality score of each image block to be detected, and determining the image to be detected as the normal image if the image quality evaluation score of the image to be detected is smaller than a first threshold. The image quality evaluation method and the characteristics of the dark primary color image are combined together, the generalization capability is strong, whether the image is haze or not is effectively judged, false detection caused by the fact that the image is a single scene such as a wall surface and the ground is avoided, and the false alarm rate and the missing detection rate are reduced.
Description
Technical Field
The invention relates to the technical field of image processing, in particular to a haze image detection method.
Background
With the rapid growth of video monitoring services, the existing problems are gradually exposed, and how to find the fault of the front-end camera in the first time and improve the operation and maintenance work efficiency of the video monitoring system is an indispensable part of the development of the video monitoring system.
The quality of the video stream can be automatically detected through the video quality diagnosis system, the abnormal conditions including black screen and abnormal definition can be automatically detected, the abnormal definition can be caused by the haze, the abnormal definition caused by the haze is related to weather, the camera failure is avoided, the false detection is achieved, and therefore the abnormal definition of the camera caused by the haze is detected out to be particularly important.
The existing haze detection method cannot judge whether a video image is affected by haze or not aiming at a single camera.
Disclosure of Invention
In order to solve the technical problem, the invention provides a method for detecting a haze image, which can detect that a shot image is influenced by haze by aiming at a single camera.
In order to achieve the purpose, the invention adopts the following technical scheme:
a haze image detection method comprises the following steps:
s10, selecting a normal image without haze from an image library, blocking the normal image and the image to be detected, preprocessing the blocked image of the normal image and the blocked image of the image to be detected, and setting the preprocessed blocked image of the image to be detected as an image block to be detected; selecting a block image with the contrast ratio larger than a set value from the block images of the preprocessed normal image, and setting the block image as a standard image block;
s11, extracting features from each standard image block and each image block to be detected, wherein the features at least comprise color, brightness, gradient and gradient amplitude;
s12, generating a feature set of the normal image according to the features of each standard image block; generating a feature set of the image to be detected according to the features of each image block to be detected;
s13, generating a multivariate Gaussian model of the normal image and a multivariate Gaussian model of the image to be detected by respectively adopting a principal component analysis method for the feature set of the normal image and the feature set of the image to be detected in the step S12;
s14, carrying out maximum likelihood estimation on the multivariate Gaussian model in the step S13 to respectively obtain an average vector and a covariance matrix of the normal image and an average vector and a covariance matrix of the image to be detected;
s15, inputting the average vector and covariance matrix of the normal image and the average vector and covariance matrix of the image to be detected into a Pasteur distance formula, and calculating the mass fraction of each image block to be detected;
s16, calculating the average value of the mass fractions of the images to be detected, namely the image quality evaluation fraction of the images to be detected according to the mass fraction of each image block to be detected;
s17, if the image quality evaluation score of the image to be detected is smaller than the first threshold value, the image to be detected is a normal image; otherwise, the image to be detected is an abnormal image, and the step S18 is carried out;
s18, calculating a dark primary color image of the image to be detected according to a dark primary color prior theory;
and S19, if the pixel value of the dark primary color image meets the set condition, the image to be detected is a haze image, otherwise, the image to be detected is an out-of-focus image.
Further, the specific steps of step S10 are as follows:
s100, respectively processing the normal image and the image to be detected shot by the camera lens by adopting an interpolation method, wherein the interpolation method at least comprises an adjacent value interpolation method and a mean value interpolation method, so that the sizes of the normal image and the image to be detected are both m ', m is the number of rows of a corresponding matrix of the normal image and a corresponding matrix of the image to be detected, and m' is the number of columns of the corresponding matrix of the normal image and the corresponding matrix of the image to be detected;
s101, dividing a normal image with the size of m × m 'into N image blocks with the size of N × N', and setting the image blocks as a first group of image blocks of the normal image; dividing an image to be detected with the size of m × m ' into N image blocks with the size of N × N ', setting the image blocks as a first group of image blocks of the image to be detected, wherein N is the number of rows of a matrix corresponding to each image block of the first group of image blocks, and N ' is the number of columns of the matrix corresponding to each image block of the first group of image blocks;
s102, selecting image blocks with the contrast ratio larger than a set value of the normal image from the first group of image blocks of the normal image, and setting the image blocks as a second group of image blocks of the normal image;
s103, performing Gaussian filtering on the second group of image blocks of the normal image and the first group of image blocks of the image to be detected respectively, removing noise of the image, and setting the image blocks as a third group of image blocks of the normal image and a second group of image blocks of the image to be detected respectively;
s104, extracting a third group of image blocks of the normal image in an interval extraction mode, then dividing each image block of the extracted third group of image blocks of the normal image into N 'S-S' image blocks, and setting each divided image block as a standard image block; and extracting a second group of image blocks of the image to be detected in an interval mode, then dividing each image block of the extracted second group of image blocks of the image to be detected into N's ' image blocks, setting each divided image block as the image block to be detected, wherein s is the row number of a matrix corresponding to each extracted image block, and s ' is the column number of the matrix corresponding to each extracted image block.
Further preferably, in step S18, the dark primary color image J of the image to be measured is calculated according to the dark primary color prior theorydark(x) The formula of (1) is:
r, G, B are respectively the red, green and blue color channels of the image to be measured, JcAnd (y) represents each color channel of the image to be detected, wherein c is each color channel, y is a color image of the image to be detected, omega (x) represents a window with a pixel x as a center, and min is a minimum value.
Further, the specific steps of step S19 are:
s190, calculating the number of pixel points of which the pixel value of the whole dark primary color image is greater than a and less than b, and setting the ratio of the number to the sum of the pixel points of the whole dark primary color image as P; dividing the dark primary color image into four blocks equally according to a quadrant method, calculating the number of pixel points of which the pixel value of the upper left block is more than a and less than b, setting the ratio of the number to the sum of the pixel points of the upper left block as P1(ii) a Calculating the pixel value of the lower left block is larger than a and smallerThe number of pixels in b, the ratio of the number to the sum of pixels in the lower left block is set as P2(ii) a Calculating the number of pixel points with the pixel value of the upper right block larger than a and smaller than b, and setting the ratio of the number to the sum of the pixel points of the upper right block as P3(ii) a Calculating the number of pixel points of which the pixel value of the lower right block is more than a and less than b, and setting the ratio of the number to the sum of the pixel points of the lower right block as P4A and b are both constants;
s191, if the P is larger than a second threshold value, the image to be detected is a haze image, otherwise, the image to be detected is an out-of-focus image; or, if P1Greater than P2And P is3Greater than P4If not, the image to be detected is an out-of-focus image; or P is greater than the second threshold and P1Greater than P2And P is3Greater than P4And if not, the image to be detected is an out-of-focus image.
It is further preferred that the contrast in step 102 comprises at least a variance and a mean square error.
Preferably, the multivariate Gaussian model f in step S14u,∑(z) formula:
z is the feature set extracted in step S11, u is the average vector of the standard image blocks, the covariance matrix of the sigma standard image blocks, m is the number of standard image blocks, e is a constant, (z-u)TIs a transposed matrix of (z-u).
Preferably, the extraction manner of the interval in step S104 includes odd bit extraction or even bit extraction.
The invention has the following beneficial effects:
(1) whether the image is a haze image is detected by adopting a dark primary color prior algorithm, only one camera video image is needed, whether the camera image is affected by haze can be detected without depending on a professional tool, the detection method is simple, and whether the video image is affected by haze can be judged aiming at a single camera; the image quality evaluation method and the characteristics of the dark primary color image are combined together, the generalization capability is strong, whether the video image is haze or not is effectively judged, false detection caused by the fact that the image is a single scene such as a wall surface and the ground is avoided, and the false alarm rate and the missing detection rate are reduced.
(2) And selecting the image block with larger contrast, so that the detection speed can be improved on one hand, and the detection accuracy can be improved on the other hand.
(3) The principal component analysis method is adopted to reduce the dimension of the image, namely the number of pixel points of the image is reduced, and the detection speed can be improved.
(4) The image quality evaluation method is combined with the characteristics of the dark primary color image, and whether the fault of the camera or the haze weather causes the shot image to be an abnormal image can be distinguished.
(5) The image quality evaluation score is calculated before the dark channel prior algorithm, so that scenes which are not suitable for the dark channel prior algorithm can be removed, and the false detection rate is reduced.
(6) The blocking is for the convenience of acquiring a region with a large contrast on a large image. The sizes of the matrixes corresponding to the images are adjusted consistently, and feature extraction is facilitated.
Drawings
FIG. 1 is a flow chart of the present invention;
FIG. 2 is a normal image of the present invention;
FIG. 3 is a haze image of the present invention;
fig. 4 is an out-of-focus image of the present invention.
Detailed Description
The technical scheme of the invention is clearly and completely described below by combining the embodiment and the attached drawings of the specification. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example 1
As shown in fig. 1, a method for detecting a haze image includes the following steps:
s10, selecting a normal image without haze from an image library, blocking the normal image and the image to be detected, preprocessing the blocked image of the normal image and the blocked image of the image to be detected, and setting the preprocessed blocked image of the image to be detected as an image block to be detected; and selecting the block images with the contrast ratio larger than a set value from the block images of the preprocessed normal images, and setting the block images as standard image blocks.
In this embodiment, the step of preprocessing the normal image and the image to be detected is as follows:
s100, respectively processing the normal image and the image to be detected shot by the camera lens by adopting an interpolation method, wherein the interpolation method at least comprises an adjacent value interpolation method and a mean value interpolation method, so that the sizes of the normal image and the image to be detected are both m ', m is the number of rows of a corresponding matrix of the normal image and a corresponding matrix of the image to be detected, and m' is the number of columns of the corresponding matrix of the normal image and the corresponding matrix of the image to be detected;
s101, dividing a normal image with the size of m × m 'into N image blocks with the size of N × N', and setting the image blocks as a first group of image blocks of the normal image; dividing an image to be detected with the size of m × m ' into N image blocks with the size of N × N ', setting the image blocks as a first group of image blocks of the image to be detected, wherein N is the number of rows of a matrix corresponding to each image block of the first group of image blocks, and N ' is the number of columns of the matrix corresponding to each image block of the first group of image blocks;
s102, selecting image blocks with the contrast ratio larger than a set value of the normal image from the first group of image blocks of the normal image, and setting the image blocks as a second group of image blocks of the normal image;
in this embodiment, the contrast is a mean square error, the set value is obtained through a large number of experiments, the value range of the set value is (1, 5), or [1, 5], and the set value is a value in the above-mentioned interval.
S103, performing Gaussian filtering on the second group of image blocks of the normal image and the first group of image blocks of the image to be detected respectively, removing noise of the image, and setting the image blocks as a third group of image blocks of the normal image and a second group of image blocks of the image to be detected respectively;
s104, extracting a third group of image blocks of the normal image in an interval extraction mode, then dividing each image block of the extracted third group of image blocks of the normal image into N 'S-S' image blocks, and setting each divided image block as a standard image block; extracting a second group of image blocks of the image to be detected in an interval mode, then dividing each image block of the extracted second group of image blocks of the image to be detected into N's-s ' image blocks, setting each divided image block as the image block to be detected, wherein s is the row number of a matrix corresponding to each extracted image block, and s ' is the column number of the matrix corresponding to each extracted image block;
s11, extracting features from each standard image block and each image block to be detected, wherein the features at least comprise color, brightness, gradient and gradient amplitude;
in this embodiment, the features include four of color, brightness, gradient, and gradient magnitude.
S12, generating a feature set of the normal image according to the features of each standard image block; generating a feature set of the image to be detected according to the features of each image block to be detected;
s13, generating a multivariate Gaussian model of the normal image and a multivariate Gaussian model of the image to be detected by respectively adopting a principal component analysis method for the feature set of the normal image and the feature set of the image to be detected in the step S12;
s14, carrying out maximum likelihood estimation on the multivariate Gaussian model in the step S13 to respectively obtain an average vector and a covariance matrix of the normal image and an average vector and a covariance matrix of the image to be detected;
s15, inputting the average vector and covariance matrix of the normal image and the average vector and covariance matrix of the image to be detected into a Pasteur distance formula, and calculating the mass fraction of each image block to be detected;
s16, calculating the average value of the mass fractions of the images to be detected, namely the image quality evaluation fraction of the images to be detected according to the mass fraction of each image block to be detected;
in this embodiment, as shown in fig. 2, the image is a normal image without haze, and the image quality evaluation score is 22; as shown in fig. 3, which is an unclear haze image, the image quality evaluation score was 67; as shown in fig. 4, the out-of-focus image has an image quality evaluation score of 63.
S17, if the image quality evaluation score of the image to be detected is smaller than the first threshold value, the image to be detected is a normal image; otherwise, the image to be detected is an abnormal image, and the step S18 is carried out;
in this embodiment, the first threshold is 50.
S18, calculating a dark primary color image of the image to be detected according to a dark primary color prior theory;
and S19, if the pixel value of the dark primary color image meets the set condition, the image to be detected is a haze image, otherwise, the image to be detected is an out-of-focus image.
Example 2
On the basis of embodiment 1, the specific steps of extracting four characteristics of color, brightness, gradient and gradient amplitude in step S11 are as follows:
color characteristics
Three channels of the RGB image are subjected to respective logarithmic mean removal:
AR=logR(i,j)-avgR
AG=logG(i,j)-avgG
AB=logB(i,j)-avgB
in the formula, avgR, avgG, and avgB respectively represent the mean values of logR (i, j), logG (i, j), and logB (i, j).
To lR(i,j)、lG(i,j)、lBAnd (i, j) three-channel modeling, namely corresponding color features, wherein R (i, j), G (i, j) and B (i, j) respectively represent pixel values of a red color channel, a green color channel and a blue color channel of the ith row and j column of the matrix corresponding to the image.
Features of brightness
And converting the color image into a gray image, normalizing the gray image, and modeling the image by utilizing generalized Gaussian distribution.
The formula shows a Gamma function, and in this example, the mean value μ is 0.α and β are corresponding quality-related features, and are constants calculated from the image matrix.
Features of gradient
Amplitude characteristics of three channels of R, G, B in the horizontal direction and the vertical direction are extracted respectively, and Gaussian modeling is carried out.
G(x,y)=dx(i,j)+dy(i,j)
dx(i,j)=I(i+1,j)-I(i,j)
dy(i,j)=I(i,j+1)-I(i,j)
Where I represents the pixel value of three channels and (I, j) represents the pixel coordinates. G (x, y) represents gradient characteristics, and dx (i, j) and dy (i, j) represent amplitude characteristics of the channel in the horizontal and vertical directions, respectively.
Gradient amplitude feature
The gradient magnitude at pixel point (i, j) is:
example 3
Based on embodiments 1 and 2, in step S18, the dark primary color image J of the image to be measured is calculated according to the dark primary color prior theorydark(x) The formula of (1) is:
r, G, B are respectively the red, green and blue color channels of the image to be measured, Jc(y) represents each color channel of the image to be measured, Ω (x) represents a window centered on pixel x, and min is the minimum value.
Example 4
Based on embodiments 1, 2 and 3, the specific steps of step S19 are as follows:
and S190, calculating the number of pixel points of which the pixel value of the whole dark primary color image is greater than a and less than b, and setting the ratio of the number to the sum of the pixel points of the whole dark primary color image as P.
Dividing the dark primary color image into four blocks equally according to a quadrant method, calculating the number of pixel points of which the pixel value of the upper left block is more than a and less than b, setting the ratio of the number to the sum of the pixel points of the upper left block as P1(ii) a Calculating the number of pixel points of which the pixel value of the lower left block is more than a and less than b, and setting the ratio of the number to the sum of the pixel points of the lower left block as P2(ii) a Calculating the number of pixel points with the pixel value of the upper right block larger than a and smaller than b, and setting the ratio of the number to the sum of the pixel points of the upper right block as P3(ii) a Calculating the number of pixel points of which the pixel value of the lower right block is more than a and less than b, and setting the ratio of the number to the sum of the pixel points of the lower right block as P4And a and b are constants and are obtained by dark channel characteristic analysis of tens of thousands of abnormal-definition non-haze images and haze images.
S191, if the P is larger than a second threshold value, the image to be detected is a haze image, otherwise, the image to be detected is an out-of-focus image; or, if P1Greater than P2And P is3Greater than P4If not, the image to be detected is an out-of-focus image; or P is greater than the second threshold and P1Greater than P2And P is3Greater than P4And if not, the image to be detected is an out-of-focus image.
In this embodiment, the second threshold value is 0.9.
Multivariate Gaussian model f in step S14u,∑(z) formula:
z is the feature set extracted in step S11, u is the average vector of the standard image block, the covariance matrix of the Σ standard image block,m is the number of standard image blocks, e is a constant, (z-u)TIs a transposed matrix of (z-u).
Example 5
On the basis of the embodiments 1, 2, 3 and 4,
the test sample is from a video image of a certain safe city, and the number unit of the sample is as follows: sheet of paper
In the table: the definition abnormal graph is a sample of an unclear camera picture caused by non-haze;
the detection rate is the number of detected haze/the number of actual haze;
the accuracy rate is the number of detected haze as true/the number of detected haze as true.
Claims (6)
1. A haze image detection method is characterized by comprising the following steps:
s10, selecting a normal image without haze from an image library, blocking the normal image and the image to be detected, preprocessing the blocked image of the normal image and the blocked image of the image to be detected, and setting the preprocessed blocked image of the image to be detected as an image block to be detected; selecting a block image with the contrast ratio larger than a set value from the block images of the preprocessed normal image, and setting the block image as a standard image block;
s11, extracting features from each standard image block and each image block to be detected, wherein the features at least comprise color, brightness, gradient and gradient amplitude;
s12, generating a feature set of the normal image according to the features of each standard image block; generating a feature set of the image to be detected according to the features of each image block to be detected;
s13, generating a multivariate Gaussian model of the normal image and a multivariate Gaussian model of the image to be detected by respectively adopting a principal component analysis method for the feature set of the normal image and the feature set of the image to be detected in the step S12;
s14, carrying out maximum likelihood estimation on the multivariate Gaussian model in the step S13 to respectively obtain an average vector and a covariance matrix of the normal image and an average vector and a covariance matrix of the image to be detected;
s15, inputting the average vector and covariance matrix of the normal image and the average vector and covariance matrix of the image to be detected into a Pasteur distance formula, and calculating the mass fraction of each image block to be detected;
s16, calculating the average value of the mass fractions of the whole image to be detected, namely the image quality evaluation fraction of the image to be detected, according to the mass fraction of each image block to be detected;
s17, if the image quality evaluation score of the image to be detected is smaller than the first threshold value, the image to be detected is a normal image; otherwise, the image to be detected is an abnormal image, and the step S18 is carried out;
s18, calculating a dark primary color image of the image to be detected according to a dark primary color prior theory;
s19, if the pixel value of the dark primary color image meets the set condition, the image to be detected is a haze image, otherwise, the image to be detected is an out-of-focus image, and the specific steps are as follows:
s190, calculating the number of pixel points of which the pixel value of the whole dark primary color image is greater than a and less than b, and setting the ratio of the number to the sum of the pixel points of the whole dark primary color image as P; dividing the dark primary color image into four blocks equally according to a quadrant method, calculating the number of pixel points of which the pixel value of the upper left block is more than a and less than b, setting the ratio of the number to the sum of the pixel points of the upper left block as P1(ii) a Calculating the number of pixel points of which the pixel value of the lower left block is more than a and less than b, and setting the ratio of the number to the sum of the pixel points of the lower left block as P2(ii) a Calculating the number of pixel points with the pixel value of the upper right block larger than a and smaller than b, and setting the ratio of the number to the sum of the pixel points of the upper right block as P3(ii) a Calculating the number of pixel points of which the pixel value of the lower right block is more than a and less than b, and setting the ratio of the number to the sum of the pixel points of the lower right block as P4A and b are both constants;
s191, if the P is larger than a second threshold value, the image to be detected is a haze image, otherwise, the image to be detected is an out-of-focus image; or, if P1Greater than P2And P is3Greater than P4If not, the image to be detected is an out-of-focus image; or P is greater than the second threshold and P1Greater than P2And P is3Greater than P4And if not, the image to be detected is an out-of-focus image.
2. The method for detecting the haze image according to claim 1, wherein the step S10 is specifically as follows:
s100, preprocessing a normal image and a to-be-detected image shot by a camera lens by adopting an interpolation method, wherein the interpolation method at least comprises an adjacent value interpolation method and a mean value interpolation method, so that the sizes of the normal image and the to-be-detected image are m × m ', m is the number of rows of corresponding matrixes of the normal image and the to-be-detected image, and m' is the number of columns of the normal image and the to-be-detected image;
s101, dividing a normal image with the size of m × m 'into N image blocks with the size of N × N', and setting the image blocks as a first group of image blocks of the normal image; dividing an image to be detected with the size of m × m ' into N image blocks with the size of N × N ', setting the image blocks as a first group of image blocks of the image to be detected, wherein N is the number of rows of a matrix corresponding to each image block of the first group of image blocks, and N ' is the number of columns of the matrix corresponding to each image block of the first group of image blocks;
s102, selecting image blocks with the contrast ratio larger than a set value of the normal image from the first group of image blocks of the normal image, and setting the image blocks as a second group of image blocks of the normal image;
s103, performing Gaussian filtering on the second group of image blocks of the normal image and the first group of image blocks of the image to be detected respectively, and removing noise of the image, wherein the second group of image blocks of the normal image and the first group of image blocks of the image to be detected after the noise is removed are set as a third group of image blocks of the normal image and a second group of image blocks of the image to be detected respectively;
s104, extracting a third group of image blocks of the normal image in an interval extraction mode, then dividing each image block of the extracted third group of image blocks of the normal image into N 'S-S' image blocks, and setting each divided image block as a standard image block; and extracting a second group of image blocks of the image to be detected in an interval mode, then dividing each image block of the extracted second group of image blocks of the image to be detected into N's ' image blocks, setting each divided image block as the image block to be detected, wherein s is the row number of a matrix corresponding to each extracted image block, and s ' is the column number of the matrix corresponding to each extracted image block.
3. The method for detecting the haze image as claimed in claim 1 or 2, wherein the dark primary color image J of the image to be detected is calculated according to a dark primary color prior theory in step S18dark(x) The formula of (1) is:
r, G, B are respectively the red, green and blue color channels of the image to be measured, JcAnd (y) represents each color channel of the image to be detected, wherein c is each color channel, y is a color image of the image to be detected, omega (x) represents a window with a pixel x as a center, and min is a minimum value.
4. The method for detecting the haze image as claimed in claim 2, characterized in that: the contrast in step 102 includes at least a variance and a mean square error.
5. The method for detecting the haze image as claimed in claim 1, characterized in that: multivariate Gaussian model f in step S14u,∑(z) formula:
z is the feature set extracted in step S11, u is the average vector of the standard image block, Σ is the covariance matrix of the standard image block, m is the number of standard image blocks, e is a constant, (z-u)TIs a transposed matrix of (z-u).
6. The method for detecting the haze image as claimed in claim 2, characterized in that: the extraction method of the interval in step S104 includes odd bit extraction or even bit extraction.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910377719.XA CN110211096B (en) | 2019-04-30 | 2019-04-30 | Haze image detection method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910377719.XA CN110211096B (en) | 2019-04-30 | 2019-04-30 | Haze image detection method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110211096A CN110211096A (en) | 2019-09-06 |
CN110211096B true CN110211096B (en) | 2021-01-05 |
Family
ID=67785548
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910377719.XA Active CN110211096B (en) | 2019-04-30 | 2019-04-30 | Haze image detection method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110211096B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113065420A (en) * | 2021-03-18 | 2021-07-02 | 天津大学 | Haze detection and classification method based on dark primary color prior theory |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106548463A (en) * | 2016-10-28 | 2017-03-29 | 大连理工大学 | Based on dark and the sea fog image automatic defogging method and system of Retinex |
CN107680054A (en) * | 2017-09-26 | 2018-02-09 | 长春理工大学 | Multisource image anastomosing method under haze environment |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101448164B1 (en) * | 2013-04-22 | 2014-10-14 | 금오공과대학교 산학협력단 | Method for Image Haze Removal Using Parameter Optimization |
KR102461144B1 (en) * | 2015-10-16 | 2022-10-31 | 삼성전자주식회사 | Image haze removing device |
CN106548155A (en) * | 2016-10-28 | 2017-03-29 | 安徽四创电子股份有限公司 | A kind of detection method of license plate based on depth belief network |
CN107103591B (en) * | 2017-03-27 | 2020-01-07 | 湖南大学 | Single image defogging method based on image haze concentration estimation |
CN109255804A (en) * | 2018-08-10 | 2019-01-22 | 重庆大数据研究院有限公司 | A kind of haze concentration sealing method |
CN109389132A (en) * | 2018-09-28 | 2019-02-26 | 深圳大学 | A kind of mist Concentration Testing method for early warning and system based on image |
-
2019
- 2019-04-30 CN CN201910377719.XA patent/CN110211096B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106548463A (en) * | 2016-10-28 | 2017-03-29 | 大连理工大学 | Based on dark and the sea fog image automatic defogging method and system of Retinex |
CN107680054A (en) * | 2017-09-26 | 2018-02-09 | 长春理工大学 | Multisource image anastomosing method under haze environment |
Also Published As
Publication number | Publication date |
---|---|
CN110211096A (en) | 2019-09-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109870461B (en) | Electronic components quality detection system | |
EP3783374A1 (en) | Method for detecting corona discharge employing image processing | |
CN111260616A (en) | Insulator crack detection method based on Canny operator two-dimensional threshold segmentation optimization | |
CN112149543B (en) | Building dust recognition system and method based on computer vision | |
WO2019076326A1 (en) | Shadow detection method and system for surveillance video image, and shadow removing method | |
CN111127359A (en) | Underwater image enhancement method based on selective compensation color and three-interval balance | |
CN110880184B (en) | Method and device for automatically inspecting camera based on optical flow field | |
CN102169585A (en) | Method and device for detecting image color cast | |
CN111060442A (en) | Oil particle detection method based on image processing | |
US8606016B2 (en) | Edge detection apparatus and computing circuit employed in edge detection apparatus | |
CN111967345A (en) | Method for judging shielding state of camera in real time | |
US20110001823A1 (en) | Method for Detecting a Target | |
CN110211096B (en) | Haze image detection method | |
CN104299234B (en) | The method and system that rain field removes in video data | |
CN105451015B (en) | Detection method and device for image dead pixels | |
CN111768455A (en) | Image-based wood region and dominant color extraction method | |
CN113744326B (en) | Fire detection method based on seed region growth rule in YCRCB color space | |
US9235882B2 (en) | Method for detecting existence of dust spots in digital images based on locally adaptive thresholding | |
CN108830834B (en) | Automatic extraction method for video defect information of cable climbing robot | |
CN117237283A (en) | Screen defect detection method, device and equipment based on second-order curved surface fitting method | |
CN109359513B (en) | Anomaly detection method based on edge detection and color matching | |
CN113155247A (en) | Object weighing method, state evaluation method, weighing system and state evaluation system | |
CN111553376B (en) | Cultural relic contour monitoring method | |
CN114897766A (en) | Code stream anomaly detection method and device and computer readable storage medium | |
CN109886276B (en) | Half-word judging method for dial rolling digital character |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |