Vehicle length determination method and device, terminal equipment and storage medium

By acquiring the vehicle side image and determining its horizontal maximum pixel length, combined with preset conversion parameters, the tedious and complex problem of vehicle length determination in the existing technology is solved, and simple and efficient vehicle length measurement is achieved.

CN119334254APending Publication Date: 2025-01-21VANJEE TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310885811.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-18
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

The method of determining the length of a vehicle in the prior art is complicated and complex, relies on the camera calibration process, and requires temporary closure.

Method used

By obtaining the side image of the vehicle to be processed, determining the horizontal maximum pixel length of its side, and using preset conversion parameters to convert the pixel length into the actual vehicle length, the vehicle length is determined.

Benefits of technology

Without the need for camera calibration, the vehicle length determination process is simplified, improving efficiency and convenience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119334254A_ABST
    Figure CN119334254A_ABST
Patent Text Reader

Abstract

The invention provides a vehicle length determination method and apparatus, a terminal device and a storage medium. The method comprises the steps of obtaining a side image of a to-be-processed vehicle; determining the horizontal maximum pixel length of the side surface of the to-be-processed vehicle according to the side surface image of the to-be-processed vehicle; the vehicle length of the to-be-processed vehicle is determined according to the horizontal maximum pixel length of the side face of the to-be-processed vehicle and preset conversion parameters, the preset conversion parameters are determined according to the side face images of the multiple reference vehicles and the standard vehicle lengths corresponding to the reference vehicles, and the vehicle types of the reference vehicles are the same. Therefore, the conversion relation between the pixel length in the image and the actual vehicle length is obtained by obtaining the preset conversion parameter, so that after the horizontal maximum pixel length of the side face of the to-be-processed vehicle is obtained, the vehicle length of the to-be-processed vehicle can be obtained in combination with the horizontal maximum pixel length and the preset conversion parameter; therefore, the vehicle length data of the vehicle can be determined without camera calibration, and the method is simple and effective.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of traffic technology, and in particular, relates to a vehicle length determination method, device, terminal equipment and storage medium. Background Art

[0002] Determining the length of a vehicle is very important in many scenarios. For example, in the ETC (Electronic Toll Collection) system, the toll of a vehicle is closely related to its model, and the model is related to the length of the vehicle. Therefore, determining the length of a passing vehicle is crucial for the transportation department to understand the operation of the highway.

[0003] In related technologies, the internal and external parameters can be obtained by installing a camera and calibrating the camera, and then the corresponding relationship between the pixels in the camera shooting area and the length of the vehicle can be obtained. Then the camera can be used to shoot the vehicle from the side, and the corresponding pixel data can be converted into the required vehicle length data. However, this method relies on the camera calibration process, and sometimes even requires temporary road closures, which is cumbersome and complicated. Summary of the invention

[0004] The embodiments of the present application provide a method, apparatus, terminal device and storage medium for determining vehicle length, which can solve the problem that the current method for determining vehicle length is cumbersome and complicated.

[0005] A first aspect of an embodiment of the present application provides a method for determining vehicle length, comprising: obtaining a side image of a vehicle to be processed, wherein the side image of the vehicle to be processed includes the complete body of the vehicle to be processed; determining the maximum horizontal pixel length of the side of the vehicle to be processed based on the side image of the vehicle to be processed; determining the vehicle length of the vehicle to be processed based on the maximum horizontal pixel length of the side of the vehicle to be processed and preset conversion parameters, wherein the preset conversion parameters are determined based on the side images of multiple reference vehicles and the standard vehicle lengths corresponding to the reference vehicles, and the vehicle types of the reference vehicles are the same.

[0006] In a possible implementation of the first aspect, determining the maximum horizontal pixel length of the side surface of the vehicle to be processed according to the side surface image of the vehicle to be processed includes:

[0007] Calling a preset image recognition model to recognize the side image of the vehicle to be processed and determine the boundary box of the vehicle to be processed;

[0008] According to the bounding box of the vehicle to be processed, the maximum horizontal pixel length of the side of the vehicle to be processed is determined.

[0009] Optionally, in another possible implementation of the first aspect, the length of the bounding box is in the horizontal direction, and the determining, based on the bounding box of the vehicle to be processed, the maximum horizontal pixel length of the side of the vehicle to be processed includes:

[0010] The pixel length corresponding to the length of the boundary box of the vehicle to be processed is determined as the horizontal maximum pixel length of the side of the vehicle to be processed.

[0011] Optionally, in yet another possible implementation of the first aspect, the side image of the vehicle to be processed is acquired by a shooting device, and the shooting device is disposed on the side of the road.

[0012] Optionally, in another possible implementation of the first aspect, before determining the vehicle length of the vehicle to be processed according to the horizontal maximum pixel length of the side of the vehicle to be processed and the preset conversion parameter, the method further includes:

