Method and device for detecting surrounding vehicles

By collecting and processing images of the vehicle direction, identifying license plates and calculating relative positions, the problem of the difference between the reversing image display and the actual field of view is solved, more accurate relative position judgment is achieved, and the driver's operational safety and user experience are improved.

CN120220111APending Publication Date: 2025-06-27CHONGQING SELIS PHOENIX INTELLIGENT INNOVATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510291663.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-12
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

In the prior art, there is a difference between the picture displayed by the reverse image and the actual field of view, which causes the driver, especially the novice driver, to be misled and increase the difficulty of operation.

Method used

By calling the image acquisition module pre-installed on the vehicle body, the images in the direction of at least one side of the vehicle are collected, the coordinate information and actual size of the license plate are identified and determined, and the relative position of the vehicle corresponding to the license plate is calculated.

Benefits of technology

It realizes a more accurate determination of the relative position between the current vehicle and the surrounding vehicles, reducing the difficulty of the driver's operation and improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120220111A_ABST
    Figure CN120220111A_ABST
Patent Text Reader

Abstract

The invention relates to a surrounding vehicle detection method and device, and the method comprises the steps: calling an image collection module which is installed on a vehicle body in advance, and collecting an image in the direction of at least one side of the vehicle; determining coordinate information of the license plate in the image under the condition that the license plate is recognized to be included in the image; acquiring actual size information of the license plate; and according to the coordinate information and the actual size information, determining the relative position between the current vehicle and the vehicle corresponding to the license plate. Therefore, the relative position between the current vehicle and the surrounding vehicle can be determined more accurately, so that a driver is assisted to drive the vehicle more accurately, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of vehicles, and in particular, to a method and device for detecting surrounding vehicles. Background Art

[0002] Currently, in the automotive field, as a part of modern vehicle safety configurations, the reverse camera system is crucial for safe driving. The reverse camera system aims to assist the driver in operating more safely and conveniently when reversing.

[0003] In related technologies, the reverse camera system usually only draws several lines on the display interface to indicate the general direction and distance behind the vehicle. Meanwhile, if the vehicle is equipped with a radar, the radar alarm sound is used to prompt the driver of the approaching degree of obstacles behind.

[0004] However, although the above method can provide driving assistance to a certain extent, since the data provided by this method is inaccurate and the types of cameras equipped on different vehicle models are different, there is a difference between the image displayed on the reverse camera and the actual field of view. This visual difference may mislead the driver, especially novice drivers who are not familiar with the vehicle, thus increasing the operation difficulty. Summary of the Invention

[0005] This application provides a method and device for detecting surrounding vehicles to solve the technical problem that there is a difference between the image displayed on the reverse camera in the prior art and the actual field of view, and this visual difference may mislead the driver, especially novice drivers who are not familiar with the vehicle, thus increasing the operation difficulty.

[0006] In a first aspect, this application provides a method for detecting surrounding vehicles, and the method includes:

[0007] Invoke an image acquisition module pre-installed on the vehicle body to acquire images in at least one side direction of the vehicle;

[0008] When it is recognized that the image includes a license plate, determine the coordinate information of the license plate in the image;

[0009] Obtain the actual size information of the license plate;

[0010] Determine the relative position between the current vehicle and the vehicle corresponding to the license plate according to the coordinate information and the actual size information.

[0011] As an optional implementation manner, the determining the relative position between the current vehicle and the vehicle corresponding to the license plate according to the coordinate information and the actual size information includes:

[0012] Determine the image size information of the license plate in the image according to the coordinate information;

[0013] Determine the distance of the vehicle corresponding to the license plate currently according to the image size information and the actual size information;

[0014] Determine the image position information of the license plate in the image according to the coordinate information;

[0015] Determine the relative direction and included angle between the vehicle corresponding to the license plate currently according to the image position information;

[0016] Determine the relative position between the vehicle corresponding to the license plate currently according to the distance, the relative direction, and the included angle.

[0017] As an optional implementation manner, the coordinate information includes the vertex coordinates of at least two vertices of the license plate, and the determining the image size information of the license plate in the image according to the coordinate information includes:

[0018] Determine the number of pixels occupied by any long side of the rectangular frame corresponding to the license plate in the image according to the vertex coordinates of at least two vertices;

[0019] Obtain the pixel size corresponding to each pixel in the image;

[0020] Obtain the length of the long side of the image corresponding to the long side according to the number of pixels and the pixel size;

[0021] Determine the image size information of the license plate in the image as the length of the long side of the image.

[0022] As an optional implementation manner, the determining the number of pixels occupied by any long side of the rectangular frame corresponding to the license plate in the image according to the vertex coordinates of at least two vertices includes:

[0023] When the vertex coordinates include the coordinates of the two end vertices of the short side of the rectangular frame corresponding to the license plate, determine the number of short side pixels occupied by the short side of the rectangular frame corresponding to the license plate in the image according to the two vertex coordinates;

[0024] Determine the ratio between the long side and the short side of the license plate according to the actual size information of the license plate;

[0025] Determine the number of pixels occupied by any long side of the rectangular frame corresponding to the license plate in the image according to the ratio and the number of short side pixels.

[0026] As an alternative implementation, determining the distance between the vehicle corresponding to the license plate currently according to the image size information and the actual size information includes:

[0027] Determine the actual long side length of the long side corresponding to the license plate according to the actual size information;

[0028] Determine the conversion ratio between the image size information and the actual size information of the license plate according to the image long side length and the actual long side length;

[0029] Obtain the module focal length of the image acquisition module when acquiring the image;

[0030] Determine the distance between the license plate and the image acquisition module according to the module focal length and the conversion ratio;

[0031] Determine the distance as the distance between the vehicle corresponding to the license plate currently.

[0032] As an alternative implementation, determining the image position information of the license plate in the image according to the coordinate information includes:

[0033] Determine the long side center point coordinates of the long side of the license plate in the image according to the coordinate information;

[0034] Determining the relative direction and included angle between the vehicle corresponding to the license plate currently according to the image position information includes:

[0035] Determine the image long side center point coordinates of the image, where the image long side center point coordinates are the coordinates corresponding to the center point of the long side of the acquired image;

[0036] Determine the relative direction and included angle between the long side center point and the image long side center point according to the long side center point coordinates and the image long side center point coordinates.

[0037] As an alternative implementation, the coordinate information includes the vertex coordinates of at least two vertices of the license plate, the relative position further includes the inclination angle of the vehicle corresponding to the license plate relative to the vehicle body, and the method further includes:

[0038] In the case where it is determined that the rectangular frame corresponding to the license plate is not parallel to the border of the image, determine the border included angle between the rectangular frame and the border of the image according to the vertex coordinates of at least two vertices;

