Method and device for detecting height of vehicle, terminal equipment and storage medium

Acquisition of vehicle photos through the camera and using the image coordinates of fixed reference objects and the image coordinates of the vehicle to establish an evaluation model, solving the problems of high cost, low efficiency and poor robustness in the prior art detection of vehicles, and achieving rapid and accurate judgment Can a vehicle pass the method of limiting the height section?

CN119228886APending Publication Date: 2024-12-31GUIZHOU QIANTONGZHILIAN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410616684.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-17
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

The prior art has high cost, low efficiency and poor robustness when detecting the height of a vehicle, making it difficult to achieve large-scale on-site promotion under different environmental conditions, especially when judging whether the vehicle can pass the height-limited section.

Method used

The vehicle photos are obtained through the camera, and the image coordinates of the fixed reference object are used for data analysis, an evaluation model is established, a vehicle height is measured and compared, and a vehicle can pass the height limit section. The vertical axis dimension threshold and error are used. Correct the curve for data processing to improve detection accuracy and efficiency.

Benefits of technology

It realizes a rapid and accurate judgment of whether the vehicle can pass through the height-limited road section, improves detection speed and efficiency, reduces costs, and is suitable for a variety of environmental conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119228886A_ABST
    Figure CN119228886A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data processing, and discloses a method and device for detecting the height of a vehicle, terminal equipment and a storage medium, the method comprises the following steps: obtaining a vehicle picture captured by a camera to obtain detection data, and the detection data of the captured vehicle picture comprises an image coordinate of a fixed reference object and an image coordinate of the vehicle; world coordinates of a fixed reference object in the data are obtained, and normalization processing is carried out on the obtained data set image coordinates through the world coordinates of the fixed reference object, so that stable world coordinates of the fixed reference object are obtained; world coordinates of the vehicle in the detection data are obtained, the vehicle image recognition calibration is a world coordinate extraction model based on a calibration target, and world coordinate data of the vehicle are obtained; and obtaining an evaluation model for measuring the height of the vehicle, whether the vehicle can pass through the height-limited road section can be quickly judged, and the problem that whether the vehicle passes through the front height-limited road section is difficult to judge is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a method, an apparatus, a terminal device and a storage medium for detecting the height of a vehicle. Background Art

[0002] In daily life, we often need to analyze data to get the required results, for example, to determine the height data of a vehicle through machine vision measurement. Since the accuracy of the sampled data is one of the factors that affect the accuracy of the results, before analyzing the sampled data, it is necessary to determine whether there are any abnormalities in the sampled data and correct the data according to the cause of the abnormality to improve the accuracy of the results.

[0003] At present, before sampling data, a laser tester or binocular camera is usually required to collect data. After analyzing the collected data, the analysis results are obtained, which will lead to an increase in project costs. Even if the sampled data is analyzed, most methods are limited by the environmental conditions of the application scenarios, and the problem of poor robustness is prominent, making it difficult to promote them on a large scale on site.

[0004] In view of the defects and requirements of the above-mentioned traditional methods, which are high in complexity and low in efficiency, a method, apparatus, terminal device and storage medium for detecting the height of a vehicle are needed. Summary of the invention

[0005] The purpose of the present invention is to provide a method, device, terminal equipment and storage medium for detecting vehicle height. The present invention can quickly determine whether a vehicle can pass through a height-restricted section, solving the problem of difficulty in determining whether a vehicle is passing through a height-restricted section ahead.

[0006] The present invention is implemented in this way. The present invention provides a method for detecting the height of a vehicle;

[0007] S1: Obtain detection data by taking a photo of a vehicle captured by a camera, wherein the detection data of the captured photo of the vehicle includes image coordinates of a fixed reference object and image coordinates of the vehicle;

[0008] Get the image coordinates of the fixed reference object in the data. Please follow the steps below:

[0009] S 1.1 : Mark and identify the reference objects in the collected data;

[0010] S 1.2 : Get the world coordinates of the fixed reference object in the data;

[0011] S 1.3 : Normalize the world coordinates of the data set to obtain the stable world coordinates of the fixed reference object;

[0012] S1.4 :The world coordinates based on the fixed reference object are used in the subsequent vehicle height assessment model to improve the assessment accuracy.