[0013] Acquire a plurality of side images of reference vehicles, wherein each side image of the reference vehicle includes a complete body of the reference vehicle;

[0014] Determining the maximum horizontal pixel length of the plurality of reference vehicles based on the side images of the plurality of reference vehicles;

[0015] Determine a maximum frequency interval according to the maximum horizontal pixel length of each reference vehicle, wherein the maximum frequency interval refers to a pixel length interval with the largest number of maximum horizontal pixel lengths of each reference vehicle;

[0016] The preset conversion parameters are determined based on the maximum frequency range and the standard vehicle length.

[0017] Optionally, in another possible implementation of the first aspect, the acquiring of the side images of multiple reference vehicles includes:

[0018] Acquire multiple original images obtained by photographing the sides of multiple reference vehicles;

[0019] Filtering the plurality of original images to delete original images of reference vehicles without a complete vehicle body;

[0020] The filtered multiple original images are determined as the side images of multiple reference vehicles.

[0021] Optionally, in yet another possible implementation of the first aspect, determining the maximum frequency interval according to the horizontal maximum pixel length of each reference vehicle includes:

[0022] The pixel length range is equally divided into a plurality of pixel length intervals, wherein the pixel length range is from the minimum value to the maximum value of the horizontal maximum pixel length of each reference vehicle;

[0023] Determine the number of horizontal maximum pixel lengths in each pixel length interval;

[0024] The pixel length interval with the largest number of horizontal maximum pixel lengths is determined as the maximum frequency interval.

[0025] Optionally, in another possible implementation of the first aspect, determining the preset conversion parameter according to the maximum frequency interval and the standard vehicle length includes:

[0026] The ratio of the standard vehicle length to the median of the maximum frequency interval is determined as the preset conversion parameter.

[0027] Optionally, in another possible implementation of the first aspect, determining the vehicle length of the vehicle to be processed according to the horizontal maximum pixel length of the side of the vehicle to be processed and the preset conversion parameter includes:

[0028] The product of the horizontal maximum pixel length of the side of the vehicle to be processed and the preset conversion parameter is determined as the vehicle length of the vehicle to be processed.

[0029] A second aspect of an embodiment of the present application provides a vehicle length determination device, comprising:

[0030] An image acquisition module, used to acquire a side image of the vehicle to be processed, wherein the side image of the vehicle to be processed includes a complete body of the vehicle to be processed;

[0031] An image processing module, used for determining the maximum horizontal pixel length of the side of the vehicle to be processed according to the side image of the vehicle to be processed;

[0032] The length determination module is used to determine the vehicle length of the vehicle to be processed based on the horizontal maximum pixel length of the side of the vehicle to be processed and the preset conversion parameters, wherein the preset conversion parameters are determined based on the side images of multiple reference vehicles and the standard vehicle lengths corresponding to the reference vehicles, and the vehicle types of the reference vehicles are the same.

[0033] A third aspect of an embodiment of the present application provides a terminal device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the vehicle length determination method of the first aspect mentioned above is implemented when the processor executes the computer program.

[0034] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the vehicle length determination method of the first aspect described above is implemented.

[0035] A fifth aspect of an embodiment of the present application provides a computer program product. When the computer program product is run on a terminal device, the terminal device executes the vehicle length determination method of the first aspect described above.

[0036] Compared with the prior art, the embodiments of the present application have the following beneficial effects: by obtaining preset conversion parameters, the conversion relationship between the pixel length in the image and the actual vehicle length is obtained, so that after the horizontal maximum pixel length of the side of the vehicle to be processed is obtained, the horizontal maximum pixel length and the preset conversion parameters can be combined to obtain the vehicle length of the vehicle to be processed, thereby determining the vehicle length data without camera calibration, which is simple and effective. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0038] Figure 1 This is a schematic diagram of an application scenario of determining vehicle length by an ETC system provided in Embodiment 1 of the present application;

[0039] Figure 2 It is a flow chart of a method for determining vehicle length provided in Example 1 of the present application;

[0040] Figure 3 is a flow chart of another method for determining vehicle length provided in Embodiment 2 of the present application;

[0041] Figure 4 It is a structural schematic diagram of a vehicle length determination device provided in Embodiment 3 of the present application;

[0042] Figure 5 It is a structural diagram of a terminal device provided in Example 4 of the present application. DETAILED DESCRIPTION

[0043] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0044] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0045] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0046] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.

[0047] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0048] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0049] It should be understood that the size of the serial numbers of the steps in this embodiment does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.

[0050] In related technologies, the internal and external parameters can be obtained by installing a camera and calibrating the camera, and then the corresponding relationship between the pixels in the camera shooting area and the length of the vehicle can be obtained. Then the camera can be used to shoot the vehicle from the side, and the corresponding pixel data can be converted into the required vehicle length data. However, this method relies on the camera calibration process, and sometimes even requires temporary road closures, which is cumbersome and complicated.