[0039] Determine the border included angle as the inclination angle of the vehicle corresponding to the license plate relative to the vehicle body.

[0040] As an alternative implementation, the image acquisition module is installed at any position in the front, rear, and / or both sides of the vehicle body.

[0041] As an alternative implementation, determining the coordinate information of the license plate in the image includes:

[0042] Processing the image using a preset image enhancement algorithm to obtain a target image;

[0043] Processing the target image through a preset edge detection method to obtain the initial area of the license plate in the image;

[0044] Performing a closing operation on the initial area to obtain a rectangular frame corresponding to the license plate;

[0045] Obtaining the vertex coordinates of at least two vertices in the rectangular frame and determining the vertex coordinates as the coordinate information of the license plate in the image.

[0046] As an alternative implementation, after obtaining the rectangular frame corresponding to the license plate and before obtaining the vertex coordinates of at least two vertices in the rectangular frame, it further includes:

[0047] Performing color recognition on the license plate to determine the license plate type;

[0048] Determining the length-width ratio corresponding to the license plate according to the license plate type;

[0049] Verifying the rectangular frame according to the length-width ratio to obtain a verification result;

[0050] When the verification result indicates that the rectangular frame meets the length-width ratio, perform the step of obtaining the vertex coordinates of at least two vertices in the rectangular frame;

[0051] When the verification result indicates that the rectangular frame does not meet the length-width ratio, correct the rectangular frame according to the length-width ratio, and after correction, perform the step of obtaining the vertex coordinates of at least two vertices in the rectangular frame.

[0052] As an alternative implementation, after obtaining the rectangular frame corresponding to the license plate and before obtaining the vertex coordinates of at least two vertices in the rectangular frame, it further includes:

[0053] Determining the height value and width value of the characters inside the license plate;

[0054] Determining a first ratio of each long side of the rectangular frame to the width value and a second ratio of each short side of the rectangular frame to the height value;

[0055] When it is determined that the first ratio is the first preset ratio and the second ratio is the second preset ratio, perform the step of obtaining the vertex coordinates of at least two vertices in the rectangular frame.

[0056] As an alternative implementation, the method further includes:

[0057] When it is determined that the first ratio is not the first preset ratio and / or the second ratio is not the second preset ratio, perform color recognition on the license plate to determine the license plate type of the license plate;

[0058] Determine the length-width ratio corresponding to the license plate according to the license plate type;

[0059] Correct the rectangular frame according to the length-width ratio, and after correction, perform the step of obtaining the vertex coordinates of at least two vertices in the rectangular frame.

[0060] As an alternative implementation, obtaining the actual size information of the license plate includes:

[0061] Perform color recognition on the license plate to obtain the license plate type of the license plate;

[0062] Determine the actual size information corresponding to the license plate type from the corresponding relationship between the preset license plate type and the actual size according to the license plate type.

[0063] As an alternative implementation, the method further includes:

[0064] Obtain the weather information and light intensity of the current weather;

[0065] Adjust the acquisition parameters of the image acquisition module according to the weather information and the light intensity.

[0066] As an alternative implementation, the method further includes:

[0067] Output the image and the relative position through a preset visualization interface;

[0068] Input the image and the relative position into a preset warning model to obtain a warning result;

[0069] Output corresponding warning information according to the warning result in a preset warning manner.

[0070] In a second aspect, the present application provides a detection device for surrounding vehicles, and the device includes:

[0071] An acquisition module, configured to call an image acquisition module pre-installed on the vehicle body to acquire images of at least one side direction of the vehicle;

[0072] A first determination module, configured to determine coordinate information of the license plate in the image when it is recognized that the image includes the license plate;

[0073] An acquisition module, configured to acquire actual size information of the license plate;

[0074] A second determination module, configured to determine a relative position between the current vehicle corresponding to the license plate and surrounding vehicles according to the coordinate information and the actual size information.

[0075] In a third aspect, the present application provides a vehicle, including: a vehicle body main body, a processor, and a memory;

[0076] At least one image acquisition module is installed on the vehicle body main body;

[0077] The processor is configured to execute a detection program of surrounding vehicles stored in the memory to implement the detection method of surrounding vehicles according to any one of the first aspect.

[0078] In a fourth aspect, the present application provides a storage medium, characterized in that the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the detection method of surrounding vehicles according to any one of the first aspect.

[0079] The technical solution provided by the embodiments of the present application collects an image containing the license plates of surrounding vehicles, and determines the relative positions with surrounding vehicles according to the coordinate information of the license plates in the image and the actual size information of the license plates. Since the coordinate information of the license plates in the image and the actual size information of the license plates can be accurately obtained, and the actual size information of the license plates is fixed and unchanged, and the coordinate information is determined by the relative positions between two vehicles, the relative positions between the current vehicle and surrounding vehicles can be accurately determined according to the coordinate information of the license plates in the image and the actual size information of the license plates, achieving more accurate determination of the relative positions between the current vehicle and surrounding vehicles, thereby better assisting the driver in driving the vehicle and improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0080] The accompanying drawings here are incorporated into the specification and constitute a part of this specification, showing embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application.

[0081] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the accompanying drawings required for use in the embodiments or the prior art text. Obviously, for those of ordinary skill in the art, other accompanying drawings can also be obtained according to these accompanying drawings without creative efforts.

[0082] One or more embodiments are exemplarily illustrated by the pictures in the corresponding drawings. These exemplary illustrations do not constitute a limitation on the embodiments. Elements with the same reference numerals in the drawings are represented as similar elements, unless otherwise stated, and the drawings in the figures do not constitute a scale limitation.

[0083] Figure 1 It is a flowchart of an embodiment of a method for detecting surrounding vehicles provided by an embodiment of the present application;

[0084] Figure 2 It is a flowchart of an embodiment of another method for detecting surrounding vehicles provided by an embodiment of the present application;

[0085] Figure 3 It is a schematic diagram of an image including a license plate provided by an embodiment of the present application;

[0086] Figure 4 It is a schematic diagram of license plate conversion provided by an embodiment of the present application;

[0087] Figure 5 It is a flowchart of an embodiment of yet another method for detecting surrounding vehicles provided by an embodiment of the present application;

[0088] Figure 6 It is a schematic diagram of another image including a license plate provided by an embodiment of the present application;

[0089] Figure 7 It is a flowchart of an embodiment of still another method for detecting surrounding vehicles provided by an embodiment of the present application;

[0090] Figure 8 It is a flowchart of an embodiment of still yet another method for detecting surrounding vehicles provided by an embodiment of the present application;

[0091] Figure 9 It is a schematic diagram of the structure of a system for detecting surrounding vehicles provided by an embodiment of the present application;

[0092] Figure 10 It is a block diagram of an embodiment of a device for detecting surrounding vehicles provided by an embodiment of the present application;