[0013] S2: Acquire the world coordinates of a fixed reference object in the data, wherein the world coordinates of the fixed reference object are obtained by marking and identifying the reference object in the collected data, and the world coordinates of the fixed reference object are obtained by normalizing the image coordinates of the obtained data group to obtain the stable world coordinates of the fixed reference object;

[0014] S3: Acquire the world coordinates of the vehicle in the detection data, wherein the world coordinates of the vehicle in the data are obtained based on the vehicle image recognition calibration of the data, and the vehicle image recognition calibration is to extract the world coordinate data of the vehicle based on the world coordinate extraction model of the calibration target;

[0015] To obtain the world coordinates of the vehicle in the detection data, follow these steps:

[0016] S 3.1 : Calibrate the data for vehicle image recognition;

[0017] S 3.2 : Based on the world coordinate extraction model of the calibration target, the world coordinate data of the vehicle is obtained;

[0018] S 3.3 : Get the height data set of the vehicle to be detected.

[0019] S4: obtaining an evaluation model for measuring vehicle height, wherein the evaluation model is obtained by matching data vehicles of different dimensions based on a dimension level, wherein the dimension level is a longitudinal dimension comparison based on image coordinates, and the dimension level is determined by a preset longitudinal dimension threshold;

[0020] The evaluation model for detecting vehicle height is obtained, including dividing the calibration vehicle data set into a model training set, a test set and a validation set according to the vertical axis dimension, performing model training and validation, and adjusting the evaluation model parameters of each dimension;

[0021] Among them, the ratio of the model training set, test set and validation set is 6:2:2; the world coordinates of the vehicle are compared in the vertical axis dimension, and the dimension level is determined by presetting the vertical axis dimension threshold, wherein the dimension level matches the evaluation model of data vehicles of different dimensions, including calculating the coordinate values ​​of each detection data, and obtaining the level of each value at the vertical axis dimension threshold; and based on the level of the data, obtaining an adapted vehicle evaluation model.

[0022] S5: Based on the above detection data, the world coordinates of the reference object, the world coordinates of the vehicle in the detection data and the vehicle height evaluation model, the vehicle evaluation height is obtained, and the evaluation height is compared with the height limit threshold to determine whether the vehicle can pass normally.

[0023] Please follow the steps below:

[0024] S 5.1 : Performing data analysis on the horizontal and vertical coordinate differences of the reference object world coordinates, the horizontal and vertical coordinate differences of the calibration vehicle data, the error correction evaluation model of the detection, and the height conversion model to obtain initial vehicle height data;

[0025] S 5.2 : Inputting the obtained initial data of vehicle height into regression processing, wherein the regression processing model is corrected and modified through the data parameters of the training set, and finally obtaining the final data of the actual height of the vehicle;

[0026] S 5.3 :Compare the final vehicle height data with the height limit threshold to determine whether the vehicle can pass normally. The actual height evaluation results include three results: normal vehicle passage, slowed vehicle passage, and prohibited vehicle passage;

[0027] Among them, normal vehicle passage refers to vehicles whose vehicle height is lower than or equal to 95% of the restricted height; decelerated vehicle passage refers to vehicles whose vehicle height is higher than 95% of the restricted height or lower than the restricted height; prohibited vehicle passage refers to vehicles whose vehicle height is higher than the restricted height.

[0028] Furthermore, based on the horizontal and vertical axis dimension thresholds, an error correction curve of the evaluation model is obtained, including:

[0029] Based on the evaluation model, 5 sets of coordinate points (x i ,y i ), and obtain the error correction model of the evaluation model;

[0030] Based on the error correction model, a vehicle correction coordinate is obtained, wherein the vehicle correction coordinate is the estimated vehicle height;

[0031] Wherein, the error correction model is as follows:

[0032] l:y=kx+b Formula (1)

[0033] l is the error correction curve, y is the estimated height of the vehicle height, x is the world ordinate of the detection data, k and b are the influencing parameters of the error correction curve;

[0034] Based on the evaluated vehicle height, the actual height of the reference object and the regression model, the actual height of the vehicle is obtained, and the actual height is the final desired vehicle height, wherein the vehicle height is obtained by a height conversion model; the height conversion model is as shown in formula (2);