[0051] In view of this, the embodiments of the present application provide a vehicle length determination method, apparatus, terminal device and storage medium, which obtains the conversion relationship between the pixel length in the image and the actual vehicle length by obtaining preset conversion parameters, so that after obtaining the horizontal maximum pixel length of the side of the vehicle to be processed, the vehicle length of the vehicle to be processed can be obtained by combining the horizontal maximum pixel length with the preset conversion parameters, thereby determining the vehicle length data of the vehicle without camera calibration, which is simple and effective.

[0052] The following is an example of an application scenario of the vehicle length determination method provided in the embodiment of the present application. The present application can be applied in the ETC system. Figure 1 , shows a schematic diagram of an application scenario of determining vehicle length by an ETC system provided in an embodiment of the present application, such as Figure 1 As shown, the ETC system includes an ETC gantry 110 and a camera 120 mounted on the ETC gantry 110. The camera 120 is used to photograph a vehicle 130 from the side to obtain a side image of the vehicle. The camera 120 is connected to a control calculation unit 140 via a data transmission line or wireless communication. The control calculation unit 140 is used to execute the vehicle length determination method provided in an embodiment of the present application according to the side image of the vehicle acquired by the camera 120, thereby obtaining the vehicle length of the vehicle 130, and then determining the toll of the vehicle 130 according to the vehicle length.

[0053] In order to illustrate the technical solution of the present application, specific embodiments are provided below.

[0054] Reference Figure 2 , shows a flow chart of a method for determining vehicle length provided in Embodiment 1 of the present application. Figure 2 As shown, the vehicle length determination method may include the following steps:

[0055] Step 201, obtaining a side image of a vehicle to be processed.

[0056] It should be noted that the vehicle type to be processed may refer to a car, a van, a truck, etc. For example, according to the vehicle type, the car may be a sedan model, an off-road model, a sport utility vehicle (SUV), a multi-purpose vehicle (MPV) or other models. The sedan model can also be subdivided into compact cars, mid-sized cars, mid-to-large cars, large cars, etc., and this application does not impose any restrictions on this.

[0057] In an embodiment of the present application, the side image of the vehicle to be processed can be obtained by a shooting device, which is set on the side of the road and is used to capture passing vehicles. Among them, the shooting device can be an electronic device with a photo shooting function, and the shooting device can include a digital camera (such as a professional SLR camera, a mirrorless camera, a digital point-and-shoot camera, etc.), a video camera (such as a digital video camera, an action camera, etc.), a webcam, a smart phone, a tablet computer, a special camera (drone camera, sports camera), etc. The specific type of the shooting device can be selected in combination with the actual application scenario and needs, and the embodiment of the present application does not limit this.

[0058] It should be noted that the shooting area of ​​the shooting device needs to be able to accommodate the complete body of the vehicle to be processed so that it can be used for the subsequent determination of the vehicle length, that is, the side image of the vehicle to be processed includes the complete body of the vehicle to be processed.

[0059] In one possible implementation, in order to determine the side image of the vehicle to be processed, the vehicle to be processed can be continuously captured by using a photographing device when the vehicle to be processed is about to enter the photographing area of ​​the photographing device until the vehicle to be processed drives out of the photographing area, and then the side image of the complete body of the vehicle to be processed can be determined from the multiple original images of the side of the vehicle to be processed.

[0060] Step 202: Determine the maximum horizontal pixel length of the side surface of the vehicle to be processed based on the side surface image of the vehicle to be processed.

[0061] Among them, computer vision and deep learning technology can be used to identify the vehicle to be processed in the image, and then the maximum horizontal pixel length of the side of the vehicle to be processed can be determined through the image recognition result. Specifically, a preset image recognition model can be first called to recognize the side image of the vehicle to be processed, determine the bounding box of the vehicle to be processed, and then determine the maximum horizontal pixel length of the side of the vehicle to be processed based on the bounding box of the vehicle to be processed.

[0062] In a possible implementation, the above-mentioned preset image recognition model can be trained in the following manner: first, a vehicle image dataset of a large number of vehicles is obtained, and the vehicle image dataset is annotated to mark the position and bounding box of the vehicle. Then, a deep learning model suitable for the vehicle recognition task is selected, such as Convolutional Neural Networks (CNN), and the selected deep learning model is iteratively trained using the annotated vehicle image dataset to allow the deep learning model to learn to recognize the features and bounding boxes of the vehicle, wherein the loss can be calculated and the model parameters can be updated through an optimization algorithm (such as gradient descent). In addition, the validation dataset can be used to evaluate the accuracy, recall rate and other indicators of the deep learning model, and necessary adjustments and improvements can be made to finally generate the above-mentioned preset image recognition model.