[0093] Figure 11 It is a schematic diagram of the structure of a vehicle provided by an embodiment of the present application. Detailed implementation manners

[0094] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the following will, with reference to the accompanying drawings in some embodiments of this application, clearly and completely describe the technical solutions in some embodiments of this application. Obviously, the described embodiments are only a part rather than all of the embodiments of this application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in this application without creative efforts shall fall within the scope of protection of this application.

[0095] The following disclosure provides many different embodiments or examples for implementing different structures of this application. To simplify the disclosure of this application, components and settings of specific examples are described below. Of course, they are only examples and are not intended to limit this application. In addition, this application may repeat reference numerals and / or letters in different examples. Such repetition is for the purpose of simplification and clarity, and does not in itself indicate the relationship between the various embodiments and / or settings discussed.

[0096] To solve the technical problem that there is a difference between the image displayed by the reverse camera of a vehicle in the prior art and the actual field of view, and this visual difference may mislead the driver, especially novice drivers who are not familiar with the vehicle, thus increasing the operation difficulty, this application provides a method, device, electronic device, and storage medium for detecting surrounding vehicles. By collecting an image containing the license plates of surrounding vehicles, the relative position with the surrounding vehicles can be determined according to the coordinate information of the license plate in the image and the actual size information of the license plate. Since the coordinate information of the license plate in the image and the actual size information of the license plate can be accurately obtained, and the actual size information of the license plate is fixed and unchanged, and the coordinate information is determined by the relative position between the two vehicles, the relative position between the current vehicle and the surrounding vehicles can be accurately determined according to the coordinate information of the license plate in the image and the actual size information of the license plate, achieving a more accurate determination of the relative position between the current vehicle and the surrounding vehicles, thereby better assisting the driver in driving the vehicle and enhancing the user experience.

[0097] The following further explains the method for detecting surrounding vehicles provided by this application with specific embodiments in conjunction with the accompanying drawings. The embodiments do not constitute a limitation on the embodiments of this application.

[0098] Refer to Figure 1 , which is a flowchart of an embodiment of a method for detecting surrounding vehicles provided by an embodiment of this application. As Figure 1 shown, the process may include the following steps:

[0099] Step 101: Invoke an image acquisition module pre-installed on the vehicle body to acquire an image of at least one side direction of the vehicle.

[0100] The above image acquisition module refers to a module for acquiring images, which can be a camera or a camera, and the embodiments of the present application do not limit this.

[0101] In some embodiments of the present application, the execution subject of the embodiments of the present application can be a domain controller in a vehicle. An image acquisition module can be pre-installed around the vehicle body, and the image acquisition module can be used to acquire images in at least one side direction around the vehicle body.

[0102] As an optional implementation manner, the above image acquisition module can be installed at any position in the front, rear, and / or both sides of the vehicle body.

[0103] As an exemplary implementation manner, when an image acquisition module is installed in the front of the vehicle body, the image acquisition module can be a camera installed at the front license plate of the current vehicle, and it can acquire images in the front of the vehicle.

[0104] As another exemplary implementation manner, when an image acquisition module is installed in the rear of the vehicle body, the image acquisition module can be a camera installed at the rear license plate of the current vehicle, and it can acquire images in the rear of the vehicle.

[0105] As yet another exemplary implementation manner, when an image acquisition module is installed at any position on both sides of the vehicle body, the image acquisition module can be a camera installed on the door handle, and it can acquire images corresponding to the side where the image acquisition module is located.

[0106] Based on this, during the running of the vehicle, the execution subject of the embodiments of the present application can call the image acquisition module pre-installed on the vehicle body to acquire images in at least one side direction of the vehicle. Among them, each image acquisition module can acquire images corresponding to one side direction.

[0107] Step 102: When it is recognized that the image includes a license plate, determine the coordinate information of the license plate in the image.

[0108] Step 103: Obtain the actual size information of the license plate.

[0109] Step 104: Determine the relative position between the current license plate corresponding to the license plate according to the above coordinate information and actual size information.

[0110] The following is a unified description of steps 102 to 104:

[0111] The above license plate refers to the vehicle license plate installed on the vehicle body. When the vehicle is driving, corresponding license plates can be installed in the front and rear of the vehicle body to uniquely identify the vehicle.

[0112] The above coordinate information refers to the pixel position coordinates of the license plate in the image in the acquired image containing the license plate.

[0113] The above actual size information refers to the size of the license plate in reality, that is, the size information of the actual license plate, which may include the actual length and actual width of the license plate.

[0114] The above relative position refers to the relative position between the vehicle where the execution subject of the embodiment of the present application is located and the vehicle corresponding to the detected license plate around it, which may include but is not limited to: the relative distance, relative direction, the included angle between the two, and the tilt angle, etc.

[0115] In some embodiments of the present application, after the execution subject of the embodiment of the present application collects images in the direction of at least one side of the vehicle, the images can be recognized to determine whether one or more license plates are included in the images.

[0116] As an alternative implementation, the above collected images can be input into a pre-trained image recognition model to obtain the recognition result output by the image recognition model, and when the recognition result indicates that the license plate is included in the image, it is determined that the license plate is included in the image, where the license plate included in the image can be one or more, and the embodiments of the present application do not limit this.

[0117] Based on this, when it is recognized that the license plate is included in the image, the coordinate information of the license plate in the image can be determined. The coordinate information may include the vertex coordinates of at least two vertices included in the corresponding shape of the license plate, and the vertex coordinates may include the abscissa and ordinate of the vertex.

[0118] After that, the actual size information of the license plate can be obtained, and based on the above coordinate information and the time size information, the relative position between the current vehicle and the vehicle corresponding to the license plate can be determined. Among them, since the actual size information of the license plate is fixed and unchanged, while the size of the license plate represented by the coordinate information in the image changes correspondingly with the change of the relative position between the two vehicles, therefore, when the actual size information of the license plate and the coordinate information of the license plate in the image are determined, the conversion relationship between the two can be determined, and thus the relative position relationship between the two can be determined according to the conversion relationship.

[0119] The technical solution provided by the embodiment of the present application collects images of at least one side direction of the vehicle by calling an image acquisition module pre-installed on the vehicle. When it is recognized that the image includes a license plate, the coordinate information of the license plate in the image is determined, the actual size information of the license plate is obtained, and based on the above coordinate information and actual size information, the relative position between the current vehicle and the vehicle corresponding to the license plate is determined. In this technical solution, by collecting images containing the license plates of surrounding vehicles, the relative position with surrounding vehicles is determined according to the coordinate information of the license plate in the image and the actual size information of the license plate. Since the coordinate information of the license plate in the image and the actual size information of the license plate can be accurately obtained, and the actual size information of the license plate is fixed and unchanged, and the coordinate information is determined by the relative position between two vehicles, the relative position between the current vehicle and surrounding vehicles can be accurately determined according to the coordinate information of the license plate in the image and the actual size information of the license plate, realizing a more accurate determination of the relative position between the current vehicle and surrounding vehicles, thereby better assisting the driver in driving the vehicle and improving the user experience.

