Vehicle windshield wiper adjustment methods, devices, equipment and storage media

By utilizing the vehicle's existing dashcam equipment to collect images and perform image recognition, the wiper stroke value is calculated, thus solving the hardware cost problem caused by adding sensors and achieving the effect of intelligently adjusting the wiper frequency.

CN116101224BActive Publication Date: 2025-12-02ZHEJIANG GEELY HLDG GRP CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310228697.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-10
Publication Date
2025-12-02
Estimated Expiration
2043-03-10

AI Technical Summary

Technical Problem

In existing technologies, intelligent control of vehicle windshield wipers requires the addition of new sensors, which increases hardware costs.

Method used

Using the vehicle's existing dashcam, driving images are captured. Image recognition technology is used to determine whether the sampling point has preset weather attributes, calculate the wiper wiper value, and adjust the wiper frequency.

Benefits of technology

It enables intelligent adjustment of windshield wiper frequency without adding hardware, thus reducing vehicle production costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116101224B_ABST
    Figure CN116101224B_ABST
Patent Text Reader

Abstract

This application provides a method, apparatus, device, and storage medium for adjusting vehicle windshield wipers. The method includes: receiving at least two consecutive frames of driving images sent by a driving camera; for any two consecutive frames of driving images, extracting sampled images of multiple preset sampling points from each driving image to obtain multiple pairs of sampled images; based on a pair of sampled images for each sampling point, detecting whether the sampling point has a preset weather attribute; calculating the wiper stroke value for the current cycle based on the number of sampling points with preset weather attributes and the total number of sampling points; and adjusting the wiper stroke frequency based on the wiper stroke value for the current cycle. This application enables intelligent adjustment of windshield wipers without adding hardware, reducing vehicle production costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of vehicle intelligent technology, and in particular to a vehicle windshield wiper adjustment method, device, equipment and storage medium. Background Technology

[0002] As cars become increasingly intelligent, they are gradually evolving from ordinary means of transportation into an important part of people's daily lives. Especially in inclement weather, cars are a crucial choice for travel. Currently, intelligent control of vehicle windshield wipers automatically adjusts the wiper frequency based on the amount of rain (or snow).

[0003] In existing technologies, rain (or snow) is detected automatically by installing a separate rain (or snow) sensor on the vehicle. However, this method requires adding a new sensor, which incurs additional hardware costs. Summary of the Invention

[0004] This application provides a method, apparatus, device, and storage medium for adjusting vehicle windshield wipers, in order to solve the problem that existing intelligent windshield wiper controls require the addition of new sensors, which incurs additional hardware costs.

[0005] Firstly, this application provides a method for adjusting vehicle windshield wipers, including:

[0006] Receive at least two consecutive frames of driving images sent by the vehicle camera equipment;

[0007] For any two consecutive frames of driving images, sampled images of multiple preset locations are extracted from each driving image to obtain multiple pairs of sampled images;

[0008] Based on a pair of sampled images for each sampling point, detect whether the sampling point has a preset weather attribute;

[0009] The wiper sweep value for this cycle is calculated based on the number of sampling points with preset weather attributes and the total number of sampling points.

[0010] Adjust the wiper frequency based on the wiper stroke value for this cycle.

[0011] In one possible design, detecting whether a sampling point has a preset weather attribute based on a pair of sampled images for each sampling point includes: determining the optical flow field of the current frame's sampled image and the optical flow field of the previous frame's sampled image for each pair of sampled images for each sampling point; comparing the optical flow field of the current frame's sampled image with the optical flow field of the previous frame's sampled image to determine whether the sampling point has a preset weather attribute.

[0012] In one possible design, comparing the optical flow field of the sampled image of the current frame with the optical flow field of the sampled image of the previous frame to determine whether the sampling point has a preset weather attribute includes: if the difference between the average velocity of the optical flow field of the sampled image of the current frame and the average velocity of the optical flow field of the sampled image of the previous frame is less than or equal to a preset threshold, then the sampling point is determined to have a preset weather attribute; otherwise, the sampling point is determined not to have a preset weather attribute.

[0013] In one possible design, before comparing the optical flow field of the current frame's sampled image with the optical flow field of the previous frame's sampled image to determine whether the sampling point has a preset weather attribute, the method further includes: calculating the difference between the average grayscale pixel values ​​of the current frame's sampled image and the previous frame's sampled image; calculating the difference between the average brightness pixel values ​​of the current frame's sampled image and the previous frame's sampled image; and calculating a comprehensive pixel difference between the current frame's sampled image and the previous frame's sampled image based on the difference between the average grayscale pixel values ​​and the difference between the average brightness pixel values. Correspondingly, comparing the optical flow field of the current frame's sampled image with the optical flow field of the previous frame's sampled image to determine whether the sampling point has a preset weather attribute includes: if the difference between the average optical flow field velocity of the current frame's sampled image and the average optical flow field velocity of the previous frame's sampled image is less than or equal to a preset threshold, and the comprehensive pixel difference falls within a preset pixel range, then the sampling point is determined to have a preset weather attribute; otherwise, the sampling point is determined not to have a preset weather attribute.