[0035]

[0036] Among them, y 参照物高度 and x 参照物宽度 It is calculated manually, Δx 车辆宽度 The difference between the two horizontal coordinates of the vehicle calculated by the mask model calibration, y 车辆估算高度 is an estimate of the target.

[0037] Furthermore, the present invention provides a device for detecting vehicle height, comprising a vehicle detection data acquisition module, for acquiring detection data by acquiring a vehicle photo captured by a camera, wherein the detection data of the captured vehicle photo includes the world coordinates of a fixed reference object and the world coordinates of the vehicle;

[0038] A world coordinate acquisition module, used to acquire the world coordinates of a fixed reference object and the world coordinates of a vehicle, wherein the world coordinates of the reference object are applied to a subsequent evaluation model, and the world coordinates of the vehicle are applied to a subsequent detection threshold determination;

[0039] An evaluation model acquisition module is used to acquire an evaluation model of a vehicle with different dimensions matched to a dimension level; wherein the dimension level is determined by a preset vertical axis dimension threshold, and the evaluation model determines the evaluation model parameters of each dimension through model training and verification.

[0040] The result output module is used to perform data analysis based on the world coordinates of the reference object, the calibrated vehicle data and the detected evaluation model to obtain the initial vehicle height data, and to perform regression processing on the initial vehicle height data to obtain the final vehicle evaluation height data.

[0041] Furthermore, the present invention provides a terminal device for detecting vehicle height, comprising a display screen, a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any of the above methods when executing the computer program.

[0042] Furthermore, the present invention provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a main controller, the method described in any one of the above is implemented.

[0043] Compared with the prior art, the present invention has the following beneficial effects:

[0044] The present invention can quickly acquire and compare data on vehicles and height-restricted sections, and can quickly determine whether a vehicle can pass through the height-restricted section ahead, with high speed and efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. The following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0046] Figure 1 is a flow chart of the method of the present invention;

[0047] Figure 2 is a flow chart of the reference detection method of the present invention;

[0048] Figure 3 is a flow chart of a method for detecting vehicle space vectors of the present invention;

[0049] Figure 4 is a target evaluation flow chart of the present invention;

[0050] Figure 5 This is a flow chart of the detection model method of the present invention

[0051] Figure 6 It is a structural diagram of the device of the present invention;

[0052] Figure 7 It is a structural diagram of the terminal device of the present invention;

[0053] Figure 8 This is a schematic diagram of a reference object for marking detection data of the present invention.

[0054] Fig. 9 This is the pure output image after image noise processing of the present invention.

[0055] Fig.10 is a stable regression frame of the reference of the present invention;

[0056] Fig.11 It is a marked vehicle effect diagram of the present invention. DETAILED DESCRIPTION

[0057] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work belong to the scope of protection of the present invention. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the invention claimed for protection, but is only for selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work belong to the scope of protection of the present invention.

[0058] See also Figure 1-11 , the present invention provides a method for detecting vehicle height;

[0059] In this embodiment, the detection data is obtained by capturing vehicle photos by a camera. The data to be detected includes multiple acquisitions and license plate numbers corresponding to each sampled data. There is no fixed time interval between the sampling times of the multiple sampled data, and the time of triggering the acquisition condition is the acquisition time.

[0060] In this embodiment, the collected data includes vehicle type data, vehicle passing time data or vehicle license plate number data, etc.

[0061] like Figure 8-Figure 11 As shown, the reference objects in the collected data are marked and identified.

[0062] In this embodiment, after obtaining the detection data set, no abnormal data can be marked. The overall outline of the fixed reference object is manually marked or automatically detected and identified. If pixels are lost due to light problems in the future, fixed label points can be used for marking and identification. Supplementing can ensure the integrity of the fixed reference objects in the data set to be detected and ensure that the final determined vehicle height value is accurate.

[0063] like Fig.11 , the data is calibrated for vehicle image recognition. In the early stage, the vehicle images that need to be labeled are selected from the collected data set. These images should contain vehicles of different types, different angles, and different lighting conditions to ensure the generalization ability of the model.

