Precipitation phenomenon identification method and device based on image video

Through the precipitation phenomenon recognition method based on images and videos, the distance between the camera and the background plate is adjusted, the light source conditions are set, the image preprocessing is performed and the machine learning model is constructed. The problem of inaccurate precipitation phenomenon monitoring is solved, accurate recognition and real-time upload are achieved, and it adapts to the complex needs of modern traffic meteorological systems.

CN120673313APending Publication Date: 2025-09-19NANJING BENYUAN ENVIRONMENTAL SCI & TECH RES INST CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510767498.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-10
Publication Date
2025-09-19

AI Technical Summary

Technical Problem

The existing technology's precipitation monitoring results are inaccurate and less timely, especially in low-temperature icing environments, where the observation results are not reliable enough. Traditional equipment has limitations in future intelligent monitoring systems.

Method used

A precipitation phenomenon recognition method based on image and video is adopted. By adjusting the distance between the camera and the background board, setting the light source conditions, performing image preprocessing, and using machine learning technology to build a precipitation phenomenon recognition model, the recognition results are obtained and uploaded in real time.

Benefits of technology

It improves the accuracy of identifying precipitation phenomena, adapts to the complex needs of modern traffic meteorological systems, and improves road traffic safety and traffic efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120673313A_ABST
    Figure CN120673313A_ABST
Patent Text Reader

Abstract

The invention discloses a rainfall phenomenon identification method and device based on an image video, and the method comprises the following steps: setting a shooting angle based on a camera, setting a distance matching background plate in front of the camera, and building an image collection region; setting light source condition parameters, adjusting a camera shooting light source based on the light source condition parameters, and obtaining a rainfall picture image in real time; pre-processing the rainfall picture image, and removing image noise to obtain a pre-processed image; constructing a rainfall phenomenon identification model based on a machine learning technology, inputting the preprocessed image into the rainfall phenomenon identification model, and outputting a rainfall phenomenon identification result; uploading the rainfall phenomenon identification result to a terminal user interface according to a set transmission mode for real-time display; by adjusting the distance between the camera and the background plate, the image recognition definition in the image acquisition area is ensured, the rainfall phenomenon is accurately recognized according to the rainfall phenomenon recognition model, and the complex requirements of a modern traffic meteorological system are better met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of precipitation phenomenon recognition, and in particular to a precipitation phenomenon recognition method and device based on image and video. Background Art

[0002] Precipitation is a crucial weather phenomenon in applied meteorology, and its phase and intensity information is crucial for industries such as transportation and aviation. Traditional precipitation observation methods, such as ground-based rain gauges and weather radar, have limitations in future intelligent monitoring systems. Miniaturized sensors, such as rain sensors and piezoelectric rainfall sensors, also lack accuracy and environmental adaptability, especially in low-temperature and icy environments. However, video image acquisition is unaffected by low temperatures, snow accumulation, and icing. Using video image intelligent recognition technology opens up new avenues for intelligently identifying precipitation phenomena.

[0003] Image and video-based precipitation recognition is a new direction in the application of artificial intelligence technology. Its simple, low-cost equipment offers promising prospects for engineering applications. Deploying this image and video-based precipitation recognition algorithm can effectively replace traditional precipitation observation equipment, significantly reducing the economic burden. Furthermore, it can be integrated with road surface remote sensing equipment and road condition monitoring equipment for multimodal integration, better adapting to the complex demands of modern traffic meteorological systems and providing strong support for improving road safety and traffic efficiency. Summary of the Invention

[0004] The purpose of the present invention is to propose a precipitation phenomenon recognition method based on image and video to solve the problem that the precipitation phenomenon monitoring results in the prior art are inaccurate and have poor timeliness.

[0005] To achieve the above-mentioned object, the present invention adopts a technical solution: a precipitation phenomenon recognition method based on image and video, comprising the following steps:

[0006] S1, based on the camera setting shooting angle, and setting the distance in front of the camera to match the background plate, to establish the image acquisition area;

[0007] S2, setting light source condition parameters, adjusting the camera shooting light source based on the light source condition parameters, and obtaining precipitation images in real time;

[0008] S3, preprocessing the precipitation image to remove image noise to obtain a preprocessed image;