[0120] See Figure 2 , which is a flowchart of an embodiment of another method for detecting surrounding vehicles provided by the embodiment of the present application. Figure 2 The process shown in Figure 1 On the basis of the process shown in Figure 2 shows how to determine the relative position between the current vehicle and the vehicle corresponding to the license plate according to the coordinate information and actual size information. As shown in

[0121] Step 201: Determine the image size information of the license plate in the image according to the above coordinate information.

[0122] The above image size information refers to the size information of the license plate in the image, which may include the length, width, etc. of the license plate in the image.

[0123] In some embodiments of the present application, after the execution subject of the embodiment of the present application obtains the coordinate information of the license plate in the image, the image size information of the license plate in the image can be determined according to the coordinate information.

[0124] As an alternative implementation, the above coordinate information may include the vertex coordinates of at least two vertices of the license plate in the image. Based on this, when determining the image size information of the license plate in the image according to the coordinate information, the number of pixels occupied by any long side of the rectangle corresponding to the license plate in the image can be determined according to the vertex coordinates of at least two vertices.

[0125] As an exemplary embodiment, when the above at least two vertices are the two endpoints corresponding to any long side of the rectangle, the abscissas of the two vertex coordinates can be directly subtracted to obtain the number of pixels occupied by the long side in the image.

[0126] For example, refer to Figure 3 , which is a schematic diagram of an image containing a license plate provided by an embodiment of the present application. As Figure 3 shown, the image may include license plate 1 and license plate 2. Among them, license plate 1 may include the vertex coordinates P1(x1, y1) of the upper left corner in the rectangular frame corresponding to the license plate, and the vertex coordinates P2(x2, y2) of the upper right corner in the rectangular frame corresponding to the license plate. Then, the number of pixels occupied by the long side in the rectangular frame is x2 - x1.

[0127] As another exemplary implementation, in the case where the vertex coordinates include the coordinates of the two ends of the short side of the rectangular frame corresponding to the license plate, at this time, there may be situations such as occlusion of the license plate, resulting in the inability to obtain the coordinates of the two ends of the long side. The number of short side pixels occupied by the short side of the rectangular frame corresponding to the license plate in the image can be determined according to the two vertex coordinates.

[0128] After that, the ratio between the long side and the short side of the license plate can be determined according to the actual size information of the license plate.

[0129] Finally, the number of pixels occupied by any long side of the rectangular frame corresponding to the license plate in the image can be determined according to the above ratio and the number of short side pixels. Among them, the number of short side pixels can be multiplied by the above ratio to obtain the number of pixels occupied by any long side of the rectangular frame corresponding to the license plate in the image.

[0130] Based on the above content, after obtaining the number of pixels occupied by any long side of the rectangular frame corresponding to the license plate in the image, the pixel size corresponding to each pixel in the image can be obtained, and the length of the long side of the image corresponding to the long side can be obtained according to the above pixel number and pixel size.

[0131] Finally, the length of the long side of the image can be determined as the image size information of the license plate in the image.

[0132] Among them, since the license plate may be tilted forward or backward during installation, there is an error in the width of the license plate collected by the image, that is, the width of the license plate in the image does not correspond to the actual width of the license plate, and it is easy to generate errors. Therefore, in some embodiments of the present application, when determining the image size information, the length of the long side of any long side of the rectangular frame corresponding to the license plate is determined.

[0133] Step 202: Determine the distance between the current vehicle corresponding to the license plate and the license plate according to the above image size information and actual size information.

[0134] The above distance refers to the vertical distance between the vehicle corresponding to the license plate and the current vehicle where the execution entity of the embodiment of the present application is located, that is, the length corresponding to the perpendicular line between the two license plates.

[0135] In some embodiments of the present application, after obtaining the actual size information of the license plate and the image size information of the license plate in the captured image, since the actual size information of the license plate is fixed and unchangeable, while the image size information of the license plate can vary according to the distance, the execution entity of the embodiments of the present application can determine the current distance between the license plate and the vehicle corresponding to the license plate based on the image size information and the actual size information of the license plate.

[0136] As an alternative implementation, the actual long side length of the long side corresponding to the license plate can be determined according to the above actual size information. Then, according to the above image long side length and the actual long side length, the conversion ratio between the image size information and the actual size information of the license plate can be determined.

[0137] As an exemplary implementation, the ratio between the above actual long side length and the above image long side length can be determined as the conversion ratio between the image size information and the actual size information of the license plate.

[0138] Then, the module focal length when the image acquisition module captures the image can be obtained, and based on the above module focal length and the conversion ratio, the distance between the license plate and the image acquisition module can be determined, and this distance can be determined as the current distance between the vehicle corresponding to the license plate. The above module focal length refers to the focal length used for image acquisition in the image acquisition module, which can be a preset parameter in the image acquisition module.

[0139] For example, see Figure 4 , which is a schematic diagram of license plate conversion provided by the embodiments of the present application. As Figure 4 shown, license plate 41 is the actual license plate, and its license plate number is "Yu A·AXXXX", license plate 42 is the virtual license plate in the image. The actual long side length corresponding to the long side of license plate 41 is LPw, the number of pixels occupied by license plate 42 is Pn, and assuming the size of each pixel in the image is Ps, then the image long side length of this license plate 42 is Pn*Ps, and the conversion ratio between license plate 41 and license plate 42 is LPw / (Pn*Ps).

[0140] Continuing the assumption, the focal length when the image acquisition module captures the image is F1, then the distance D between the current vehicle and the vehicle corresponding to the license plate is LPw*F1 / (Pn*Ps).

[0141] Step 203: Determine the image position information of the license plate in the image according to the above coordinate information.

[0142] Step 204: Determine the relative direction and angle between the current vehicle and the vehicle corresponding to the license plate according to the above image position information.

[0143] The following is a unified description of step 203 and step 204:

[0144] The above image position information refers to the position of the license plate in the image.

[0145] The above relative direction refers to the direction between the license plate and the current vehicle where the execution subject of the embodiment of the present application is located.

[0146] The above included angle refers to the included angle formed between two vehicles in the above relative direction.

[0147] In some embodiments of the present application, in order to more clearly represent the position of the license plate in the image, the execution subject of the embodiment of the present application can characterize the position information of the license plate in the image through the coordinates of the center point of the long side of the license plate in the image. Based on this, the execution subject of the embodiment of the present application can determine the coordinates of the center point of the long side of the license plate in the long side center point of the image according to the coordinate information.