[0064] In this embodiment, the pre-screened images are annotated to mark the location and category of the vehicles in the images. This is first done manually by manually drawing a bounding box on the image to mark the location of the vehicle. The bounding box tightly surrounds the vehicle to provide accurate positioning information;

[0065] Specifically, in the early stage of data set construction, labelme is used for manual labeling and identification to ensure the integrity of the subsequent data set. Specifically, in the later automatic labeling, due to the problem of pixel loss, the mean of the previous manual labeling coordinate value can be used for fixed labeling. If there is no detection vehicle in the sampled data, there is no need to process the data set.

[0066] Specifically, a fixed reference object obtains a label through manual annotation, such as Fig. 9 As shown. After noise cleaning, a pure reference image is obtained, as shown Fig.10 Specifically, due to the irregularity of the fixed reference object, a stable square regression frame is obtained through the image coordinate model detection, the width of the upper and lower sides of which is equal, the width is obtained by the difference between the maximum and minimum values ​​of the calibrated image horizontal coordinate, and the specific height is obtained by the difference between the maximum and minimum values ​​of the calibrated image vertical coordinate;

[0067] In this embodiment, the relationship parameters between the camera image pixel position and the scene point position are obtained through the calibration method, and the internal and external parameters of the camera model are obtained from the corresponding relationship between the feature point in the image coordinates and the world coordinates. At the same time, the pixel coordinate system is transformed into the world coordinate system through the internal and external parameters of the camera.

[0068] The annotated images are divided into training set, validation set and test set for subsequent model training, validation and testing.

[0069] In this embodiment, the post-model check uses the target detection model mask-rcnn suitable for vehicle image recognition, which will realize automated vehicle image recognition.

[0070] Obtain the height data set of the vehicle to be detected.

[0071] In this embodiment, an infrared transmitter is used to transmit infrared signals to the vehicle. These signals should cover the entire height range of the vehicle to be detected. The infrared sensor receives the signal reflected from the vehicle surface.

[0072] In this embodiment, the data is cleaned, abnormal data is screened, etc., and several groups of vehicle height data groups to be matched with time as labels are extracted.

[0073] In this embodiment, the infrared data set is matched with the above-mentioned calibrated training set, verification set and test set, and applied to subsequent model training and the standardization and correction of the output results of the world coordinate extraction model.

[0074] Based on the world coordinate extraction model of the calibration target, the world coordinate data of the vehicle is obtained.

[0075] In this embodiment, after the above two steps of camera calibration and coordinate system conversion, the world coordinates of all pixels of the detection target mask can be obtained. By traversing the world coordinates of these pixels, the maximum and minimum values ​​on the x, y, and z axes are obtained, and a 3D bounding box is established based on them, so that the 3D information of the vehicle can be retrieved in the form of a 3D bounding box in each frame.

[0076] like Figure 5 As shown, in the implementation method of this embodiment, the implementation process includes:

[0077] The above calibrated vehicle data set is divided into multiple model training sets, test sets and validation sets according to the vertical axis dimension, the model is trained and validated, and the evaluation model parameters of each dimension are adjusted.

[0078] In this embodiment, due to the differences in camera capture, the position of the captured vehicle is variable and unstable. The position differences of the vehicles are divided into five levels according to the vertical axis dimension, and the photos of the vehicles to be detected are divided into five types of model training sets, test sets and verification sets.

[0079] In this embodiment, by training multiple types of model training sets, test sets and validation sets, 5 sets of evaluation model parameters are extracted, so as to improve the accuracy of model evaluation and better fit the actual situation of detecting vehicle height.

[0080] The world coordinates of the above-mentioned vehicles are compared in the vertical axis dimension, and the dimension level is determined by presetting the vertical axis dimension threshold.

[0081] In this embodiment, the world coordinates of the vehicle are extracted through the mask model, and the minimum value of the vertical axis is used as a comparison value for measuring the vertical axis dimension. The minimum value and the above-mentioned five types of vertical axis dimension thresholds are used to determine the vehicle dimension level.

[0082] Specifically, extract the vertical coordinate marked as x i =d, where x is the distance, i is the judgment level, and d is the minimum value of the extracted vehicle world coordinate vertical axis.