[0014] In one possible design, calculating the difference between the average grayscale pixel values ​​of the sampled image of the current frame and the sampled image of the previous frame includes: converting the sampled image of the current frame and the sampled image of the previous frame into grayscale images, and calculating a first average grayscale pixel value of the converted sampled image of the current frame and a second average grayscale pixel value of the converted sampled image of the previous frame, and calculating the difference between the average grayscale pixel values ​​of the sampled image of the current frame and the sampled image of the previous frame based on the first average grayscale pixel value and the second average grayscale pixel value; calculating the difference between the average luminance pixel values ​​of the sampled image of the current frame and the sampled image of the previous frame includes: converting the sampled image of the current frame and the sampled image of the previous frame to a preset color space, and calculating a first average luminance pixel value of the converted sampled image of the current frame and a second average luminance pixel value of the converted sampled image of the previous frame, and calculating the difference between the average luminance pixel values ​​of the sampled image of the current frame and the sampled image of the previous frame based on the first average luminance pixel value and the second average luminance pixel value.

[0015] In one possible design, calculating the wiper stroke value for the current cycle based on the number of sampling points with preset weather attributes and the total number of sampling points includes: using the ratio of the number of sampling points with preset weather attributes to the total number of sampling points as the wiper stroke value for the current cycle.

[0016] In one possible design, the step of calculating the wiper wiper movement value for the current cycle based on the number of sampling points with preset weather attributes and the total number of sampling points includes: calculating the wiper wiper movement value for the current cycle based on the number of sampling points with preset weather attributes, the total number of sampling points, and the wiper wiper movement value calculated in the previous cycle.

[0017] In one possible design, calculating the wiper wiper movement value for the current period based on the number of sampling points with preset weather attributes, the total number of sampling points, and the wiper wiper movement value calculated in the previous period includes: multiplying the ratio of the number of sampling points with preset weather attributes to the total number of sampling points by a first preset weighting coefficient to obtain a first part; multiplying the wiper wiper movement value calculated in the previous detection period by a second preset weighting coefficient to obtain a second part; and summing the first part and the second part to obtain the wiper wiper movement value for the current period.

[0018] In one possible design, adjusting the wiper frequency based on the wiper stroke value of the current cycle includes: comparing the wiper stroke value of the current cycle with a preset wiper frequency threshold, and adjusting the wiper frequency based on the comparison result.

[0019] In one possible design, the preset wiper frequency threshold includes a first preset limit and a second preset limit, wherein the first preset limit is greater than the second preset limit. Correspondingly, comparing the wiper wiper value of the current cycle with the preset wiper frequency threshold and adjusting the wiper wiper frequency based on the comparison result includes: if the wiper wiper value of the current cycle is greater than or equal to the first preset limit, then activating the wipers and gradually increasing the wiper wiper frequency; if the wiper wiper value of the current cycle is less than or equal to the second preset limit, then activating the wipers and gradually decreasing the wiper wiper frequency; if the wiper wiper value of the current cycle is less than the first preset limit and greater than the second preset limit, then activating the wipers and maintaining the wiper wiper frequency at a preset fixed value.

[0020] In one possible design, the plurality of preset locations are selected from areas in the driving image that do not contain moving objects.

[0021] Secondly, this application provides a vehicle windshield wiper adjustment device, comprising:

[0022] The receiving module is used to receive at least two consecutive frames of driving images sent by the driving camera device;

[0023] The sampling module is used to extract multiple sampling images of sampling points at preset positions from each of any two consecutive frames of driving images, and obtain multiple pairs of sampling images.

[0024] The detection module is used to detect whether a sampling point has a preset weather attribute based on a pair of sampled images for each sampling point;

[0025] The calculation module is used to calculate the wiper stroke value for the current cycle based on the number of sampling points with preset weather attributes and the total number of sampling points;

[0026] The adjustment module is used to adjust the wiper frequency based on the wiper stroke value of the current cycle.

[0027] Thirdly, this application provides an electronic device, including: at least one processor and a memory;

[0028] The memory stores computer-executed instructions;

[0029] The at least one processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the vehicle wiper adjustment method as described in the first aspect and various possible designs of the first aspect.

[0030] Fourthly, this application provides a computer storage medium storing computer execution instructions, which, when executed by a processor, implement the vehicle windshield wiper adjustment method described in the first aspect and various possible designs of the first aspect.

[0031] Fifthly, embodiments of this disclosure provide a computer program product, including a computer program that, when executed by a processor, implements the vehicle windshield wiper adjustment method as described in the first aspect and various possible designs of the first aspect.

[0032] The vehicle windshield wiper adjustment method, apparatus, device, and storage medium provided in this application first receive at least two consecutive frames of driving images captured by the vehicle's existing driving recorder; then, multiple pairs of sampled images of multiple preset sampling points are extracted from any two consecutive frames of driving images; based on a pair of sampled images of each sampling point, it is determined whether the sampling point has a preset weather attribute; the current wiper wiper movement value is calculated based on the number of sampling points with preset weather attributes and the total number of sampling points; finally, the wiper wiper movement frequency is adjusted according to the current wiper wiper movement value. This enables intelligent adjustment of the windshield wipers without adding hardware, reducing vehicle production costs. Attached Figure Description

[0033] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0034] Figure 1 This is a schematic diagram illustrating an application scenario of the vehicle wiper adjustment method provided in the embodiments of this application;

[0035] Figure 2 This is a schematic flowchart of a vehicle windshield wiper adjustment method provided in an embodiment of this application;

[0036] Figure 3 A schematic diagram of a preset rectangular frame provided in the embodiments of this application;

[0037] Figure 4 This is a schematic diagram of the structure of the vehicle wiper adjustment device provided in the embodiments of this application;