[0009] S4, building a precipitation phenomenon recognition model based on machine learning technology, inputting the preprocessed image into the precipitation phenomenon recognition model, and outputting the precipitation phenomenon recognition result;

[0010] S5, uploading the precipitation phenomenon identification result to the terminal user interface according to the set transmission method for real-time display.

[0011] Furthermore, step S1 specifically includes:

[0012] S101, setting the camera shooting angle, obtaining the shooting target area, and adjusting the shooting angle so that the target area is unobstructed and the light source reflection direction does not directly enter the camera;

[0013] S102, calculating intrinsic and extrinsic parameters of the camera based on a checkerboard calibration plate, analyzing image distortion, and adjusting the intrinsic and extrinsic parameters of the camera based on the image distortion;

[0014] S103, selecting a single-color background plate and placing the background plate in front of the camera. The background plate may be in black, white, or gray.

[0015] S104, setting a distance adjustment interval, obtaining a lower distance limit and an upper distance limit, fixing the camera position, and moving the distance between the background plate and the camera from the lower distance limit to the upper distance limit in sequence to obtain an image resolution;

[0016] S105: Select the distance with the best image resolution, set the background plate position, and form an image acquisition area.

[0017] Furthermore, the light source condition parameters in step S2 include: light source brightness, light source angle and light source color temperature;

[0018] Different light source condition parameters are matched to obtain multiple shooting conditions, and multiple precipitation scene images are acquired based on the multiple shooting conditions.

[0019] Furthermore, step S3 specifically includes:

[0020] Perform gray value processing on the precipitation image to obtain a grayscale image;

[0021] Extract image features and remove salt and pepper noise features based on the median filter algorithm;

[0022] Gaussian noise is removed based on the Gaussian filtering algorithm to obtain a denoised image;

[0023] Image features are analyzed based on the denoised image, and color features and texture features are screened out to obtain a preprocessed image.

[0024] Furthermore, step S4 specifically includes:

[0025] Collect images of different precipitation phenomena, annotate them, and generate training sets;

[0026] Select a machine learning model suitable for image classification, iteratively train the machine learning model based on the training set, and obtain training results;

[0027] Determining whether the training result has converged;

[0028] If convergence occurs, the model hyperparameters are dynamically optimized based on the cross-validation method;

[0029] If it does not converge, adjust the number of iterative training or the data in the dataset.

[0030] Furthermore, step S5 specifically includes:

[0031] Obtain precipitation phenomenon recognition results, analyze the data format, compare the data format with the set format, and obtain format difference information;

[0032] Adjust the data format based on the format difference information and match the transmission protocol based on the data format;

[0033] Based on the transmission protocol, the precipitation phenomenon identification results are encrypted and transmitted to the terminal user interface.

[0034] The present invention also provides a precipitation phenomenon identification device based on images and videos, including a processor, a memory and at least one program, wherein the program is stored in the memory and is configured to be executed by the processor, and the program includes instructions for executing the precipitation phenomenon identification method based on images and videos as described in any one of the above items.

[0035] Due to the application of the above technical solution, the present invention has the following advantages compared with the prior art:

[0036] The present invention ensures the clarity of image recognition within the image acquisition area by adjusting the distance between the camera and the background board, and accurately identifies precipitation phenomena based on the precipitation phenomenon recognition model, thereby better adapting to the complex needs of modern traffic meteorological systems and providing strong support for improving road traffic safety and traffic efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 A schematic diagram showing a flow chart of a precipitation phenomenon recognition method based on images and videos provided by an embodiment of the present invention is shown;

[0038] Figure 2 The flowchart of constructing the image acquisition area of ​​the precipitation phenomenon recognition method based on images and videos provided by this embodiment is shown.

[0039] Figure 3 A schematic diagram of the precipitation phenomenon recognition device based on images and videos provided in this embodiment is shown. DETAILED DESCRIPTION

[0040] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.

[0041] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the numbers used in this way can be interchanged where appropriate so that the embodiments of the present application described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, device, product or equipment that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment.

[0042] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in this application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0043] like Figure 1-Figure 2 As shown, an embodiment of the present invention provides a precipitation phenomenon recognition method based on images and videos, comprising the following steps:

[0044] S1, based on the camera setting shooting angle, and setting the distance in front of the camera to match the background plate, to establish the image acquisition area;

[0045] S2, setting light source condition parameters, adjusting the camera shooting light source based on the light source condition parameters, and obtaining precipitation images in real time;

[0046] S3, preprocessing the precipitation image to remove image noise to obtain a preprocessed image;

[0047] S4, building a precipitation phenomenon recognition model based on machine learning technology, inputting the preprocessed image into the precipitation phenomenon recognition model, and outputting the precipitation phenomenon recognition result;

[0048] S5, uploading the precipitation phenomenon identification result to the terminal user interface according to the set transmission method for real-time display.

[0049] It should be noted that the image acquisition area is the precipitation phenomenon image acquisition area formed by adjusting the background board and the camera.

[0050] Image acquisition equipment: includes high-definition high-speed cameras and auxiliary devices, which can capture rain and snow images more clearly, have night vision functions and fill light equipment, and are equipped with appropriate protective measures to adapt to various weather conditions.

[0051] Data processing unit: A high-performance computing platform used to process image data and run precipitation phenomenon recognition algorithms.

[0052] Communication interface: used to transmit the collected image data to the server.

[0053] According to an embodiment of the present invention, step S1 specifically includes:

[0054] S101, setting the camera shooting angle, obtaining the shooting target area, and adjusting the shooting angle so that the target area is unobstructed and the light source reflection direction does not directly enter the camera;

[0055] S102, calculating intrinsic and extrinsic parameters of the camera based on a checkerboard calibration plate, analyzing image distortion, and adjusting the intrinsic and extrinsic parameters of the camera based on the image distortion;

[0056] S103, selecting a single-color background plate and placing the background plate in front of the camera. The background plate may be in black, white, or gray.

[0057] S104, setting a distance adjustment interval, obtaining a lower distance limit and an upper distance limit, fixing the camera position, and moving the distance between the background plate and the camera from the lower distance limit to the upper distance limit in sequence to obtain an image resolution;

[0058] S105: Select the distance with the best image resolution, set the background plate position, and form an image acquisition area.

[0059] According to an embodiment of the present invention, the light source condition parameters in step S2 include: light source brightness, light source angle and light source color temperature;

[0060] Different light source condition parameters are matched to obtain multiple shooting conditions, and multiple precipitation scene images are acquired based on the multiple shooting conditions.

[0061] According to an embodiment of the present invention, step S3 specifically includes:

[0062] Perform gray value processing on the precipitation image to obtain a grayscale image;

[0063] Extract image features and remove salt and pepper noise features based on the median filter algorithm;

[0064] Gaussian noise is removed based on the Gaussian filtering algorithm to obtain a denoised image;

[0065] Image features are analyzed based on the denoised image, and color features and texture features are screened out to obtain a preprocessed image.

[0066] It should be noted that noise removal is the process of removing random noise from an image. For example, a median filter is used to remove salt and pepper noise, especially noise caused by raindrops or snow crystals; a Gaussian filter is used to smooth an image and reduce Gaussian noise, such as noise caused by camera sensors.

[0067] Image enhancement: Improves image quality and highlights the characteristics of precipitation phenomena. For example, histogram equalization is used to adjust the contrast of the image to make the image histogram as flat as possible, thereby improving the overall contrast of the image.

[0068] Feature extraction includes:

[0069] Color feature: Use color space conversion to convert the image from RGB color space to HSV color space for better processing of color information.

[0070] Texture features: Extract texture information from precipitation images, such as gradient, entropy, etc. Use the Laplace algorithm for edge detection, etc.

[0071] According to an embodiment of the present invention, step S4 specifically includes:

[0072] Collect images of different precipitation phenomena, annotate them, and generate training sets;

[0073] Select a machine learning model suitable for image classification, iteratively train the machine learning model based on the training set, and obtain training results;

[0074] Determine whether the training results converge;

[0075] If convergence occurs, the model hyperparameters are dynamically optimized based on the cross-validation method;

[0076] If it does not converge, adjust the number of iterative training or the data in the dataset.

[0077] It should be noted that the machine learning model method is as follows:

[0078] Training dataset: Images of various precipitation phenomena are collected and then annotated for training.