[0083]

[0084] The corresponding evaluation model can be selected by evaluating the value of i.

[0085] Match the dimensional levels to create evaluation models for vehicles with data of different dimensions to improve the accuracy and applicability of the models.

[0086] In this embodiment, the evaluation model obtains 5 sets of coordinate points (x i ,y i ), the five groups of coordinate points can be connected one by one to form an approximately smooth curve, where yi is the correction error index.

[0087] Specifically, the above curve acts as an error correction curve for the evaluation model, which is a linear equation curve with a formula of y=kx+b. This function is that when the extracted vehicle coordinates are within the range of this curve, a good ratio method conversion can be performed, further improving the extensiveness and robustness of the evaluation model.

[0088] like Figure 6-Figure 7 As shown, in the implementation method of this embodiment, the implementation process includes:

[0089] , the world coordinates of the reference object, the calibrated vehicle data and the evaluation model of the detection are analyzed to obtain the initial data of the vehicle height.

[0090] In this embodiment, the vehicle correction coordinates extracted by the correction curve are combined with the reference object world coordinates, and the vehicle height is converted into real world coordinate values ​​using the ratio method, so the estimated real coordinates of the vehicle are obtained, and then the vehicle height value is calculated.

[0091] Wherein, the ratio method formula is:

[0092]

[0093] In the ratio method formula, y 参照物高度 and x 参照物宽度 It is calculated artificially, Δx 车辆宽度 is the difference between the two horizontal coordinates of the vehicle calculated by the mask model calibration, and y is the estimated value of the final target of this project.

[0094] The above initial vehicle height data is subjected to regression processing to obtain the final vehicle evaluation height data.

[0095] In this embodiment, the vehicle estimated height and y are obtained by the above steps. i Correct the error index and calculate the ratio, perform regression processing on the estimated height, and obtain the real actual height of the measured data. And compare the real height with the actual restricted height to determine whether the vehicle can pass normally.

[0096] The final data of the above vehicle heights are compared to determine whether the vehicle height can pass normally, and the data results are uploaded to the UI webpage and the on-site terminal display device to inform the driver.

[0097] In this embodiment, the world coordinates of a fixed reference object in the data are obtained.

[0098] The world coordinates of the fixed reference object are obtained based on the collected data to be tested, and the test data are coordinate data in the world coordinate system obtained based on Zhang Youzheng's calibration and conversion.

[0099] The world coordinate system is used to reflect the real height of a fixed reference object. The real height includes multiple coordinate parameters, which are coordinate parameters in the world coordinate system.

[0100] Specifically, the horizontal coordinate of the world coordinate system is the width, and the vertical coordinate is the height. The data to be detected is input into the calibration model, which can be manually calibrated or can be a convolutional neural network model. The coordinates of the calibrated reference object can be expressed as H,

[0101]

[0102] Specifically, the stable coordinates of the reference object need to be refined by multiple sets of coordinate data H. The extraction adopts the normalization formula to normalize each sampling data to obtain the stable world coordinates of the fixed reference object of each data set. The fixed label marking of the fixed reference object in the data is obtained, and the image coordinate data table of the floating part series is obtained, as shown in Table 1 below. Based on this, relying on the aforementioned coordinate conversion model, a complete fixed reference object world coordinate data set is obtained.

[0103] Table 1 Complete fixed reference object world coordinate data set

[0104]

[0105]

[0106] Normalize the above data:

[0107] The normalization formula is:

[0108]

[0109] in, is the sample data x n The first data after normalization; if the pixel of the reference object of the data to be detected is fixed and stable, x n The nth sampling data in the data group to be detected; the pixels of the fixed reference object of the data to be detected are stable, and min is the minimum value of each sampling data in the data group to be detected; the pixels of the fixed reference object of the data to be detected are stable, and max is the maximum value of each sampling data in the data group to be detected.

[0110] If the pixels in the data to be detected are missing and the reference object cannot be automatically identified, the above-mentioned preliminary manually calibrated world coordinate mean is used as the processed data.

[0111] In this embodiment, the world coordinates of the vehicle in the detection data are obtained.