[0038] Figure 5 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0039] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0040] The intelligentization of automobiles and other vehicles is becoming increasingly important, especially intelligent vehicle control, which is gradually becoming a key direction for improving the user's driving experience. Currently, intelligent adjustment and control of vehicle wipers mainly involves adding sensors to the vehicle to detect the current amount of rain and / or snow, thereby intelligently adjusting the wiper frequency. However, adding sensors significantly increases the vehicle's hardware costs.

[0041] To address the aforementioned technical problems, this application proposes the following technical solution: Utilizing the vehicle's existing dashcam, images of the vehicle ahead are captured; image sampling processing is performed based on the images, and image recognition technology is used to determine whether the sampling points possess preset weather attributes (rain and / or snow); based on the number of sampling points with preset weather attributes and the total number of sampling points, the current wiper wiper movement value is estimated, thereby adjusting the wiper wiper frequency to achieve intelligent wiper adjustment without adding hardware.

[0042] Figure 1 This is a schematic diagram illustrating an application scenario of the vehicle windshield wiper adjustment method provided in this application embodiment. For example... Figure 1 As shown, there is a driving camera device 101, a controller 102, and a vehicle windshield wiper 103.

[0043] Here, the driving camera device 101 can be a camera mounted on the windshield of a vehicle for recording driving images. It should be noted that the driving camera device 101 can consist of one or more cameras. Optionally, the driving camera device 101 can also be integrated into other devices, such as an ETC (Electronic Toll Collection) device. In this example, the driving camera device 101 can be at least one of a front driving camera device, a rear driving camera device, or a combination of both.

[0044] The controller 102 may be an on-board ECU (Electronic Control Unit) or other on-board controllers or other electronic devices, and this application does not impose any restrictions on this.

[0045] The vehicle wiper 103 is an actuator on the vehicle, and its components include, but are not limited to, a motor and a wiper body. The wiper body can be a framed wiper or a frameless wiper.

[0046] In this embodiment, the driving camera 101 captures images of the road ahead. The controller 102 performs sampling processing on the images of the road ahead and obtains an estimated wiper stroke value based on the sampling results. Simultaneously, the controller 102 outputs the wiper stroke value to the vehicle wiper 103 to adjust the wiping frequency of the vehicle wiper 103.

[0047] Figure 2 This is a schematic flowchart of a vehicle windshield wiper adjustment method provided in an embodiment of this application. The executing entity of this embodiment can be... Figure 1 The controller in the illustrated embodiment can also be other controllers, processors, or servers, etc., and this embodiment does not impose any particular limitations. Figure 2As shown, the method includes:

[0048] S201: Receive at least two consecutive frames of driving images sent by the driving camera device.

[0049] In this embodiment, at least two consecutive frames of driving images belong to one detection period. A detection period can be a continuous duration, such as 10 seconds.

[0050] Specifically, the driving video footage in front of the vehicle is captured by a driving camera device, and driving video footage within a detection cycle is extracted. At least two consecutive frames of driving images are extracted from the driving video footage at preset time intervals.

[0051] For example, the preset time interval can be 1 second, and 10 consecutive frames of driving images can be extracted from a 10-second driving video.

[0052] S202: For any two consecutive frames of driving images, extract sampled images of multiple preset sampling points from each driving image to obtain multiple pairs of sampled images.

[0053] In this embodiment, multiple preset locations are selected from areas in the driving image that do not contain moving objects. The selection of these preset locations has the following characteristics:

[0054] 1) The preset position is the part of the driving image where the object is static, so as to prevent moving objects (vehicles or buildings and other moving interference objects in relative motion) in the driving image from affecting the detection.

[0055] 2) The preset position corresponds to the area that the wipers can sweep. (Here, if the wiper speed is too slow, it will detect heavy rain and increase the wiper speed, thus reducing the amount of rain detected. When the amount of rain detected decreases to a certain level, the wiper speed will automatically decrease. Therefore, the detection area must be swept by the wipers so that different wiper speeds can affect the amount of rain and / or snow detected.)

[0056] Optionally, the preset position is the part of the driving image that corresponds to the sky.

[0057] Specifically, for each driving image in any two consecutive frames of driving images, the following processing is performed: a preset sampling frame is placed at each preset position in the driving image, and the local image within the sampling frame is extracted as the sampling image.

[0058] The preset sampling frame can be a rectangular sampling frame with a preset length and width, or a circular or other shaped sampling frame.

[0059] refer to Figure 3 , Figure 3This is a schematic diagram of a preset rectangular frame provided in an embodiment of this application.

[0060] S203: Based on a pair of sampled images for each sampled point, detect whether the sampled point has a preset weather attribute.

[0061] In one embodiment of this application, the preset weather attribute includes a rain attribute and / or a snow attribute.

[0062] In one implementation, image analysis can be performed on the image information contained in two sampled images, and the analysis results can be used to determine whether the sampling point has preset weather attributes. The image information can include pixel values ​​and / or optical flow field information, etc.

[0063] In another implementation, two sampled images can be input into a pre-trained model to obtain a prediction result of whether the sampled images have a preset weather attribute, thereby determining whether the sampling point has the preset weather attribute. The pre-trained model can be a deep learning model, which can be trained using sampled images obtained by processing a large number of driving images collected by a driving camera.

[0064] S204: Calculate the wiper stroke value for this cycle based on the number of sampling points with preset weather attributes and the total number of sampling points.

[0065] Specifically, the ratio of the number of sampling points with preset weather attributes to the total number of sampling points is used as the wiper stroke value for this cycle. The ratio of the number of sampling points with preset weather attributes to the total number of sampling points is used to characterize the amount (or intensity) of rain and / or snowfall.