[0079] Model selection: Choose a machine learning model suitable for image classification. Consider the model's accuracy, speed, number of parameters, and memory usage. Generally, it's better to choose an efficient model suitable for mobile or edge deployment, such as EfficientNetv2_s, EfficientNet_lite0, MobileNet, MobileVit, Tiny_Vit, and HgNet_tiny. The specific model selection depends on the experimental results.

[0080] Model training and optimization: Use the training data set to train the model, and continuously optimize the model and related parameters through methods such as cross-validation.

[0081] Classification: Classification is typically done by determining the type and intensity of precipitation in an image based on the probability distribution of the model output. This is typically done at the end of the neural network, based on the number of classification categories.

[0082] According to an embodiment of the present invention, step S5 specifically includes:

[0083] Obtain precipitation phenomenon recognition results, analyze the data format, compare the data format with the set format, and obtain format difference information;

[0084] Adjust the data format based on the format difference information and match the transmission protocol based on the data format;

[0085] Based on the transmission protocol, the precipitation phenomenon identification results are encrypted and transmitted to the terminal user interface.

[0086] Specifically, the user interface mainly applies the algorithm according to user needs, using the highway environmental meteorological monitoring and early warning service system developed by our company, and integrating the precipitation phenomenon recognition algorithm based on images and videos and the historical data and detection results of the device into the analysis model section.

[0087] To sum up, the present invention ensures the clarity of image recognition within the image acquisition area by adjusting the distance between the camera and the background board, and accurately identifies precipitation phenomena based on the precipitation phenomenon recognition model, so as to better adapt to the complex needs of modern traffic meteorological systems and provide strong support for improving road traffic safety and traffic efficiency.

[0088] This embodiment also provides an image and video-based precipitation phenomenon identification device, including a processor, a memory, and at least one program. The program is stored in the memory and is configured to be executed by the processor. The program includes instructions for executing any of the above-mentioned image and video-based precipitation phenomenon identification methods.

[0089] Specifically including: 1) shooting device.

[0090] Camera: The specific parameter configuration requirements of the shooting camera are shown in Table 1.

[0091] Table 1 Camera parameter configuration requirements

[0092]

[0093]

[0094] Fill light device: fully consider that when there is precipitation (rain and snow), it is relatively dark even during the day (local or intermittent precipitation in summer is sometimes accompanied by sunshine). Fill light is conducive to more uniform image quality, and it is also possible to make full use of the light on raindrops or snowflakes to enhance the imaging effect; the position and angle relationship between the fill light device and the lens should be determined through experiments. Generally, the light source should not be projected directly onto the background board. The fill light beam should be at a certain angle to the lens (roughly 30-45 degrees), and even designed to have a certain height difference (the light source should be higher) to enhance the reflected or scattered light effect on the raindrops or snowflakes, and to retain the dark background and the reflection of raindrops or snowflakes to enhance the image effect as much as possible.

[0095] Others: Configure lens wiper and lens defogger; do not consider the storage of video information (or video loop caching for a short period of time); realize single-point image recognition and multi-point image recognition every minute. Single-point means retaining one static image every minute for image processing and recognition. Multi-point means acquiring images at intervals of multiple times per minute (such as 15 / 10s intervals, 4 / 6 images collected per minute for recognition). Finally, the multiple recognition results are integrated to output the precipitation phenomenon of this minute (this is beneficial for the recognition of serpentine precipitation, short-term precipitation, and non-continuous precipitation).

[0096] 2) Auxiliary devices.

[0097] Background plate: A square background plate (can be independent) is set at a certain distance in front of the camera (determined by specific experiments). The plate surface is "black". The size of this background plate needs to be designed as an integral part of the shooting device, and the size of the background plate is determined according to the shooting effect. By reducing the shooting distance L between the background plate and the background plate, the background plate can be reduced. Under the condition that the image meets the recognition requirements, the size S of the background plate can be minimized as much as possible. When the size S of the background plate is reduced to a certain extent, it can be considered to be integrated with the column bracket of the shooting device. The specific design of the background plate usually requires experiments to be carried out step by step. During the preliminary design, the material can be "stainless steel plate", and its shape can be designed into a "Z" (note that the curling design of the top side facing the lens should be strengthened to prevent the influence of running water, melting snow water, hanging ice, etc.). At the same time, the wind resistance of the background plate should be taken into consideration. In order to prevent or reduce the flow of water, sticky snow, ice, etc. on the background board, which affects the precipitation imaging effect and analysis, a "blackening + hydrophobic" coating can be applied, and the background board can be set to have a slight inclination (tilted towards the ground), and the top can be bent towards the lens to form a top plate with a "precipitation-proof shed" effect (the top of the Z shape).