[0112] The world coordinates of the vehicle are obtained based on the collected data to be detected, and the detection data are the world coordinates obtained based on the world calibration model; the world coordinates are obtained based on the coordinate conversion model, and the coordinate data in the world coordinate system is converted by the coordinate conversion model;

[0113] Specifically, the coordinate system of the calibrated coordinates of the vehicle is as above, and the representation method is similar. Before inputting the vehicle data set to be detected into the coordinate extraction model, the coordinate extraction model can also be trained.

[0114] Specifically, the training samples are input into the coordinate extraction model mask, the coordinate extraction model is trained, the output value of the coordinate extraction model is obtained, the parameters in the coordinate extraction model are corrected by the output value, and then the coordinate extraction model with updated parameters is trained again using the training samples until the output value of the coordinate extraction model meets the requirements, thereby obtaining the trained coordinate extraction model.

[0115] Specifically, the training coordinate extraction model uses the artificially collected real data set as the correction model parameters in the neural network regression analysis training.

[0116] In this embodiment, an evaluation model for detecting vehicle height is obtained; an error correction curve of the height evaluation model is obtained based on five preset high-frequency vehicle data capture points, which are obtained based on image statistics of the data to be detected; a true evaluation model of the vehicle height is obtained based on a ratio method model conversion, which is obtained based on the above-mentioned fixed reference object and the vehicle's world coordinate conversion;

[0117] Specifically, the five types of high-frequency vehicle data capture points are regarded as an approximately smooth curve, which is named the error correction curve. The horizontal axis of the curve is the horizontal coordinate mean of the minimum values ​​of the two vertical axes at the position of the detected vehicle, and the vertical axis is the corrected error vehicle height index.

[0118] It should be understood that the size of the serial numbers of the steps in the above embodiments 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 embodiments of the present application.

[0119] Corresponding to the method for determining the cause of data anomaly described in the above embodiment, Figure 7 A structural block diagram of a vehicle height detection and determination device provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.

[0120] Reference Figure 7 The device may include: a vehicle detection data acquisition module, a world coordinate acquisition module, an evaluation model acquisition module and a result output module.

[0121] The vehicle detection data acquisition module is used to acquire detection data by acquiring vehicle photos captured by a camera, wherein the detection data captured by the vehicle photos includes the world coordinates of a fixed reference object and the world coordinates of the vehicle;

[0122] A world coordinate acquisition module, used to acquire the world coordinates of a fixed reference object and the world coordinates of a vehicle, wherein the world coordinates of the reference object are applied to a subsequent evaluation model, and the world coordinates of the vehicle are applied to a subsequent detection threshold determination;

[0123] An evaluation model acquisition module, used to acquire an evaluation model of a vehicle whose dimension level matches data of different dimensions, wherein the dimension level is determined by a preset vertical axis dimension threshold, and the evaluation model determines evaluation model parameters of each dimension through model training and verification;

[0124] The result output module is used to perform data analysis based on the world coordinates of the reference object, the calibrated vehicle data and the detected evaluation model to obtain the initial vehicle height data, and to perform regression processing on the initial vehicle height data to obtain the final vehicle evaluation height data.

[0125] Specifically, the detection data can be used to calculate the coordinate values ​​and combine them with the error correction curve to obtain the approximate real vehicle height data. The vehicle correction coordinates are combined with the reference world coordinates, and the vehicle height is converted into the real world coordinate value using the ratio method. The vehicle's real coordinates are obtained, and then the vehicle height value is calculated.

[0126] In this embodiment, based on the above detection data, the world coordinates of the reference object, the world coordinates of the vehicle in the detection data and the vehicle height evaluation model, the estimated real height of the vehicle is obtained. The estimated height is compared with the height limit threshold to determine whether the vehicle can pass normally.

[0127] In this embodiment, the estimated real height of the vehicle is used to compare with the height limit threshold to determine whether the vehicle can pass normally. The estimated real height result may include normal vehicle passage, decelerated vehicle passage, and prohibited vehicle passage. Normal vehicle passage refers to vehicles passing with a height lower than or equal to 95% of the restricted height. Decelerated vehicle passage refers to vehicles passing with a height higher than 95% of the restricted height or lower than the restricted height. Prohibited vehicle passage refers to vehicles passing with a height higher than the restricted height.