[0066] The formula for calculating the ratio is: In the formula, R is the wiper stroke value for this cycle; n is the number of sampling points with preset weather attributes; and N is the total number of sampling points.

[0067] S205: Adjust the wiper frequency based on the wiper stroke value of the current cycle.

[0068] Specifically, the wiper swipe value of the current cycle is compared with a preset swipe frequency threshold, and the wiper swipe frequency is adjusted according to the comparison result; wherein the preset swipe frequency threshold includes a first preset limit (R1) and a second preset limit (R2), and the first preset limit is greater than the second preset limit (R1>R2).

[0069] The specific process of adjusting the wiper frequency includes the following scenarios:

[0070] a: If the wiper stroke value in this cycle is greater than or equal to the first preset limit (R≥R1), then the wipers will be activated and the wiper stroke frequency will be gradually increased.

[0071] One option is to start the wipers and gradually increase their swipe frequency. This can be achieved by starting the wipers and increasing their swipe frequency by a set value at set time intervals.

[0072] b: If the wiper stroke value in this cycle is less than or equal to the second preset limit (R≤R2), then the wipers will be activated and the wiper stroke frequency will be gradually reduced.

[0073] One option is to start the wipers and gradually reduce their swipe frequency. This can be achieved by starting the wipers and then reducing their swipe frequency by a set value at set time intervals.

[0074] c: If the wiper stroke value in this cycle is less than the first preset limit and greater than the second preset limit (R1>R>R2), then the wipers are activated and the wiper stroke frequency is maintained at a preset fixed value.

[0075] The preset fixed value can be the current wiping frequency of the wiper.

[0076] As described above, the system first receives at least two consecutive frames of driving images captured by the vehicle's existing dashcam. Then, it extracts multiple pairs of sampled images from any two consecutive frames, each representing a preset location. Based on each pair of sampled images, it determines whether the sampled point has a preset weather attribute. The current wiper movement value is calculated based on the number of sampled points with preset weather attributes and the total number of sampled points. Finally, the wiper movement frequency is adjusted according to the current wiper movement value. This allows for intelligent adjustment of the wipers without adding hardware, reducing vehicle production costs.

[0077] In one embodiment of this application, in Figure 2 Based on the provided embodiments, this embodiment describes in detail a specific implementation of step S203, which involves detecting whether a sampling point has a preset weather attribute based on a pair of sampled images for each sampling point. The details are as follows:

[0078] S301: For a pair of sampled images at each sampling point, determine the optical flow field of the sampled image of the current frame and the optical flow field of the sampled image of the previous frame, respectively.

[0079] Optical flow is an instantaneous velocity field used to characterize the changing trend of grayscale values ​​of pixels in an image. In the real world, the motion of an object is usually characterized by changes in the grayscale distribution of individual pixels in a video stream.

[0080] In this embodiment, the optical flow field of the sampled image of the current frame is determined as follows: the optical flow field of the sampled image of the current frame is calculated based on the sampled image of the current frame and the sampled image of the previous frame.

[0081] Similarly, the specific method for determining the optical flow field of the previous frame's sampled image is as follows: calculate the optical flow field of the previous frame's sampled image based on the previous frame's sampled image and the sampled image of the frame before that.

[0082] S302: Compare the optical flow field of the current frame's sampled image with the optical flow field of the previous frame's sampled image to determine whether the sampling point has a preset weather attribute.

[0083] Specifically, the velocity value of the optical flow field of the current frame's sampled image in a preset direction is calculated based on the optical flow field of the current frame's sampled image. The average value of the velocity value in the preset direction is then calculated to obtain the average velocity of the optical flow field of the current frame's sampled image.

[0084] In one example, the optical flow field of the sampled image of the current frame is calculated with velocity Vx in the x-direction and velocity Vy in the y-direction. Vx 2 With Vy 2 The sum of the square roots is used as the average velocity of the optical flow field of the sampled image of the current frame.

[0085] Similarly, calculate the velocity Vx in the x-direction and the velocity Vy in the y-direction of the optical flow field in the sampled image of the previous frame, and then... 2 With Vy 2 The sum of the square roots is used as the average velocity of the optical flow field of the sampled image of the previous frame.

[0086] Specifically, the average velocity of the optical flow field in the current frame's sampled image is compared with the average velocity of the optical flow field in the previous frame's sampled image. If the difference between the average velocity of the optical flow field in the current frame's sampled image and the average velocity of the optical flow field in the previous frame's sampled image is less than or equal to a preset threshold, then the sampled point is determined to have a preset weather attribute; otherwise, the sampled point is determined not to have a preset weather attribute.

[0087] Specifically, if the difference between the average velocity of the optical flow field in the current frame's sampled image and the average velocity of the optical flow field in the previous frame's sampled image is greater than a preset threshold, then the change in the optical flow field at the sampling point is determined to be caused by a preset object entering or leaving the sampled image. The preset object can be a cloud in the sky, a moving tree shadow, or a bridge arch. If the difference between the average velocity of the optical flow field in the current frame's sampled image and the average velocity of the optical flow field in the previous frame's sampled image is less than or equal to a preset threshold, then the change in the optical flow field at the sampling point is determined to be caused by rain and / or snow.

[0088] It should be noted that the changes in the part corresponding to the sky (sampling points) in the driving image may be caused by clouds, moving tree shadows, or entering underpasses, etc. These changes are caused by the movement of the car and will have a clear overall velocity in the optical flow field. These situations are filtered out here using the optical flow field; the remaining changes are caused by rain.