[0098] Rainwater collection trough: A rainwater collection trough is added at the bottom edge behind the background board (the bottom end of the Z shape). This is beneficial for collecting rainwater when it is drizzling or with very little rainfall. A switch information detector is added at the rainwater outlet to detect whether there is rainfall. This is also a supplementary verification device for heavier rainfall. A temperature sensor can also be added simultaneously (attached to the water trough, and this water accumulation function is eliminated when the temperature is low enough to cause freezing).

[0099] Cable device: A horizontal "cable or metal rod" is added to the top of the background board (Z-shaped top) for imaging phenomena such as icing, freezing rain, snow accumulation, and ice hanging; when snow or ice accumulates, there should be a characteristic of increasing / decreasing thickness of the cover; a temperature sensor (attached to the wire or metal rod) can also be added simultaneously.

[0100] Vibration detection device: Use the top flat plate of the Z-shaped background plate as the precipitation receiving plane to detect hail falling (large discrete impact vibrations). During heavy precipitation, there should be continuous slow vibrations (mutually verified with rainfall phenomena).

[0101] Those skilled in the art will appreciate that, for ease of explanation, the following example illustrates a configuration in which one memory and one processor are provided. In an actual terminal or server, multiple processors and memories may exist. A memory may also be referred to as a storage medium or storage device, etc., which is not limited in the present embodiment.

[0102] It should be understood that in the embodiments of the present application, the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor may also be a general-purpose microprocessor, a graphics processing unit (GPU), or one or more integrated circuits for executing relevant programs to implement the functions required to be executed in the embodiments of the present application.

[0103] The processor can also be an integrated circuit chip with signal processing capabilities. During the implementation process, the various steps of the present application can be completed by the integrated logic circuit of the hardware in the processor or by instructions in the form of software. The above-mentioned processor can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. The steps of the method disclosed in conjunction with the embodiments of the present application can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a mature storage medium in the art such as random access memory, flash memory and read-only memory, programmable read-only memory or electrically erasable programmable memory, registers, etc. The storage medium is located in the memory, and the processor reads the information in the memory and, in combination with its hardware, completes the functions required to be performed by the units included in the method, device and storage medium of the embodiments of the present application.

[0104] It should also be understood that the memory mentioned in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache.

[0105] By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM bus random access memory (DR RAM).

[0106] The memory may also be a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory may be independent and connected to the processor via a bus. The memory may also be integrated with the processor, and the memory may store a program. When the program stored in the memory is executed by the processor, the processor is used to execute the various steps of the determination method in the above-mentioned embodiment of the present application.

[0107] It should be noted that when the processor is a general-purpose processor, DSP, ASIC, FPGA or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, the memory (storage module) is integrated into the processor. It should be noted that the memory described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0108] It should be understood that the term "and / or" in this document simply describes a relationship between related objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, or B exists alone. Furthermore, the character " / " in this document generally indicates that the related objects are in an "or" relationship.

[0109] During implementation, each step of the above method can be completed by an integrated logic circuit of the hardware in the processor or an instruction in the form of software. The steps of the method disclosed in conjunction with the embodiments of the present application can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory and completes the steps of the above method in conjunction with its hardware. To avoid repetition, it will not be described in detail here.

[0110] Those skilled in the art will appreciate that the various illustrative logical blocks (ILBs) and steps described in conjunction with the embodiments disclosed herein can be implemented using electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0111] In the above embodiments, all or part of the embodiments may be implemented using software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments may be implemented in the form of a computer-programmed program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a processor, the processes or functions according to the embodiments of the present application are generated in whole or in part. The computer may be a general-purpose computer, a computer network, or other programmable device.