[0148] As an alternative implementation, the above coordinate information may include the vertex coordinates corresponding to both ends of any long side. Based on this, the midpoint coordinates corresponding to the midpoint of the long side can be determined as the long side center point coordinates. For example, if the two vertex coordinates are (x1, y1) and (x2, y1), and x2 is greater than x1, then the long side center point coordinates can be ((x2 - x1) / 2 + x1, y1).

[0149] Based on the above determined long side center point coordinates, the execution subject of the embodiment of the present application can determine the long side center point coordinates of the image, and determine the relative direction and included angle between the long side center point of the license plate and the long side center point of the image according to the above long side center point coordinates and the long side center point coordinates of the image.

[0150] Among them, the above long side center point coordinates of the image refer to the coordinates corresponding to the center point of the long side of the collected image. Since the image is the image collected by the current vehicle, the coordinates corresponding to the center point of the long side of the image can be used as the position of the current vehicle, and the long side center point coordinates can be used as the position where the vehicle corresponding to the license plate is currently located. By determining the included angle and relative direction between the long side center point coordinates of the image and the long side center point coordinates, the relative direction and included angle of the license plate relative to the current vehicle can be determined.

[0151] For example, continuing with Figure 3 the image shown as an example, assuming that the long side center point coordinates of the long side center point of license plate 1 are (x3, y3), and the long side center point of the long side of the image is (x4, 0). Continuing to assume Figure 3 the image shown is the image collected by the image acquisition module located at the front end of the license plate, and x3 is greater than x4. From the long side center point coordinates and the long side center point coordinates of the image, it can be known that the included angle between the two is α, and tanα = y3 / (x3 - x4). Then the relative direction of the vehicle corresponding to the license plate and the current vehicle can be determined as the right front oblique, and the included angle is α.

[0152] Step 205: Determine the relative position between the current vehicle and the vehicle corresponding to the license plate according to the above distance, the above relative direction, and the above included angle.

[0153] In some embodiments of the present application, based on the distance, the relative direction, and the included angle determined in the above steps, the execution subject of the embodiments of the present application can determine the relative position between the current vehicle and the vehicle corresponding to the license plate according to the above distance, the above relative direction, and the above included angle.

[0154] The technical solution provided by the embodiments of the present application determines the image size information of the license plate in the image according to the above coordinate information, determines the distance between the current vehicle and the vehicle corresponding to the license plate according to the above image size information and the actual size information, determines the image position information of the license plate in the image according to the above coordinate information, determines the relative direction and the included angle between the current vehicle and the vehicle corresponding to the license plate according to the above image position information, and determines the relative position between the current vehicle and the vehicle corresponding to the license plate according to the above distance, the above relative direction, and the above included angle. This technical solution determines the image size information and the actual size information of the license plate of the vehicle in the image after the license plate is collected. Since the actual size information of the license plate is fixed and unchanged, while the image size information of the license plate in the image changes correspondingly with the change of the relative position between the two vehicles, therefore, after determining the actual size information of the license plate and the image size information of the license plate in the image, the conversion relationship between the two can be determined, and thus the distance between the two can be determined according to the conversion relationship, and further the relative direction and the included angle between the vehicle corresponding to the license plate and the current vehicle can be determined according to the position information of the license plate in the image, so that the relative position between the current vehicle and the surrounding vehicles can be determined according to the distance, the relative direction, and the included angle of the two vehicles, realizing more accurately determining the relative position between the surrounding vehicles and the current vehicle.

[0155] See Figure 5 , which is a flowchart of an embodiment of another method for detecting surrounding vehicles provided by the embodiments of the present application. Figure 5 The process shown Figure 2 On the basis of the process shown, it describes that the relative position between the current vehicle and the vehicle corresponding to the license plate further includes the tilt angle of the vehicle corresponding to the license plate relative to the body of the current vehicle. As Figure 5 shown, the process may include:

[0156] Step 501: When it is determined that the rectangular frame corresponding to the license plate is not parallel to the border of the image, determine the border included angle between the rectangular frame and the border of the image according to the vertex coordinates of at least two vertices.

[0157] Step 502: Determine the above border included angle as the tilt angle of the vehicle corresponding to the license plate relative to the body.

[0158] The following is a unified description of Step 501 and Step 502:

[0159] In some embodiments of the present application, after determining the relative position relationship between the vehicle corresponding to the license plate and the current vehicle, it is also possible to determine whether the license plate is tilted, so as to determine the driving trajectory and attitude information of surrounding vehicles, thereby enabling the vehicle to perform emergency avoidance.

[0160] As an alternative implementation, it is possible to determine whether the rectangular frame corresponding to the license plate is parallel to the image border.

[0161] As an exemplary implementation, it is possible to check whether the ordinates of the two end vertices corresponding to the long side in the rectangular frame are the same. If they are the same, it indicates that the rectangular frame corresponding to the license plate is parallel to the image border at this time; if they are different, it indicates that the rectangular frame corresponding to the license plate is not parallel to the image border at this time.

[0162] Optionally, when it is determined that the rectangular frame corresponding to the license plate is not parallel to the image border, it indicates that the vehicle corresponding to the license plate may be changing lanes, turning, or running obliquely. At this time, according to the vertex coordinates of at least two vertices, the border corner between the rectangular frame and the border of the image can be determined, and this border angle can be determined as the tilt angle of the vehicle corresponding to the license plate relative to the vehicle body.

[0163] For example, refer to Figure 6 , which is a schematic diagram of another image containing a license plate provided by an embodiment of the present application. As Figure 6 shown, the license plate in this image can include two vertices: P1 and P2, where P1 is the upper left vertex of the license plate and P2 is the upper right vertex of the license plate.

[0164] Continuing the assumption, if the coordinates of P1 are (x1, y1) and the coordinates of P2 are (x2, y2), then the tilt angle of this license plate can be arctan((y2 - y1) / (x2 - x1)).

[0165] The technical solution provided by the embodiments of the present application, when it is determined that the rectangular frame corresponding to the license plate is not parallel to the border of the image, determines the border angle between the rectangular frame and the border of the image according to the vertex coordinates of at least two vertices, and determines the above border angle as the tilt angle of the vehicle corresponding to the license plate relative to the vehicle body. This technical solution determines the current tilt angle of the vehicle corresponding to the license plate by determining the tilt angle of the license plate in the image, so as to determine the driving trajectory and driving attitude of the vehicle corresponding to the license plate, and realizes accurately obtaining the driving state of the vehicle corresponding to the license plate to assist the driver in driving the vehicle safely and improve the user experience.

