Vehicle wading warning method, device and electronic equipment
By extracting the vehicle image feature, determining the vehicle wading information and generating early warning prompts, the problem of difficult to take into account the cost and universality of vehicle wading depth detection in the prior art, and an efficient and reliable wading early warning is achieved.
Patent Information
- Application Number
- CN202111653063.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-30
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2041-12-30
AI Technical Summary
The prior art cannot effectively take into account the cost and universality of vehicle wading depth detection. Ultrasonic sensor solutions increase cost and installation complexity, while the water depth detection device solutions are limited to specific environments and are not suitable for self-detection of ordinary vehicles.
By acquiring the vehicle image of the target vehicle, feature extraction is performed to obtain vehicle feature information, and the wading edge of the vehicle is characterized. The water wading information is determined based on the vehicle characteristic information. If the water wading information meets the preset warning conditions, a water wading warning prompt is generated.
It realizes that the detection cost is significantly reduced without the need for additional sensors, and improves the reliability and universality of early warning through vehicle self-detection.
Smart Images

Figure CN114332820B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of vehicle safety technology, and in particular to a vehicle wading warning method, device and electronic equipment. Background Art
[0002] With the development of artificial intelligence and computer technology, the attention paid to smart cars has gradually increased. In order to improve the active safety of vehicles, smart cars can be enabled to better perceive some unknown environmental conditions, such as the vehicle's wading depth.
[0003] The vehicle wading depth detection solution provided by the related art includes: (1) installing an ultrasonic sensor on an intelligent vehicle to detect the vehicle wading depth through the ultrasonic sensor. This solution increases the sensor cost and the sensor installation location design; (2) installing a water depth detection device in a specific environment such as a tunnel. When an intelligent vehicle driving there is detected, the water level depth or warning information will be sent to the intelligent vehicle through the GPS (Global Positioning System). This solution has certain limitations and cannot be well applied to relatively open roads. Moreover, this solution is not suitable for self-detection of ordinary vehicles. In summary, the vehicle wading depth detection solution provided by the related art cannot well take into account the detection cost and universality of wading depth. Summary of the invention
[0004] In view of this, an object of the present invention is to provide a vehicle wading warning method, device and electronic equipment, which can better balance the detection cost and detection universality of the wading depth.
[0005] In a first aspect, an embodiment of the present invention provides a vehicle wading warning method, comprising: acquiring a vehicle image of a target vehicle; performing feature extraction on the vehicle image to obtain vehicle feature information of the target vehicle; wherein the vehicle feature information is used to characterize the wading edge of the target vehicle; determining the wading information of the target vehicle based on the vehicle feature information; if the wading information meets a preset warning condition, generating a wading warning prompt for the target vehicle based on the wading information.
[0006] In one embodiment, the step of extracting features from the vehicle image to obtain vehicle feature information of the target vehicle includes: extracting vehicle body information and water surface information from the vehicle image; and determining the vehicle feature information of the target vehicle based on the vehicle body information and the water surface information.
[0007] In one embodiment, the step of determining the wading information of the target vehicle based on the vehicle characteristic information includes: identifying a wading reference mark contained in the vehicle image, and a first coordinate value of the wading reference mark in a preset pixel coordinate system; determining a position of the wading edge in the vehicle image based on the vehicle characteristic information; drawing a perpendicular line to the wading edge through the wading reference mark in the vehicle image, and determining a second coordinate value of an intersection of the perpendicular line and the wading edge in the preset pixel coordinate system; calculating the wading information of the target vehicle based on the first coordinate value and the second coordinate value; wherein the wading information includes a vertical distance between the wading reference mark and the wading edge.
[0008] In one embodiment, the water-wading reference mark includes a first mark located on the left side of the vehicle body and a second mark located on the right side of the vehicle body, and the first mark and the second mark are both at a first distance from the chassis of the target vehicle; if the water-wading information meets the preset warning condition, then the step of generating a water-wading warning prompt for the target vehicle according to the water-wading information includes: determining whether the vertical distance corresponding to the first mark and the vertical distance corresponding to the second mark are both greater than a preset distance threshold; if not, determining that the water-wading information meets the preset warning condition, and generating a water-wading warning prompt for the target vehicle according to the vertical distance.
[0009] In one embodiment, the step of generating a wading warning prompt for the target vehicle based on the vertical distance includes: if the vertical distance corresponding to the first mark is smaller than the vertical distance corresponding to the second mark, determining the first mark as the target mark; or, if the vertical distance corresponding to the second mark is smaller than the vertical distance corresponding to the first mark, determining the second mark as the target mark; calculating the safe wading distance based on the installation position of the air intake in the target vehicle and the vertical distance corresponding to the target mark; and generating a wading warning prompt corresponding to the safe wading distance.
[0010] In one embodiment, the step of calculating the safe wading distance based on the installation position of the air intake in the target vehicle and the vertical distance corresponding to the target mark includes: if the installation position of the air intake is on the left or right side of the target vehicle, then calculating the product of the vertical distance corresponding to the target mark and the distance coefficient to obtain the safe wading distance.
[0011] In one embodiment, the step of calculating the safe wading distance based on the installation position of the air intake in the target vehicle and the vertical distance corresponding to the target mark also includes: if the installation position of the air intake is the center of the target vehicle, determining the second distance between the air intake in the target vehicle and the chassis, and the width value of the target vehicle; calculating the third distance according to the vertical distance corresponding to the first mark, the vertical distance corresponding to the second mark, the first distance, the second distance and the width value; calculating the product of the third distance and the distance coefficient to obtain the safe wading distance.
[0012] In one embodiment, before the step of calculating the safe wading distance based on the installation position of the air intake in the target vehicle and the vertical distance corresponding to the target mark, the method further includes: calculating the distance coefficient according to a specified operation function, a width value, the vertical distance corresponding to the first mark, and the vertical distance corresponding to the second mark; wherein the specified operation function includes a division formula, an inverse sine function, and a cosine function.
[0013] In one embodiment, the method also includes: if the vertical distance corresponding to the first mark is equal to the vertical distance corresponding to the second mark, then calculating the distance difference between the first distance and the vertical distance corresponding to the first mark, or calculating the distance difference between the first distance and the vertical distance corresponding to the second mark; calculating the difference between the second distance and the distance difference to obtain the safe wading distance.
[0014] In one embodiment, an image acquisition device is provided at a designated position of the left rearview mirror and / or the right rearview mirror of the target vehicle; the step of acquiring the vehicle image of the target vehicle comprises: acquiring the vehicle image of the target vehicle by means of the image acquisition device; wherein the vehicle image comprises an image of the left side of the vehicle body and an image of the right side of the vehicle body.
[0015] In one embodiment, before the step of extracting features from the vehicle image to obtain vehicle feature information of the target vehicle, the method further includes: calibrating the image acquisition device to determine distortion parameters of the image acquisition device; and dedistorting the vehicle image based on the distortion parameters to determine the correspondence between the vehicle image and the preset pixel coordinate system.
[0016] In one embodiment, the water wading warning prompt includes a voice prompt and / or a text prompt.
[0017] In a second aspect, an embodiment of the present invention further provides a vehicle wading warning device, comprising: an image acquisition module, used to acquire a vehicle image of a target vehicle; a feature extraction module, used to perform feature extraction on the vehicle image to obtain vehicle feature information of the target vehicle; wherein the vehicle feature information is used to characterize the wading edge of the target vehicle; a wading information determination module, used to determine the wading information of the target vehicle based on the vehicle feature information; and a warning module, used to generate a wading warning prompt for the target vehicle based on the wading information if the wading information meets a preset warning condition.
[0018] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a processor and a memory, wherein the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement any one of the methods provided in the first aspect.
[0019] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement any one of the methods provided in the first aspect.
[0020] The embodiments of the present invention provide a vehicle wading warning method, device and electronic device, which first obtains a vehicle image of a target vehicle, then extracts features from the vehicle image to obtain vehicle feature information for characterizing the wading edge of the target vehicle, and then determines the wading information of the target vehicle based on the vehicle feature information. If the wading information meets the preset warning conditions, a wading warning prompt of the target vehicle is generated based on the wading information. The above method can determine the wading information of the target vehicle based on the vehicle feature information obtained by feature extraction, and when the wading information meets the preset warning conditions, a corresponding wading warning prompt can be generated. Compared with the method of detecting the wading depth of the vehicle using ultrasonic sensors in the prior art, the embodiments of the present invention do not need to install additional sensors on the target vehicle, thereby significantly reducing the cost required for additional sensors. In addition, compared with the prior art of detecting the wading depth of the vehicle using a water depth detection device, the embodiments of the present invention can obtain a highly reliable wading warning prompt through self-detection of the target vehicle. Therefore, the embodiments of the present invention better take into account the detection cost and detection universality of the wading depth.
[0021] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.
[0022] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0024] Figure 1 A schematic flow chart of a vehicle wading warning method provided by an embodiment of the present invention;
[0025] Figure 2 A topological diagram of the architecture of a vehicle wading warning system provided by an embodiment of the present invention;
[0026] Figure 3 A schematic diagram of an application scenario of a vehicle wading warning method provided by an embodiment of the present invention;
[0027] Figure 4 A schematic diagram of an application scenario of another vehicle wading warning method provided by an embodiment of the present invention;
[0028] Figure 5 A schematic flow chart of another vehicle wading warning method provided by an embodiment of the present invention;
[0029] Figure 6 A schematic structural diagram of a vehicle wading warning device provided by an embodiment of the present invention;
[0030] Figure 7 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0031] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described in combination with the embodiments below. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0032] At present, the vehicle wading depth detection solution provided by the relevant technology cannot take into account both the detection cost and the detection universality of the wading depth. Based on this, the implementation of the present invention provides a vehicle wading warning method, device and electronic equipment, which can take into account both the detection cost and the detection universality of the wading depth.
[0033] To facilitate understanding of this embodiment, a vehicle wading warning method disclosed in an embodiment of the present invention is first described in detail. Figure 1 The flowchart of a vehicle wading warning method shown in FIG. 1 mainly includes the following steps S102 to S108:
[0034] Step S102, obtaining a vehicle image of the target vehicle. In one embodiment, a wading reference mark may be provided on the body of the target vehicle, and the wading reference mark is used to assist in detecting the wading depth of the target vehicle, and the vehicle image needs to include the wading reference mark. Exemplarily, the wading reference mark may be a door handle on the left and right sides of the target vehicle, or other marks or structures may be added to the left and right sides, the front of the vehicle, or the parking space of the target vehicle as wading reference marks. Taking the door handle as an example of a wading reference mark, the vehicle image may be collected by an image acquisition device (i.e., a surround-view camera) under the left and right rearview mirrors of the target vehicle, and the vehicle image may only include images of the left and right sides of the target vehicle.
[0035] Step S104, feature extraction is performed on the vehicle image to obtain vehicle feature information of the target vehicle. The vehicle feature information is used to characterize the wading edge of the target vehicle, and the wading edge is also the boundary between the target vehicle and the water accumulation area. In one embodiment, the vehicle feature information of the vehicle image can be extracted by a deep learning semantic segmentation method. For example, the vehicle image is input into a pre-trained neural network model, and the body information and water surface information are identified by the neural network model. The body information is used to characterize the body edge of the target vehicle (for example, the left edge of the body and / or the right edge of the body), and the water surface information is used to characterize the edge of the water accumulation area, so that the vehicle feature information can be obtained based on the body information and the water surface information.
[0036] Step S106, determining the wading information of the target vehicle according to the vehicle characteristic information. The wading information may include the vertical distance between the wading reference mark and the wading edge. In one embodiment, the position of the wading reference mark in the vehicle image and the position of the wading edge in the vehicle image are determined respectively, so as to calculate the vertical distance between the wading reference mark and the wading edge.
[0037] Step S108, if the wading information meets the preset warning conditions, then generate a wading warning prompt for the target vehicle based on the wading information. The wading warning prompt may include a voice prompt and / or a text prompt, and the prompt content may include a safe wading distance, which can assist the driver in determining whether to continue driving forward. In one embodiment, there are multiple wading reference marks, and by determining whether the vertical distance between each wading reference mark and the wading edge is greater than a preset distance threshold, when there is one or more wading reference marks corresponding to a vertical distance less than the preset distance threshold, it can be determined that the wading information meets the preset warning conditions, and at this time, the safe wading distance is calculated based on the wading information, and then the safe wading distance is broadcast to the driver in the form of voice or text.
[0038] The above-mentioned vehicle wading warning method provided by the embodiment of the present invention can determine the wading information of the target vehicle based on the vehicle feature information obtained by feature extraction, and can generate a corresponding wading warning prompt when the wading information meets the preset warning conditions. Compared with the method of using ultrasonic sensors to detect the wading depth of the vehicle in the prior art, the embodiment of the present invention does not need to install additional sensors on the target vehicle, thereby significantly reducing the cost required for additional sensors. In addition, compared with the prior art of using a water depth detection device to detect the wading depth of the vehicle, the embodiment of the present invention can obtain a more reliable wading warning prompt through self-detection of the target vehicle. Therefore, the embodiment of the present invention better takes into account the detection cost and detection universality of the wading depth.
[0039] In one embodiment, the vehicle wading warning method can be applied to a vehicle wading warning system or a central processor of a target vehicle. Taking the application to a vehicle wading warning system as an example, the embodiment of the present invention provides the following: Figure 2 The topological diagram of the vehicle wading warning system is shown in FIG. Figure 2 The system includes a sensor, a feature extraction unit, a data processing unit and an early warning unit. The sensor may include image acquisition devices such as a surround view camera and a visual sensor, which are used to acquire a vehicle image of the target vehicle; the feature extraction unit is used to extract vehicle feature information from the vehicle image. When the wading reference mark is set on the left side of the target vehicle, the vehicle feature information may also be referred to as vehicle side edge feature information; the data processing unit is used to perform calculations on the vehicle feature information to obtain wading information and / or safe wading distance; and the early warning unit is used to issue voice prompts or text prompts.
[0040] exist Figure 2On the basis of, an embodiment of the present invention provides a sensor, which can be an image acquisition device arranged at a designated position of the left rearview mirror and / or the right rearview mirror of the target vehicle, wherein the designated position can include the bottom of the rearview mirror, and the image acquisition device can be a surround-view camera. On this basis, when executing the step of acquiring a vehicle image of the target vehicle, the vehicle image of the target vehicle can be acquired by the image acquisition device, wherein the vehicle image includes an image of the left side of the vehicle body and an image of the right side of the vehicle body. Exemplarily, the image of the left side of the vehicle body is acquired by the surround-view camera under the left rearview mirror, and the image of the right side of the vehicle body is acquired by the surround-view camera under the right rearview mirror.
[0041] Considering that the surround-view camera may be a wide-angle camera, the vehicle images it captures may have certain distortions and distortions. Therefore, before extracting features from the vehicle image, the image acquisition device may be calibrated to determine the distortion parameters of the image acquisition device, and then the vehicle image may be dedistorted according to the distortion parameters to determine the correspondence between the vehicle image and the preset pixel coordinate system. In a specific implementation, the camera may be calibrated according to the installation position of the surround-view camera to obtain the internal and external parameters and distortion parameters of the surround-view camera, and then the dedistortion algorithm in the OpenCV library may be called to dedistort the vehicle image captured by the surround-view camera. Optionally, the correspondence between the vehicle image and the preset pixel coordinate system may be: the center of the vehicle image overlaps with the center of the circle of the preset pixel coordinate system, which may be set based on actual needs, and the embodiments of the present invention are not limited to this.
[0042] For the aforementioned step S104, the embodiment of the present invention also provides an implementation method for extracting features from a vehicle image to obtain vehicle feature information of a target vehicle, which can extract vehicle body information and water surface information from the vehicle image, and then determine the vehicle feature information of the target vehicle based on the vehicle body information and water surface information. Exemplarily, the image of the left side of the vehicle body is input into a pre-trained neural network model, and the left edge of the vehicle body and the edge of the water accumulation area are identified by the neural network model, and the boundary line between the left edge of the vehicle body and the edge of the water accumulation area is determined as the wading edge of the left side of the vehicle body; similarly, the image of the right side of the vehicle body is input into the neural network model, and the right edge of the vehicle body and the edge of the water accumulation area are identified by the neural network model, and the boundary line between the right edge of the vehicle body and the edge of the water accumulation area is determined as the wading edge of the right side of the vehicle body.
[0043] For the aforementioned step S106, the embodiment of the present invention further provides an implementation method for determining the wading information of the target vehicle according to the vehicle characteristic information, see the following steps a to d:
[0044] Step a, identifying the wading reference mark contained in the vehicle image, and the first coordinate value of the wading reference mark in a preset pixel coordinate system. The wading reference mark includes a first mark located on the left side of the vehicle body and a second mark located on the right side of the vehicle body, and both the first mark and the second mark are at a first distance H from the chassis of the target vehicle, and the first distance H can be measured in advance and saved in the vehicle wading warning system.
[0045] Assuming that the first mark is the left door handle and the second mark is the right door handle, taking the left door handle as an example, the position of the left door handle in the left image of the vehicle body is determined by the target detection algorithm, and the first coordinate value of the left door handle in the preset pixel coordinate system can be determined by combining the correspondence between the left image of the vehicle body and the preset pixel coordinate system. For example, see Figure 3 A schematic diagram of an application scenario of a vehicle wading warning method is shown, Figure 3 The installation position of the surround view camera and the position of the door handle are indicated, and the first coordinate value of the left door handle A in the preset pixel coordinate system is (x, y).
[0046] Step b: Determine the position of the wading edge in the vehicle image based on the vehicle feature information. Figure 3 , Figure 3 The water level (ie the wading edge) is represented by a dotted line.
[0047] Step c: in the vehicle image, draw a vertical line through the wading reference mark to the wading edge, and determine the second coordinate value of the intersection of the vertical line and the wading edge in the preset pixel coordinate system. Figure 3 , Figure 3 It is shown that a perpendicular line to the water level is drawn through the left door handle A to obtain the intersection point B, the second coordinate value of the intersection point B in the preset pixel coordinate system is (x1, y1), and a perpendicular line to the water level is drawn through the right door handle to obtain the intersection point D.
[0048] Step d, calculating the wading information of the target vehicle according to the first coordinate value and the second coordinate value. The wading information includes the vertical distance between the wading reference mark and the wading edge. Taking the left side of the vehicle body as an example, the vertical distance L1 between the left door handle and the wading edge can be calculated according to the following formula:
[0049]
[0050] In a specific application, the calculation process of the vertical distance L2 between the right door handle and the wading edge can refer to the vertical distance L1, and the embodiment of the present invention will not be repeated here.
[0051] For the aforementioned step S108, the embodiment of the present invention also provides an implementation method for determining whether the water-related information meets the preset warning condition: (1) determining whether the vertical distance corresponding to the first mark and the vertical distance corresponding to the second mark are both greater than the preset distance threshold; (2) if not, determining that the water-related information meets the preset warning condition, and generating a water-related warning prompt for the target vehicle based on the vertical distance. Exemplarily, if the vertical distance L1 is greater than the preset distance threshold and the vertical distance L2 is greater than the preset threshold, it is determined that the water-related information does not meet the preset warning condition; conversely, if the vertical distance L1 is less than or equal to the preset distance threshold and / or if the vertical distance L2 is less than or equal to the preset distance threshold, it is determined that the water-related information meets the preset warning condition, and a voice prompt or a text prompt can be generated at this time.
[0052] In an optional implementation, the prompt content of the voice prompt or text prompt may include a safe wading distance. To facilitate understanding of the safe wading distance, an embodiment of the present invention further provides an implementation for calculating the safe wading distance, see steps 1 to 5 below:
[0053] Step 1: If the vertical distance corresponding to the first mark is equal to the vertical distance corresponding to the second mark, then calculate the distance difference between the first distance and the vertical distance corresponding to the first mark, or calculate the distance difference between the first distance and the vertical distance corresponding to the second mark. Figure 3 , Figure 3 It is shown that the vertical distance L1 is equal to the vertical distance L2, and at this time, the distance difference between the first distance H and any vertical distance can be obtained.
[0054] Step 2, calculate the difference between the second distance and the distance difference to obtain the safe wading distance. The second distance Sd is the distance between the air intake and the chassis of the target vehicle. In one embodiment, the safe wading distance D can be calculated according to the following formula:
[0055] D=Sd-(H-L1); or, D=Sd-(H-L2).
[0056] Step 3: If the vertical distance corresponding to the first mark is smaller than the vertical distance corresponding to the second mark, the first mark is determined as the target mark; or, if the vertical distance corresponding to the second mark is smaller than the vertical distance corresponding to the first mark, the second mark is determined as the target mark. In actual applications, the road where the target vehicle is located may have a certain slope, resulting in a certain difference between the wading edges on the left and right sides of the vehicle body. In this case, the wading reference mark with a smaller vertical distance can be selected as the target mark. For example, see Figure 4 The schematic diagram of another application scenario of the vehicle wading warning method is shown in FIG. Figure 4It is shown that the vertical distance L2 corresponding to the right door handle is less than the vertical distance L1 corresponding to the left door handle. Therefore, the right door handle is determined as the target marker.
[0057] Step 4: Calculate the safe wading distance based on the installation position of the air intake in the target vehicle and the vertical distance corresponding to the target marker. The installation position of the air intake includes the left and right sides of the target vehicle or the center of the target vehicle.
[0058] In practical applications, the distance coefficient of the target vehicle can be calculated in advance. Assuming the width value Cd of the target vehicle, the distance coefficient is calculated according to the specified operation function, the width value Cd, the vertical distance L1 corresponding to the first marker, and the vertical distance L2 corresponding to the second marker. The specified operation function includes division formula, arcsine function, and cosine function. In one implementation, the expression of the distance coefficient is as follows:
[0059] cos[arcsin(BE / Cd)], where arcsin(BE / Cd) > 0 and BE = L1 - L2.
[0060] Based on the above distance coefficient, some implementation manners for calculating the safe wading distance are provided in the embodiments of the present invention. Refer to the following Manner 1 to Manner 2:
[0061] Manner 1: The installation position of the air intake is on the left and right sides of the target vehicle: Calculate the product of the vertical distance corresponding to the target marker and the distance coefficient to obtain the safe wading distance. Please continue to refer to Figure 4, Figure 4 It is shown that L2 < L1. Therefore, the vertical distance L2 corresponding to the right door handle is used to calculate the safe wading distance. The calculation formula is as follows: D = L2 * cos[arcsin(BE / Cd)], arcsin(BE / Cd) > 0.
[0062] Manner 2: The installation position of the air intake is in the center of the target vehicle: (1) Determine the second distance Sd between the air intake and the chassis in the target vehicle, and the width value Cd of the target vehicle; (2) Calculate the third distance according to the vertical distance L1 corresponding to the first marker, the vertical distance L2 corresponding to the second marker, the first distance H, the second distance Sd, and the width value Cd. Please continue to refer to Figure 4 , taking the right door handle as the target marker, the expression of the third distance is as follows: 2Cd * (L1 - L2) + Sd - H + L2; (3) Calculate the product of the third distance and the distance coefficient to obtain the safe wading distance, that is, the safe wading distance D = [2Cd * (L1 - L2) + Sd - H + L2] * cos[arcsin(BE / Cd)], arcsin(BE / Cd) > 0 and L1 > L2.
[0063] Step 5: Generate a wading warning prompt corresponding to the safe wading distance. In specific implementation, the safe wading distance can be broadcasted in voice or text form to assist the driver in determining whether to continue driving forward.
[0064] For ease of understanding, the present invention also provides an application example of a vehicle wading warning method, see Figure 5 The flowchart of another vehicle wading warning method shown in FIG. 1 mainly includes the following steps S502 to S508:
[0065] Step S502, determine whether the sensor is initialized successfully. If yes, execute step S504; if no, end. Before the sensor is initialized, the vertical height from the door handle to the chassis bracket (that is, the first distance H mentioned above) can be measured. The sensor initialization process can include camera calibration, through which the internal and external parameters and distortion parameters of the surround view camera are determined.
[0066] Step S504, calculate the vertical distance L1 and the vertical distance L2. In one embodiment, the dedistortion algorithm in the OpenCV library can be used to dedistort the left side image and the right side image of the vehicle body collected by the surround camera, and then the door handle in the dedistorted image is identified, and then the first coordinate value of the door handle A in the preset pixel coordinate system is determined. Furthermore, when the vehicle body passes through the wading road surface, there will be corresponding wading feature information on the left and right sides (that is, the aforementioned vehicle feature information), and the vehicle body information and water surface information in the image can be extracted by a deep learning semantic segmentation algorithm, and the wading edges on the left and right sides of the vehicle body can be obtained based on the vehicle body information and water surface information. A vertical line of the wading edge is drawn through the door handle A, and the vertical distance L1 and the vertical distance L2 are calculated respectively.
[0067] Step S506, determine whether the vertical distance L1 and the vertical distance L2 are less than a preset distance threshold. If yes, execute step S508; if not, execute step S504. In one embodiment, the preset distance threshold can be determined based on the vertical distance from the air inlet to the door handle. When the vertical distance L1 is less than the preset distance threshold and / or the vertical distance L2 is less than the preset distance threshold, step S508 can be executed.
[0068] Step S508, generating a water wading warning prompt.
[0069] To sum up, the embodiments of the present invention can theoretically be applied to all vehicles that include left and right surround-view cameras. Using the door handle as a reference mark for wading depth detection not only eliminates the need for additional sensors, but also enables self-inspection of the vehicle's wading depth, thereby better balancing the detection cost and universality of the wading depth.
[0070] For the vehicle wading warning method provided in the above embodiment, the embodiment of the present invention also provides a vehicle wading warning device, see Figure 6 The schematic diagram of the structure of a vehicle wading warning device is shown, and the device includes the following parts:
[0071] An image acquisition module 602 is used to acquire a vehicle image of a target vehicle;
[0072] The feature extraction module 604 is used to extract features from the vehicle image to obtain vehicle feature information of the target vehicle; wherein the vehicle feature information is used to characterize the wading edge of the target vehicle;
[0073] The water wading information determination module 606 is used to determine the water wading information of the target vehicle according to the vehicle characteristic information;
[0074] The warning module 608 is used to generate a water wading warning prompt for the target vehicle according to the water wading information if the water wading information meets the preset warning conditions.
[0075] The above-mentioned vehicle wading warning device provided by the embodiment of the present invention can determine the wading information of the target vehicle based on the vehicle feature information obtained by feature extraction, and can generate a corresponding wading warning prompt when the wading information meets the preset warning conditions. Compared with the method of using ultrasonic sensors to detect the wading depth of the vehicle in the prior art, the embodiment of the present invention does not need to install additional sensors on the target vehicle, thereby significantly reducing the cost required for additional sensors. In addition, compared with the prior art of using a water depth detection device to detect the wading depth of the vehicle, the embodiment of the present invention can obtain a more reliable wading warning prompt through self-detection of the target vehicle. Therefore, the embodiment of the present invention better takes into account the detection cost and detection universality of the wading depth.
[0076] In one implementation, the feature extraction module 604 is further used to: extract vehicle body information and water surface information from the vehicle image; and determine vehicle feature information of the target vehicle based on the vehicle body information and water surface information.
[0077] In one embodiment, the wading information determination module 606 is also used to: identify the wading reference mark contained in the vehicle image, and the first coordinate value of the wading reference mark in a preset pixel coordinate system; determine the position of the wading edge in the vehicle image based on the vehicle characteristic information; draw a perpendicular line of the wading edge through the wading reference mark in the vehicle image, and determine the second coordinate value of the intersection of the perpendicular line and the wading edge in the preset pixel coordinate system; calculate the wading information of the target vehicle based on the first coordinate value and the second coordinate value; wherein the wading information includes the vertical distance between the wading reference mark and the wading edge.
[0078] In one embodiment, the wading reference mark includes a first mark located on the left side of the vehicle body and a second mark located on the right side of the vehicle body, and the first mark and the second mark are both at a first distance from the chassis of the target vehicle; the early warning module 608 is also used to: determine whether the vertical distance corresponding to the first mark and the vertical distance corresponding to the second mark are both greater than a preset distance threshold; if not, determine that the wading information meets the preset early warning conditions, and generate a wading early warning prompt for the target vehicle based on the vertical distance.
[0079] In one embodiment, the warning module 608 is also used to: if the vertical distance corresponding to the first mark is smaller than the vertical distance corresponding to the second mark, determine the first mark as the target mark; or, if the vertical distance corresponding to the second mark is smaller than the vertical distance corresponding to the first mark, determine the second mark as the target mark; calculate the safe wading distance based on the installation position of the air intake in the target vehicle and the vertical distance corresponding to the target mark; and generate a wading warning prompt corresponding to the safe wading distance.
[0080] In one embodiment, the warning module 608 is further used for: if the air intake is installed on the left or right side of the target vehicle, then the product of the vertical distance corresponding to the target mark and the distance coefficient is calculated to obtain the safe wading distance.
[0081] In one embodiment, the early warning module 608 is also used for: if the installation position of the air intake is the center of the target vehicle, then determining the second distance between the air intake and the chassis of the target vehicle and the width value of the target vehicle; calculating the third distance according to the vertical distance corresponding to the first mark, the vertical distance corresponding to the second mark, the first distance, the second distance and the width value; calculating the product of the third distance and the distance coefficient to obtain the safe wading distance.
[0082] In one embodiment, the warning module 608 is also used to calculate the distance coefficient based on a specified operation function, a width value, a vertical distance corresponding to the first mark, and a vertical distance corresponding to the second mark; wherein the specified operation function includes a division formula, an inverse sine function, and a cosine function.
[0083] In one embodiment, the early warning module 608 is also used for: if the vertical distance corresponding to the first mark is equal to the vertical distance corresponding to the second mark, then calculating the distance difference between the first distance and the vertical distance corresponding to the first mark, or calculating the distance difference between the first distance and the vertical distance corresponding to the second mark; calculating the difference between the second distance and the distance difference to obtain the safe wading distance.
[0084] In one embodiment, an image acquisition device is provided at a designated position of the left rearview mirror and / or the right rearview mirror of the target vehicle; the image acquisition module 602 is also used to: acquire a vehicle image of the target vehicle through the image acquisition device; wherein the vehicle image includes an image of the left side of the vehicle body and an image of the right side of the vehicle body.
[0085] In one embodiment, the image acquisition module 602 is further used to: calibrate the image acquisition device to determine the distortion parameters of the image acquisition device; and dedistort the vehicle image according to the distortion parameters to determine the correspondence between the vehicle image and a preset pixel coordinate system.
[0086] In one embodiment, the water wading warning prompt includes a voice prompt and / or a text prompt.
[0087] The device provided in the embodiment of the present invention has the same implementation principle and technical effects as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the device embodiment, reference may be made to the corresponding contents in the aforementioned method embodiment.
[0088] An embodiment of the present invention provides an electronic device. Specifically, the electronic device includes a processor and a storage device. The storage device stores a computer program, and when the computer program is executed by the processor, it executes the method described in any one of the above-mentioned implementation methods.
[0089] Figure 7 A structural diagram of an electronic device provided in an embodiment of the present invention, the electronic device 100 includes: a processor 70, a memory 71, a bus 72 and a communication interface 73, wherein the processor 70, the communication interface 73 and the memory 71 are connected via the bus 72; the processor 70 is used to execute an executable module stored in the memory 71, such as a computer program.
[0090] The memory 71 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 73 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used.
[0091] The bus 72 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0092] Among them, the memory 71 is used to store programs, and the processor 70 executes the program after receiving the execution instruction. The method executed by the device for flow process definition disclosed in any embodiment of the above-mentioned embodiment of the present invention can be applied to the processor 70 or implemented by the processor 70.
[0093] The processor 70 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 70. The above processor 70 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiments of the present invention can be directly embodied as a hardware decoding processor to be executed, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 71, and the processor 70 reads the information in the memory 71 and completes the steps of the above method in combination with its hardware.
[0094] The computer program product of the readable storage medium provided in the embodiment of the present invention includes a computer-readable storage medium storing program code, and the instructions included in the program code can be used to execute the methods described in the previous method embodiments. The specific implementation can be referred to the previous method embodiments, which will not be repeated here.
[0095] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.
[0096] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims
1. A vehicle wading warning method, characterized in that: include: Acquire a vehicle image of a target vehicle; Performing feature extraction on the vehicle image to obtain vehicle feature information of the target vehicle; wherein the vehicle feature information is used to characterize the wading edge of the target vehicle; Determining water wading information of the target vehicle according to the vehicle characteristic information; If the water wading information meets the preset warning condition, generating a water wading warning prompt for the target vehicle according to the water wading information; The step of determining the wading information of the target vehicle according to the vehicle characteristic information comprises: identifying a wading reference mark contained in the vehicle image and a first coordinate value of the wading reference mark in a preset pixel coordinate system; determining the position of the wading edge in the vehicle image according to the vehicle characteristic information; drawing a perpendicular line of the wading edge through the wading reference mark in the vehicle image, and determining a second coordinate value of an intersection of the perpendicular line and the wading edge in the preset pixel coordinate system; calculating the wading information of the target vehicle according to the first coordinate value and the second coordinate value; wherein the wading information comprises a vertical distance between the wading reference mark and the wading edge; The wading reference mark includes a first mark located on the left side of the vehicle body and a second mark located on the right side of the vehicle body, and the first mark and the second mark are both at a first distance from the chassis of the target vehicle; if the wading information meets the preset warning condition, the step of generating a wading warning prompt of the target vehicle according to the wading information includes: judging whether the vertical distance corresponding to the first mark and the vertical distance corresponding to the second mark are both greater than a preset distance threshold; if not, determining that the wading information meets the preset warning condition, and generating a wading warning prompt of the target vehicle according to the vertical distance; The step of generating a wading warning prompt of the target vehicle according to the vertical distance includes: if the vertical distance corresponding to the first mark is smaller than the vertical distance corresponding to the second mark, determining the first mark as the target mark; or if the vertical distance corresponding to the second mark is smaller than the vertical distance corresponding to the first mark, determining the second mark as the target mark; calculating a safe wading distance based on the installation position of the air intake in the target vehicle and the vertical distance corresponding to the target mark; generating a wading warning prompt corresponding to the safe wading distance; The step of calculating the safe wading distance based on the installation position of the air intake in the target vehicle and the vertical distance corresponding to the target mark comprises: if the installation position of the air intake is on the left or right side of the target vehicle, then calculating the product of the vertical distance corresponding to the target mark and the distance coefficient to obtain the safe wading distance; The step of calculating the safe wading distance based on the installation position of the air intake in the target vehicle and the vertical distance corresponding to the target mark further includes: if the installation position of the air intake is the center of the target vehicle, determining the second distance between the air intake in the target vehicle and the chassis, and the width value of the target vehicle; calculating the third distance according to the vertical distance corresponding to the first mark, the vertical distance corresponding to the second mark, the first distance, the second distance and the width value; calculating the product of the third distance and the distance coefficient to obtain the safe wading distance; The method also includes: if the vertical distance corresponding to the first mark is equal to the vertical distance corresponding to the second mark, then calculating the distance difference between the first distance and the vertical distance corresponding to the first mark, or calculating the distance difference between the first distance and the vertical distance corresponding to the second mark; calculating the difference between the second distance and the distance difference to obtain the safe wading distance.
2. The method according to claim 1, characterized in that: The step of extracting features from the vehicle image to obtain vehicle feature information of the target vehicle comprises: Extracting vehicle body information and water surface information from the vehicle image; The vehicle characteristic information of the target vehicle is determined according to the vehicle body information and the water surface information.
3. The method according to claim 1, characterized in that Before the step of calculating the safe wading distance based on the installation position of the air intake in the target vehicle and the vertical distance corresponding to the target mark, the method further includes: The distance coefficient is calculated according to a specified operation function, a width value, a vertical distance corresponding to the first mark, and a vertical distance corresponding to the second mark; wherein the specified operation function includes a division formula, an inverse sine function, and a cosine function.
4. The method according to claim 1, characterized in that: An image acquisition device is provided at a designated position of the left rearview mirror and / or the right rearview mirror of the target vehicle; The step of acquiring the vehicle image of the target vehicle comprises: The vehicle image of the target vehicle is acquired by the image acquisition device; wherein the vehicle image includes a left side image and a right side image of the vehicle body.
5. The method according to claim 4, characterized in that Before the step of extracting features from the vehicle image to obtain vehicle feature information of the target vehicle, the method further includes: Calibrate the image acquisition device to determine the distortion parameters of the image acquisition device; De-distortion processing is performed on the vehicle image according to the distortion parameter to determine a corresponding relationship between the vehicle image and a preset pixel coordinate system.
6. The method according to claim 1, characterized in that The water wading warning prompt includes a voice prompt and / or a text prompt.
7. A vehicle wading warning device, characterized in that: include: An image acquisition module, used for acquiring a vehicle image of a target vehicle; A feature extraction module, used to extract features from the vehicle image to obtain vehicle feature information of the target vehicle; wherein the vehicle feature information is used to characterize the wading edge of the target vehicle; A water wading information determination module, used to determine the water wading information of the target vehicle according to the vehicle characteristic information; An early warning module, configured to generate a water wading early warning prompt for the target vehicle according to the water wading information if the water wading information meets a preset early warning condition; The early warning module is also used to: identify the wading reference mark contained in the vehicle image, and the first coordinate value of the wading reference mark in a preset pixel coordinate system; determine the position of the wading edge in the vehicle image according to the vehicle characteristic information; draw a vertical line of the wading edge through the wading reference mark in the vehicle image, and determine the second coordinate value of the intersection of the vertical line and the wading edge in the preset pixel coordinate system; calculate the wading information of the target vehicle according to the first coordinate value and the second coordinate value; wherein the wading information includes the vertical distance between the wading reference mark and the wading edge; The wading reference mark includes a first mark located on the left side of the vehicle body and a second mark located on the right side of the vehicle body, and the first mark and the second mark are both at a first distance from the chassis of the target vehicle; the early warning module is also used to: determine whether the vertical distance corresponding to the first mark and the vertical distance corresponding to the second mark are both greater than a preset distance threshold; if not, determine that the wading information meets the preset early warning condition, and generate a wading early warning prompt for the target vehicle according to the vertical distance; The warning module is further used to: if the vertical distance corresponding to the first mark is smaller than the vertical distance corresponding to the second mark, determine the first mark as the target mark; or if the vertical distance corresponding to the second mark is smaller than the vertical distance corresponding to the first mark, determine the second mark as the target mark; calculate the safe wading distance based on the installation position of the air intake in the target vehicle and the vertical distance corresponding to the target mark; generate a wading warning prompt corresponding to the safe wading distance; The early warning module is also used for: if the installation position of the air inlet is on the left or right side of the target vehicle, then calculating the product of the vertical distance corresponding to the target mark and the distance coefficient to obtain the safe wading distance; The early warning module is further used for: if the installation position of the air intake is the center of the target vehicle, determining the second distance between the air intake in the target vehicle and the chassis, and the width value of the target vehicle; calculating the third distance according to the vertical distance corresponding to the first mark, the vertical distance corresponding to the second mark, the first distance, the second distance and the width value; calculating the product of the third distance and the distance coefficient to obtain the safe wading distance; The early warning module is also used for: if the vertical distance corresponding to the first mark is equal to the vertical distance corresponding to the second mark, then calculating the distance difference between the first distance and the vertical distance corresponding to the first mark, or calculating the distance difference between the first distance and the vertical distance corresponding to the second mark; calculating the difference between the second distance and the distance difference to obtain the safe wading distance.
8. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Water level recognition method and system based on car-mounted panoramic images
CN108151824A
Vehicle water-wading detection method and system and vehicle
CN108973894A