[0128] In this embodiment, the vehicle evaluation real height result can be represented by characters or numbers, and different vehicle evaluation real height results correspond to different characters or numbers. The data result obtained by the monocular detection method used in this application is more accurate.

[0129] In this embodiment, the present application also provides a terminal device, see Figure 8The terminal device includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, and at least one result display. When the processor executes the computer program, the steps in any of the above-mentioned method embodiments are implemented, such as Figure 1 Alternatively, when the processor executes the computer program, the functions of each module / unit in the above-mentioned device embodiments are implemented, for example Figure 7 The function of the module shown. The result display implements the last step when executing the computer program, and displays the height measurement result finally processed in this embodiment to the current driver to inform the driver of the current driving condition of the vehicle.

[0130] In this embodiment, the computer program can be divided into one or more modules / units, one or more modules / units are stored in the memory and executed by the processor, and the processor uploads the result to the result display to complete the present application. The one or more modules / units can be a series of computer program segments that can complete specific functions, and the program segments are used to describe the execution process of the computer program in the terminal device.

[0131] In this embodiment, those skilled in the art can understand that Figure 6-Figure 7 It is only an example of a terminal device and does not constitute a limitation on the terminal device. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components, such as input and output devices, network access devices, buses, etc.

[0132] The processor may be a graphics processor, a central processing unit, a digital signal processor, an application specific integrated circuit, an off-the-shelf programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0133] The memory may be an internal storage unit of the terminal device, or an external storage device of the terminal device, such as a plug-in hard disk, a smart memory card, a secure digital card, a flash memory card, etc. The memory is used to store the computer program and other programs and data required by the terminal device. The memory may also be used to temporarily store data that has been output or is to be output.

[0134] The result display is a light-emitting diode display and an organic light-emitting diode or a common outdoor display in the world. Universal LED display is a display device composed of a large number of LED lights, each of which can be used as a pixel to emit light of different colors. These pixels are arranged in a certain way to form a matrix that can display text, images, videos and other information to provide drivers with real-time road conditions, traffic rules, speed limits and other information.

[0135] The bus can be an industrial standard architecture bus, a peripheral device interconnection bus, or an extended industrial standard architecture bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of this application is not limited to only one bus or one type of bus.

[0136] In this embodiment, the present invention provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a main controller, the method described in any one of the above is implemented.

[0137] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention has various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for detecting vehicle height, characterized in that: Please follow the steps below: S1: Obtain detection data by taking a photo of a vehicle captured by a camera, wherein the detection data of the captured photo of the vehicle includes image coordinates of a fixed reference object and image coordinates of the vehicle; S2: Acquire the world coordinates of a fixed reference object in the data, wherein the world coordinates of the fixed reference object are obtained by marking and identifying the reference object in the collected data, and the world coordinates of the fixed reference object are obtained by normalizing the image coordinates of the obtained data group to obtain the stable world coordinates of the fixed reference object; S3: Acquire the world coordinates of the vehicle in the detection data, wherein the world coordinates of the vehicle in the data are obtained based on the vehicle image recognition calibration of the data, and the vehicle image recognition calibration is to extract the world coordinate data of the vehicle based on the world coordinate extraction model of the calibration target; S4: obtaining an evaluation model for measuring vehicle height, wherein the evaluation model is obtained by matching data vehicles of different dimensions based on a dimension level, wherein the dimension level is a longitudinal dimension comparison based on image coordinates, and the dimension level is determined by a preset longitudinal dimension threshold; S5: Based on the above detection data, the world coordinates of the reference object, the world coordinates of the vehicle in the detection data and the vehicle height evaluation model, the vehicle evaluation height is obtained, and the evaluation height is compared with the height limit threshold to determine whether the vehicle can pass normally.

2. A method for detecting vehicle height according to claim 1, characterized in that: Get the image coordinates of the fixed reference object in the data. Please follow the steps below: S 1.1 : Mark and identify the reference objects in the collected data; S 1.2 : Get the world coordinates of the fixed reference object in the data; S 1.3 : Normalize the world coordinates of the data set to obtain the stable world coordinates of the fixed reference object; S 1.4 :The world coordinates based on the fixed reference object are used in the subsequent vehicle height assessment model to improve the assessment accuracy.