[0166] Refer to Figure 7 , which is a flowchart of an embodiment of another method for detecting surrounding vehicles provided by an embodiment of the present application. Figure 7 The process shown is in Figure 1Based on the shown process, it describes how to specifically determine the coordinate information of the license plate in the image. As Figure 7 shown, this process may include the following steps:

[0167] Step 701: Process the image using a preset image enhancement algorithm to obtain a target image.

[0168] The above image enhancement algorithm is used to enhance the quality of the image. It can be a Fourier transform method or an artificial intelligence algorithm. The embodiments of this application do not limit this.

[0169] In the embodiments of this application, in order to more accurately obtain the coordinate information of the license plate in the image, after the execution entity of the embodiments of this application collects an image containing the license plate, it can process the image through a preset image enhancement algorithm to remove the noise in the image and enhance the image quality.

[0170] Step 702: Process the above target image using a preset edge detection method to obtain the initial area of the license plate in the image.

[0171] Step 703: Perform a closing operation on the above initial area to obtain a rectangular frame corresponding to the license plate.

[0172] The following is a unified description of steps 702 and 703:

[0173] The above edge detection method is used to detect the contour of the license plate in the image, so that the area of the license plate in the image can be obtained more clearly. For example, extract the edge in the Y direction through the Sobel operator and use the adaptive binarization technology to highlight the license plate area.

[0174] The above closing operation is used to perform a closed-loop process on the detected contour of the license plate to form a complete rectangular frame.

[0175] In some embodiments of this application, after identifying the license plate in the image, in order to more accurately obtain the rectangular frame occupied by the license plate, the execution entity of the embodiments of this application can first process the above target image through an edge detection method to detect the contour of the license plate in the image, so as to obtain the initial area of the license plate in the image.

[0176] After that, in order to make the contour of the license plate form a complete closed loop in the image, the execution entity of the embodiments of this application can perform a closing operation on the initial area to obtain the rectangular frame corresponding to the license plate.

[0177] Step 704: Obtain the vertex coordinates of at least two vertices in the rectangular frame, and determine the above vertex coordinates as the coordinate information of the license plate in the image.

[0178] In some embodiments of the present application, after obtaining the rectangular frame corresponding to the license plate in the image, a coordinate system can be established in the image in terms of pixels, and the vertex coordinates of at least two vertices in the rectangular frame in the image can be determined, and the vertex coordinates can be determined as the coordinate information of the license plate in the image.

[0179] In addition, in some embodiments of the present application, in order to improve the accuracy of the rectangular frame, after the execution entity of the embodiment of the present application obtains the rectangular frame corresponding to the license plate, before obtaining the vertex coordinates of at least two vertices in the rectangular frame, the rectangular frame of the recognized license plate can be verified first.

[0180] As an alternative implementation, the color of the license plate in the image can be recognized to determine the type of the license plate. Then, since the corresponding size of each type of license plate is fixed, for example, the actual size of the yellow license plate is A*B, and the actual size of the green license plate is C*D, the execution entity of the embodiment of the present application can determine the aspect ratio of the length and width corresponding to the license plate according to the type of the license plate.

[0181] After that, the rectangular frame of the recognized license plate can be verified according to the above aspect ratio to determine whether the length and width of the rectangular frame meet the aspect ratio, and a verification result can be obtained.

[0182] Optionally, when the above verification result indicates that the rectangular frame meets the aspect ratio, it can be determined that the rectangular frame is the rectangular frame corresponding to the accurately recognized license plate, so the step of obtaining the vertex coordinates of at least two vertices in the rectangular frame can be executed.

[0183] Optionally, when the above verification result indicates that the rectangular frame does not meet the above aspect ratio, it means that there is an error in the currently recognized rectangular frame. Therefore, the current rectangular frame can be corrected according to the above aspect ratio, and after the correction, the step of obtaining the vertex coordinates of at least two vertices in the rectangular frame can be executed.

[0184] As another alternative implementation, since the ratio between the area of the characters in the license plate and the total area of the license plate is a preset fixed ratio, in order to ensure the accuracy of the rectangular frame, the characters of the license plate can be verified.

[0185] As an exemplary implementation, the height value and width value of the characters in the license plate can be determined, and the first ratio of each long side in the rectangular frame to the width value, and the second ratio of the first wide side to the height value can be determined. Here, the width value refers to the length corresponding to the area occupied by all the characters in the license plate.

[0186] After that, it can be determined whether the first ratio is the first preset ratio, and whether the second ratio is the second preset ratio.

[0187] Optionally, when it is determined that the first ratio is the first preset ratio and the second ratio is the second preset ratio, it can be determined that the rectangular frame is a relatively accurate rectangular frame corresponding to the license plate. At this time, the step of obtaining the vertex coordinates of at least two vertices in the rectangular frame can be executed.

[0188] Optionally, when it is determined that the first ratio is not the first preset ratio, or the second ratio is not the second preset ratio, or the first ratio is not the first preset ratio and the second ratio is not the second preset ratio, it indicates that the rectangular frame corresponding to the license plate obtained at this time may have errors due to reasons such as occlusion. Therefore, color recognition of the license plate can be performed to determine the license plate type of the license plate.

[0189] After that, the length-width ratio corresponding to the license plate can be determined according to the license plate type, and the rectangular frame can be corrected according to the above length-width ratio. After the correction, the step of obtaining the vertex coordinates of at least two vertices in the rectangular frame can be executed.

[0190] The technical solution provided by the embodiment of the present application processes the image by using a preset image enhancement algorithm to obtain a target image, processes the above target image by using a preset edge detection method to obtain an initial area of the license plate in the image, performs a closing operation on the above initial area to obtain a rectangular frame corresponding to the license plate, obtains the vertex coordinates of at least two vertices in the rectangular frame, and determines the above vertex coordinates as the coordinate information of the license plate in the image. This technical solution enhances the image quality through the image enhancement algorithm, identifies the contour area of the license plate in the image through the edge detection algorithm, and obtains the rectangular frame corresponding to the license plate through the closing operation, so as to obtain the vertex coordinates of the vertices in the rectangular frame. Combining multiple different processing technologies, it can more accurately obtain the coordinate information of the license plate in the image, and realizes accurately obtaining the coordinate information of the license plate in the image.

[0191] In some embodiments of the present application, since the actual sizes of different types of license plates are fixed, when obtaining the actual size information of the license plate, color recognition of the license plate can be performed to obtain the license plate type of the license plate, and according to the license plate type, the actual size information corresponding to the license plate type can be determined from the corresponding relationship between the preset license plate type and the actual size.

[0192] In some embodiments of the present application, in order to improve the quality of the collected image, the execution subject of the embodiment of the present application can also adjust the acquisition parameters of the image acquisition module according to the current environment.