[0089] As described above, the optical flow field change at the sampling point is determined by the average velocity of the optical flow field of the sampled image. Based on the magnitude of the optical flow field change at the sampling point, it is determined whether the optical flow field change at the sampling point is caused by a preset weather attribute, thereby obtaining the judgment result of whether the sampling point has a preset weather attribute. This embodiment can efficiently and quickly detect whether the sampling point has a preset weather attribute.

[0090] In one embodiment of this application, in Figure 2 Based on the provided embodiments, this embodiment describes in detail another specific implementation of step S203, which involves detecting whether a sampling point has a preset weather attribute based on a pair of sampled images for each sampling point. The details are as follows:

[0091] S401: Calculate the difference between the average grayscale pixel value of the sampled image of the current frame and the sampled image of the previous frame.

[0092] Specifically, the sampled image of the current frame and the sampled image of the previous frame are converted into grayscale images, and the first average grayscale pixel value of the converted sampled image of the current frame and the second average grayscale pixel value of the converted sampled image of the previous frame are calculated. Based on the first average grayscale pixel value and the second average grayscale pixel value, the difference between the average grayscale pixel values ​​of the sampled image of the current frame and the sampled image of the previous frame is calculated.

[0093] In this embodiment, the difference between the average grayscale pixel values ​​of the current frame and the previous frame is calculated based on the first and second average grayscale pixel values. Specifically, this includes:

[0094] The absolute value of the difference between the first gray-scale average pixel value and the second gray-scale average pixel value is used as the difference between the gray-scale average pixel value of the sampled image of the current frame and the sampled image of the previous frame.

[0095] S402: Calculate the difference between the average pixel value of the brightness of the sampled image of the current frame and the sampled image of the previous frame.

[0096] Specifically, the sampled image of the current frame and the sampled image of the previous frame are converted to a preset color space, and the first average brightness pixel value of the converted sampled image of the current frame and the second average brightness pixel value of the converted sampled image of the previous frame are calculated. Based on the first average brightness pixel value and the second average brightness pixel value, the difference between the average brightness pixel values ​​of the sampled image of the current frame and the sampled image of the previous frame is calculated.

[0097] In this embodiment, the preset color space can be the HSL color space. In HSL, the H (hue) channel represents the range of colors that the human eye can perceive; the S (saturation) channel refers to the color saturation, which uses values ​​from 0% to 100% to describe the change in color purity under the same hue and lightness; and the L (lightness) channel refers to the color lightness, which controls the change in the brightness of the color.

[0098] In this embodiment, the average pixel value of brightness in the first average pixel value and the second average pixel value is the average pixel value of the L channel in the HSL color space.

[0099] Specifically, based on the first average brightness pixel value and the second average brightness pixel value, the difference in average brightness pixel value between the sampled image of the current frame and the sampled image of the previous frame is calculated, including:

[0100] The absolute value of the difference between the first average brightness pixel value and the second average brightness pixel value is used as the difference between the average brightness pixel value of the sampled image of the current frame and the sampled image of the previous frame.

[0101] S403: Calculate the combined pixel difference between the sampled image of the current frame and the sampled image of the previous frame based on the difference between the average grayscale pixel values ​​and the difference between the average brightness pixel values.

[0102] In this embodiment, the overall pixel difference is calculated using the following formula:

[0103] PL_diff = wpP_diff + w l L_diff

[0104] In the formula, PL_diff is the combined pixel difference; P_diff is the difference in average grayscale pixel values; L_diff is the average brightness pixel value; wp and w l To preset the weights, wp+w l =1 in which.

[0105] S404: If the difference between the average optical flow velocity of the optical flow field of the sampled image of the current frame and the average optical flow velocity of the optical flow field of the sampled image of the previous frame is less than or equal to a preset threshold, and the comprehensive pixel difference falls within a preset pixel range, it is determined that the sampling point has a preset weather attribute; otherwise, it is determined that the sampling point does not have a preset weather attribute.

[0106] Among them, the average optical flow velocity of the optical flow field of the sampled image of the current frame is denoted as V; the average optical flow velocity of the optical flow field of the sampled image of the previous frame is denoted as V_previous; the preset threshold is denoted as V0.

[0107] In this embodiment, if the difference between V and V_previous is greater than the preset threshold V0, it is considered that the change in the sampled image is caused by an object entering or leaving the sampled image (such as clouds in the sky or moving tree shades), and it is output that no rain and / or snow is detected at the sampling point; otherwise, it is considered that the image change at the sampling point may be caused by rain and / or snow. Then, when PL_2 < PL_diff < PL_1 (the comprehensive pixel difference being too large or too small does not conform to the characteristics of rain and / or snow) is considered, the result of detecting rain and / or snow at the sampling point is finally output.

[0108] As can be seen from the above description, in this embodiment, based on the judgment basis of whether the change in the optical flow field of the sampled images of adjacent frames of the sampling point is caused by a preset weather attribute, another judgment basis is added, that is, further according to whether the comprehensive pixel difference of the sampled image of the sampling point falls within a reasonable range, and multiple judgment bases are used to improve the detection accuracy of whether the sampling point has a preset weather attribute.

[0109] In an embodiment of the present application, Figure 2 Based on the provided embodiment, this embodiment details another implementation manner of calculating the wiper stroke value of this cycle in step S204 according to the number of sampling points with a preset weather attribute and the total number of sampling points:

[0110] Calculate the wiper stroke value of this cycle according to the number of sampling points with a preset weather attribute, the total number of sampling points, and the wiper stroke value calculated in the previous cycle.

