Method for identifying rain intensity classes and device therefor
By dividing the car window image into grid blocks and performing edge detection and Gaussian smoothing, raindrop areas are identified, solving the problem of inaccurate rainfall density level judgment in existing technologies, and realizing accurate identification and level judgment of raindrop areas with different shapes.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING CO WHEELS TECH CO LTD
- Filing Date
- 2021-09-26
- Publication Date
- 2026-06-19
AI Technical Summary
Existing technologies are not effective in determining the rainfall density level under different distribution states of raindrops on car windows, and it is difficult to accurately identify raindrop areas with various irregular shapes.
The car window image is divided into multiple grid blocks. Texture grid blocks are identified through edge detection, and raindrop regions are identified using Gaussian smoothing and fuzziness analysis. The proportion of raindrop regions in the image is calculated to determine the rainfall density level.
It improves the recognition of raindrop areas with different shapes, and can more accurately determine the rainfall density level, applicable to rainfall density judgment under different distribution conditions.
Smart Images

Figure CN115861945B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intelligent vehicle technology, and in particular to a method and apparatus for identifying rainfall density levels. Background Technology
[0002] To enhance user experience, an increasing number of smart vehicle terminals are controlling windshield wipers based on rainfall density levels, enabling the wipers to clean windows to the maximum extent while saving power. In reality, when it rains, raindrops adhere to the windshield, displaying various shapes. Similarly, the actual distribution of raindrop areas on the windshield includes not only spots but also numerous other irregular shapes, such as ellipses, polygons, and many other patchy distributions. However, current technologies are not very effective at determining the density levels of rainfall in different distribution patterns. Summary of the Invention
[0003] This application aims to at least partially address one of the technical problems in the related art.
[0004] Therefore, the first objective of this application is to propose a method for identifying rainfall density levels.
[0005] The second objective of this application is to provide a device for identifying rainfall density levels.
[0006] The third objective of this application is to propose a vehicle.
[0007] The fourth objective of this application is to propose an electronic device.
[0008] The fifth objective of this application is to provide a computer-readable storage medium.
[0009] To achieve the above objectives, a first aspect of this application proposes a method for identifying rainfall density levels, comprising: dividing a vehicle window image into multiple grid blocks; identifying textured grid blocks among the multiple grid blocks; identifying raindrop regions within the textured grid blocks; and determining the rainfall density level based on the raindrop regions.
[0010] According to one embodiment of this application, identifying a textured mesh block among the plurality of mesh blocks includes: performing edge detection on the mesh blocks to obtain a sum of first edge intensities of the mesh blocks; and identifying whether the mesh block is the textured mesh block based on the sum of the first edge intensities.
[0011] According to one embodiment of this application, identifying whether the mesh block is a textured mesh block based on the sum of the first edge intensities includes: if the sum of the first edge intensities is greater than a preset edge intensity threshold, then the mesh block is identified as a textured mesh block; if the sum of the first edge intensities is equal to or less than the edge intensity threshold, then the mesh block is identified as a non-textured mesh block.
[0012] According to one embodiment of this application, identifying the raindrop region in the textured mesh block includes: performing Gaussian smoothing on the window image based on a first variance to obtain a first smoothed image; performing Gaussian smoothing on the window image based on a second variance to obtain a second smoothed image, wherein the second variance is different from the first variance; performing edge detection on the pixel blocks in the textured mesh block in the first smoothed image to obtain the sum of the second edge intensities of the pixel blocks corresponding to the textured mesh block in the first smoothed image; performing edge detection on the pixel blocks in the textured mesh block in the second smoothed image to obtain the sum of the third edge intensities of the pixel blocks corresponding to the textured mesh block in the second smoothed image; calculating the ratio of the sum of the second edge intensities to the sum of the third edge intensities of the same pixel block to obtain the blurriness of the pixel block; and identifying whether the pixel block is the raindrop region based on the blurriness of the pixel block and the blurriness of the surrounding pixel blocks.
[0013] According to one embodiment of this application, the second variance is greater than the first variance, and the step of identifying whether the pixel block is the raindrop region based on the blurriness of the pixel block and the blurriness of the surrounding pixel blocks includes: if the blurriness of the pixel block is less than the blurriness of the surrounding pixel blocks, then the pixel block is identified as the raindrop region; if the blurriness of the pixel block is equal to or greater than the blurriness of the surrounding pixel blocks, then the pixel block is identified as a non-raindrop region.
[0014] According to one embodiment of this application, determining the rainfall density level based on the raindrop area includes: calculating the proportion of the raindrop area in the window image; and determining the rainfall density level based on the proportion.
[0015] According to one embodiment of this application, before dividing the window image into multiple grid blocks, the method further includes: performing image enhancement processing on the window image.
[0016] To achieve the above objectives, a second aspect of this application provides a rainfall density level identification device, comprising: a preprocessing module for dividing a vehicle window image into multiple grid blocks; a first identification module for identifying textured grid blocks among the multiple grid blocks; a second identification module for identifying raindrop regions among the textured grid blocks; and a determination module for determining the rainfall density level based on the raindrop regions.
[0017] According to one embodiment of this application, the first identification module is specifically used for: performing edge detection on the mesh block to obtain the sum of the first edge intensities of the mesh block; and identifying whether the mesh block is the texture mesh block based on the sum of the first edge intensities.
[0018] According to one embodiment of this application, the first identification module is specifically used to: identify the mesh block as the textured mesh block if the sum of the first edge intensities is greater than a preset edge intensity threshold; and identify the mesh block as a non-textured mesh block if the sum of the first edge intensities is equal to or less than the edge intensity threshold.
[0019] According to one embodiment of this application, the second recognition module is specifically configured to: perform Gaussian smoothing on the window image based on a first variance to obtain a first smoothed image; perform Gaussian smoothing on the window image based on a second variance to obtain a second smoothed image, wherein the second variance is different from the first variance; perform edge detection on the pixel blocks in the texture mesh block in the first smoothed image to obtain the sum of the second edge intensities of the pixel blocks corresponding to the texture mesh block in the first smoothed image; perform edge detection on the pixel blocks in the texture mesh block in the second smoothed image to obtain the sum of the third edge intensities of the pixel blocks corresponding to the texture mesh block in the second smoothed image; calculate the ratio of the sum of the second edge intensities to the sum of the third edge intensities of the same pixel block to obtain the blurriness of the pixel block; and identify whether the pixel block is the raindrop region based on the blurriness of the pixel block and the blurriness of the surrounding pixel blocks.
[0020] According to one embodiment of this application, the second variance is greater than the first variance, and the second identification module is specifically used for: if the ambiguity of the pixel block is less than the ambiguity of the surrounding pixel blocks, then the pixel block is identified as the raindrop region; if the ambiguity of the pixel block is equal to or greater than the ambiguity of the surrounding pixel blocks, then the pixel block is identified as a non-raindrop region.
[0021] According to one embodiment of this application, the determining module is specifically used for: calculating the proportion of the raindrop area in the window image; and determining the rainfall density level based on the proportion.
[0022] According to one embodiment of this application, the preprocessing module is further configured to: perform image enhancement processing on the vehicle window image.
[0023] To achieve the above objectives, a third aspect of this application provides a vehicle including a rainfall density level identification device as described in the second aspect of this application.
[0024] To achieve the above objectives, a fourth aspect of this application provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the method for identifying rainfall density levels as described in the first aspect of this application.
[0025] To achieve the above objectives, a fifth aspect of this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for identifying rainfall density levels as described in the first aspect of this application. Attached Figure Description
[0026] Figure 1 This is a flowchart illustrating a method for identifying rainfall density levels according to an exemplary embodiment of this application;
[0027] Figure 2 This is a flowchart illustrating another method for identifying rainfall density levels according to an exemplary embodiment of this application;
[0028] Figure 3 This is a flowchart illustrating another method for identifying rainfall density levels according to an exemplary embodiment of this application;
[0029] Figure 4 This is a flowchart illustrating another method for identifying rainfall density levels according to an exemplary embodiment of this application;
[0030] Figure 5 This is an overall flowchart illustrating a method for identifying rainfall density levels according to an exemplary embodiment of this application;
[0031] Figure 6 This is a block diagram illustrating a rainfall density level identification device according to an exemplary embodiment of this application;
[0032] Figure 7 This is a block diagram of a vehicle including a rainfall density level identification device according to an exemplary embodiment of this application;
[0033] Figure 8 This is a schematic diagram of the structure of an electronic device according to an exemplary embodiment of this application. Detailed Implementation
[0034] The embodiments of this application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.
[0035] Figure 1 This is a flowchart illustrating a method for identifying rainfall density levels according to an exemplary embodiment of this application, as shown below. Figure 1 As shown, the method for identifying this rainfall density level includes the following steps:
[0036] S101 divides the window image into multiple grid blocks.
[0037] The rainfall density level identification method of this application embodiment can be applied to a scenario where a vehicle controls the windshield wipers to clean the windshield according to the rainfall density level. The executing entity of the rainfall density level identification method of this application embodiment can be the rainfall density level identification device of this application embodiment, which can be installed on the vehicle.
[0038] In practice, a vehicle-mounted camera can be used to acquire images of a car window containing raindrops. For example, a vehicle-mounted Digital Video Recorder (DVR) can be used to acquire the window image, which is then divided into multiple grid blocks to facilitate the division of texture regions within each grid block. For instance, the window image can be divided into multiple 10*10 pixel grid blocks B(u, v), where u and v represent the coordinates of the grid block in the vehicle image. Optionally, the coordinates of the entire grid block can be represented by the coordinates of its center pixel. It should be noted that the size of the grid blocks can be set as needed, and this application does not impose any restrictions.
[0039] S102 identifies textured mesh blocks among multiple mesh blocks.
[0040] In this embodiment of the application, based on the multiple mesh blocks divided in step S101, edge detection and texture analysis can be performed on each mesh block using the Sobel operator, thereby identifying textured mesh blocks from the multiple mesh blocks.
[0041] S103 identifies raindrop regions within textured mesh blocks.
[0042] In this embodiment of the application, each texture mesh block identified in step S102 can be weighted for texture information and edge detection based on a Gaussian Smoothing Filter and the Sobel operator, thereby identifying the raindrop region in each texture mesh block.
[0043] S104, determine the rainfall density level based on the area of raindrops.
[0044] Specifically, the rainfall density level is determined by identifying the proportion of raindrop areas in each textured grid block identified in step S103 within the aforementioned vehicle image.
[0045] In this embodiment, the car window image is divided into multiple grid blocks, textured grid blocks within these grid blocks are identified, and raindrop regions within these textured grid blocks are identified. Rainfall density levels are then determined based on these raindrop regions. This embodiment identifies textured grid blocks from the car window image and further identifies raindrop regions based on these textured grid blocks, thereby achieving clearer boundary division and enhancing the recognition effect of raindrop regions. This allows for more effective determination of rainfall density levels based on the identified raindrop regions. The rainfall density level recognition method of this embodiment can identify raindrops of different shapes and is applicable to rainfall density level judgment under different distribution conditions.
[0046] Based on the above embodiments, the method for identifying rainfall density levels in this application embodiment may further include the following step before step S101 "dividing the window image into multiple grid blocks": performing image enhancement processing on the window image.
[0047] In practice, the Contrast Limited Adaptive Histogram Equalization (CLAHE) algorithm can be used to enhance the image of the car window, thereby increasing the contrast of the image and making the pixel values of the background and raindrops in the image significantly different, thus enhancing the effect of image texture analysis and raindrop region recognition.
[0048] exist Figure 1 Based on the illustrated embodiments, as Figure 2 As shown, step S102, "Identifying textured mesh blocks among multiple mesh blocks," may specifically include the following steps:
[0049] S201, perform edge detection on the mesh block to obtain the sum of the first edge strengths of the mesh block.
[0050] In this embodiment of the application, the Sobel operator can be used to perform edge detection on each grid block B(u, v) to obtain the sum of the first edge intensities E1(u, v) of the grid block.
[0051] S202, Identify whether a mesh block is a textured mesh block based on the sum of the first edge intensities.
[0052] Specifically, based on the sum of the first edge intensities E1(u, v) obtained in step S201, the mesh block B(u, v) is identified as either a textured mesh block or a non-textured mesh block.
[0053] Furthermore, in the above embodiments, step S202, "identifying whether a mesh block is a textured mesh block based on the sum of the first edge intensities," can be interpreted in the following two ways:
[0054] Case 1: If the sum of the first edge intensities is greater than the preset edge intensity threshold, then the mesh block is identified as a texture mesh block.
[0055] Specifically, if the sum of the first edge intensities E1(u, v) obtained in step S201 is greater than a preset edge intensity threshold, then the mesh block B(u, v) is identified as a textured mesh block. The preset edge intensity threshold can be determined through multiple tests. For example, for a car window image containing raindrops, buildings, and the ground, textured mesh blocks are identified based on an initial edge intensity threshold. The threshold value is adjusted according to the identification results until mesh blocks containing the ground are identified as non-textured mesh blocks, and mesh blocks containing raindrops are identified as textured mesh blocks. The adjusted threshold value is then used as the preset edge intensity threshold.
[0056] Case 2: If the sum of the first edge intensities is equal to or less than the edge intensity threshold, then the mesh block is identified as a non-textured mesh block.
[0057] Specifically, if the sum of the first edge intensities obtained in step S201 is equal to or less than the edge intensity threshold, then the mesh block B(u, v) is identified as a non-textured mesh block.
[0058] Therefore, the grid blocks containing raindrops in the car window image can be identified as texture grid blocks, and the raindrop area can be identified based on these texture grid blocks, thus enhancing the recognition effect.
[0059] exist Figure 1 Based on the illustrated embodiments, as Figure 3 As shown, step S103, "Identifying raindrop regions in textured mesh blocks," may specifically include the following steps:
[0060] S301, Gaussian smoothing is performed on the window image based on the first variance to obtain the first smoothed image.
[0061] In specific implementation, the window image is Gaussian smoothed based on the first variance σ1. Specifically, the window image that has been identified by texture grid blocks is smoothed by a Gaussian smoothing filter to reduce noise interference. The texture information of the image in the texture grid block is weighted to obtain the first smoothed image image1.
[0062] S302, Gaussian smoothing is performed on the window image based on the second variance to obtain a second smoothed image, the second variance being different from the first variance.
[0063] In a specific implementation, the window image is Gaussian smoothed based on the second variance σ2. Specifically, the window image after texture mesh block recognition is Gaussian smoothed to obtain a second smoothed image image2. The second variance σ2 is different from the first variance σ1. The values of the second variance σ2 and the first variance σ1 can be set as needed, and this application does not limit them.
[0064] S303, perform edge detection on the pixel blocks in the texture grid block in the first smooth image to obtain the sum of the second edge intensities of the pixel blocks corresponding to the texture grid block in the first smooth image.
[0065] In a specific implementation, edge detection can be performed on each pixel block Is1(i,j) in the texture network block of the first smoothed image image1 obtained in step S301 based on the Sobel operator to obtain the sum of the second edge intensities E2(i,j) of the pixel block. Here, the parameters i and j represent the coordinates of the pixel block. It should be noted that the pixel block can be composed of one or more pixels, which is not limited in this application.
[0066] S304, perform edge detection on the pixel blocks of the texture mesh block in the second smooth image to obtain the sum of the third edge intensities of the pixel blocks corresponding to the texture mesh block in the second smooth image.
[0067] In a specific implementation, edge detection can be performed on each pixel block Is2(i,j) in the texture network block of the second smooth image image2 obtained in step S302 based on the Sobel operator to obtain the sum of the third edge intensity E3(i,j) of the pixel block.
[0068] S304, calculate the ratio of the sum of the second edge intensity to the sum of the third edge intensity of the same pixel block to obtain the blur of the pixel block.
[0069] In specific implementation, for the same pixel block (i, j), based on the sum of the second edge intensities E2(i, j) obtained in step S302 and the sum of the third edge intensities E3(i, j) obtained in step S303, the ratio of E2(i, j) to E3(i, j) is calculated to obtain the blur degree (i, j) of the pixel block (i, j). The specific formula for calculating the blur degree (i, j) is as follows:
[0070]
[0071] S306, Identify whether the pixel block is a raindrop area based on the blurriness of the pixel block and the blurriness of the surrounding pixel blocks.
[0072] In specific implementation, based on the blurriness of the current pixel block (i, j) obtained in step S305 and the blurriness of the surrounding pixel blocks, the relationship between the blurriness of the pixel block and the surrounding pixel blocks is determined, thereby determining whether the pixel block is a raindrop area.
[0073] Furthermore, in the above embodiments, step S306, "identifying whether the pixel block is a raindrop region based on the blurriness of the pixel block and the blurriness of the surrounding pixel blocks," can be interpreted in the following two ways:
[0074] Case 1: If the blurriness of this pixel block is less than that of the surrounding pixel blocks, then this pixel block is identified as a raindrop area.
[0075] As a feasible implementation method, in Figure 3 In the embodiment shown, the second variance is set to be greater than the first variance, i.e., σ2 > σ1. At this time, the more severe the blurring of pixel block (i, j), the smaller the corresponding blur degree (i, j) value. Conversely, the more slight the blurring of pixel block (i, j), the larger the corresponding blur degree (i, j) value.
[0076] Therefore, if the blur degree of the current pixel block (i, j) is less than the blur degree of the surrounding pixel blocks, then the pixel block is identified as a raindrop region.
[0077] Scenario 2: If the blurriness of the pixel block is equal to or greater than the blurriness of the surrounding pixel blocks, then the pixel block is identified as a non-raindrop area.
[0078] If the blur degree (blur_degree(i,j)) of the current pixel block (i,j) is not less than, equal to or greater than, the blur degree of the surrounding pixel blocks, then the pixel block is identified as a non-raindrop region.
[0079] In this embodiment, Gaussian smoothing of the car window image is applied using different variance values, which further weights the texture mesh blocks in the car window image, resulting in a clearer boundary division. Based on this, the blurriness of the pixel blocks of the texture mesh blocks is calculated, and raindrop regions are identified according to the blurriness of the pixel blocks. By examining the difference in blurriness between the raindrop region and the surrounding region, the raindrop region is detected, enhancing the raindrop region recognition effect.
[0080] exist Figure 1 Based on the illustrated embodiments, as Figure 4 As shown, step S104, "determining the rainfall density level based on the raindrop area," may specifically include the following steps:
[0081] S401, calculate the proportion of raindrop areas in the window image.
[0082] In a specific implementation, all the raindrop areas identified in the above embodiments can be superimposed to obtain a total raindrop area as the raindrop area in the window image, and the proportion of this area in the window image can be calculated.
[0083] S402, the rainfall density level is determined based on the proportion.
[0084] In practice, the rainfall density level is determined based on the proportion calculated in step S401. It should be noted that the correspondence between the proportion and the rainfall density level can be set as needed, and this application does not impose any restrictions.
[0085] Therefore, determining the rainfall density level based on the proportion of raindrop areas in the car window image can enable the identification of raindrop areas with different distribution states containing raindrops of different shapes, thus enhancing the recognition effect of rainfall density level.
[0086] To more clearly describe the rainfall density level identification method of this application embodiment, the following is combined with... Figure 5 Provide a detailed description. Figure 5 This is an overall flowchart illustrating a method for identifying rainfall density levels according to an exemplary embodiment of this application.
[0087] like Figure 5 As shown, the method for identifying rainfall density levels in this application embodiment may specifically include the following steps:
[0088] S501 performs image enhancement processing on the car window image.
[0089] S502 divides the image of the car window after image enhancement into multiple grid blocks.
[0090] S503 performs edge detection on the mesh blocks to obtain the sum of the first edge strengths of the mesh blocks.
[0091] S504, determine whether the sum of the first edge strengths is greater than the preset edge strength threshold.
[0092] If yes, proceed to step S505; otherwise, proceed to step S506.
[0093] S505 identifies the mesh block as a textured mesh block.
[0094] S506 identifies the mesh block as a non-textured mesh block.
[0095] S507, Gaussian smoothing is performed on the window image after image enhancement processing based on the first variance pair to obtain the first smoothed image.
[0096] S508, Gaussian smoothing is applied to the window image after image enhancement based on the second variance to obtain a second smoothed image. The second variance is greater than the first variance.
[0097] S509, perform edge detection on the pixel blocks in the texture mesh block in the first smooth image to obtain the sum of the second edge intensities of the pixel blocks corresponding to the texture mesh block in the first smooth image.
[0098] S510, perform edge detection on the pixel blocks of the texture mesh block in the second smooth image to obtain the sum of the third edge intensities of the pixel blocks corresponding to the texture mesh block in the second smooth image.
[0099] S511, calculate the ratio of the sum of the second edge intensity to the sum of the third edge intensity of the same pixel block to obtain the blur of the pixel block.
[0100] S512, determine whether the blur of the pixel block is less than the blur of the surrounding pixel blocks.
[0101] If yes, proceed to step S513; otherwise, proceed to step S514.
[0102] S513 identifies the pixel block as a raindrop area.
[0103] S514 identifies the pixel block as a non-raindrop area.
[0104] S515, calculate the proportion of raindrop areas in the window image.
[0105] S516, determine the rainfall density level based on the proportion.
[0106] Figure 6 This is a block diagram illustrating a rainfall density level identification device according to an exemplary embodiment of this application, such as... Figure 6 As shown, the rainfall density level identification device 600 includes: a preprocessing module 601, a first identification module 602, a second identification module 603, and a determination module 604.
[0107] Preprocessing module 601 is used to divide the window image into multiple grid blocks;
[0108] The first identification module 602 is used to identify textured mesh blocks among multiple mesh blocks;
[0109] The second recognition module 603 is used to recognize raindrop regions in textured mesh blocks;
[0110] Module 604 is used to determine the rainfall density level based on the raindrop area.
[0111] In this embodiment of the application, the first identification module 602 can be specifically used to: perform edge detection on the mesh block to obtain the sum of the first edge intensities of the mesh block; and identify whether the mesh block is a textured mesh block based on the sum of the first edge intensities.
[0112] In this embodiment of the application, the first identification module 602 can be specifically used to: identify the mesh block as a textured mesh block if the sum of the first edge intensities is greater than a preset edge intensity threshold; and identify the mesh block as a non-textured mesh block if the sum of the first edge intensities is equal to or less than the edge intensity threshold.
[0113] In this embodiment, the second recognition module 603 can be specifically used for: performing Gaussian smoothing on the window image based on a first variance to obtain a first smoothed image; performing Gaussian smoothing on the window image based on a second variance to obtain a second smoothed image, wherein the second variance is different from the first variance; performing edge detection on the pixel blocks in the texture mesh block in the first smoothed image to obtain the sum of the second edge intensities of the pixel blocks corresponding to the texture mesh block in the first smoothed image; performing edge detection on the pixel blocks in the texture mesh block in the second smoothed image to obtain the sum of the third edge intensities of the pixel blocks corresponding to the texture mesh block in the second smoothed image; calculating the ratio of the sum of the second edge intensities to the sum of the third edge intensities of the same pixel block to obtain the blurriness of the pixel block; and identifying whether the pixel block is a raindrop region based on the blurriness of the pixel block and the blurriness of the surrounding pixel blocks.
[0114] In this embodiment of the application, the second variance is greater than the first variance. The second recognition module 603 can be specifically used to: identify the pixel block as a raindrop region if the ambiguity of the pixel block is less than the ambiguity of the surrounding pixel blocks; and identify the pixel block as a non-raindrop region if the ambiguity of the pixel block is equal to or greater than the ambiguity of the surrounding pixel blocks.
[0115] In this embodiment of the application, the determining module 604 can be used to: calculate the proportion of raindrop areas in the window image; and determine the rainfall density level based on the proportion.
[0116] In this embodiment of the application, the preprocessing module 601 can also be used to perform image enhancement processing on the vehicle window image.
[0117] It should be noted that the above explanation of the method embodiment for identifying rainfall density level also applies to the rainfall density level identification device in the embodiments of this application, and the specific process will not be repeated here.
[0118] In this embodiment, the car window image is divided into multiple grid blocks, textured grid blocks within these grid blocks are identified, and raindrop regions within these textured grid blocks are identified. Rainfall density levels are then determined based on these raindrop regions. This embodiment identifies textured grid blocks from the car window image and further identifies raindrop regions based on these textured grid blocks, thereby achieving clearer boundary division and enhancing the recognition effect of raindrop regions. This allows for more effective determination of rainfall density levels based on the identified raindrop regions. The rainfall density level recognition method of this embodiment can identify raindrops of different shapes and is applicable to rainfall density level judgment under different distribution conditions.
[0119] To achieve the above embodiments, this application also proposes a vehicle 700, such as... Figure 7 As shown, the vehicle 700 may specifically include: a rainfall density level identification device 600 as shown in the above embodiment.
[0120] To implement the above embodiments, this application also proposes an electronic device 800, such as... Figure 8 As shown, the electronic device 800 may specifically include: a memory 801, a processor 802, and a computer program stored in the memory 801 and executable on the processor 802. When the processor 802 executes the program, it implements the method for identifying rainfall density levels as shown in the above embodiment.
[0121] To implement the above embodiments, this application also proposes a computer-readable storage medium storing a computer program that is executed by a processor to implement the rainfall density level identification method as shown in the above embodiments. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.
[0122] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0123] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.
Claims
1. A method for identifying rainfall density levels, characterized in that, include: Divide the car window image into multiple grid blocks; Identify textured mesh blocks among the plurality of mesh blocks; Gaussian smoothing was applied to the car window image using two different variances to obtain the corresponding smoothed image. For each of the smoothed images, edge detection is performed on the pixel blocks of the texture mesh blocks in the smoothed image to obtain the sum of the edge intensities of the pixel blocks; The blurriness of a pixel block is obtained by calculating the ratio of the sum of edge intensities of the same pixel block in different smoothed images; The blurriness of the pixel block and the blurriness of the surrounding pixel blocks are used to identify whether the pixel block is a raindrop area; The rainfall density level is determined based on the area of the raindrops.
2. The identification method according to claim 1, characterized in that, The identification of textured mesh blocks among the plurality of mesh blocks includes: Edge detection is performed on the mesh blocks to obtain the sum of the first edge intensities of the mesh blocks; The sum of the first edge intensities is used to identify whether the mesh block is the texture mesh block.
3. The identification method according to claim 2, characterized in that, The step of identifying whether the mesh block is the texture mesh block based on the sum of the first edge intensities includes: If the sum of the first edge intensities is greater than a preset edge intensity threshold, then the mesh block is identified as the texture mesh block; If the sum of the first edge intensities is equal to or less than the edge intensity threshold, then the mesh block is identified as a non-textured mesh block.
4. The identification method according to claim 1, characterized in that, The process involves applying Gaussian smoothing to the car window image using two different variances to obtain corresponding smoothed images. For each smoothed image, edge detection is performed on the pixel blocks of the texture mesh in the smoothed image to obtain the sum of the edge intensities of the pixel blocks. The blurriness of the pixel block is obtained by calculating the ratio of the sum of the edge intensities of the same pixel block in different smoothed images. This includes: Gaussian smoothing is applied to the window image based on the first variance to obtain a first smoothed image; Gaussian smoothing is applied to the window image based on the second variance to obtain a second smoothed image, wherein the second variance is different from the first variance. Edge detection is performed on the pixel blocks in the texture grid block in the first smoothed image to obtain the sum of the second edge intensities of the pixel blocks corresponding to the texture grid block in the first smoothed image; Edge detection is performed on the pixel blocks of the texture mesh block in the second smoothed image to obtain the sum of the third edge intensities of the pixel blocks corresponding to the texture mesh block in the second smoothed image; The blurriness of a pixel block is obtained by calculating the ratio of the sum of the second edge intensities to the sum of the third edge intensities.
5. The identification method according to claim 4, characterized in that, The second variance is greater than the first variance, and the step of identifying whether the pixel block is a raindrop region based on the blurriness of the pixel block and the blurriness of the surrounding pixel blocks includes: If the blurriness of a pixel block is less than that of the surrounding pixel blocks, then the pixel block is identified as the raindrop region. If the blurriness of a pixel block is equal to or greater than the blurriness of its surrounding pixel blocks, then the pixel block is identified as a non-raindrop region. The degree of blurring of the pixel block is inversely proportional to the degree of blurring of the pixel block.
6. The identification method according to claim 1, characterized in that, The step of determining the rainfall density level based on the raindrop area includes: Calculate the proportion of the raindrop area in the window image; The rainfall density level is determined based on the stated proportion.
7. The identification method according to claim 1, characterized in that, Before dividing the car window image into multiple grid blocks, the process also includes: The image of the car window is subjected to image enhancement processing.
8. A device for identifying rainfall density levels, characterized in that, include: The preprocessing module is used to divide the window image into multiple grid blocks; The first identification module is used to identify textured grid blocks among the plurality of grid blocks; The second recognition module is used to perform Gaussian smoothing on the car window image using two different variances to obtain corresponding smoothed images; for each smoothed image, edge detection is performed on the pixel blocks of the texture mesh block in the smoothed image to obtain the sum of edge intensities of the pixel blocks; the ratio of the sum of edge intensities of the same pixel block in different smoothed images is calculated to obtain the blur of the pixel block; and the blur of the pixel block and the blur of the surrounding pixel blocks are used to identify whether the pixel block is a raindrop area. The determination module is used to determine the rainfall density level based on the raindrop area.
9. The identification device according to claim 8, characterized in that, The first identification module is specifically used for: Edge detection is performed on the mesh blocks to obtain the sum of the first edge intensities of the mesh blocks; The sum of the first edge intensities is used to identify whether the mesh block is the texture mesh block.
10. The identification device according to claim 9, characterized in that, The first identification module is specifically used for: If the sum of the first edge intensities is greater than a preset edge intensity threshold, then the mesh block is identified as the texture mesh block; If the sum of the first edge intensities is equal to or less than the edge intensity threshold, then the mesh block is identified as a non-textured mesh block.
11. The identification device according to claim 8, characterized in that, The second identification module is specifically used for: Gaussian smoothing is applied to the window image based on the first variance to obtain a first smoothed image; Gaussian smoothing is applied to the window image based on the second variance to obtain a second smoothed image, wherein the second variance is different from the first variance. Edge detection is performed on the pixel blocks in the texture grid block in the first smoothed image to obtain the sum of the second edge intensities of the pixel blocks corresponding to the texture grid block in the first smoothed image; Edge detection is performed on the pixel blocks of the texture mesh block in the second smoothed image to obtain the sum of the third edge intensities of the pixel blocks corresponding to the texture mesh block in the second smoothed image; The blurriness of a pixel block is obtained by calculating the ratio of the sum of the second edge intensities to the sum of the third edge intensities.
12. The identification device according to claim 11, characterized in that, The second variance is greater than the first variance, and the second identification module is specifically used for: If the blurriness of a pixel block is less than that of the surrounding pixel blocks, then the pixel block is identified as the raindrop region. If the blurriness of a pixel block is equal to or greater than the blurriness of its surrounding pixel blocks, then the pixel block is identified as a non-raindrop region. The degree of blurring of the pixel block is inversely proportional to the degree of blurring of the pixel block.
13. The identification device according to claim 8, characterized in that, The determining module is specifically used for: Calculate the proportion of the raindrop area in the window image; The rainfall density level is determined based on the stated proportion.
14. The identification device according to claim 8, characterized in that, The preprocessing module is also used for: The image of the car window is subjected to image enhancement processing.
15. A vehicle, characterized in that, include: The rain density level identification device as described in any one of claims 8-14.
16. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the method for identifying rainfall density levels as described in any one of claims 1-7.
17. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method for identifying rainfall density levels as described in any one of claims 1-7.