[0193] As an alternative implementation, weather information and light intensity of the current weather can be obtained, and based on the weather information and light intensity, the acquisition parameters of the image acquisition module are adjusted. Among them, the acquisition parameters may include, but are not limited to: contrast and clarity. For example, at night or on a rainy day, the execution entity of the embodiment of the present application can enhance the contrast and clarity of the image to more accurately identify vehicle license plates and other key information.

[0194] See Figure 8 , which is a flowchart of an embodiment of another method for detecting surrounding vehicles provided by the embodiment of the present application. Figure 8 The process shown in Figure 1 On the basis of the process shown, it describes warning the driver according to the detected relative position between the current vehicle and surrounding vehicles. As Figure 8 shown, the process may include the following steps:

[0195] Step 801, output the acquired image and relative position through a preset visualization interface.

[0196] The above image refers to the acquired image containing the license plate.

[0197] The above relative position refers to the relative position relationship between the vehicle corresponding to the license plate contained in the image and the current vehicle.

[0198] In some embodiments of the present application, after determining the relative position between the current vehicle and surrounding vehicles, in order to assist the driver in understanding the situation, the image and the marked relative position can be output through the visualization interface.

[0199] In some embodiments of the present application, the execution entity of the embodiment of the present application can be based on Figure 9 The system shown detects the position relationship with surrounding vehicles. See Figure 9 , which is a schematic structural diagram of a system for detecting surrounding vehicles provided by the embodiment of the present application. As Figure 9 shown, the system may include a domain controller, a gear controller, a display, and a body camera.

[0200] Based on this, the execution entity of the embodiment of the present application can be the domain controller. The domain controller can call cameras at different positions by detecting the gear controller. For example, when it is detected that the gear controller is in the forward gear, the camera located at the front of the vehicle can be called to acquire an image of the front of the vehicle; when it is detected that the gear controller is in the reverse gear, the camera located at the rear of the vehicle can be called to acquire an image of the rear of the vehicle.

[0201] After that, after determining the relative position between the current vehicle and surrounding vehicles according to the acquired image, the image and the relative position can be output through the display so that the driver can timely understand the surrounding vehicle conditions.

[0202] Step 802: Input the above image and relative position into a preset warning model to obtain a warning result.

[0203] Step 803: According to the above warning result, output corresponding warning information according to a preset warning method.

[0204] The following is a unified description of Step 802 and Step 803:

[0205] The above warning model refers to a pre-trained model that determines whether a safety accident occurs between two vehicles based on the positional relationship between the two vehicles.

[0206] In some embodiments of the present application, in order to predict in a timely manner whether there is a safety hazard between the current vehicle and the vehicle corresponding to the license plate, the execution subject of the embodiment of the present application may input the above image and relative position into a preset warning model. The warning model can determine whether a collision is likely to occur between the two based on the above image and relative position, and output a warning result.

[0207] Based on this, the execution subject of the embodiment of the present application may output corresponding warning information according to the preset warning method based on the above warning result to prompt the user to change the driving state in a timely manner to prevent a collision with surrounding vehicles. Among them, the above warning method may be a voice warning, a symbol warning (such as a red exclamation mark), or a sound warning. The embodiment of the present application does not limit this.

[0208] The technical solution provided by the embodiment of the present application outputs the collected image and relative position by using a preset visualization interface, inputs the above image and relative position into a preset warning model to obtain a warning result, and outputs corresponding warning information according to the preset warning method based on the above warning result. This technical solution assists the driver in driving the vehicle by outputting the image and relative position, can predict in a timely manner whether it is easy to collide with surrounding vehicles through a pre-trained warning model, and gives a timely warning, realizing more accurate assistance for the driver to drive the vehicle and improving the safety of the driver driving the vehicle.

[0209] See Figure 10 , which is a block diagram of an embodiment of a detection device for surrounding vehicles provided by an embodiment of the present application. As Figure 10 shown, the device may include:

[0210] An acquisition module 1001, configured to call an image acquisition module pre-installed on the vehicle body to acquire images in at least one side direction of the vehicle;

[0211] A first determination module 1002, configured to determine the coordinate information of the license plate in the image when it is recognized that the image includes the license plate;

[0212] An acquisition module 1003, configured to acquire the actual size information of the license plate;

[0213] A second determination module 1004, configured to determine the relative position between the current vehicle and the vehicle corresponding to the license plate according to the coordinate information and the actual size information.

[0214] As Figure 11 shown, a schematic structural diagram of a vehicle provided by an embodiment of the present application includes a processor 1101, a communication interface 1102, a memory 1103, a communication bus 1104, and a vehicle body 1105. Among them, the processor 1101, the communication interface 1102, and the memory 1103 communicate with each other through the communication bus 1104.

[0215] The above-mentioned vehicle body 1105 is used to install at least one image acquisition module, such as a camera.

[0216] The memory 1103 is used to store a computer program;

[0217] In an embodiment of the present application, when the processor 1101 executes the program stored on the memory 1103, it implements the detection method of surrounding vehicles provided by any one of the foregoing method embodiments, including:

[0218] Invoking an image acquisition module pre-installed on the vehicle body to acquire images of at least one side direction of the vehicle;

[0219] When it is recognized that the license plate is included in the image, determining the coordinate information of the license plate in the image;

[0220] Acquiring the actual size information of the license plate;

[0221] Determining the relative position between the current vehicle and the vehicle corresponding to the license plate according to the coordinate information and the actual size information.

[0222] An embodiment of the present application also provides a storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the steps of the detection method of surrounding vehicles provided by any one of the foregoing method embodiments.

[0223] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0224] Through the text of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the essence of the above technical solution or the part that contributes to the related technology can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0225] It should be understood that the terms used in this text are only for the purpose of specific example embodiments of the text and are not intended to be restrictive. Unless the context clearly indicates otherwise, the singular forms "a", "an", and "the" as used in this text may also represent the plural form. The terms "include", "comprise", "contain", and "have" are inclusive and thus specify the presence of the stated features, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, steps, operations, elements, components, and / or their combinations. The method steps, processes, and operations in the text of this text are not to be construed as necessarily requiring them to be executed in the specific order stated in the text or description, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.

[0226] The above description is only the specific embodiments of the present application, enabling those skilled in the art to understand or implement the present application. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to these embodiments shown in this text, but rather to the broadest scope consistent with the principles and novel features claimed herein.

Claims

1. A method for detecting surrounding vehicles, characterized in that: The method comprises: Calling an image acquisition module pre-installed on the vehicle body to acquire images of at least one side of the vehicle; In the case where the image is identified to include a license plate, determining coordinate information of the license plate in the image; Obtaining actual size information of the license plate; The relative position between the current vehicle corresponding to the license plate is determined according to the coordinate information and the actual size information.

