Vehicle driving state identification method, device, electronic device and storage medium
By acquiring and classifying the end face images of the trailer, the driving state of the trailer is determined, and the problem of misjudgment based on reference marks in the prior art is solved, and the accurate judgment of the state of the trailer is achieved.
Patent Information
- Application Number
- CN202111630511.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-28
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2041-12-28
AI Technical Summary
In the prior art, calculating the state of the trailer based on reference marks can easily lead to problems of misjudgment and low accuracy.
By obtaining the end face image of the trailer end face, performing angle classification, obtaining the angle corresponding to the end face image, and determining the driving state of the trailer based on the side length and angle of the end face image.
It realizes accurate judgment of the status and position of the trailer, solves the problems of misjudgment and low accuracy, has a wider scope of application, and is not affected by the external environment.
Smart Images

Figure CN114494822B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image recognition technology, and in particular to a vehicle driving status recognition method, device, electronic device and storage medium. Background Art
[0002] A motor vehicle is a wheeled vehicle that is driven or towed by a power unit and travels on the road for passengers or to transport goods or for special operations. According to the type of motor vehicle, it can be divided into large cars, small cars, special-purpose cars, special vehicles, rail / trolleybuses, tractors, trailers, etc. For a trailer, its main components are the tractor and the trailer. When the trailer turns, an angle will be formed between the tractor and the trailer. The turning state of the trailer will be different depending on the angle. The turning state of the trailer plays an important role in the turning control during the automatic driving process.
[0003] In the related art, a reference mark can be set at the front end of the trailer compartment, and the camera set on the tractor recognizes and analyzes the reference mark to calculate the turning state of the trailer. However, in harsh environments, or when the reference mark is damaged or blocked, the camera cannot recognize a clear reference mark, resulting in a misjudgment of the turning state of the trailer.
[0004] There is a problem in the related technology that the calculation of the trailer status based on the reference mark is prone to misjudgment and low accuracy, and no effective solution has been proposed so far. Summary of the invention
[0005] In this embodiment, a vehicle driving state recognition method, device, electronic device and storage medium are provided to solve the problem in the related art that the trailer state is calculated based on a reference mark, which is prone to misjudgment and low accuracy.
[0006] In a first aspect, a vehicle driving state recognition method is provided in this embodiment, which is applied to a trailer, wherein the trailer includes a tractor and a trailer, and the method includes:
[0007] Acquire an end face image of an end face of the trailer, wherein the end face of the trailer is an end face of the trailer close to the tractor;
[0008] Performing angle classification on the end face image to obtain an angle corresponding to the end face image, wherein the angle is an angle between the end face of the trailer and the end face of the tractor, and the end face of the tractor is an end face of the tractor close to the trailer;
[0009] The driving state of the trailer is determined according to the side length of the end face image and the angle.
[0010] In some embodiments, the angle classification of the end face image to obtain the angle corresponding to the end face image includes:
[0011] Extracting a feature vector of the end face image through a trained classification model;
[0012] The feature vector is matched with a preset angle category based on the classification model to obtain an angle corresponding to the end face image.
[0013] In some of the embodiments, the method for setting the preset angle category is:
[0014] The achievable angle range between the trailer end face and the tractor end face is divided into a plurality of angle categories according to a preset recognition accuracy.
[0015] In some embodiments, determining the driving state of the trailer according to the side length and the angle of the end face image includes:
[0016] Calculate the predicted side length of the end face image according to the height of the geometric figure corresponding to the end face image and the angle;
[0017] Determining the actual side length of the trailer end face;
[0018] The driving state of the trailer is determined according to the difference between the predicted side length and the actual side length corresponding to the position.
[0019] In some embodiments, determining the driving state of the trailer according to the difference between the predicted side length and the actual side length corresponding to the position includes:
[0020] When it is determined that the predicted side length is consistent with the actual side length, determining that the trailer has not deviated;
[0021] When it is determined that the predicted side length is inconsistent with the actual side length, it is determined that the trailer is offset and the angle is output.
[0022] In some embodiments, acquiring the end face image of the trailer end face includes:
[0023] Acquiring a trailer image including the trailer end face by means of a camera, wherein the camera is arranged at the geometric center of the tractor end face;
[0024] Identifying position information of the end face of the trailer in the trailer image;
[0025] The trailer image is segmented according to the position information to obtain the end face image.
[0026] In some of the embodiments, before performing angle classification on the end face image, the method further includes:
[0027] The end face image is converted into a color image.
[0028] In a second aspect, a vehicle driving state recognition device is provided in this embodiment, which is applied to a trailer, wherein the trailer includes a tractor and a trailer, and the device includes an acquisition module, a classification module, and a determination module:
[0029] The acquisition module is used to acquire an end face image of the trailer end face, wherein the trailer end face is the end face of the trailer close to the tractor;
[0030] The classification module is used to classify the end face image by angle to obtain an angle corresponding to the end face image, wherein the angle is the angle between the trailer end face and the tractor end face, and the tractor end face is the end face of the tractor close to the trailer;
[0031] The determination module is used to determine the driving state of the trailer according to the side length of the end face image and the angle.
[0032] In a third aspect, an electronic device is provided in this embodiment, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the vehicle driving state identification method described in the first aspect when executing the computer program.
[0033] In a fourth aspect, in this embodiment, a storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the vehicle driving state identification method described in the first aspect is implemented.
[0034] Compared with the related art, the vehicle driving status recognition method provided in this embodiment obtains the end face image of the trailer end face, classifies the angles of the end face image to obtain the angle corresponding to the end face image, and determines the driving status of the trailer according to the side length and angle of the end face image. This solves the problem that calculating the trailer status based on reference marks is prone to misjudgment and low accuracy, and achieves accurate judgment of the vehicle status and position.
[0035] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0037] Figure 1 It is a hardware structure block diagram of a terminal of a vehicle driving state identification method according to an embodiment of the present application;
[0038] Figure 2 is a flow chart of a vehicle driving state identification method according to an embodiment of the present application;
[0039] Figure 3 is a schematic diagram of the environment of the vehicle driving state recognition method of this embodiment;
[0040] Figure 4 is an angle category information diagram of an end face image of a trailer in an embodiment of the present application;
[0041] Figure 5 is a schematic diagram of calculating the side length of the end face image of a trailer in an embodiment of the present application;
[0042] Figure 6 is a flow chart of the end face image acquisition method of an embodiment of the present application;
[0043] Figure 7 is a preferred flow chart of the vehicle driving state identification method of the embodiment of the present application;
[0044] Figure 8 It is a structural block diagram of a vehicle driving state recognition device according to an embodiment of the present application. DETAILED DESCRIPTION
[0045] In order to more clearly understand the purpose, technical solutions and advantages of the present application, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments.
[0046] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the general meaning understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the", "these" and the like in this application do not represent quantitative restrictions, and they can be singular or plural. The terms "include", "comprise", "have" and any variants thereof involved in this application are intended to cover non-exclusive inclusions; for example, a process, method and system, product or device comprising a series of steps or modules (units) is not limited to the listed steps or modules (units), but may include unlisted steps or modules (units), or may include other steps or modules (units) inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether directly or indirectly. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships. For example, "A and / or B" can mean: A exists alone, A and B exist at the same time, and B exists alone. Usually, the character " / " indicates that the objects associated with each other are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.
[0047] The method embodiment provided in this embodiment can be executed in a terminal, a computer or a similar computing device. For example, running on a terminal, Figure 1 is a hardware structure block diagram of a terminal of a vehicle driving state identification method according to an embodiment of the present application. Figure 1 As shown, the terminal may include one or more ( Figure 1 Only one is shown in the figure) processor 102 and memory 104 for storing data, wherein processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA. The above terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0048] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the vehicle driving state identification method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0049] The transmission device 106 is used to receive or send data via a network. The above network includes a wireless network provided by the communication provider of the terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.
[0050] In this embodiment, a vehicle driving state recognition method is provided. Figure 2 is a flow chart of a vehicle driving state recognition method according to an embodiment of the present application. Figure 2 As shown, the process includes the following steps:
[0051] Step S201, acquiring an end face image of the trailer end face;
[0052] The vehicles in this embodiment include but are not limited to flatbed trucks, box trucks, dump trucks, grid trucks, flatbed trucks, tank trucks, off-road trucks for off-road and roadless areas, and various trucks manufactured specifically for special needs, etc., which are composed of tractors and trailers.
[0053] Preferably, the trailer end face in this embodiment is the end face of the trailer close to the tractor side, and the end face image can be obtained in real time through a camera installed on the tractor. The camera is installed at the geometric center of the end face of the tractor. When shooting the end face image, there is no need to rotate the camera.
[0054] Step S202, classifying the end face image by angle to obtain the angle corresponding to the end face image;
[0055] The angle is the angle between the trailer end face and the tractor end face, and the tractor end face is the end face of the tractor close to the trailer. Figure 3 As shown, when the towing vehicle is turning during driving, there is an angle β between the tractor and the trailer, and the angle is complementary to the angle γ between the end face of the trailer and the end face of the tractor.
[0056] The specific angle determination can be performed by sending the end face image of the trailer end face to the VGG16 model for angle classification processing of the end face image after obtaining the end face image of the trailer end face, so as to obtain the angle between the current trailer end face and the tractor end face. Furthermore, the side length of the corresponding end face image can be obtained by analyzing the end face image. Preferably, the analysis of the end face image can be completed by the chip built into the camera, or the end face image can be transmitted to the cloud through a mobile network and / or a wireless network and completed by the cloud server.
[0057] Step S203, determining the driving state of the trailer according to the side length and angle of the end face image.
[0058] The driving state of the trailer can be straight or turning. When the trailer is straight, it means that the trailer is not offset relative to the tractor; when the trailer is turning, it means that the trailer is offset relative to the tractor. When judging the driving state, it is necessary to combine the side length and angle of the end face image. After the side length and angle of the end face image meet the preset standard, the driving state of the trailer can be judged according to the preset standard.
[0059] Through the above steps S201 to S203, this embodiment analyzes the side length information and angle information in the end face image of the trailer, and judges the driving status of the trailer based on the side length information and angle information. During this process, no external auxiliary tools are used. This solves the problem that calculating the trailer status based on reference marks is prone to misjudgment and low accuracy. It has a wider scope of application, is not affected by the external environment, and has a higher accuracy rate.
[0060] VGGNet (Visual Geometry Group, referred to as VGG) explored the relationship between the depth of convolutional neural networks and their performance. By repeatedly stacking 3×3 small convolution kernels and 2×2 maximum pooling layers, it successfully built a 16-19-layer deep convolutional neural network. Compared with the previous state-of-the-art network structure, VGGNet has the characteristics of low error rate, strong scalability, and good generalization when migrated to other image data. The structure of VGGNet is very simple. The entire network uses the same convolution kernel size and maximum pooling size, and is often used to extract end face image features.
[0061] In some of the embodiments, when the angle of the end face image is classified and the angle corresponding to the end face image is obtained, the feature vector of the end face image can be extracted through the trained classification model. The training process of the classification model, for example, first marks the end face image samples, and then trains according to the marked end face image samples until the loss function of the classification model converges or the number of training times reaches a preset value. Specifically, the classification model used in this embodiment may include but is not limited to a deep convolutional neural network such as the VGG16 model that can extract feature vectors from the end face image. After the classification model extracts the attribute features in the end face image, the feature vector of the end face image can be obtained, and then the feature vector is matched with the preset angle category to obtain the angle corresponding to the end face image, wherein the attribute features include the edge, corner, color, etc. of the end face image. Through the classification of the angle and the matching of the end face image, the rotation angle of the trailer can be accurately identified, and the accuracy of judging the driving state of the trailer can be improved.
[0062] In some of the embodiments, the preset angle categories are set in a method of dividing the achievable angle range between the end face of the trailer and the end face of the tractor into multiple angle categories according to the preset recognition accuracy. The preset recognition accuracy is the angle accuracy that is desired to be achieved in the process of identifying the angle. For example, when the preset recognition accuracy is 1°, every 1 degree in the angle range is considered as an angle category. The angle range in this embodiment is preferably the maximum angle range that the trailer can deflect in order to obtain more angle conditions. In other embodiments, it can also be a smaller angle range. Preferably, in consideration of the calculation accuracy and calculation cost, within the range that the trailer can deflect, the angle range between the end face of the trailer and the end face of the tractor is (-90°, +90°), Figure 4 This is an angle category information diagram of the end face image of the trailer in the embodiment of the present application, such as Figure 4 As shown, assuming that the preset recognition accuracy is 5°, every 5° is recorded as an angle category, and the state of the trailer end face under the current angle category is recorded, which is divided into 35 angle categories for recording. When the deflection angle is -90° and +90°, the trailer will enter the visual blind spot, and the end face image of the trailer cannot be observed at this time. When the trailer is going straight, that is, the deflection angle of the trailer is 0°, the obtained trailer end face image is a rectangle / or square; when the trailer turns / changes lanes, that is, the trailer has a deflection angle, such as ±60° and ±30°, where the trailer is positive when turning right and negative when turning left, the trailer end face image is an isosceles trapezoid, and the heights of these trapezoids are the same.
[0063] Preferably, the length and width of the trailer end face will change at different angles, and will be presented as a trapezoidal image in the end face image, where the upper base of the trapezoid corresponds to the side close to the turning position, and the lower base corresponds to the side away from the turning position. Therefore, the end face image can be classified by a trained classification model to determine the angle category to which the trailer end face belongs. According to the changes in the shape of the trailer end face at different angles, the 35 angle categories divided are recorded for category information, and each angle category corresponds to a position information. Therefore, when every 5° is recorded as an angle category, there are 35 position information for the trailer, recorded as [n1, n2, n3...n35], where the category information includes the position information, angle information, and image information of the trailer state. For example, when the trailer deflects to the right at an angle of 85°, the current trailer position information is recorded as n1, the image information is the trailer end image corresponding to the right deflection angle of 85°, and the angle information is +85°; when the trailer deflects to the left at an angle of 30°, the current trailer position information is recorded as n24, the image information is the trailer end image corresponding to the left deflection angle of 30°, and the angle information is -30°. The rest of the angles are similar, and each angle category has a corresponding category information record, such as Figure 4 shown.
[0064] In this embodiment, the trailer is divided into angle levels within the range in which it can be deflected, and the end face image features at each angle are recorded. This not only provides a basis for determining whether the trailer has deflected, but also makes up for the shortcoming in the prior art that the angle of deflection of the trailer cannot be determined. It can provide an approximate angle range of the trailer, optimize the detection effect of the classification model and improve the accuracy of trailer status judgment.
[0065] In some of the embodiments, when determining the driving state of the trailer based on the side length and angle of the end face image, it is first necessary to calculate the predicted side length of the end face image based on the height of the geometric figure corresponding to the end face image and the angle corresponding to the end face image. When the trailer turns, the side length in the corresponding end face image will become shorter when it is close to the camera near the turning position, and the side length in the corresponding end face image will become longer when it is far away from the camera far away from the turning position. For the above reasons, the end face image at this time will no longer remain a rectangle, but will become an isosceles trapezoid, that is, the above-mentioned geometric figure. In other embodiments, if the end face of the trailer is not a rectangle, the shape of the geometric figure will also change accordingly. Further, the above-mentioned angle can be obtained through a classification model. Figure 5 This is a schematic diagram of the calculation of the side length of the end face image of the trailer in the embodiment of the present application. It can be seen that after determining the angle and the height of the isosceles trapezoid, the detailed calculation of the side length of the end face of the trailer when turning can be performed.
[0066] Specifically, Figure 5As shown in the figure, the actual end face of the trailer is a rectangle with a length of L and a width of H. The distance from the front and rear of the truck to the end face of the trailer is d, and the original offset angle of the trailer is 0°. When the trailer is offset to the right by an angle γ, the end face image of the trailer will no longer remain a rectangle, but will be deformed into an isosceles trapezoid. However, the height of the trapezoid is still L at this time, and the angle α between the waist and the height of the trapezoid corresponds to the offset angle γ. Before determining α through the classification model, the corresponding relationship between α and γ can be set based on α in a large number of sample end face images and the corresponding actual γ. Then, for the trained classification model, after obtaining the end face image, the angle α can be obtained through the classification model, and γ can be determined from α according to the corresponding relationship, so as to finally determine the driving state of the trailer represented by γ. Through trigonometric function calculation, it can be obtained that the length of the waist corresponding to the above trapezoid is L / cosα, the upper base of the trapezoid is H-Ltanα, and the lower base of the lower base trapezoid is H+Ltanα, wherein the upper base corresponds to the side of the trailer close to the turn during driving, and the lower base is the side of the trailer away from the turn during driving.
[0067] Furthermore, after calculating the predicted side length of the end face image, it is necessary to determine the actual side length of the trailer end face. The actual side length can be set in advance according to the actual size of the trailer end face, or can be obtained by the camera after judging the 0° deflection angle during driving, and further, can be determined according to the height of the end face image. Finally, the driving state of the trailer can be determined according to the difference between the predicted side length and the actual side length corresponding to the position. The calculation of the predicted side length in this embodiment can be intuitively compared with the actual side length, which simplifies the judgment of the driving state of the trailer.
[0068] In some of the embodiments, the driving state of the trailer can be determined based on the difference between the predicted side length and the actual side length corresponding to the position. Specifically, when the predicted side length and the actual side length are determined to be consistent, it is determined that the trailer has not shifted; when the predicted side length and the actual side length are determined to be inconsistent, it is determined that the trailer has shifted and the angle is output. In this embodiment, whether the trailer has shifted is determined by the side length of the end face image, which can simplify the process of judging the vehicle form state and ensure the accuracy of the judgment.
[0069] In this embodiment, a method for obtaining an end face image of a trailer is provided. Figure 6 is a flow chart of the end face image acquisition method of the embodiment of the present application, such as Figure 6 As shown, the process includes the following steps:
[0070] Step S601, acquiring a trailer image including the trailer end face through a camera, wherein the camera is set at the geometric center of the tractor end face;
[0071] In this embodiment, the camera used may be a device used to obtain trailer images in the field of vehicle automatic driving, such as a vehicle-mounted camera. Preferably, the trailer image is a visible light color image. When the end face of the tractor is a rectangle, the geometric center is the intersection of the diagonal lines of the end face of the tractor. The trailer image may be a single-frame image directly acquired by the camera in real time, or a single-frame image extracted from a video captured by the camera in real time. Specifically, the trailer image may be in RGB format or HSV format.
[0072] Step S602, identifying the position information of the end face of the trailer in the trailer image;
[0073] After obtaining the trailer image, it is necessary to use a deep learning algorithm to enhance the collected trailer image through the open source computer vision library (Open Source Computer Vision Library, referred to as OpenCV) or the image processing library (Python Image Library, referred to as PIL). Specifically, the trailer image can be first subjected to Gaussian filtering to effectively filter out the high-frequency noise superimposed in the trailer image and perform preliminary optimization on the trailer image; then the filtered trailer image is subjected to image binarization, at which point the entire trailer image presents an obvious black and white effect. The binarization of the trailer image greatly reduces the amount of data in the trailer image, thereby highlighting the outline of the target; then the trailer image after binarization is subjected to contrast enhancement processing, making the trailer end face more obvious in the end face image and easier to distinguish. Finally, the enhanced grayscale trailer image is input into the Unet (Convolutional Networks for Biomedical Image Segmentation) network, and the position information of the trailer end face coordinate frame in the trailer image [(x1, y1), (x2, y2), (x3, y3), (x4, y4)] is accurately obtained through the Unet network.
[0074] Step S603, segmenting the trailer image according to the position information of the trailer end face to obtain an end face image.
[0075] After obtaining the position information of the trailer end face in the trailer image, the Unet network performs the segmentation of the trailer image according to the above position information, separates the trailer end face from the trailer image, and obtains the trailer end face image.
[0076] Through the above steps S601 to S603, this embodiment uses the position information of the trailer end face to perform image segmentation, which can achieve accurate segmentation of the trailer image and obtain the corresponding real-time trailer end face image. When the vehicle turns at a large angle, it can effectively reduce the influence of the trailer body or other road vehicles on the classification of the trailer end face, improve the accuracy of the deep learning algorithm in classifying the truck status position, and effectively reduce the misjudgment rate of the end face image classification.
[0077] It should be noted that the process of segmenting the trailer image to obtain the end face image requires training in advance. The training process includes first obtaining a labeled sample trailer image, determining the initial segmentation range according to the position information of the trailer end face labeled in the sample trailer image, so as to determine the actual end face image; then extracting the segmented end face image according to the segmentation range, if the ratio of the pixels contained in the segmented end face image to the pixels contained in the actual end face image is greater than or equal to the segmentation threshold, for example, 90%, then it is considered that the segmented end face image has been correctly extracted from the sample trailer image, wherein the actual end face image is the actual image size of the trailer end face in the sample trailer image. Therefore, when the segmentation threshold is 90%, in the sample trailer image, if more than 90% of the pixels in the actual end face image are segmented, it can be considered that the segmented sample end face image is correct. By setting the initial segmentation range and comparing it with the corresponding segmentation threshold, not only can the segmentation process be simplified, but also the efficiency of obtaining a usable trailer end face image can be improved.
[0078] In some of the embodiments, since the end face image obtained after the image segmentation process is a grayscale image, it is necessary to convert the end face image into a color image before the angle classification of the end face image. Similarly, the color image can be in RGB format or HSV format. Based on the color image, the accuracy of angle classification can be improved.
[0079] Figure 7 is a preferred flow chart of the vehicle driving state identification method of the embodiment of the present application, such as Figure 7 As shown, the vehicle driving state recognition method includes the following steps:
[0080] Step S701, obtaining a trailer image;
[0081] Specifically, a real-time video frame can be extracted from a video of the end face of the trailer during the driving process of the vehicle, and the video frame is the real-time trailer image.
[0082] Step S702, performing Gaussian filtering, image binarization, and image enhancement processing to increase contrast on the trailer image to obtain a black and white trailer image;
[0083] Step S703, segmenting the trailer image to obtain an end face image;
[0084] Step S704, performing image processing on the end face image to obtain a color end face image;
[0085] Step S705, performing angle classification on the end face image in color form;
[0086] The feature vector in the end face image is extracted through the classification model, and then the image is classified according to the feature vector. The segmented image category corresponding to the length of the trailer end face frame is determined by trigonometric functions and deflection angles.
[0087] Step S706, determine the vehicle driving state according to the angle classification and output the angle result.
[0088] The side length of the trailer end face is calculated based on the angle. If the side length of the trailer end face does not change, the output is "0°", and the trailer has not deviated. If the side length of the trailer end face is L / cosα, it is determined that the trailer has an angular deviation, and the output angle value is "α°".
[0089] Through the above steps S701 to S706, this embodiment judges the vehicle driving state through the angle classification and side length of the trailer end face and outputs the angle result. No other external auxiliary objects are used in the judgment process, which makes the method of this embodiment unaffected by the external environment and improves the accuracy of vehicle driving state judgment. In addition, the angle result is output, and the current turning angle of the trailer can be clearly obtained, which makes up for the shortcoming of the prior art that the angle of the trailer deflection cannot be determined.
[0090] It should be noted that the steps shown in the above process or the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0091] In this embodiment, a vehicle driving state recognition device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. The terms "module", "unit", "subunit", etc. used below can implement a combination of software and / or hardware of predetermined functions. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0092] Figure 8 is a structural block diagram of a vehicle driving state recognition device according to an embodiment of the present application. Figure 8 As shown, the device includes: an acquisition module 81, a classification module 82 and a determination module 83;
[0093] An acquisition module 81 is used to acquire an end face image of the trailer end face, wherein the trailer end face is the end face of the trailer close to the tractor;
[0094] The classification module 82 is used to classify the end face image by angle to obtain the angle corresponding to the end face image, wherein the angle is the angle between the trailer end face and the tractor end face, and the tractor end face is the end face of the tractor close to the trailer;
[0095] The determination module 83 is used to determine the driving state of the trailer according to the side length and angle of the end face image.
[0096] Through the above-mentioned vehicle driving state recognition device, this embodiment can obtain the angle between the trailer and the tractor by acquiring the image of the trailer end face, and then determine the current state of the trailer, thereby solving the problem of calculating the trailer state based on reference marks, which is prone to misjudgment and low accuracy, and realizes accurate judgment of the trailer state position.
[0097] Furthermore, the classification module is also used to extract the feature vector of the end face image through the trained classification model; based on the classification model, the feature vector is matched with the preset angle category to obtain the angle corresponding to the end face image.
[0098] Furthermore, the classification module is also used to divide the achievable angle range between the end face of the trailer and the end face of the tractor into multiple angle categories according to a preset recognition accuracy.
[0099] Furthermore, the determination module is also used to calculate the predicted side length of the end face image based on the height and angle of the geometric figure corresponding to the end face image; determine the actual side length of the trailer end face; and determine the driving state of the trailer based on the difference between the predicted side length and the actual side length corresponding to the position.
[0100] Furthermore, the determination module is also used to determine that the trailer has not deviated when the predicted side length and the actual side length are consistent; when the predicted side length and the actual side length are inconsistent, determine that the trailer has deviated and output the angle.
[0101] Furthermore, the acquisition module is also used to acquire a trailer image including the trailer end face through a camera, wherein the camera is set at the geometric center of the tractor end face; identify the position information of the trailer end face in the trailer image; and segment the trailer image according to the position information of the trailer end face to obtain an end face image.
[0102] Furthermore, the acquisition module is also used to convert the end surface image into a color image.
[0103] It should be noted that the above modules can be functional modules or program modules, and can be implemented by software or hardware. For modules implemented by hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.
[0104] In this embodiment, an electronic device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0105] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0106] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0107] S1, acquiring an end face image of an end face of a trailer, wherein the end face of the trailer is an end face of the trailer close to the tractor;
[0108] S2, performing angle classification on the end face image to obtain an angle corresponding to the end face image, wherein the angle is an angle between the end face of the trailer and the end face of the tractor, and the end face of the tractor is an end face of the tractor close to the trailer;
[0109] S3, determining the driving state of the trailer according to the side length of the end face image and the angle.
[0110] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and will not be repeated in this embodiment.
[0111] In addition, in combination with the vehicle driving state identification method provided in the above embodiments, a storage medium can also be provided in this embodiment to implement the method. The storage medium stores a computer program; when the computer program is executed by a processor, any one of the vehicle driving state identification methods in the above embodiments is implemented.
[0112] It should be understood that the specific embodiments described herein are only used to explain the application, rather than to limit it. Based on the embodiments provided in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the protection scope of this application.
[0113] Obviously, the drawings are only some examples or embodiments of the present application. For ordinary technicians in the field, the present application can also be applied to other similar situations based on these drawings without creative work. In addition, it is understandable that although the work done in this development process may be complicated and lengthy, for ordinary technicians in the field, certain changes in design, manufacturing or production based on the technical content disclosed in this application are only conventional technical means and should not be regarded as insufficient content disclosed in this application.
[0114] The term "embodiment" in this application refers to a specific feature, structure or characteristic described in conjunction with the embodiment that can be included in at least one embodiment of the present application. The appearance of this phrase in various locations in the specification does not necessarily mean the same embodiment, nor does it mean that it is mutually exclusive with other embodiments and is independent or optional. It is clearly or implicitly understood by those of ordinary skill in the art that the embodiments described in this application can be combined with other embodiments without conflict.
[0115] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of patent protection. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the scope of protection of the present application. Therefore, the scope of protection of the present application shall be subject to the attached claims.
Claims
1. A vehicle driving state recognition method, characterized in that: Applied to a trailer, the trailer includes a tractor and a trailer, the method includes: Acquire an end face image of an end face of the trailer, wherein the end face of the trailer is an end face of the trailer close to the tractor; Performing image classification on the end face image to obtain an angle corresponding to the end face image, wherein the angle is an angle between the end face of the trailer and the end face of the tractor, and the end face of the tractor is an end face of the tractor close to the trailer; determining the driving state of the trailer according to the side length of the end face image and the angle; The determining the driving state of the trailer according to the side length and the angle of the end face image includes: Determine the predicted side length of the end face image according to the height of the geometric figure corresponding to the end face image and the angle; Determining the actual side length of the trailer end face; When it is determined that the predicted side length is consistent with the actual side length, determining that the trailer has not deviated; When it is determined that the predicted side length is inconsistent with the actual side length, it is determined that the trailer is offset and the angle is output.
2. The vehicle driving state recognition method according to claim 1, characterized in that: The performing angle classification on the end face image to obtain the angle corresponding to the end face image comprises: Extracting a feature vector of the end face image through a trained classification model; The feature vector is matched with a preset angle category based on the classification model to obtain an angle corresponding to the end face image.
3. The vehicle driving state recognition method according to claim 2, characterized in that: The method for setting the preset angle category is: The achievable angle range between the trailer end face and the tractor end face is divided into a plurality of angle categories according to a preset recognition accuracy.
4. The vehicle driving state recognition method according to claim 1, characterized in that: The step of acquiring the end face image of the trailer end face comprises: Acquiring a trailer image including the trailer end face by means of a camera, wherein the camera is arranged at the geometric center of the rear end face of the tractor; Identifying position information of the end face of the trailer in the trailer image; The trailer image is segmented according to the position information to obtain the end face image.
5. The vehicle driving state recognition method according to any one of claims 1 to 4, characterized in that: Before performing angle classification on the end face image, the method further includes: The end face image is converted into a color image.
6. A vehicle driving state recognition device, characterized in that: Applied to a trailer, the trailer includes a tractor and a trailer, the device includes an acquisition module, a classification module and a determination module: The acquisition module is used to acquire an end face image of the trailer end face, wherein the trailer end face is the end face of the trailer close to the tractor; The classification module is used to classify the end face image to obtain an angle corresponding to the end face image, wherein the angle is the angle between the trailer end face and the tractor end face, and the tractor end face is the end face of the tractor close to the trailer; The determination module is used to determine the driving state of the trailer according to the side length of the end face image and the angle; The determination module is further used to determine the predicted side length of the end face image according to the height of the geometric figure corresponding to the end face image and the angle; Determining the actual side length of the trailer end face; When it is determined that the predicted side length is consistent with the actual side length, determining that the trailer has not deviated; When it is determined that the predicted side length is inconsistent with the actual side length, it is determined that the trailer is offset and the angle is output.
7. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to execute the vehicle driving state identification method according to any one of claims 1 to 5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the vehicle driving state recognition method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Automatic driving trailer and included angle detection method and device thereof
CN111703430A
Angle identification method, device and equipment
CN113095266A