CN116402823B - Road surface garbage drip detection method based on image enhancement - Google Patents
Road surface garbage drip detection method based on image enhancement Download PDFInfo
- Publication number
- CN116402823B CN116402823B CN202310677403.9A CN202310677403A CN116402823B CN 116402823 B CN116402823 B CN 116402823B CN 202310677403 A CN202310677403 A CN 202310677403A CN 116402823 B CN116402823 B CN 116402823B
- Authority
- CN
- China
- Prior art keywords
- image
- mean value
- bright channel
- channel mean
- pair
- 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
- 238000001514 detection method Methods 0.000 title claims abstract description 30
- 238000000034 method Methods 0.000 claims abstract description 54
- 238000005457 optimization Methods 0.000 claims abstract description 47
- 230000008569 process Effects 0.000 claims abstract description 37
- 238000002834 transmittance Methods 0.000 claims abstract description 28
- 238000012545 processing Methods 0.000 claims abstract description 13
- 230000003044 adaptive effect Effects 0.000 claims abstract description 12
- 230000008859 change Effects 0.000 claims description 74
- 230000002159 abnormal effect Effects 0.000 claims description 15
- 238000004364 calculation method Methods 0.000 claims description 9
- 239000010808 liquid waste Substances 0.000 claims description 9
- 230000005856 abnormality Effects 0.000 claims description 6
- 239000007788 liquid Substances 0.000 abstract description 32
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 12
- 230000011218 segmentation Effects 0.000 description 9
- 238000013528 artificial neural network Methods 0.000 description 8
- 230000000694 effects Effects 0.000 description 6
- 230000002708 enhancing effect Effects 0.000 description 4
- 238000010606 normalization Methods 0.000 description 3
- 238000009825 accumulation Methods 0.000 description 2
- 238000011156 evaluation Methods 0.000 description 2
- 238000011176 pooling Methods 0.000 description 2
- 238000012549 training Methods 0.000 description 2
- 241001225883 Prosopis kuntzei Species 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 238000002310 reflectometry Methods 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
- 239000002351 wastewater Substances 0.000 description 1
Classifications
-
- 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
- G01—MEASURING; TESTING
- G01M—TESTING STATIC OR DYNAMIC BALANCE OF MACHINES OR STRUCTURES; TESTING OF STRUCTURES OR APPARATUS, NOT OTHERWISE PROVIDED FOR
- G01M3/00—Investigating fluid-tightness of structures
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/84—Systems specially adapted for particular applications
- G01N21/85—Investigating moving fluids or granular solids
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/90—Dynamic range modification of images or parts thereof
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/25—Determination of region of interest [ROI] or a volume of interest [VOI]
Landscapes
- Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Life Sciences & Earth Sciences (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Multimedia (AREA)
- Health & Medical Sciences (AREA)
- Quality & Reliability (AREA)
- Chemical & Material Sciences (AREA)
- Analytical Chemistry (AREA)
- Biochemistry (AREA)
- General Health & Medical Sciences (AREA)
- Immunology (AREA)
- Pathology (AREA)
- Image Analysis (AREA)
Abstract
The invention relates to the technical field of image data processing, in particular to a pavement garbage drip detection method based on image enhancement, which comprises the following steps: acquiring a plurality of front images and a plurality of rear images in the garbage transportation process to form a plurality of image pairs, and acquiring an initial atmospheric light value and an initial transmittance by using a dark channel prior algorithm; acquiring a bright channel mean value of each front image of a vehicle, forming a bright channel mean value sequence, acquiring the adjustment degree of each bright channel mean value, and acquiring an adjustment parameter optimization factor of each image pair; acquiring the adaptive transmittance of each image pair according to the adjustment parameter optimization factor of each image pair; and respectively carrying out enhancement treatment on the front image and the rear image of each pair of images by using a dark channel prior algorithm according to the self-adaptive transmissivity and the initial atmospheric light value of each pair of images, and carrying out pavement liquid garbage drip detection. The invention aims to solve the problem that the detection of the garbage leakage can be influenced by rainwater.
Description
Technical Field
The invention relates to the technical field of image data processing, in particular to a pavement garbage drip detection method based on image enhancement.
Background
In order to maintain the sanitary environment of the city and reduce the pollution source of the urban environment, the liquid garbage dripping and leaking detection is required to be carried out on the garbage truck in the city, so that the tightness of the garbage truck is ensured. The existing garbage dripping and leaking detection method for the garbage truck is that image acquisition equipment is respectively arranged in front of and behind the garbage truck to acquire real-time images of the road surface, comparison image matching is carried out between the image acquisition interval and the real-time running speed of the truck, whether the garbage dripping and leaking phenomenon of the garbage truck is detected through the difference between the matched images, and the phenomenon that the garbage dripping and leaking phenomenon of the garbage truck is caused by the change of the road surface after the garbage truck passes through is detected; in the detection process, as the garbage truck can meet the changeable condition, when the front of the vehicle is in the presence of the garbage drip and the current garbage transportation vehicle is in the presence of the liquid garbage drip, the image acquired by the image acquisition equipment at the rear of the vehicle contains the garbage drip which is the same as the garbage drip which is the current vehicle, and when the two are in coincidence, or the shape of the leaked liquid garbage is changed, an error detection result can be generated; or in rainy weather, the detection of the waste water drip is affected by rainwater, so that the erroneous detection result of the pavement liquid waste water drip is caused.
The existing solution to the above-mentioned scene problem is to reduce the image characteristics by performing image enhancement on the image collected in front of the vehicle, and to perform the same image enhancement on the image collected behind the vehicle by the same image enhancement method, so as to increase the image difference when the current vehicle has liquid drip while reducing the image characteristics of the template. In the existing image processing method, an image acquired by the front of the vehicle can be processed in a dark channel priori image enhancement mode, when the existing road surface liquid drips and leaks and rains, the image is processed in the front of the vehicle, the highlight pixel points in the front of the vehicle, namely the rainwater pixel points, are displayed as highlight points because of reflection, and other highlight pixel points are gray reduced according to the brightness lowest point in the image serving as a target enhancement effect and the statistics principle of the dark channel priori. Thereby reducing the influence of external factors. The liquid garbage leakage phenomenon of the garbage truck is judged by pixel point differences occurring in the prior process of carrying out dark channels with the same parameters on the front and back of the pixel points.
In the existing detection process of the liquid garbage leakage of the garbage truck, the detection of the liquid garbage leakage is carried out through the change difference of the dark channel priori, so that the target state needs to be determined in the process of reducing the brightness of the dark channel priori, namely the target effect of atomizing the image through the dark channel priori is needed. When the influence of the liquid garbage leakage of the current garbage truck on the pixel value of the image is low, the difference of the pixel points before and after the dark channel priori is small, and the liquid garbage leakage cannot be accurately judged.
Disclosure of Invention
The invention provides a pavement garbage drip detection method based on image enhancement to solve the existing problems.
The invention discloses an image-enhancement-based pavement garbage drip detection method, which adopts the following technical scheme:
the embodiment of the invention provides a pavement garbage dripping detection method based on image enhancement, which comprises the following steps of:
collecting a plurality of front images and a plurality of rear images in the garbage transportation process to form a plurality of image pairs, wherein each image pair comprises a front image and a rear image;
acquiring an initial transmittance and an initial atmospheric light value of each image pair by using a dark channel prior algorithm;
the method comprises the steps of forming a bright channel mean value sequence from bright channel mean values of all front images, obtaining the difference degree of each bright channel mean value according to the numerical difference of adjacent bright channel mean values in the bright channel mean value sequence, obtaining the change direction judgment factor and the change trend degree of each bright channel mean value in the bright channel mean value sequence according to the difference of the change trend of the adjacent bright channel mean values in the bright channel mean value sequence, obtaining the enhancement parameter optimization factor of each image pair according to the change direction judgment factor, the change trend degree and the difference degree of the bright channel mean value of the front image in each image pair, obtaining the adjustment degree of the bright channel mean value of the front image in each image pair, and obtaining the adjustment parameter optimization factor of each image pair according to the adjustment degree of the bright channel mean value of the front image in each image pair and the enhancement parameter optimization factor of each image pair; acquiring the adaptive transmittance of each image pair according to the adjustment parameter optimization factor of each image pair;
respectively carrying out enhancement processing on a front image and a rear image of each image pair by using a dark channel prior algorithm according to the self-adaptive transmissivity and an initial atmospheric light value of each image pair, recording two pixel points of each same position on the rear image of each image pair and the enhanced rear image of each image pair as contrast pixel point pairs, acquiring the change degree of each contrast point pair, acquiring the reference change degree of each image pair, and acquiring the abnormality degree of each contrast point pair according to the absolute value of the difference value between the change degree of each contrast point and the reference change degree of each image pair; acquiring abnormal points of each enhanced vehicle rear image according to a preset abnormal degree threshold, acquiring a ROI (region of interest) of each enhanced vehicle rear image according to the density distribution of the abnormal points, and detecting the liquid waste dripping and leaking of the road surface according to the ROI.
Optionally, the method for obtaining the change direction judgment factor and the change trend degree of each bright channel mean value in the bright channel mean value sequence according to the difference of the change trend of the adjacent bright channel mean values in the bright channel mean value sequence comprises the following specific steps:
recording any bright channel mean value in the bright channel mean value sequence as a target bright channel mean value, recording the last bright channel mean value of the target bright channel mean value in the bright channel mean value sequence as a contrast bright channel mean value, recording the change direction judgment factor of the target bright channel mean value as 1 when the contrast bright channel mean value is smaller than or equal to the target bright channel mean value, and recording the change direction judgment factor of the target bright channel mean value as-1 when the contrast bright channel mean value is larger than the target bright channel mean value; setting the judgment numberBefore acquiring target bright channel mean value in bright channel mean value sequenceAnd (5) the number of the bright channels, the change direction judgment factors of which are the same as the target bright channel mean, in the bright channel mean is recorded as the change trend degree of the target bright channel mean.
Optionally, the enhancement parameter optimization factor of each image pair is obtained according to the change direction judgment factor, the change trend degree and the difference degree of the bright channel mean value of the front image in each image pair, and the calculation formula is as follows:
wherein ,represent the firstThe enhancement parameter optimization factor for each image pair,represent the firstThe direction of change judgment factor of the bright channel mean value of the front image in the pair of images,represent the firstThe degree of variation trend of the bright channel mean of the front image in the pair of images,represent the firstThe degree of difference in the mean value of the bright channels of the front images in the pair of images,representing natural constants.
Optionally, the step of obtaining the adjustment parameter optimization factor of each image pair according to the adjustment degree of the bright channel mean value of the front image in each image pair and the enhancement parameter optimization factor of each image pair includes the following specific steps:
and (3) recording the product of the natural number 1 and the difference value of the adjustment degree of the bright channel mean value of the front image in each image pair and the enhancement parameter optimization factor of each image pair as the adjustment parameter optimization factor of each image pair.
Optionally, the step of obtaining the variation degree of each pair of comparison points includes the following specific steps:
and recording two pixel points at the same position on the rear image and the enhanced rear image in each image pair as a contrast pixel point pair of the image pair, acquiring the maximum pixel value of R, G, B three channels of two pixel points in each contrast pixel point pair in each image pair as the lightening channel value of each pixel point in each contrast pixel point pair, acquiring the absolute value of the difference value of the lightening channel values of the two pixel points in each contrast pixel point pair, and recording the absolute value as the change degree of each contrast pixel point pair.
Optionally, the obtaining the adaptive transmittance of each image pair according to the adjustment parameter optimization factor of each image pair includes the following specific steps:
wherein ,represent the firstThe adaptive transmissivity of the individual image pairs,represent the firstThe adjustment parameters of the individual image pairs optimize the factors,represent the firstThe adaptive transmissivity of the individual image pairs,indicating the initial transmittance.
Optionally, the step of obtaining the adjustment degree of the bright channel mean value of the front image in each pair of images includes the following specific steps:
setting the judgment numberRecording any bright channel mean value in bright channel mean value sequenceFor the target bright channel mean value, acquiring the front of the target bright channel mean value in the bright channel mean value sequenceThe average value of each bright channel is recorded as a reference set of the average value of the target bright channel, and is utilizedThe algorithm processes the reference set, obtains outlier factors and marks the outlier factors as the adjustment degree of the mean value of the target bright channel.
The technical scheme of the invention has the beneficial effects that: according to the invention, the prior processing of the reverse dark channel is carried out on the image through the prior processing of the existing image, so that the liquid garbage leakage detection of the garbage truck is carried out through the image pixel value change condition under the same prior parameters of the dark channel, and compared with the prior method, the prior parameters of each image obtained by the prior method can be obtained through the optimization processing of the parameters, and the prior parameters of the dark channel which can maximize the difference between the front and the back can be obtained. Therefore, the difference between the front and rear enhancement in the images after the vehicle is increased, and the liquid garbage dripping and leaking of the garbage vehicle can be detected more accurately; meanwhile, the optimization of the prior parameters of the dark channel is carried out through the local difference between the adjacent images, and compared with the dark channel enhancement processing of a single image, the real-time parameter adjustment can be carried out through the result feedback in the previous comparison process, so that the accuracy of identification and detection in each time in the garbage truck transportation process is optimal.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flow chart of steps of the road surface garbage drip detection method based on image enhancement.
Detailed Description
In order to further describe the technical means and effects adopted by the invention to achieve the preset aim, the following detailed description is given below of the specific implementation, structure, characteristics and effects of the image-enhancement-based pavement waste drip detection method according to the invention in combination with the accompanying drawings and the preferred embodiment. In the following description, different "one embodiment" or "another embodiment" means that the embodiments are not necessarily the same. Furthermore, the particular features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
The following specifically describes a specific scheme of the pavement garbage drip detection method based on image enhancement.
Referring to fig. 1, a flowchart of steps of a method for detecting road surface garbage dripping based on image enhancement according to an embodiment of the present invention is shown, where the method includes the following steps:
step S001, collecting a plurality of front images and a plurality of rear images in the garbage transportation process to form a plurality of image pairs.
In the present embodiment, in the scene of the water on the road surface or the garbage leaking from other vehicles, the collected image of the water or other influences can be regarded as a brighter image, if the enhancement is not performed, the collected image behind the vehicle cannot distinguish the water leaking from the other influences, namely, rainwater and the like when the liquid garbage leaking from the vehicle is detected currently; at the moment, if the front image is darkened according to dark points in the image through a dark channel prior, the influence of other influences such as rainwater in the front image is reduced, and at the moment, the image acquired after the vehicle in a similar position is also darkened through the dark channel prior adjustment through the same parameters of the front image, so that the measurement of the liquid garbage dripping condition of the current detection vehicle can be carried out according to the change of the pixel values of the pixel points before and after the enhancement of the image acquired after the vehicle; therefore, firstly, the front image and the rear image of each time stamp in the garbage transportation process need to be collected, and the front image and the rear image form a plurality of image pairs according to the implementation running speed of the vehicle and the length of the vehicle.
The image acquisition device is arranged at the head and tail of the garbage truck, the image acquisition device can set the time interval for acquiring images, the acquired front image and rear image are stored in a time sequence mode according to the time stamp of the acquisition time, namely, the image acquisition time interval is set in the running process of the truckThe present embodiment setsThe image acquisition device of the headstock and the tailstock starts to acquire images at the same time within 0.5 seconds, and the images acquired by the headstock are recorded as the front images of the car and are recorded as the sequencesThe images acquired by the tail of the vehicle are recorded as rear images of the vehicle and are recorded as sequencesAcquiring a rear image corresponding to each front image acquisition position according to the length of the vehicle body and recording the rear image as a rear image corresponding to each front image, wherein each front image and the corresponding rear image form an image pair; it should be noted that, the front image and the rear image in each image pair are similar in collected position, and the liquid garbage of the vehicle is leaked continuously, so that even if errors exist in the image correspondence, the liquid garbage can be detected through the difference through the whole information of the images.
Thus, a plurality of front images, rear images and a plurality of image pairs are obtained.
Step S002, obtaining initial transmittance and initial atmospheric light value of each image pair by using dark channel prior algorithm.
When there is water on the road surface or there is a drop of garbage from other vehicles, it is impossible to accurately determine whether there is a drop of garbage from the current vehicle with respect to the difference between the front and rear images of the current vehicle; in this case, the influence of the highlight pixels in the existing image needs to be reduced by the image enhancement mode, and the water is present as the bright pixels, so that the garbage leakage condition occurs because of the diversity of the color and the reflectivity of the liquid garbage, and therefore, the detection of the garbage leakage needs to be adaptively adjusted according to the brightness change of the image. In the process, the prior parameters of the initial dark channel are firstly determined according to the initial image condition, and then the parameters can be optimized according to the difference condition between the current image and the previous image in time sequence. After the initial prior parameters of the dark channel are acquired, the judgment is required to be carried out through the brightness change of the continuous frames acquired by the front images in the whole detection process. According to the self-adaptive optimized parameters, it can be ensured that each time of image enhancement can obtain the current best drip image for homogenizing the existing rainwater or liquid garbage in the front image according to the last compared image, and suspicious drip pixels are obtained. And finally, identifying the ROI area formed by the suspicious drip pixel points through a neural network to obtain a drip detection result.
It should be further noted that, the existing dark channel prior algorithm is mostly used for image defogging, but the essence of the dark channel prior is that the dark channel of the foggy image is estimated to be 0 through a statistical means, the dark channel value of the high-brightness point in the image is used as an atmospheric light value, and the transmissivity is estimated through the dark channel value and the atmospheric light value. After the transmittance is obtained, the dark image is enhanced by the transmittance and the atmospheric light value, and converted into a bright image. In the scene of the embodiment, as the condition that the pixels in the image are brighter due to factors such as reflection of liquid in rainwater on a road or existing liquid leakage and other interference conditions of the garbage, the bright image is converted into the dark image according to the dark channel priori principle by the reverse calculation of the dark channel priori, namely, the dark channels of some highlight pixels in the image are converted into 0, so that the influence of the factors such as rainwater in the image is reduced; firstly, obtaining initial dark channel priori parameters, namely an initial atmospheric light value and an initial transmissivity, according to a dark channel priori algorithm.
The method comprises the steps of recording a calculation process of a traditional dark channel prior as a positive process, recording a process of reversely reasoning an output image according to the traditional dark channel prior to obtain an input image as a reverse process, arranging the obtained image pairs according to an acquisition time sequence, acquiring an atmospheric light value and a transmissivity according to a first image pair by using the positive process, and recording an initial atmospheric light value and an initial transmissivity; it should be noted that, in this embodiment, the pixel value with the smallest value of each pixel point in the three R, G, B channels of the front image in each image pair is set as the dark channel pixel value of the pixel point, the pixel value with the largest value of each pixel point in the three R, G, B channels is set as the bright channel pixel value of the pixel point, the average value of the bright channel pixel values of the first 5% of the pixels with the smallest dark channel pixel value in the front image is recorded as the initial atmospheric light value of the front image in each image pair, and the initial atmospheric light value of the front image in each image pair is recorded as the initial atmospheric light value of the image pair.
To this end, the initial transmittance and the initial atmospheric light value for each image pair are obtained using a dark channel prior algorithm.
Step S003, acquiring a bright channel mean value of each front image to form a bright channel mean value sequence, acquiring the adjustment degree of the bright channel mean value of the front image in each pair, and acquiring the adjustment parameter optimization factor of each pair according to the adjustment degree of the bright channel mean value of the front image in each pair and the enhancement parameter optimization factor of each pair; the adaptive transmittance of each image pair is obtained according to the adjustment parameter optimization factor of each image pair.
After the initial parameters are acquired, for each image pair in the garbage truck transportation process, the abnormal degree is measured according to the pixel value change degree before and after the prior enhancement of the dark channel in the process; in the process, as the images acquired in the garbage truck transportation process are constantly changed and the road surface conditions of the road are also changeable, the image enhancement of the parameters, namely the initial atmospheric light value and the initial transmissivity, can lead to inaccurate extraction of abnormal pixel points in the images through a single parameter; for example, for a non-aqueous road surface, the whole road surface is relatively dark, when the road surface with water is treated according to the initial transmittance obtained by the non-aqueous road surface, the situation that the enhancement effect is poor, namely the difference between front and rear pixel values is not obvious, then the parameter self-adaptive optimization is required to be carried out through real-time image change in the running process of the garbage transport vehicle, so that the abnormal degree of the pixel points in an accurate image is obtained, and whether liquid garbage leakage occurs is represented.
It should be further noted that, in the running of the garbage vehicle, for each image pair, the luminance change of the front images continuously acquired in time sequence is utilized to perform the adaptive change of the dark channel parameters, and first, the luminance evaluation of each front image needs to be acquired, that is, the bright channel average value of each front image is acquired.
Specifically, by the firstTaking the front image of the individual car as an example, obtain the firstBright channel mean of individual front imagesThe calculation method of (1) is as follows:
wherein ,represent the firstThe number of pixels in the individual front images,representation ofAny one of the three channels may be used,expressed by the firstFirst in the front image of the personal carThe preset window size with each pixel point as the center is set as the pre-examination window size in the embodimentThe implementation practitioner may make adjustments as appropriate.The representation belongs toAny pixel point within the range of the pixel,represent the firstIn the front image of the individual carPixel point is atThe pixel value under the channel is determined,representing a maximum value.
Representation for the firstFirst in the front image of the personal carAnd estimating bright channel values of the pixel points.
Thus, the bright channel mean value of each front image of the vehicle is obtained.
And (3) forming a sequence by the bright channel mean value of all the front images according to the image acquisition time sequence, and marking the sequence as a bright channel mean value sequence.
Thus, a bright channel mean sequence is obtained.
It should be further noted that, in the running process of the garbage vehicle, the luminance change of the front images continuously collected in time sequence is utilized to perform the self-adaptive change of the dark channel parameters, that is, the dark channel parameters are adjusted through the change trend and the change condition of the bright channel mean value sequence.
In this embodiment, the atmospheric light value in the process of enhancing the dark channel of the image pair is set as the initial atmospheric light value, but for the selection of the transmittance, the transmittance which can most represent the difference between the front and rear of the vehicle is required to be found, so the enhancement of the transmittance change is performed according to the change trend of the bright channel mean sequence of the continuous front image, so that for a group of images to be judged, the pixel value of the pixel point which can be affected in the front image and the rear image of the vehicle can be determined to be reduced according to the evaluation change condition of the images, and at the moment, if the current vehicle has liquid garbage leakage, the difference between the front and rear of the pixel point enhancement occurs in the road surface monitoring image behind the vehicle when the dark channel enhancement of the same parameters is performed.
In the liquid garbage dripping detection process of the garbage truck, the color characteristics of the liquid garbage cannot be determined. Liquid waste may be cloudy or otherwise. The judgment of the liquid refuse needs to be made by the overall change (brightness or darkening) of the front and rear images of the vehicle. When liquid garbage appears and the detected image is wholly lightened, the brightness of the image is reduced through the reverse process of the step S002, and judgment is carried out according to the change before and after pixel point enhancement; when the whole is darkened, the image is lightened through the positive process in the step S002, and the abnormal degree of the pixel point is judged according to the change of the pixel value before and after enhancement; when the average brightness in the front image is increased, a larger degree of dark channel prior enhancement is needed; meanwhile, when trend changes occur in the bright channel mean value sequence, the enhanced transmittance is required to be changed, so that the transmittance can enlarge the difference in the front and rear images of the automobile to a greater degree, and accurate detection is ensured.
Acquiring absolute values of differences between each bright channel mean value and the previous bright channel mean value in the bright channel mean value sequence, recording the absolute values as the difference degree of each bright channel mean value, and carrying out normalization processing on all the difference degrees; it should be noted that, the difference degree is not calculated for the first bright channel mean in the bright channel mean sequence.
Recording any bright channel mean value in the bright channel mean value sequence as a target bright channel mean value, recording the last bright channel mean value of the target bright channel mean value in the bright channel mean value sequence as a contrast bright channel mean value, recording the change direction judgment factor of the target bright channel mean value as 1 when the contrast bright channel mean value is smaller than or equal to the target bright channel mean value, and recording the change direction judgment factor of the target bright channel mean value as-1 when the contrast bright channel mean value is larger than the target bright channel mean value; setting the judgment numberThe present embodiment sets the judgment numberThe implementation process implementation person can adjust according to the specific implementation condition before acquiring the target bright channel mean value in the bright channel mean value sequenceThe number of the bright channels, of which the change direction judgment factors are the same as the target bright channel mean, in the bright channel mean is recorded as the change trend degree of the target bright channel mean; when the change direction judgment factor of the target bright channel mean value is-1, the image of the front image corresponding to the target bright channel mean value is subjected to dark channel enhancement through a positive process, and when the change direction judgment factor of the target bright channel mean value is 1, the image of the front image corresponding to the target bright channel mean value is subjected to dark channel enhancement through a negative process; it should be noted that, when the target is on in the on-channel mean sequenceWhen the number of the bright channel mean values before the channel mean value is smaller than the judgment number, the number of the bright channel mean values before the target bright channel mean value is recorded as the judgment number of the target bright channel mean value, and the first bright channel mean value in the bright channel mean value sequence is not considered.
Specifically, by the firstTaking the image pair as an example, obtain the firstEnhancement parameter optimization factor for individual image pairsThe calculation method of (1) is as follows:
wherein ,represent the firstThe direction of change judgment factor of the bright channel mean value of the front image in the pair of images,represent the firstThe degree of variation trend of the bright channel mean of the front image in the pair of images,represent the firstThe degree of difference in the mean value of the bright channels of the front images in the pair of images,representing natural constants.
When the bright channel mean value is in sequenceWhen the variation trend of the mean value of the bright channels is continuous and the same, namelyThe larger the garbage truck is, the more the garbage truck is driven in a place with water, then for the first timeThe transmittance of the image pair needs to be adjusted to be higher and higher according to the characteristic that the brightness of the image is higher and higher, namely, the degree of darkening the image needs to be higher and the difference of the images before and after enhancement is ensured along with the fact that the bright spots contained in the image are more and more, so that the pixel points of liquid garbage in the images after the vehicle are accurately detected.
Thus, the enhancement parameter optimization factor of each image pair is obtained.
It should be further noted that, due to the weather change and the vehicle driving speed change during the driving process, there may be water accumulation in a certain image before the acquisition time sequence, but no water accumulation exists in an image after the acquisition time sequence, at this time, an outlier exists in the bright channel mean sequence, the enhancement parameter optimization factor of the image pair corresponding to the outlier is larger, the image pair is enhanced to a higher degree, at this time, an error occurs in judging the liquid garbage dripping, and further adjustment is required for the enhancement parameter optimization factor.
Specifically, by the firstFor example, in the bright channel mean sequence, when the image pair is the firstWhen the number of the bright channel mean values before the bright channel mean value of the front image in the pair of images is smaller than the judgment threshold value, the pair of images is aligned with the firstThe enhancement parameter optimisation factor of the individual image pairs is not adjusted, i.e. the firstAdjustment parameter optimization factor of individual image pairs, i.e. the firstEnhancement parameter optimization factors for the individual image pairs; when the first isWhen the number of the bright channel mean values before the bright channel mean value of the front image in the pair of images is more than or equal to the judgment threshold value, the pair of images is compared with the firstAnd adjusting the enhancement parameter optimization factors of the image pairs to obtain adjustment parameter optimization factors.
The obtaining of the adjustment parameter optimization factor comprises recording any bright channel mean value in the bright channel mean value sequence as a target bright channel mean value and obtaining the target bright channel mean value in the bright channel mean value sequence beforeThe average value of each bright channel is recorded as a reference set of the average value of the target bright channel, and is utilizedThe algorithm processes the reference set, obtains outlier factors, marks the outlier factors as adjustment degrees of the mean value of the target bright channel, and performs linear normalization processing on all adjustment degrees.
Specifically, by the firstTaking the image pair as an example, obtain the firstAdjusting parameter optimization factors for individual image pairsThe calculation method of (1) is as follows:
wherein ,represent the firstEnhancement parameter optimization factors for the bright channel mean of the front image in each image pair,represent the firstThe individual images are aligned to the extent of adjustment of the bright channel mean of the front image of the vehicle.
By passing throughThe outlier factors obtained by the algorithm further adjust the enhancement parameter optimization factors of each image pair, and compared with the enhancement parameter optimization factors obtained only through the variation trend of the data in the bright channel mean sequence, the enhancement parameter optimization factors can avoid the influence of road diversity variation; that is, the speed of the vehicle is not stable during running, in a variable speed, the front-rear correspondence may have a difference, and when the influence of a small amount of water occurs, only a smaller portion of accumulated water may exist in the corresponding image behind the vehicle, and for this case, the difference may be accurately judged according to the optimization of the above equation, that is, the effect of enhancing the dark channel is reduced, so that the front-rear difference is reduced.
Thus, the adjustment parameter optimization factor of each image pair is obtained.
Specifically, by the firstTaking the image pair as an example, obtain the firstAdaptive transmittance of individual image pairsThe calculation method of (1) is as follows:
wherein ,represent the firstThe adjustment parameters of the individual image pairs optimize the factors,indicating the initial transmittance of the light, and,represent the firstAdaptive transmittance of the image pairs.
To this end, an adaptive transmittance for each image pair is obtained.
And S004, respectively carrying out enhancement processing on the front image and the rear image of each pair of images by utilizing a dark channel prior algorithm according to the self-adaptive transmissivity and the initial atmospheric light value of each pair of images, and carrying out pavement liquid garbage drip detection.
And (3) respectively carrying out enhancement processing on the front image and the rear image of each pair of images by utilizing the dark channel prior algorithm in the step S002 according to the self-adaptive transmissivity and the initial atmospheric light value of each pair of images to obtain enhanced images of the front image and the rear image of each pair of images.
The method comprises the steps of recording two pixel points at the same position on a rear image and an enhanced rear image in each image pair as a contrast pixel point pair of the image pair, obtaining the maximum pixel value of R, G, B three channels of the two pixel points in each contrast pixel point pair in each image pair as the lightening channel value of each pixel point in each contrast pixel point pair, obtaining the absolute value of the difference value of the lightening channel values of the two pixel points in each contrast pixel point pair, recording the change degree of the contrast pixel point pair, obtaining the change degree of the two pixel points at the same position on a front image and an enhanced front image according to the obtaining mode of the change degree of the two pixel points at the same position on the rear image and the enhanced rear image, and obtaining the average value of the change degree of the two pixel points at all the same position on the front image and the enhanced front image as the reference change degree of the image pair.
Specifically, by the firstThe first of the image pairsThe contrast pixel point pair is exemplified by the firstDegree of abnormality of contrast pixel pairs of individual image pairsThe calculation method of (1) is as follows:
wherein ,represent the firstThe first of the image pairsThe degree of variation of the pairs of individual contrast pixels,represent the firstThe reference variation degree of each image pair is subjected to linear normalization processing on the abnormality degree of all contrast pixel point pairs of each image pair,the representation takes absolute value.
Thus, the degree of abnormality of the contrast pixel point pair of each image pair is obtained.
Setting abnormality degree thresholdThe present embodiment setsThe specific implementation process implementer can adjust the abnormal degree threshold according to specific implementation conditions, mark the pixel points in the contrast pixel point pair which is larger than the abnormal degree threshold in the enhanced vehicle rear image as abnormal points, set a preset radius, set the preset radius to be one tenth of the image length in the embodiment, obtain the number of abnormal points in the circular window which takes each abnormal point as the center and takes the preset radius as the radius, and mark the circular window with the largest number as the ROI area of each enhanced vehicle rear image.
The method comprises the steps of identifying liquid garbage dripping conditions of a region of interest (ROI) in an enhanced vehicle rear image obtained by enhancing the acquired vehicle rear image in rainy weather through a semantic segmentation neural network, wherein the adopted semantic segmentation neural network comprises the following specific contents:
1. and inputting the acquired ROI region by using the semantic segmentation Unet neural network, and outputting a corresponding semantic segmentation result. Firstly, extracting image features through a convolution layer and a pooling layer, and then reconstructing an image by adopting deconvolution and anti-pooling operation to obtain a semantic segmentation result corresponding to an input image.
2. And collecting a large number of high-difference pixel points acquired by corresponding garbage truck transportation vehicles as data points to train the neural network.
3. And (3) manually marking category information in the image, and acquiring corresponding semantic segmentation image label information of the ROI in the single image, wherein the marked non-liquid-waste drip category is 0, the low-degree liquid-waste drip category is 1, the medium-range liquid-waste drip category is 2 and the large-amount liquid-waste drip category is 3.
4. The neural network employs cross entropy loss functions to supervise training due to the classification task.
After the semantic segmentation neural network training is completed, the ROI area in the enhanced post-vehicle image obtained by enhancing the post-vehicle image in the rainwater weather acquired in real time can be input into the semantic segmentation neural network, the corresponding semantic segmentation image is obtained by network reasoning, and then, through the category label of the image, the requirement of the liquid garbage dripping degree of the garbage vehicle under different conditions is alerted; for example, if it is determined that the medium-range drip is illegal for the liquid waste drip of the garbage truck, when the occurrence of the labels is 2 and 3, an alarm needs to be sent to the operation and maintenance center of the garbage truck, so that the operation and maintenance center detects and maintains the tightness of the garbage truck, and the urban environment is ensured.
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather is intended to cover all modifications, equivalents, alternatives, and improvements that fall within the spirit and scope of the invention.
Claims (7)
1. The pavement garbage drip detection method based on image enhancement is characterized by comprising the following steps of:
collecting a plurality of front images and a plurality of rear images in the garbage transportation process to form a plurality of image pairs, wherein each image pair comprises a front image and a rear image;
acquiring an initial transmittance and an initial atmospheric light value of each image pair by using a dark channel prior algorithm;
the method comprises the steps of forming a bright channel mean value sequence from bright channel mean values of all front images, obtaining the difference degree of each bright channel mean value according to the numerical difference of adjacent bright channel mean values in the bright channel mean value sequence, obtaining the change direction judgment factor and the change trend degree of each bright channel mean value in the bright channel mean value sequence according to the difference of the change trend of the adjacent bright channel mean values in the bright channel mean value sequence, obtaining the enhancement parameter optimization factor of each image pair according to the change direction judgment factor, the change trend degree and the difference degree of the bright channel mean value of the front image in each image pair, obtaining the adjustment degree of the bright channel mean value of the front image in each image pair, and obtaining the adjustment parameter optimization factor of each image pair according to the adjustment degree of the bright channel mean value of the front image in each image pair and the enhancement parameter optimization factor of each image pair; acquiring the adaptive transmittance of each image pair according to the adjustment parameter optimization factor of each image pair;
respectively carrying out enhancement processing on a front image and a rear image of each image pair by using a dark channel prior algorithm according to the self-adaptive transmissivity and an initial atmospheric light value of each image pair, recording two pixel points of each same position on the rear image of each image pair and the enhanced rear image of each image pair as contrast pixel point pairs, acquiring the change degree of each contrast point pair, acquiring the reference change degree of each image pair, and acquiring the abnormality degree of each contrast point pair according to the absolute value of the difference value between the change degree of each contrast point pair and the reference change degree of each image pair; acquiring abnormal points of each enhanced vehicle rear image according to a preset abnormal degree threshold, acquiring a ROI (region of interest) of each enhanced vehicle rear image according to the density distribution of the abnormal points, and detecting the liquid waste dripping and leaking of the road surface according to the ROI.
2. The method for detecting the road surface garbage leakage based on image enhancement according to claim 1, wherein the step of obtaining the change direction judgment factor and the change trend degree of each bright channel mean value in the bright channel mean value sequence according to the difference of the change trend of the adjacent bright channel mean values in the bright channel mean value sequence comprises the following specific steps:
recording any bright channel mean value in the bright channel mean value sequence as a target bright channel mean value, recording the last bright channel mean value of the target bright channel mean value in the bright channel mean value sequence as a contrast bright channel mean value, recording the change direction judgment factor of the target bright channel mean value as 1 when the contrast bright channel mean value is smaller than or equal to the target bright channel mean value, and recording the change direction judgment factor of the target bright channel mean value as-1 when the contrast bright channel mean value is larger than the target bright channel mean value; setting the judgment numberBefore acquiring target bright channel mean value in bright channel mean value sequence/>And (5) the number of the bright channels, the change direction judgment factors of which are the same as the target bright channel mean, in the bright channel mean is recorded as the change trend degree of the target bright channel mean.
3. The method for detecting the road surface garbage leakage based on image enhancement according to claim 1, wherein the enhancement parameter optimization factor of each image pair is obtained according to the change direction judgment factor, the change trend degree and the difference degree of the bright channel mean value of the front image of each image pair, and the calculation formula is as follows:
wherein ,indicate->Enhancement parameter optimization factor for individual image pairs, +.>Indicate->Direction of change judgment factor of bright channel mean value of front image in each image pair, < >>Indicate->Degree of variation of bright channel mean of front image in individual images, +.>Represent the first/>Difference of bright channel mean value of front image in each image pair,/-degree>Representing natural constants.
4. The method for detecting the road surface garbage leakage based on image enhancement according to claim 1, wherein the step of obtaining the adjustment parameter optimization factor of each image pair according to the adjustment degree of the bright channel mean value of the front image in each image pair and the enhancement parameter optimization factor of each image pair comprises the following specific steps:
and (3) recording the product of the natural number 1 and the difference value of the adjustment degree of the bright channel mean value of the front image in each image pair and the enhancement parameter optimization factor of each image pair as the adjustment parameter optimization factor of each image pair.
5. The method for detecting the road surface garbage leakage based on the image enhancement according to claim 1, wherein the step of obtaining the variation degree of each pair of comparison points comprises the following specific steps:
and recording two pixel points at the same position on the rear image and the enhanced rear image in each image pair as a contrast pixel point pair of the image pair, acquiring the maximum pixel value of R, G, B three channels of two pixel points in each contrast pixel point pair in each image pair as the lightening channel value of each pixel point in each contrast pixel point pair, acquiring the absolute value of the difference value of the lightening channel values of the two pixel points in each contrast pixel point pair, and recording the absolute value as the change degree of each contrast pixel point pair.
6. The method for detecting the road surface garbage leakage based on the image enhancement according to claim 1, wherein the step of obtaining the adaptive transmittance of each image pair according to the adjustment parameter optimization factor of each image pair comprises the following specific steps:
wherein ,indicate->Adaptive transmittance of individual image pairs, +.>Indicate->Adjusting parameter optimization factor for individual image pairs, +.>Indicate->Adaptive transmittance of individual image pairs, +.>Indicating the initial transmittance.
7. The method for detecting the road surface garbage leakage based on the image enhancement according to claim 1, wherein the step of obtaining the adjustment degree of the bright channel mean value of the front image in each pair of images comprises the following specific steps:
setting the judgment numberRecording any bright channel mean value in the bright channel mean value sequence as a target bright channel mean value, and acquiring the target bright channel mean value in the bright channel mean value sequence before +.>The mean value of each bright channel is recorded as a reference set of the mean value of the target bright channel, and the mean value of the bright channel is utilized +.>The algorithm processes the reference set, obtains outlier factors and marks the outlier factors as the adjustment degree of the mean value of the target bright channel.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310677403.9A CN116402823B (en) | 2023-06-09 | 2023-06-09 | Road surface garbage drip detection method based on image enhancement |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310677403.9A CN116402823B (en) | 2023-06-09 | 2023-06-09 | Road surface garbage drip detection method based on image enhancement |
Publications (2)
Publication Number | Publication Date |
---|---|
CN116402823A CN116402823A (en) | 2023-07-07 |
CN116402823B true CN116402823B (en) | 2023-08-04 |
Family
ID=87010945
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310677403.9A Active CN116402823B (en) | 2023-06-09 | 2023-06-09 | Road surface garbage drip detection method based on image enhancement |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116402823B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117036204B (en) * | 2023-10-09 | 2024-02-02 | 东莞市华复实业有限公司 | Image quality enhancement method for visual interphone |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104509091A (en) * | 2012-07-27 | 2015-04-08 | 日产自动车株式会社 | Water droplet detection device, and three-dimensional object detection device using said water droplet detection device |
JP2015215694A (en) * | 2014-05-08 | 2015-12-03 | 日産自動車株式会社 | Three-dimensional object detector and three-dimensional object detection method |
CN110136210A (en) * | 2018-02-07 | 2019-08-16 | 中国石油化工股份有限公司 | A kind of intelligent early-warning system of monitoring device leakage |
CN111598814A (en) * | 2020-05-26 | 2020-08-28 | 北京理工大学 | A single-image dehazing method based on extreme scattering channels |
CN115619662A (en) * | 2022-09-28 | 2023-01-17 | 河北汉光重工有限责任公司 | Image defogging method based on dark channel prior |
-
2023
- 2023-06-09 CN CN202310677403.9A patent/CN116402823B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104509091A (en) * | 2012-07-27 | 2015-04-08 | 日产自动车株式会社 | Water droplet detection device, and three-dimensional object detection device using said water droplet detection device |
JP2015215694A (en) * | 2014-05-08 | 2015-12-03 | 日産自動車株式会社 | Three-dimensional object detector and three-dimensional object detection method |
CN110136210A (en) * | 2018-02-07 | 2019-08-16 | 中国石油化工股份有限公司 | A kind of intelligent early-warning system of monitoring device leakage |
CN111598814A (en) * | 2020-05-26 | 2020-08-28 | 北京理工大学 | A single-image dehazing method based on extreme scattering channels |
CN115619662A (en) * | 2022-09-28 | 2023-01-17 | 河北汉光重工有限责任公司 | Image defogging method based on dark channel prior |
Non-Patent Citations (1)
Title |
---|
基于暗通道补偿和透射率修正的图像去雾算法;容杰雄 等;计算机应用与软件;第第40卷卷(第第4期期);第166-171、262页 * |
Also Published As
Publication number | Publication date |
---|---|
CN116402823A (en) | 2023-07-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106651872B (en) | Pavement crack identification method and system based on Prewitt operator | |
CN116630813B (en) | Highway road surface construction quality intelligent detection system | |
CN106296612B (en) | A graded surveillance video sharpening system and method for image quality evaluation and weather condition guidance | |
CN102722982B (en) | Based on wagon flow and the motion state detection method thereof of background and inter-frame difference algorithm | |
CN105424655B (en) | A kind of visibility detecting method based on video image | |
CN116092015B (en) | Road construction state monitoring method | |
CN113554629A (en) | Strip steel red rust defect detection method based on artificial intelligence | |
CN107230207A (en) | The detection method and system of tire | |
US20100266214A1 (en) | Smart Image Enhancement Process | |
CN116758059A (en) | Visual nondestructive testing method for roadbed and pavement | |
CN116110053B (en) | Container surface information detection method based on image recognition | |
CN117094914A (en) | Smart city road monitoring system based on computer vision | |
CN116402823B (en) | Road surface garbage drip detection method based on image enhancement | |
CN103679656B (en) | A kind of Automated sharpening of images method | |
CN111079734B (en) | Method for detecting foreign matters in triangular holes of railway wagon | |
CN114708325A (en) | Method for quickly positioning rubber production problem based on rubber blooming defect | |
CN117173661A (en) | Asphalt road quality detection method based on computer vision | |
CN111144301A (en) | Road pavement defect quick early warning device based on degree of depth learning | |
Hsia et al. | An Intelligent IoT-based Vision System for Nighttime Vehicle Detection and Energy Saving. | |
CN109919062A (en) | A kind of road scene weather recognition methods based on characteristic quantity fusion | |
CN116109577A (en) | Printing label defect detection system and method | |
CN117132594A (en) | Intelligent detection method for underground water microplastic based on hyperspectral image | |
CN103295017A (en) | Vehicle type identification method based on road videos | |
CN116524196B (en) | Intelligent power transmission line detection system based on image recognition technology | |
CN104156727A (en) | Lamplight inverted image detection method based on monocular vision |
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 |