2. The method according to claim 1, characterized in that Determining the relative position of the current vehicle corresponding to the license plate according to the coordinate information and the actual size information includes: Determining image size information of the license plate in the image according to the coordinate information; Determine the current distance to the vehicle corresponding to the license plate according to the image size information and the actual size information; Determining image position information of the license plate in the image according to the coordinate information; Determine the relative direction and angle of the vehicle currently corresponding to the license plate according to the image position information; The relative position between the current vehicle and the vehicle corresponding to the license plate is determined according to the distance, the relative direction, and the angle.

3. The method according to claim 2, characterized in that The coordinate information includes vertex coordinates of at least two vertices of the license plate, and determining image size information of the license plate in the image according to the coordinate information includes: Determine the number of pixels occupied by any long side of the rectangular frame corresponding to the license plate in the image according to the vertex coordinates of at least two vertices; Obtaining a pixel size corresponding to each pixel in the image; Obtaining the length of the long side of the image corresponding to the long side according to the number of pixels and the pixel size; The length of the long side of the image is determined as the image size information of the license plate in the image.

4. The method according to claim 3, characterized in that Determining the number of pixels occupied by any long side of the rectangular frame corresponding to the license plate in the image according to the vertex coordinates of at least two vertices includes: In the case where the vertex coordinates include the coordinates of the vertices at both ends of the short side of the rectangular frame corresponding to the license plate, determining the number of short side pixels occupied by the short side of the rectangular frame corresponding to the license plate in the image according to the two vertex coordinates; Determining the ratio between the long side and the short side of the license plate according to the actual size information of the license plate; The number of pixels occupied by any long side of the rectangular frame corresponding to the license plate in the image is determined according to the ratio and the number of pixels of the short side.

5. The method according to claim 3, characterized in that: The determining, based on the image size information and the actual size information, the current distance to the vehicle corresponding to the license plate includes: Determining the actual length of the long side of the license plate corresponding to the long side according to the actual size information; Determining a conversion ratio between the image size information and the actual size information of the license plate according to the length of the long side of the image and the actual long side length; Obtaining a module focal length of the image acquisition module when acquiring the image; Determining the distance between the license plate and the image acquisition module according to the module focal length and the conversion ratio; The distance is determined as the current distance to the vehicle corresponding to the license plate.

6. The method according to claim 2, characterized in that Determining the image position information of the license plate in the image according to the coordinate information includes: Determine the coordinates of the center point of the long side of the license plate in the image according to the coordinate information; Determining the relative direction and angle of the vehicle currently corresponding to the license plate according to the image position information includes: Determine the coordinates of the center point of the long side of the image, where the coordinates of the center point of the long side of the image are the coordinates corresponding to the center point of the long side of the acquired image; According to the coordinates of the center point of the long side and the coordinates of the center point of the long side of the image, the relative direction and angle between the center point of the long side and the center point of the long side of the image are determined.

7. The method according to claim 2, characterized in that The coordinate information includes vertex coordinates of at least two vertices of the license plate, the relative position also includes an inclination angle of the vehicle corresponding to the license plate relative to the vehicle body, and the method further includes: In the case where it is determined that the rectangular frame corresponding to the license plate is not parallel to the frame of the image, determining a frame angle between the rectangular frame and the frame of the image according to the vertex coordinates of at least two vertices; The frame angle is determined as the tilt angle of the vehicle corresponding to the license plate relative to the vehicle body.

8. The method according to claim 1, characterized in that The image acquisition module is installed at any position in front of, behind, and / or on both sides of the vehicle body.

9. The method according to claim 1, characterized in that: The determining the coordinate information of the license plate in the image includes: Processing the image using a preset image enhancement algorithm to obtain a target image; Processing the target image by a preset edge detection method to obtain an initial area of ​​the license plate in the image; Performing a closing operation on the initial area to obtain a rectangular frame corresponding to the license plate; The vertex coordinates of at least two vertices in the rectangular frame are obtained, and the vertex coordinates are determined as the coordinate information of the license plate in the image.

10. The method according to claim 9, characterized in that After obtaining the rectangular frame corresponding to the license plate and before obtaining the vertex coordinates of at least two vertices in the rectangular frame, the method further includes: Performing color recognition on the license plate to determine the license plate type of the license plate; According to the license plate type, determining the length-to-width ratio corresponding to the license plate; Verify the rectangular frame according to the aspect ratio to obtain a verification result; When the verification result indicates that the rectangular frame satisfies the aspect ratio, performing the step of obtaining vertex coordinates of at least two vertices in the rectangular frame; When the verification result indicates that the rectangular frame does not satisfy the aspect ratio, the rectangular frame is corrected according to the aspect ratio, and after the correction, the step of obtaining vertex coordinates of at least two vertices in the rectangular frame is performed.

11. The method according to claim 9, characterized in that After obtaining the rectangular frame corresponding to the license plate and before obtaining the vertex coordinates of at least two vertices in the rectangular frame, the method further includes: Determine the height and width of the characters in the license plate; Determine a first ratio of each long side of the rectangular frame to the width value, and a second ratio of each wide side to the height value; When it is determined that the first ratio is a first preset ratio and the second ratio is a second preset ratio, the step of acquiring the vertex coordinates of at least two vertices in the rectangular frame is performed.

12. The method according to claim 11, characterized in that The method further comprises: When it is determined that the first ratio is not a first preset ratio and / or the second ratio is not a second preset ratio, performing color recognition on the license plate to determine the license plate type of the license plate; According to the license plate type, determining the length-to-width ratio corresponding to the license plate; The rectangular frame is corrected according to the aspect ratio, and after the correction, the step of obtaining the vertex coordinates of at least two vertices in the rectangular frame is performed.

13. The method according to claim 1, characterized in that The obtaining of the actual size information of the license plate includes: Performing color recognition on the license plate to obtain the license plate type of the license plate; According to the license plate type, actual size information corresponding to the license plate type is determined from a correspondence between a preset license plate type and an actual size.

14. The method according to claim 1, characterized in that The method further comprises: Get the current weather information and light intensity; The acquisition parameters of the image acquisition module are adjusted according to the weather information and the light intensity.

15. The method according to claim 1, characterized in that The method further comprises: Outputting the image and the relative position through a preset visual interface; Inputting the image and the relative position into a preset early warning model to obtain an early warning result; According to the warning result, the corresponding warning information is output according to the preset warning method.

16. A device for detecting surrounding vehicles, characterized in that: The device comprises: The acquisition module is used to call the image acquisition module pre-installed on the vehicle body to acquire images of at least one side of the vehicle; A first determination module is used to determine the coordinate information of the license plate in the image when it is recognized that the image includes a license plate; An acquisition module, used to acquire the actual size information of the license plate; The second determination module is used to determine the relative position between the current vehicle corresponding to the license plate according to the coordinate information and the actual size information.