[0063] It should be noted that in order to facilitate the determination of the maximum horizontal pixel length of the side of the vehicle to be processed, the bounding box output by the preset image recognition model can be fixed to be parallel to the horizontal plane, that is, the length of the bounding box is in the horizontal direction. In this way, after obtaining the side image of the vehicle to be processed, the pixel length corresponding to the length of the bounding box of the vehicle to be processed can be directly determined as the maximum horizontal pixel length of the side of the vehicle to be processed.

[0064] Step 203, determining the vehicle length of the vehicle to be processed according to the maximum horizontal pixel length of the side of the vehicle to be processed and the preset conversion parameters.

[0065] In an embodiment of the present application, the preset conversion parameters are determined based on the side images of multiple reference vehicles and the standard vehicle lengths corresponding to the reference vehicles, and the vehicle types of the reference vehicles are the same.

[0066] The side image of each reference vehicle is obtained in the same manner as the side image of the vehicle to be processed, which can be found in the detailed description in step 201 and will not be repeated here.

[0067] Among them, the standard vehicle length, that is, the most concentrated value of the length corresponding to the vehicle type of the reference vehicle, is determined according to the vehicle type of the reference vehicle. Taking the vehicle type of the reference vehicle as a sedan as an example, the sedan-type vehicle with the highest proportion is the compact A-class vehicle, and the vehicle length of the compact A-class vehicle is about 4.7m. Therefore, the standard vehicle length of the reference vehicle can be determined as 4.7m.

[0068] It should be noted that, through the side images of multiple reference vehicles, the most concentrated value of the horizontal maximum pixel length of the vehicle type of the reference vehicle can be obtained by using statistical laws, and then the most concentrated value of the horizontal maximum pixel length is matched with the standard vehicle length, so that the preset conversion parameter can be obtained, and the preset conversion parameter is used to represent the conversion relationship between the horizontal maximum pixel length of the side of the vehicle to be processed and the real vehicle length. For example, the vehicle type of the reference vehicle is a sedan, the most concentrated value of the horizontal maximum pixel length of multiple reference vehicles is 100, and the standard vehicle length is 4.7m, then the preset conversion parameter can be determined to be 4.7 / 100=0.047. At this time, assuming that the horizontal maximum pixel length of the side of the vehicle to be processed is 200, then the product of the horizontal maximum pixel length 200 of the side of the vehicle to be processed and the preset conversion parameter 0.047, 9.4m, can be further determined as the vehicle length of the vehicle to be processed.

[0069] Preferably, in order to facilitate statistics and improve the universality of the preset conversion parameters, the reference vehicle can be a type of vehicle with a large number and a small variation in vehicle length, such as a sedan. The length of a sedan is distributed between 4m and 5.3m, and the length of a compact A-class vehicle, which accounts for the largest proportion of sedans, is about 4.7m, and the length of a sedan varies little. However, if the reference vehicle is a large truck, the length of a large truck may be distributed between 6m and 20m, and the length varies too much. If it is necessary to obtain a more universal preset conversion parameter through a large truck, it is necessary to obtain a large number of side images for statistics, which is more troublesome. Therefore, for the same number of side images, compared with a large truck, the preset conversion parameters obtained through a sedan are more accurate and more universal.

[0070] It should be noted that the number of side images of the reference vehicle cannot be too small, otherwise the preset conversion parameters finally calculated will not be representative, resulting in a large error between the vehicle length finally calculated and the actual length of the vehicle to be processed.

[0071] The vehicle length determination method disclosed in the above embodiment of the present application first obtains the side image of the vehicle to be processed, and then determines the horizontal maximum pixel length of the side of the vehicle to be processed based on the side image of the vehicle to be processed, and then determines the vehicle length of the vehicle to be processed based on the horizontal maximum pixel length of the side of the vehicle to be processed and the preset conversion parameters. Thus, by obtaining the preset conversion parameters, the conversion relationship between the pixel length in the image and the actual vehicle length is obtained, so that after the horizontal maximum pixel length of the side of the vehicle to be processed is obtained, the vehicle length of the vehicle to be processed can be obtained by combining the horizontal maximum pixel length with the preset conversion parameters, thereby determining the vehicle length data of the vehicle without camera calibration, which is simple and effective.

[0072] In a possible implementation of the present application, in order to accurately obtain the preset conversion parameters, the pixel length range corresponding to the reference vehicle can be divided, and the maximum frequency interval can be statistically obtained. Then, the maximum frequency interval can be matched with the standard vehicle length to obtain the preset conversion parameters.

[0073] See also Figure 3 , shows a flow chart of a vehicle length determination method provided in Embodiment 2 of the present application. Figure 2 As shown, the vehicle length determination method may include the following steps:

[0074] Step 301, obtaining a side image of a vehicle to be processed.

[0075] The side image of the vehicle to be processed includes the complete body of the vehicle to be processed.

[0076] Step 302: Determine the maximum horizontal pixel length of the side surface of the vehicle to be processed according to the side surface image of the vehicle to be processed.

[0077] The specific implementation process and principle of the above steps 301-302 can refer to the detailed description of the above embodiment, which will not be repeated here.

[0078] Step 303: Acquire side images of multiple reference vehicles.

[0079] The side image of each reference vehicle includes a complete body of the reference vehicle.

[0080] As a possible implementation method, a shooting device can be used to capture each vehicle traveling on the road to obtain a cross-sectional image stream. The cross-sectional image stream is usually a continuous image stream composed of a series of cross-sectional images. The cross-sectional image is obtained by shooting or scanning a virtual plane (i.e., cross section) of the photographed object or body, and then each cross section is converted into an image. By organizing a continuous sequence of cross-sectional images into an image stream, an experience that looks like a video can be achieved. Then, a preset image recognition model can be used to identify the vehicle in each original image in the cross-sectional image stream, wherein the specific process of identifying the vehicle in each original image using the preset image recognition model is the same as the process of identifying the vehicle to be processed, and the content of step 202 in the aforementioned embodiment can be referred to, which will not be repeated here. Then, the original image containing the reference vehicle is screened out, that is, multiple original images obtained by shooting the side of multiple reference vehicles are obtained, and the multiple original images are filtered to delete the original images of the reference vehicle without a complete body, and finally the filtered multiple original images are determined as the side images of multiple reference vehicles.

[0081] Step 304 : determining the maximum horizontal pixel length of the multiple reference vehicles based on the side images of the multiple reference vehicles.

[0082] It should be noted that the specific process of step 304 is the same as the process of determining the maximum horizontal pixel length of the side of the vehicle to be processed based on the side image of the vehicle to be processed. Please refer to the content of step 202 in the above embodiment, which will not be repeated here.

[0083] Step 305: Determine the maximum frequency interval according to the maximum horizontal pixel length of each reference vehicle.

[0084] The maximum frequency interval refers to the pixel length interval with the largest number of maximum horizontal pixel lengths for each reference vehicle.

[0085] Specifically, the maximum frequency interval can be determined by dividing the pixel length range of each reference vehicle into intervals and then counting the number of horizontal maximum pixel lengths in each interval in detail. That is, in a possible implementation of the embodiment of the present application, the above step 305 may include:

[0086] The pixel length range is equally divided into a plurality of pixel length intervals, wherein the pixel length range is from the minimum value to the maximum value of the horizontal maximum pixel length of each reference vehicle;

[0087] Determine the number of horizontal maximum pixel lengths in each pixel length interval;

[0088] The pixel length interval with the largest number of horizontal maximum pixel lengths is determined as the maximum frequency interval.

[0089] For example, assume that the maximum horizontal pixel length of each reference vehicle obtained in step 304 is recorded as a pixel length set {CarLengthPix1, CarLengthPix2, ..., CarLengthPixM}, where M refers to the number of side images of the reference vehicle. Then the minimum value in the pixel length set is determined as CarLengthMin, the maximum value is determined as CarLengthMax, and then a fixed value chanel = (CarLengthMax-CarLengthMin) / n is set, and the pixel length range is divided into n pixel length intervals using the fixed value, namely: [CarLengthMin, CarLengthMin+chanel), [CarLengthMin+chanel, CarLengthMin+2*chanel), ..., [CarLengthMin+(n-1)*chanel, CarLengthMax].

[0090] Among them, the value of n needs to be determined in combination with the actual application scenario, the number of side images of the reference vehicle, and the accuracy. It should be noted that if the number of n is set to be large and the number of side images is insufficient, it is easy for the maximum horizontal pixel length in each pixel length interval to be too small, thereby reducing the accuracy of the preset conversion parameters determined subsequently.

[0091] Finally, the frequency of each horizontal maximum pixel length in the pixel length set falling into each pixel length interval is counted, and the pixel length interval with the highest frequency is determined as the maximum frequency interval.

[0092] Step 306, determining preset conversion parameters according to the maximum frequency interval and the standard vehicle length.

[0093] Specifically, since the median of an interval is usually used to describe the central trend of the data in the interval and reflects the typical value of the interval, the specific value of the preset conversion parameter can be determined by matching the median of the maximum frequency interval with the standard vehicle length, that is, the ratio of the standard vehicle length to the median of the maximum frequency interval is determined as the preset conversion parameter.