[0111] Specifically, multiply the ratio of the number of sampling points with a preset weather attribute to the total number of sampling points by a first preset weight coefficient to obtain a first part, and multiply the wiper stroke value calculated in the previous detection cycle by a second preset weight coefficient to obtain a second part; sum the first part and the second part to obtain the wiper stroke value of this cycle.

[0112] Its specific calculation formula is:

[0113] In the formula, R is the wiper stroke value for this cycle; w1 is the first preset weighting coefficient; n is the number of sampling points with preset weather attributes; N is the total number of sampling points; w2 is the second preset weighting coefficient; R pre This is the wiper stroke value from the previous testing cycle.

[0114] As can be seen from the above description, by using the wiper wiper movement value calculated in the previous detection cycle to smooth the wiper wiper movement value in the current cycle, it is possible to avoid sudden and large jumps in wiper wiper movement value caused by false detection, thereby improving the user experience.

[0115] It should be noted that, in order to adapt to different scenarios such as rain, snow, and a combination of rain and snow, the embodiments of this application can adjust one or more of the following parameters:

[0116] Adjust the size and position of the preset sampling frame;

[0117] And adjust the preset threshold V0;

[0118] And adjust the preset pixel range (PL_2, PL_1);

[0119] And adjust the first preset limit to be greater than the second preset limit (R1>R2).

[0120] Figure 4 This is a schematic diagram of the structure of a vehicle windshield wiper adjustment device provided in an embodiment of this application. Figure 4 As shown, the vehicle wiper adjustment device includes: a receiving module 401, a sampling module 402, a detection module 403, a calculation module 404, and an adjustment module 405.

[0121] The receiving module 401 is used to receive at least two consecutive frames of driving images sent by the driving camera device;

[0122] The sampling module 402 is used to extract multiple sampling images of sampling points at preset positions from each of any two consecutive frames of driving images to obtain multiple pairs of sampling images;

[0123] Detection module 403 is used to detect whether a sampling point has a preset weather attribute based on a pair of sampled images for each sampling point;

[0124] The calculation module 404 is used to calculate the wiper stroke value for the current cycle based on the number of sampling points with preset weather attributes and the total number of sampling points.

[0125] The adjustment module 405 is used to adjust the wiper frequency according to the wiper stroke value of the current cycle.

[0126] In one possible design, the detection module 403 is specifically used to: determine the optical flow field of the current frame's sampled image and the optical flow field of the previous frame's sampled image for each pair of sampled images at each sampling point; and compare the optical flow field of the current frame's sampled image with the optical flow field of the previous frame's sampled image to determine whether the sampling point has a preset weather attribute.

[0127] In one possible design, the detection module 403 is specifically used to: determine that the sampling point has a preset weather attribute if the difference between the average velocity of the optical flow field of the current frame's sampled image and the average velocity of the optical flow field of the previous frame's sampled image is less than or equal to a preset threshold; otherwise, determine that the sampling point does not have a preset weather attribute.

[0128] In one possible design, the detection module 403 is further specifically used to: calculate the difference between the average grayscale pixel values ​​of the current frame's sampled image and the previous frame's sampled image; calculate the difference between the average brightness pixel values ​​of the current frame's sampled image and the previous frame's sampled image; calculate the comprehensive pixel difference between the current frame's sampled image and the previous frame's sampled image based on the difference between the average grayscale pixel values ​​and the difference between the average brightness pixel values; if the difference between the average optical flow field velocity of the current frame's sampled image and the average optical flow field velocity of the previous frame's sampled image is less than or equal to a preset threshold, and the comprehensive pixel difference falls within a preset pixel range, then the sampling point is determined to have a preset weather attribute; otherwise, the sampling point is determined not to have a preset weather attribute.

[0129] In one possible design, the detection module 403 is further specifically configured to: convert the sampled image of the current frame and the sampled image of the previous frame into grayscale images, and calculate the first average grayscale pixel value of the converted sampled image of the current frame and the second average grayscale pixel value of the converted sampled image of the previous frame, and calculate the difference between the average grayscale pixel values ​​of the sampled image of the current frame and the sampled image of the previous frame based on the first average grayscale pixel value and the second average grayscale pixel value; convert the sampled image of the current frame and the sampled image of the previous frame to a preset color space, and calculate the first average brightness pixel value of the converted sampled image of the current frame and the second average brightness pixel value of the converted sampled image of the previous frame, and calculate the difference between the average brightness pixel values ​​of the sampled image of the current frame and the sampled image of the previous frame based on the first average brightness pixel value and the second average brightness pixel value.

[0130] In one possible design, the calculation module 404 is specifically used to: use the ratio of the number of sampling points with preset weather attributes to the total number of sampling points as the wiper stroke value for the current cycle.

[0131] In one possible design, the calculation module 404 is specifically used to: calculate the wiper wiper value for the current cycle based on the number of sampling points with preset weather attributes, the total number of sampling points, and the wiper wiper wiper value calculated in the previous cycle.

[0132] In one possible design, the calculation module 404 is specifically used to: multiply the ratio of the number of sampling points with preset weather attributes to the total number of sampling points by a first preset weighting coefficient to obtain a first part; multiply the wiper motion value calculated in the previous detection cycle by a second preset weighting coefficient to obtain a second part; and sum the first part and the second part to obtain the wiper motion value for the current cycle.

[0133] In one possible design, the adjustment module 405 is specifically used to: compare the wiper stroke value of the current cycle with a preset stroke frequency threshold, and adjust the wiper stroke frequency according to the comparison result.

