Precipitation detection is an important part of meteorological observation,and the monitoring and early warning of precipitation are of great significance to flood and drought prevention and climate research.At present,precipitation observation is mainly based on electromechanical rain gauges such as tipping bucket type and weighing type,however,these rain gauges generally have defects such as large size and inaccessibility of precipitation types.Therefore,this paper designs an image-processing-based precipitation measuring instrument system to measure and distinguish precipitation through image analysis techniques.The paper mainly designs the device structure,hardware circuit,software program and image algorithm parts of the precipitation measuring instrument,including the design of infrared filtering,video acquisition,environmental detection and control circuit.At the same time,in order to improve the efficiency of system data management and analysis,this paper also designs the system upper computer software,using SQLite database and Zigbee technology to store and transmit the measurement data.The system is based on the ARM architecture I.MX6 ULL microprocessor as the main control unit,ported embedded Linux system,QT software and Open CV vision library,through the infrared camera to capture precipitation video,and send frame by frame to the main control unit for processing.Firstly,image pre-processing is carried out to reduce image noise and enhance the contrast between the foreground particles and the background using methods such as grey scale transformation,Gaussian filtering and adaptive histogram equalization;the gray-scale precipitation image is then binarized using triangular thresholding to highlight the particle contours;followed by the removal of a small number of isolated noise points and larger noise blocks in the binary image using a morphological algorithm;further,the minimum outer rectangle method is used to extract the characteristic parameters of the precipitation particles and obtain information such as the width,length and tilt angle of the rain and snow lines;meanwhile,for the intersection of the rain and snow lines in the image,this paper uses the Hough transform method to extract the location of the rain and snow lines in order to obtain the exact number of precipitation particles;finally,the precipitation spectrum is constructed by combining the particle characteristic parameters and the actual sampling area to find out the precipitation amount and intensity.In addition,this paper achieves a comprehensive discrimination of precipitation types by using LBP cascade classifier,ambient temperature and precipitation particle features.The experiment verified that the precipitation measurement system based on image processing developed in this paper is able to realize real-time monitoring and measurement of environmental precipitation,and is effective in distinguishing the current precipitation type and precipitation intensity with positive measurement results. |