3. A method for detecting vehicle height according to claim 1, characterized in that: To obtain the world coordinates of the vehicle in the detection data, follow these steps: S 3.1 : Calibrate the data for vehicle image recognition; S 3.2 : Based on the world coordinate extraction model of the calibration target, the world coordinate data of the vehicle is obtained; S 3.3 : Get the height data set of the vehicle to be detected.

4. A method for detecting vehicle height according to claim 3, characterized in that: The evaluation model for detecting vehicle height is obtained, including dividing the calibration vehicle data set into a model training set, a test set and a validation set according to the vertical axis dimension, performing model training and validation, and adjusting the evaluation model parameters of each dimension; Among them, the ratio of the model training set, test set and validation set is 6:2:2; the world coordinates of the vehicle are compared in the vertical axis dimension, and the dimension level is determined by presetting the vertical axis dimension threshold, wherein the dimension level matches the evaluation model of data vehicles of different dimensions, including calculating the coordinate values ​​of each detection data, and obtaining the level of each value at the vertical axis dimension threshold; and based on the level of the data, obtaining an adapted vehicle evaluation model.

5. A method for detecting vehicle height according to claim 4, characterized in that: Based on the horizontal and vertical axis dimension thresholds, the error correction curve of the evaluation model is obtained, including: Based on the evaluation model, 5 sets of coordinate points (x i ,y i ), and obtain the error correction model of the evaluation model; Based on the error correction model, a vehicle correction coordinate is obtained, wherein the vehicle correction coordinate is the estimated vehicle height; Wherein, the error correction model is as follows: l:y=kx+b Formula (1) l is the error correction curve, y is the estimated height of the vehicle height, x is the world ordinate of the detection data, k and b are the influencing parameters of the error correction curve; Based on the evaluated vehicle height, the actual height of the reference object and the regression model, the actual height of the vehicle is obtained, and the actual height is the final desired vehicle height, wherein the vehicle height is obtained by a height conversion model; the height conversion model is as shown in formula (2); Among them, y 参照物高度 and x 参照物宽度 It is calculated manually, Δx 车辆宽度 The difference between the two horizontal coordinates of the vehicle calculated by the mask model calibration, y 车辆估算高度 is an estimate of the target.

6. A method, device, terminal equipment and storage medium for detecting vehicle height according to claim 1, characterized in that: In step S5, the following steps are specifically performed: S 5.1 : Performing data analysis on the horizontal and vertical coordinate differences of the reference object world coordinates, the horizontal and vertical coordinate differences of the calibration vehicle data, the error correction evaluation model of the detection, and the height conversion model to obtain initial vehicle height data; S 5.2 : Inputting the obtained initial data of vehicle height into regression processing, wherein the regression processing model is corrected and modified through the data parameters of the training set, and finally obtaining the final data of the actual height of the vehicle; S 5.3 :Compare the final vehicle height data with the height limit threshold to determine whether the vehicle can pass normally. The actual height evaluation results include three results: normal vehicle passage, slowed vehicle passage, and prohibited vehicle passage; Among them, normal vehicle passage refers to vehicles whose vehicle height is lower than or equal to 95% of the restricted height; decelerated vehicle passage refers to vehicles whose vehicle height is higher than 95% of the restricted height or lower than the restricted height; prohibited vehicle passage refers to vehicles whose vehicle height is higher than the restricted height.

7. A device for detecting vehicle height, characterized in that: It includes a vehicle detection data acquisition module, which is used to obtain detection data by acquiring vehicle photos captured by a camera; A world coordinate acquisition module, used to acquire the world coordinates of a fixed reference object and the world coordinates of a vehicle; An evaluation model acquisition module is used to obtain evaluation models of data vehicles of different dimensions by matching the dimension levels; The result output module is used to perform data analysis based on the world coordinates of the reference object, the calibrated vehicle data and the detected evaluation model to obtain the initial vehicle height data, and to perform regression processing on the initial vehicle height data to obtain the final vehicle evaluation height data.

8. A terminal device for detecting vehicle height, comprising a display screen, 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 7 is implemented.

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