[0094] For example, assuming that each pixel length interval obtained through step 305 is recorded as N1, N2, ... Nn in sequence, and assuming that the pixel length interval with the largest frequency is recorded as Nm, that is, the mth pixel length interval, then the median of the pixel length interval, that is, the mean of the pixel length interval MeanRuler = CarLengthMin + m*chanel-chanel / 2, and the median of the pixel length interval is made to correspond to the standard vehicle length, and the preset conversion parameters can be obtained.

[0095] Assuming that the minimum value CarLengthMin in the pixel length set is 40, the maximum value is 50, and the fixed value n is 5, the pixel length interval can be divided into 5 pixel length intervals: [40,42), [42,44), [44,46), [46,48), and [48,50]. The fixed value chanel = (50-40) / 5 = 2. Assuming that the frequency of the fourth pixel length interval is the largest, that is, m = 4, the median of the maximum frequency interval [46,48) is 40+4*2-2 / 2 = 47.

[0096] Step 307 , determining the vehicle length of the vehicle to be processed according to the maximum horizontal pixel length of the side of the vehicle to be processed and the preset conversion parameters.

[0097] The preset conversion parameters are determined based on the side images of multiple reference vehicles and the standard vehicle lengths corresponding to the reference vehicles, and the vehicle types of the reference vehicles are the same.

[0098] The specific implementation process and principle of the above step 307 can be referred to the detailed description of the above embodiment, which will not be repeated here.

[0099] The vehicle length determination method disclosed in the above embodiment of the present application first obtains the horizontal maximum pixel length of the side of the vehicle to be processed, and then obtains the maximum frequency interval based on the side images of multiple reference vehicles, thereby determining the preset conversion parameters based on the maximum frequency interval and the standard vehicle length, and then determining the vehicle length of the vehicle to be processed based on the horizontal maximum pixel length of the side of the vehicle to be processed and the preset conversion parameters. Therefore, by dividing the corresponding pixel length range of the reference vehicle and obtaining the maximum frequency interval by statistics, the preset conversion parameters can be obtained by matching the maximum frequency interval with the standard vehicle length.

[0100] See also Figure 4 , shows a schematic diagram of the structure of a vehicle length determination device provided in Example 3 of the present application. For the sake of convenience of explanation, only the parts related to the example of the present application are shown.

[0101] The vehicle length determination device may specifically include the following modules:

[0102] The image acquisition module 401 is used to acquire a side image of the vehicle to be processed, wherein the side image of the vehicle to be processed includes a complete body of the vehicle to be processed.

[0103] The image processing module 402 is used to determine the maximum horizontal pixel length of the side surface of the vehicle to be processed according to the side surface image of the vehicle to be processed.

[0104] The length determination module 403 is used to determine the vehicle length of the vehicle to be processed based on the maximum horizontal pixel length of the side of the vehicle to be processed and the preset conversion parameters, wherein the preset conversion parameters are determined based on the side images of multiple reference vehicles and the standard vehicle lengths corresponding to the reference vehicles, and the vehicle types of the reference vehicles are the same.

[0105] The vehicle length determination device disclosed in the above embodiment of the present application first obtains the side image of the vehicle to be processed, and then determines the horizontal maximum pixel length of the side of the vehicle to be processed based on the side image of the vehicle to be processed, and then determines the vehicle length of the vehicle to be processed based on the horizontal maximum pixel length of the side of the vehicle to be processed and the preset conversion parameters. Thus, by obtaining the preset conversion parameters, the conversion relationship between the pixel length in the image and the actual vehicle length is obtained, so that after the horizontal maximum pixel length of the side of the vehicle to be processed is obtained, the vehicle length of the vehicle to be processed can be obtained by combining the horizontal maximum pixel length with the preset conversion parameters, thereby determining the vehicle length data of the vehicle without camera calibration, which is simple and effective.

[0106] In a possible implementation of the third embodiment of the present application, the image processing module 402 may specifically include the following submodules:

[0107] The model calling submodule is used to call the preset image recognition model to recognize the side image of the vehicle to be processed and determine the boundary box of the vehicle to be processed.

[0108] The first determination submodule is used to determine the maximum horizontal pixel length of the side of the vehicle to be processed according to the boundary box of the vehicle to be processed.

[0109] Further, in another possible implementation of the third embodiment of the present application, the length of the boundary box is in the horizontal direction, and the first determining submodule may specifically include the following units:

[0110] The first determining unit is used to determine the pixel length corresponding to the length of the boundary box of the to-be-processed vehicle as the horizontal maximum pixel length of the side surface of the to-be-processed vehicle.

[0111] Furthermore, in another possible implementation of the third embodiment of the present application, the side image of the vehicle to be processed is acquired by a photographing device, and the photographing device is arranged on the side of the road.

[0112] Furthermore, in another possible implementation of the third embodiment of the present application, the vehicle length determination device may further include the following modules:

[0113] The first acquisition module is used to acquire side images of multiple reference vehicles, wherein the side image of each reference vehicle includes a complete body of the reference vehicle.

[0114] The first determination module is used to determine the maximum horizontal pixel length of multiple reference vehicles based on the side images of multiple reference vehicles.

[0115] The second determination module is used to determine the maximum frequency interval according to the horizontal maximum pixel length of each reference vehicle, wherein the maximum frequency interval refers to the pixel length interval with the largest number of horizontal maximum pixel lengths of each reference vehicle.

[0116] The third determination module is used to determine the preset conversion parameters according to the maximum frequency interval and the standard vehicle length.

[0117] Furthermore, in another possible implementation of the third embodiment of the present application, the first acquisition module may specifically include the following submodules:

[0118] The first acquisition submodule is used to acquire a plurality of original images obtained by photographing the side surfaces of a plurality of reference vehicles.

[0119] The image filtering submodule is used to filter the multiple original images to delete the original images of the reference vehicle without a complete body.

[0120] The second determination submodule is used to determine the filtered multiple original images as multiple reference vehicle side images.

[0121] Furthermore, in another possible implementation of the third embodiment of the present application, the second determining module may specifically include the following submodules:

[0122] The interval division submodule is used to equally divide the pixel length range into a plurality of pixel length intervals, wherein the pixel length range is from the minimum value to the maximum value of the horizontal maximum pixel length of each reference vehicle.

[0123] The third determination submodule is used to determine the number of maximum horizontal pixel lengths in each pixel length interval.

[0124] The fourth determination submodule is used to determine the pixel length interval with the largest number of horizontal maximum pixel lengths as the maximum frequency interval.

[0125] Furthermore, in another possible implementation of the third embodiment of the present application, the third determining module may specifically include the following submodules:

[0126] The fifth determination submodule is used to determine the ratio of the standard vehicle length to the median of the maximum frequency interval as a preset conversion parameter.

[0127] Furthermore, in another possible implementation of the third embodiment of the present application, the length determination module 403 may specifically include the following submodules:

[0128] The sixth determination submodule is used to determine the product of the horizontal maximum pixel length of the side of the vehicle to be processed and the preset conversion parameter as the vehicle length of the vehicle to be processed.

[0129] The vehicle length determination device disclosed in the above embodiment of the present application first obtains the horizontal maximum pixel length of the side of the vehicle to be processed, and then obtains the maximum frequency interval based on the side images of multiple reference vehicles, thereby determining the preset conversion parameters based on the maximum frequency interval and the standard vehicle length, and then determining the vehicle length of the vehicle to be processed based on the horizontal maximum pixel length of the side of the vehicle to be processed and the preset conversion parameters. Therefore, by dividing the corresponding pixel length range of the reference vehicle and obtaining the maximum frequency interval by statistics, the preset conversion parameters can be obtained by matching the maximum frequency interval with the standard vehicle length.

[0130] The vehicle length determination device provided in the embodiment of the present application can be applied in the aforementioned method embodiment. For details, please refer to the description of the aforementioned method embodiment, which will not be repeated here.

[0131] Figure 5Schematic diagram of the structure of the terminal device provided in the fourth embodiment of the present application. Figure 5 As shown, the terminal device 500 of this embodiment includes: at least one processor 510 ( Figure 5 (only one is shown in the figure) a processor, a memory 520, and a computer program 521 stored in the memory 520 and executable on at least one processor 510, and when the processor 510 executes the computer program 521, the steps in the above-mentioned vehicle length determination method embodiment are implemented.

[0132] The terminal device 500 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The terminal device may include, but is not limited to, a processor 510 and a memory 520. Those skilled in the art will appreciate that Figure 5 It is only an example of the terminal device 500 and does not constitute a limitation on the terminal device 500. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components, for example, it may also include input and output devices, network access devices, etc.

[0133] The processor 510 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0134] The memory 520 may be an internal storage unit of the terminal device 500 in some embodiments, such as a hard disk or memory of the terminal device 500. The memory 520 may also be an external storage device of the terminal device 500 in other embodiments, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the terminal device 500. Further, the memory 520 may also include both an internal storage unit of the terminal device 500 and an external storage device. The memory 520 is used to store an operating system, an application program, a boot loader (Boot Loader), data, and other programs, such as program codes of a computer program, etc. The memory 520 may also be used to temporarily store data that has been output or is to be output.

[0135] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0136] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0137] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0138] In the embodiments provided in the present application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0139] 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 distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0140] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0141] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electric carrier signals and telecommunication signals.

[0142] The present application implements all or part of the processes in the above-mentioned embodiment method, and may also be completed through a computer program product. When the computer program product runs on a terminal device, the terminal device can implement the steps in the above-mentioned method embodiments when executing the computer program product.