[0112] This embodiment also provides a computer-readable storage medium, which stores a computer program. The computer program enables a computer to execute to implement the above-mentioned precipitation phenomenon recognition method based on images and videos.

[0113] It should be noted that computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via wired (e.g., coaxial cable, optical fiber) or wireless (e.g., infrared, wireless, microwave, etc.) means, or can be transmitted from one website, computer, server or data center to a mobile phone processor via wired means. A computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media. Available media can be magnetic media (e.g., floppy disk, hard disk), optical media (e.g., DVD), or semiconductor media (e.g., solid-state drive), etc.

[0114] Finally, it should be noted that the above are only preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or make equivalent replacements for some of the technical features therein. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A precipitation phenomenon recognition method based on image and video, characterized in that: The following steps are involved: S1, based on the camera setting shooting angle, and setting the distance in front of the camera to match the background plate, to establish the image acquisition area; S2, setting light source condition parameters, adjusting the camera shooting light source based on the light source condition parameters, and obtaining precipitation images in real time; S3, preprocessing the precipitation image to remove image noise to obtain a preprocessed image; S4, building a precipitation phenomenon recognition model based on machine learning technology, inputting the preprocessed image into the precipitation phenomenon recognition model, and outputting the precipitation phenomenon recognition result; S5, uploading the precipitation phenomenon identification result to the terminal user interface according to the set transmission method for real-time display.

2. The precipitation phenomenon recognition method based on images and videos according to claim 1, characterized in that: Step S1 specifically includes: S101, setting the camera shooting angle, obtaining the shooting target area, and adjusting the shooting angle so that the target area is unobstructed and the light source reflection direction does not directly enter the camera; S102, calculating intrinsic and extrinsic parameters of the camera based on a checkerboard calibration plate, analyzing image distortion, and adjusting the intrinsic and extrinsic parameters of the camera based on the image distortion; S103, selecting a single-color background plate and placing the background plate in front of the camera. The background plate may be in black, white, or gray. S104, setting a distance adjustment interval, obtaining a lower distance limit and an upper distance limit, fixing the camera position, and moving the distance between the background plate and the camera from the lower distance limit to the upper distance limit in sequence to obtain an image resolution; S105: Select the distance with the best image resolution, set the background plate position, and form an image acquisition area.

3. The precipitation phenomenon recognition method based on images and videos according to claim 2, characterized in that: The light source condition parameters in step S2 include: light source brightness, light source angle and light source color temperature; Different light source condition parameters are matched to obtain multiple shooting conditions, and multiple precipitation scene images are acquired based on the multiple shooting conditions.

4. The precipitation phenomenon recognition method based on images and videos according to claim 3, characterized in that: Step S3 specifically includes: Perform gray value processing on the precipitation image to obtain a grayscale image; Extract image features and remove salt and pepper noise features based on the median filter algorithm; Gaussian noise is removed based on the Gaussian filtering algorithm to obtain a denoised image; Image features are analyzed based on the denoised image, and color features and texture features are screened out to obtain a preprocessed image.

5. The precipitation phenomenon recognition method based on images and videos according to claim 1, characterized in that: Step S4 specifically includes: Collect images of different precipitation phenomena, annotate them, and generate training sets; Select a machine learning model suitable for image classification, iteratively train the machine learning model based on the training set, and obtain training results; Determining whether the training result has converged; If convergence occurs, the model hyperparameters are dynamically optimized based on the cross-validation method; If it does not converge, adjust the number of iterative training or the data in the dataset.

6. The precipitation phenomenon recognition method based on images and videos according to claim 1, characterized in that: Step S5 specifically includes: Obtain precipitation phenomenon recognition results, analyze the data format, compare the data format with the set format, and obtain format difference information; Adjust the data format based on the format difference information and match the transmission protocol based on the data format; Based on the transmission protocol, the precipitation phenomenon identification results are encrypted and transmitted to the terminal user interface.

7. A precipitation phenomenon recognition device based on image and video, characterized in that: The system comprises a processor, a memory, and at least one program, wherein the program is stored in the memory and configured to be executed by the processor, and the program comprises instructions for executing the precipitation phenomenon recognition method based on images and videos according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • System for automatically observing precipitation phenomenon based on digital shooting

    CN102183801A