[0134] In one possible design, the preset wiper frequency threshold includes a first preset limit and a second preset limit, wherein the first preset limit is greater than the second preset limit; the adjustment module 405 is specifically used for: if the wiper wipe value of the current cycle is greater than or equal to the first preset limit, then start the wiper and gradually increase the wiper wiper frequency; if the wiper wipe value of the current cycle is less than or equal to the second preset limit, then start the wiper and gradually decrease the wiper wiper frequency; if the wiper wipe value of the current cycle is less than the first preset limit and greater than the second preset limit, then start the wiper and maintain the wiper wiper frequency at a preset fixed value.

[0135] In one possible design, the preset weather attributes include rain and / or snow.

[0136] The apparatus provided in this embodiment can be used to execute the technical solutions of the above method embodiments. Its implementation principle and technical effects are similar, and will not be described again here.

[0137] Figure 5 This is a schematic diagram of the hardware structure of the electronic device provided in an embodiment of this application. Figure 5 As shown, the electronic device 50 of this embodiment includes: a processor 501 and a memory 502; wherein

[0138] Memory 502 is used to store instructions executed by the computer;

[0139] The processor 501 is used to execute computer execution instructions stored in the memory to implement the various steps performed by the electronic device in the above embodiments. For details, please refer to the relevant descriptions in the foregoing method embodiments.

[0140] Alternatively, the memory 502 can be either standalone or integrated with the processor 501.

[0141] When the memory 502 is set up independently, the electronic device also includes a bus 503 for connecting the memory 502 and the processor 501.

[0142] This application also provides a computer storage medium storing computer execution instructions. When the processor executes the computer execution instructions, the above-mentioned vehicle windshield wiper adjustment method is implemented.

[0143] This application also provides a computer program product, including a computer program, which, when executed by a processor, implements the above-described vehicle windshield wiper adjustment method.

[0144] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or modules, and may be electrical, mechanical, or other forms.

[0145] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to implement the solution of this embodiment according to actual needs.

[0146] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing unit, or each module can exist physically separately, or two or more modules can be integrated into one unit. The unit composed of the above modules can be implemented in hardware or in the form of hardware plus software functional units.

[0147] The integrated modules described above, implemented as software functional modules, can be stored in a computer-readable storage medium. These software functional modules, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods of the various embodiments of this application.

[0148] It should be understood that the aforementioned processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly manifested as execution by a hardware processor, or execution by a combination of hardware and software modules within the processor.

[0149] The memory may include high-speed RAM, and may also include non-volatile storage (NVM), such as at least one disk storage device, and may also be a USB flash drive, external hard drive, read-only memory, disk or optical disc, etc.

[0150] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0151] The aforementioned storage medium can be implemented from any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The storage medium can be any available medium accessible to general-purpose or special-purpose computers.

[0152] An exemplary storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. Alternatively, the storage medium can be an integral part of the processor. Both the processor and the storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and storage medium can exist as discrete components in an electronic device or host device.

[0153] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0154] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. A method for adjusting vehicle windshield wipers, characterized in that, include: Receive at least two consecutive frames of driving images sent by the vehicle camera equipment; For any two consecutive frames of driving images, sampled images of multiple preset locations are extracted from each driving image to obtain multiple pairs of sampled images; Based on a pair of sampled images for each sampling point, the difference between the average velocity of the optical flow field of the current frame's sampled image and the average velocity of the optical flow field of the previous frame's sampled image, and a preset threshold, is used to determine whether the sampling point has a preset weather attribute. The wiper sweep value for this cycle is calculated based on the number of sampling points with preset weather attributes and the total number of sampling points. Adjust the wiper frequency based on the wiper stroke value for this cycle.

2. The method according to claim 1, characterized in that, The method for determining whether a sampling point has a preset weather attribute based on a pair of sampled images at each sampling point, according to the relationship between the difference between the average velocity of the optical flow field in the current frame's sampled image and the average velocity of the optical flow field in the previous frame's sampled image and a preset threshold, includes: For each pair of sampled images at each sampling point, the average optical flow velocity of the optical flow field of the current frame's sampled image and the average optical flow velocity of the optical flow field of the previous frame's sampled image are determined respectively. The difference between the average velocity of the optical flow field of the current frame's sampled image and the average velocity of the optical flow field of the previous frame's sampled image is compared with a preset threshold to determine whether the sampling point has a preset weather attribute.

3. The method according to claim 2, characterized in that, The step of comparing the difference between the average velocity of the optical flow field of the current frame's sampled image and the average velocity of the optical flow field of the previous frame's sampled image with a preset threshold to determine whether the sampling point has a preset weather attribute includes: If the difference between the average velocity of the optical flow field of the current frame's sampled image and the average velocity of the optical flow field of the previous frame's sampled image is less than or equal to a preset threshold, then the sampling point is determined to have a preset weather attribute; otherwise, the sampling point is determined not to have a preset weather attribute.