[0143] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application is described in detail with reference to the above embodiments, a person skilled in the art should understand that the technical solutions described in the above embodiments can still be modified, or some of the technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.

Claims

1. A method for determining vehicle length, characterized in that: include: Acquire a side image of the vehicle to be processed, wherein the side image of the vehicle to be processed includes a complete body of the vehicle to be processed; Determining the maximum horizontal pixel length of the side of the vehicle to be processed according to the side image of the vehicle to be processed; The vehicle length of the vehicle to be processed is determined based on the maximum horizontal pixel length of the side of the vehicle to be processed and the preset conversion parameters, wherein the preset conversion parameters are determined based on the side images of multiple reference vehicles and the standard vehicle lengths corresponding to the reference vehicles, and the vehicle types of the reference vehicles are the same.

2. The vehicle length determination method according to claim 1, characterized in that: The step of determining the maximum horizontal pixel length of the side surface of the vehicle to be processed according to the side surface image of the vehicle to be processed comprises: Calling a preset image recognition model to recognize the side image of the vehicle to be processed, and determining a boundary box of the vehicle to be processed; The maximum horizontal pixel length of the side surface of the vehicle to be processed is determined according to the boundary box of the vehicle to be processed.

3. The vehicle length determination method according to claim 2, characterized in that: The length of the bounding box is in the horizontal direction, and determining the maximum horizontal pixel length of the side of the vehicle to be processed according to the bounding box of the vehicle to be processed includes: The pixel length corresponding to the length of the boundary box of the to-be-processed vehicle is determined as the horizontal maximum pixel length of the side surface of the to-be-processed vehicle.

4. The vehicle length determination method according to claim 1, characterized in that: The side image of the vehicle to be processed is acquired by a photographing device, and the photographing device is arranged on the side of the road.

5. The vehicle length determination method according to claim 1, characterized in that: Before determining the vehicle length of the vehicle to be processed according to the horizontal maximum pixel length of the side of the vehicle to be processed and the preset conversion parameter, the method further includes: Acquire a plurality of side images of the reference vehicles, wherein each side image of the reference vehicle includes a complete body of the reference vehicle; Determining the maximum horizontal pixel length of the plurality of reference vehicles according to the side images of the plurality of reference vehicles; Determine a maximum frequency interval according to the maximum horizontal pixel length of each of the reference vehicles, wherein the maximum frequency interval refers to a pixel length interval having the largest number of the maximum horizontal pixel lengths of each of the reference vehicles; The preset conversion parameter is determined according to the maximum frequency interval and the standard vehicle length.

6. The vehicle length determination method according to claim 5, characterized in that: The acquiring of the side images of the plurality of reference vehicles comprises: Acquire a plurality of original images obtained by photographing the sides of a plurality of reference vehicles; Filtering the plurality of original images to delete the original image of the reference vehicle without a complete vehicle body; The multiple filtered original images are determined as multiple side images of the reference vehicle.

7. The vehicle length determination method according to claim 5, characterized in that: The determining of the maximum frequency interval according to the maximum horizontal pixel length of each reference vehicle includes: Divide the pixel length range into a plurality of pixel length intervals, wherein the pixel length range is from the minimum value to the maximum value of the horizontal maximum pixel length of each of the reference vehicles; Determining the number of the horizontal maximum pixel lengths in each of the pixel length intervals; The pixel length interval having the largest number of horizontal maximum pixel lengths is determined as the maximum frequency interval.

8. The vehicle length determination method according to claim 5, characterized in that: The step of determining the preset conversion parameter according to the maximum frequency interval and the standard vehicle length includes: The ratio of the standard vehicle length to the median of the maximum frequency interval is determined as the preset conversion parameter.

9. The vehicle length determination method according to claim 8, characterized in that: The determining the vehicle length of the vehicle to be processed according to the horizontal maximum pixel length of the side of the vehicle to be processed and the preset conversion parameter comprises: The product of the horizontal maximum pixel length of the side of the vehicle to be processed and the preset conversion parameter is determined as the vehicle length of the vehicle to be processed.

10. A vehicle length determination device, characterized in that: include: An image acquisition module, used to acquire a side image of the vehicle to be processed, wherein the side image of the vehicle to be processed includes a complete body of the vehicle to be processed; An image processing module, used for determining the maximum horizontal pixel length of the side surface of the vehicle to be processed according to the side surface image of the vehicle to be processed; A length determination module is used to determine the vehicle length of the vehicle to be processed based on the horizontal maximum pixel length of the side of the vehicle to be processed and a preset conversion parameter, wherein the preset conversion parameter is determined based on the side images of multiple reference vehicles and the standard vehicle lengths corresponding to the reference vehicles, and the vehicle type of each of the reference vehicles is the same.

11. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 9 is implemented.

12. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.