4. The method according to claim 2, characterized in that, Before comparing the difference between the average velocity of the optical flow field of the current frame's sampled image and the average velocity of the optical flow field of the previous frame's sampled image with a preset threshold to determine whether the sampling point has a preset weather attribute, the method further includes: Calculate the difference between the average grayscale pixel value of the sampled image of the current frame and the sampled image of the previous frame; Calculate the difference between the average pixel value of the brightness of the sampled image of the current frame and the sampled image of the previous frame; The combined pixel difference between the sampled image of the current frame and the sampled image of the previous frame is calculated based on the difference between the average grayscale pixel value and the difference between the average brightness pixel value. Accordingly, the step of comparing the difference between the average velocity of the optical flow field of the current frame's sampled image and the average velocity of the optical flow field of the previous frame's sampled image with a preset threshold to determine whether the sampling point has a preset weather attribute includes: If the difference between the average velocity of the optical flow field of the current frame's sampled image and the average velocity of the optical flow field of the previous frame's sampled image is less than or equal to a preset threshold, and the combined pixel difference falls within a preset pixel range, then the sampling point is determined to have a preset weather attribute; otherwise, the sampling point is determined not to have a preset weather attribute.

5. The method according to claim 4, characterized in that, The step of calculating the difference between the average grayscale pixel value of the sampled image of the current frame and the sampled image of the previous frame includes: The sampled image of the current frame and the sampled image of the previous frame are converted into grayscale images, and the first average grayscale pixel value of the converted sampled image of the current frame and the second average grayscale pixel value of the converted sampled image of the previous frame are calculated. Based on the first average grayscale pixel value and the second average grayscale pixel value, the difference between the average grayscale pixel values ​​of the sampled image of the current frame and the sampled image of the previous frame is calculated. The calculation of the difference between the average pixel value of the brightness of the sampled image of the current frame and the sampled image of the previous frame includes: The sampled image of the current frame and the sampled image of the previous frame are converted to a preset color space, and the first average brightness pixel value of the converted sampled image of the current frame and the second average brightness pixel value of the converted sampled image of the previous frame are calculated. Based on the first average brightness pixel value and the second average brightness pixel value, the difference between the average brightness pixel values ​​of the sampled image of the current frame and the sampled image of the previous frame is calculated.

6. The method according to any one of claims 1 to 5, characterized in that, The calculation of the wiper stroke value for this cycle based on the number of sampling points with preset weather attributes and the total number of sampling points includes: The ratio of the number of sampling points with preset weather attributes to the total number of sampling points is used as the wiper stroke value for this cycle.

7. The method according to any one of claims 1 to 5, characterized in that, The calculation of the wiper stroke value for this cycle based on the number of sampling points with preset weather attributes and the total number of sampling points includes: The wiper ...

8. The method according to claim 7, characterized in that, The step of calculating the wiper wiper movement value for the current cycle based on the number of sampling points with preset weather attributes, the total number of sampling points, and the wiper wiper movement value calculated in the previous cycle includes: The first part is obtained by multiplying the ratio of the number of sampling points with preset weather attributes to the total number of sampling points by a first preset weighting coefficient, and the second part is obtained by multiplying the wiper sweep value calculated in the previous detection cycle by a second preset weighting coefficient. Summing the first part and the second part yields the wiper stroke value for this cycle.

9. The method according to any one of claims 1 to 5, characterized in that, The step of adjusting the wiper frequency based on the wiper stroke value of the current cycle includes: The wiper stroke value for the current cycle is compared with a preset stroke frequency threshold, and the wiper stroke frequency is adjusted according to the comparison result.

10. The method according to claim 9, characterized in that, The preset swipe frequency threshold includes a first preset limit and a second preset limit, and the first preset limit is greater than the second preset limit; Accordingly, comparing the wiper stroke value of the current cycle with a preset stroke frequency threshold, and adjusting the wiper stroke frequency based on the comparison result, includes: If the wiper stroke value of the current cycle is greater than or equal to the first preset limit, then the wipers are activated and the wiper stroke frequency is gradually increased. If the wiper stroke value of the current cycle is less than or equal to the second preset limit, then the wipers are activated and the wiper stroke frequency is gradually reduced. If the wiper stroke value in this cycle is less than the first preset limit and greater than the second preset limit, then the wipers are activated and the wiper stroke frequency is maintained at a preset fixed value.

11. The method according to any one of claims 1 to 5, characterized in that, The plurality of preset locations are selected from areas in the driving image that do not contain moving objects.

12. A vehicle windshield wiper adjustment device, characterized in that, include: The receiving module is used to receive at least two consecutive frames of driving images sent by the driving camera device; The sampling module is used to extract multiple sampling images of sampling points at preset positions from each of any two consecutive frames of driving images, and obtain multiple pairs of sampling images. The detection module is used to determine whether a sampling point has a preset weather attribute based on a pair of sampled images for each sampling point, according to the relationship between the difference between the average velocity of the optical flow field of the current frame's sampled image and the average velocity of the optical flow field of the previous frame's sampled image and a preset threshold. The calculation module is used to calculate the wiper stroke value for the current cycle based on the number of sampling points with preset weather attributes and the total number of sampling points; The adjustment module is used to adjust the wiper frequency based on the wiper stroke value of the current cycle.

13. An electronic device, characterized in that, include: At least one processor and memory; The memory stores computer-executed instructions; The at least one processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the vehicle wiper adjustment method as described in any one of claims 1 to 11.

14. A computer storage medium, characterized in that, The computer storage medium stores computer execution instructions, and when the processor executes the computer execution instructions, it implements the vehicle wiper adjustment method as described in any one of claims 1 to 11.

15. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method for adjusting vehicle windshield wipers as described in any one of claims 1 to 11.

Citation Information

Patent Citations

  • Windscreen wiper control method and system based on vehicle-mounted intelligent camera

    CN111055811A

  • Image diagnosing device, image diagnosing system of on- vehicle image monitoring device and passing vehicle monitoring device

    JP2003312408A