Vehicle detection method and device, computer equipment and storage medium

Through the laser scanning device identifying effective points and calculating the vehicle width, the problem of low detection accuracy of existing vehicles is solved, and efficient and low-cost vehicle capture is achieved, which meets the needs of rapid detection.

CN120451920APending Publication Date: 2025-08-08ZHEJIANG DAHUA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510590302.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-08
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

The existing vehicle capture detection methods have low accuracy and cannot effectively capture the illegal behavior of drivers using mobile phones in specific locations. The traditional detectors have poor real-time performance and cannot meet the 5ms capture requirements.

Method used

The distance information of the scanning point is obtained by the laser scanning device, and the point with a difference greater than the threshold is identified as an effective point, and the width of the object to be tested is calculated. When the width is greater than the threshold, the capture signal is output to the capture camera for capture.

Benefits of technology

It improves the accuracy and real-timeness of vehicle capture detection, reduces application costs, and only requires a laser scanning device and capture camera to effectively eliminate non-target interference, improving detection accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120451920A_ABST
    Figure CN120451920A_ABST
Patent Text Reader

Abstract

The invention relates to a vehicle detection method and device, computer equipment and a storage medium. Comprising the steps that an object to be measured is scanned through a preset laser scanning device, at least one scanning point position is obtained, and each scanning point position carries point position distance information between the scanning point position and the laser scanning device; sequentially taking each scanning point as a target scanning point, calculating a difference value between point position distance information of the target scanning point and corresponding preset distance information, and if the difference value is detected to be greater than a preset distance threshold value, identifying the target scanning point as an effective point position; when it is detected that the number of the obtained scanning point positions is equal to a preset number threshold value, the width to be detected of the object to be detected is calculated based on the orientations of all the effective point positions, and when the width to be detected is larger than a preset first width threshold value, a snapshot signal is output to a preset snapshot camera, and snapshot processing is conducted through the snapshot camera. By adopting the method, the vehicle snapshot detection precision can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of intelligent transportation technology, and in particular to a vehicle detection method, apparatus, computer equipment, and storage medium. Background Art

[0002] Traffic accidents caused by drivers using their phones while driving are increasing. To regulate safe driving, laws and regulations worldwide have been introduced prohibiting the use of mobile phones while driving. However, to avoid being photographed while using their phones, some drivers hold their phones low, such as on their thighs or near the bottom of the steering wheel. However, this only allows for a very narrow range of tilt angles to capture evidence of the violation. In practice, due to the high speeds of vehicles, there is typically only one opportunity to capture the violation. Furthermore, the latency from the vehicle approaching to the triggering of the capture must be less than 5ms.

[0003] Currently, traditional sensing triggering solutions mainly include three types: ground sensor coil detectors, wave frequency vehicle detectors, and video vehicle detectors. However, the above-mentioned wave frequency and video detection have poor real-time performance and cannot meet the 5ms requirement. The ground sensor coil solution has too large an error in vehicle position detection and is more difficult to deploy.

[0004] At present, no effective solution has been proposed to address the problems of low accuracy and poor capture effect of vehicle capture detection methods in existing technologies. Summary of the Invention

[0005] Based on this, it is necessary to provide a vehicle detection method, device, computer equipment and storage medium to address the above technical problems.

[0006] In a first aspect, the present application provides a vehicle detection method. The method comprises:

[0007] Scanning the object to be measured by a preset laser scanning device to obtain at least one scanning point, wherein each scanning point carries point distance information of the scanning point from the laser scanning device;

[0008] Each scanning point is taken as a target scanning point in turn, and the difference between the point distance information of the target scanning point and the corresponding preset distance information is calculated. If the difference is greater than the preset distance threshold, the target scanning point is identified as a valid point;

[0009] When it is detected that the number of acquired scanning points is equal to a preset number threshold, the measured width of the object to be measured is calculated based on the orientation of all valid points. When the measured width is greater than the preset first width threshold, a capture signal is output to the preset capture camera, and the capture processing is performed by the capture camera.

[0010] In one embodiment, before scanning the object to be measured by a preset laser scanning device to obtain at least one scanning point, the method further includes:

[0011] In a preset calibration scenario, a laser scanning device is used to scan and obtain at least one scanning point, wherein each scanning point carries preset distance information of the scanning point from the laser scanning device and point number information, and the point number information is used to correspond the obtained point distance information with the preset distance information;

[0012] The preset distance information and point number information corresponding to each scanning point are saved and processed.

[0013] In one embodiment, after the snapshot is captured by the snapshot camera, the method further includes:

[0014] The snapshot function of the snapshot camera is locked, and the laser scanning device is continuously used for scanning processing until it is detected that the object to be measured has left.

[0015] In one embodiment, the method further includes:

[0016] When it is detected that the residence time of the object to be measured exceeds a preset time threshold, an alarm signal is generated.

[0017] In one embodiment, after capturing the object to be measured, the object to be measured is scanned by a laser scanning device to obtain at least one scanning point;

[0018] Traverse each scan point acquired in sequence and detect the valid points among the scan points;

[0019] When the number of detected scanning points is equal to the number threshold, the width to be measured is calculated based on the orientation of the valid points. When the width to be measured is less than a preset second width threshold, it is determined that the object to be measured has left and the snapshot camera is unlocked, wherein the second width threshold is less than the first width threshold.

[0020] In one embodiment, the scanning mode of the laser scanning device is an equal-pitch resolution scanning mode, wherein the spacing between adjacent scanning points is equal.

[0021] In one embodiment, calculating the width to be measured based on the position of the valid point includes:

[0022] Each time a target scanning point is detected as a valid point, the preset target weight is automatically increased, wherein the initial value of the target weight is 0;

[0023] When it is detected that the number of scanning points is equal to the number threshold, the width to be measured is obtained based on the target weight and the spacing between adjacent scanning points.

[0024] In a second aspect, the present application also provides a vehicle detection device. The device comprises:

[0025] An acquisition module is used to scan the object to be measured by a preset laser scanning device to obtain at least one scanning point, wherein each scanning point carries point distance information of the scanning point from the laser scanning device;

[0026] a calculation module, configured to sequentially take each scanning point as a target scanning point, calculate the difference between the point distance information of the target scanning point and the corresponding preset distance information, and identify the target scanning point as a valid point if the difference is greater than a preset distance threshold;

[0027] The generation module is used to calculate the measured width of the object to be measured based on the orientation of all valid points when it detects that the number of acquired scanning points is equal to a preset number threshold. When the measured width is greater than a preset first width threshold, a capture signal is output to a preset capture camera, and the capture processing is performed by the capture camera.

[0028] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are performed:

[0029] Scanning the object to be measured by a preset laser scanning device to obtain at least one scanning point, wherein each scanning point carries point distance information of the scanning point from the laser scanning device;

[0030] Each scanning point is taken as a target scanning point in turn, and the difference between the point distance information of the target scanning point and the corresponding preset distance information is calculated. If the difference is greater than the preset distance threshold, the target scanning point is identified as a valid point;

[0031] When it is detected that the number of acquired scanning points is equal to a preset number threshold, the measured width of the object to be measured is calculated based on the orientation of all valid points. When the measured width is greater than the preset first width threshold, a capture signal is output to the preset capture camera, and the capture processing is performed by the capture camera.

[0032] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the following steps:

[0033] Scanning the object to be measured by a preset laser scanning device to obtain at least one scanning point, wherein each scanning point carries point distance information of the scanning point from the laser scanning device;

[0034] Each scanning point is taken as a target scanning point in turn, and the difference between the point distance information of the target scanning point and the corresponding preset distance information is calculated. If the difference is greater than the preset distance threshold, the target scanning point is identified as a valid point;

[0035] When it is detected that the number of acquired scanning points is equal to a preset number threshold, the measured width of the object to be measured is calculated based on the orientation of all valid points. When the measured width is greater than the preset first width threshold, a capture signal is output to the preset capture camera, and the capture processing is performed by the capture camera.

[0036] The above-mentioned vehicle detection method, device, computer equipment and storage medium first scans the object to be detected by a laser scanning device to obtain multiple scanning points, and takes each scanning point as a target scanning point in turn, and calculates the difference between the point distance information of the target scanning point and the preset distance information. If the difference is detected to be greater than the distance threshold, the target scanning point is identified as a valid point. When it is detected that the number of scanning points is equal to the number threshold, the measured width of the object to be detected is calculated based on the orientation of the valid point. When the measured width is greater than the first width threshold, a capture signal is output to the capture camera, and the capture processing is performed by the capture camera. The implementation cost of this application is relatively low, and only a laser scanning device and a capture camera need to be set up. Furthermore, this application performs screening based on the width of the object to be detected, and only objects that meet the width requirements are considered to be targets such as vehicles, thereby effectively eliminating other non-target interference objects and improving the accuracy of vehicle detection capture. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 1 is a flow chart of a vehicle detection method according to an embodiment;

[0038] Figure 2 A schematic diagram of a structure for scanning an object to be measured in one embodiment;

[0039] Figure 3 This is the result of medium-angle laser scanning using traditional technology;

[0040] Figure 4 This is a laser scanning result with equal spacing resolution in one embodiment;

[0041] Figure 5 1 is a flow chart of a vehicle detection method in a preferred embodiment;

[0042] Figure 6is a structural block diagram of a vehicle detection device in one embodiment;

[0043] Figure 7 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0044] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0045] In one embodiment, Figure 1 As shown, a vehicle detection method is provided, comprising the following steps:

[0046] Step S110 , scanning the object to be measured by a preset laser scanning device to obtain at least one scanning point, wherein each scanning point carries point distance information of the scanning point from the laser scanning device.

[0047] Specifically, Figure 2 This is a structural diagram of scanning the object to be measured in one embodiment. It can be seen that the laser scanning device and the snapshot camera are set at a high place, and there is a wired connection or communication connection between the laser scanning device and the snapshot camera. The red dotted line in the figure is the laser trip line, that is, the line where the scanning point is located. The green lines in the figure constitute a schematic area of the scanning laser boundary, and the scanning laser is distributed in this area. The cube in the figure is the object to be measured described in this embodiment. The object to be measured can be any object located in the scanning area of the laser scanning device, such as people, vehicles, cats and dogs.

[0048] In this embodiment, the laser scanning device is first used to scan the object to be measured within the scanning area of the laser scanning device, thereby obtaining scanning points. The number of scanning points in a frame scanned by the laser scanning device is preset. For example, at a certain installation height and angle, the scanning width is set to 10m, and the distance resolution d is set to 0.1m. The number of scanning points in a frame should be 101 points (10m ÷ 0.1m + 1). Therefore, when it is detected that 101 scanning points have been obtained, it can be determined that the current frame scan is completed. In addition, each scanning point carries a distance measurement value of the scanning point relative to the distance between the scanning point and the laser scanning device, i.e., the above-mentioned point distance information. It should be noted that in some preferred embodiments, the scanning points output by the laser scanning device are arranged in a row, and the calculated width of the object to be measured is the calculated width of the object to be measured at the location of the scanning point.

[0049] In summary, in this embodiment, after detecting the presence of the object to be measured and triggering the trip wire of the laser scanning device, the object to be measured is scanned by the laser scanning device to obtain multiple scanning points, and each point carries the point distance information of the point from the laser scanning device. Furthermore, the scanning method of the laser scanning device in this embodiment is not limited, and it can scan a line from left to right or from right to left, or scan multiple lines at the same time. In some preferred embodiments, a line is scanned from left to right or from right to left.

[0050] In step S120, each scanning point is taken as a target scanning point in turn, and the difference between the point distance information of the target scanning point and the corresponding preset distance information is calculated. If the difference is detected to be greater than the preset distance threshold, the target scanning point is identified as a valid point.

[0051] Specifically, each scanning point is preset with preset distance information. The preset distance information of each scanning point represents the distance between the scanning point and the laser scanning device when the laser scanning device scans the ground once when there is no object to be measured.

[0052] In this embodiment, when the object to be measured triggers the trip wire, the distance information between several scanning points and the laser scanning device will change, and the above-mentioned multiple scanning points carrying point distance information are obtained, and the difference between the point distance information of each scanning point and the corresponding preset distance information is calculated. If it is detected that the difference is greater than the preset distance threshold, the corresponding target scanning point is identified as a valid point, wherein the distance threshold can be set to 0.5m. In actual applications, the setting of the distance threshold can be adjusted by relevant technical personnel according to actual needs.

[0053] Step S130, when it is detected that the number of acquired scanning points is equal to a preset number threshold, the measured width of the object to be measured is calculated based on the orientation of all valid points. When the measured width is greater than the preset first width threshold, a capture signal is output to the preset capture camera, and the capture processing is performed through the capture camera.

[0054] Specifically, when it is detected that the number of acquired scanning points is equal to a preset number threshold, it means that a frame scan is completed at this time, wherein the above-mentioned number threshold can be designed by technical personnel, such as being set to 101, or can be set according to the scanning width and distance resolution. Furthermore, the width to be measured of the object to be measured is calculated based on the orientation of the effective point, wherein the effective point is the scanning point detected above, where the distance information between the scanning point and the laser scanning device has significantly changed. Since the orientation and height of each scanning point are fixed, the width to be measured of the object to be measured can be calculated based on the orientation of the effective point. In order to avoid the operation of the snapshot camera being affected by other objects such as pedestrians, cats and dogs on the road, in this embodiment, when it is detected that the width to be measured is greater than the first width threshold, a snapshot signal is output to the snapshot camera, thereby completing the snapshot processing through the snapshot camera, wherein the first width threshold can be set to 1.5m, and the first width threshold can be adjusted by relevant technical personnel according to actual needs.

[0055] Through steps S110 to S130, the present application scans the object to be measured according to the scanning points emitted by the laser scanning device. The number of scanning points contained in a frame is fixed and small, which effectively improves the calculation efficiency. In addition, the present application can measure the width of the target object by only calculating the number of valid points, further reducing the processor performance requirements and speeding up the response speed. In addition, in the present application, only a laser scanning device and a snapshot camera are needed to capture the vehicle driver, effectively reducing the application cost.

[0056] In some embodiments, before scanning the object to be measured using a preset laser scanning device to obtain at least one scanning point, the method further includes:

[0057] In a preset calibration scenario, a laser scanning device is used to scan and obtain at least one scanning point, wherein each scanning point carries preset distance information of the scanning point from the laser scanning device and point number information, and the point number information is used to correspond the obtained point distance information with the preset distance information;

[0058] The preset distance information and point number information corresponding to each scanning point are saved and processed.

[0059] Specifically, before actual use, in this embodiment, the laser scanning device needs to be calibrated. During calibration, it is assumed that there are no target objects on the road, and the laser scanning device scans the ground. In the calibration scenario, the laser scanning device scans the ground to obtain multiple scanning points, and each scanning point carries preset distance information and point number information. The preset distance information and point number information of each scanning point are stored in correspondence. The following table is a schematic table showing the storage of preset distance information and point number information:

[0060]

[0061] Here, point number information n represents the nth element in the table, and Dn represents the distance information between the nth scanning point (i.e., the nth element) and the laser scanning device. Furthermore, in this embodiment, the laser scanning device also includes a point counter, which is used to number and count the points struck by the laser scanning device, thereby obtaining the above-mentioned point number information. The obtained point number can be used to determine whether a frame has ended, and to associate scanning points with distance information.

[0062] This embodiment defines a preprocessing method for a laser scanning device, which obtains and saves the point number information and preset distance information of the scanning point, so that in the subsequent process, the preset distance information and the point distance information obtained by scanning can be matched according to the point number information, thereby accurately determining the effective point where the point distance information has changed significantly.

[0063] In some embodiments, after the snapshot is captured by the snapshot camera, the method further includes:

[0064] The snapshot function of the snapshot camera is locked, and the laser scanning device is continuously used for scanning processing until it is detected that the object to be measured has left.

[0065] Specifically, a vehicle has a certain length and width, and a vehicle passing by may trigger a large number of snapshots. However, in this application, only the driver needs to be snapshotted and detected, so only the first snapshot is valid. Other snapshots after the first time will increase power consumption, consume device storage space, and affect the preparation time of the scanning device for the next snapshot. Therefore, in this embodiment, after completing a snapshot process through the snapshot camera, the snapshot function of the snapshot camera is locked. In some preferred embodiments, the snapshot camera has a locking state L, L=0 is unlocked, and L=1 is locked. After the snapshot function of the snapshot camera is locked, the laser scanning device continues to perform scanning processing, and detects whether there is a target object to be captured according to the method described above, until it is detected that the object to be measured has left the scanning range of the laser scanning device, and then the snapshot function of the snapshot camera is unlocked, so that the snapshot camera can perform normal snapshot processing. Through this embodiment, it can be achieved that multiple snapshot trigger signals based on the same target, that is, the same object to be measured, do not repeatedly trigger the snapshot camera.

[0066] In some embodiments, the method further comprises:

[0067] When it is detected that the residence time of the object to be measured exceeds a preset time threshold, an alarm signal is generated.

[0068] Specifically, when it is detected that the object to be measured stays in the scanning area of the laser scanning device for a long time, the snapshot camera will be in a locked state, thereby affecting the normal operation of the snapshot camera. Therefore, in some embodiments, when it is detected that the residence time of the object to be measured exceeds a preset time threshold, an alarm signal is generated to report the abnormality of the object to be measured. In other embodiments, the object to be measured can be continuously scanned and the width of the object to be measured can be calculated accordingly. When the width is greater than the first width threshold, or the width is less than the first width threshold but greater than the second width threshold, it is considered that a snapshot signal is generated to trigger the snapshot camera to capture a picture (it can be understood that since the snapshot camera is in a locked state at this time, although the snapshot signal exists, the snapshot camera will not perform snapshot processing), and the number of snapshot signals generated is counted. If the value of the snapshot number is greater than the preset trigger number threshold, it is considered that the vehicle has stayed for too long, wherein the trigger number threshold can be set by relevant technical personnel according to actual needs; in other embodiments, it can also be set to be triggered by time, that is, it can be set to calculate the time the object to be measured stays, and the calculated time is compared with the preset time threshold, without the need to use the number of snapshot signal generations mentioned above as the alarm basis, wherein, in actual applications, the above time threshold can be set by relevant technical personnel, for example, if the red light time at the intersection is 60s, then the above time threshold can be set to about 70s.

[0069] In some embodiments, after capturing the object to be measured, the object to be measured is scanned by a laser scanning device to obtain at least one scanning point;

[0070] Traverse each scan point acquired in sequence and detect the valid points among the scan points;

[0071] When the number of detected scanning points is equal to the number threshold, the width to be measured is calculated based on the orientation of the valid points. When the width to be measured is less than a preset second width threshold, it is determined that the object to be measured has left and the snapshot camera is unlocked, wherein the second width threshold is less than the first width threshold.

[0072] Specifically, after completing the capture of the object to be measured, the laser scanning device continues to scan the object to be measured. This is to clarify when the object to be measured leaves the scanning area, so as to facilitate accurate capture of the next object to be measured.

[0073] In this embodiment, after capturing the object to be measured, the laser scanning device scans it again, traversing each acquired scanning point and detecting valid points. When the number of scanning points is detected to be equal to the number threshold, that is, after detecting that a frame of scanning points has been acquired, the measured width of the object to be measured is calculated based on the valid points. When the measured width is detected to be less than a second width threshold, it is considered that the object to be measured is leaving the scanning area. The second width threshold can be adjusted by relevant technical personnel. In some preferred embodiments, the second width threshold can be set to 0.1m. It is understood that based on the appearance and structure of a typical vehicle, the second width threshold will be less than the first width threshold.

[0074] Through this embodiment, it is possible to effectively ensure that the vehicle that has been captured leaves, reduce misjudgment of some points, and avoid affecting the capture of the next object to be measured.

[0075] In some embodiments, the scanning mode of the laser scanning device is an equal-pitch resolution scanning mode, wherein the spacing between adjacent scanning points is equal.

[0076] Specifically, in traditional laser scanning systems, equi-angle scanning is generally used to facilitate the transformation of spatial coordinates. However, the points of equi-angle scanning are unevenly distributed on a straight line perpendicular to the scanning angle of 0°, such as Figure 3 As shown, Figure 3 The result of the conventional laser scanning with equal angles is shown in FIG. d1 and d0 are both the spacing between adjacent scanning points. As can be seen from the figure, d1 is obviously smaller than d0. Furthermore, in order to achieve the snapshot effect in this application, the scanning method of the laser scanning device in this embodiment is a scanning method with equal spacing resolution, that is, Figure 4 As shown, Figure 4 is the laser scanning result of equal spacing resolution in one embodiment. In this embodiment, a distance resolution d can be first defined, and then the scanning angle of any equal spacing scanning point can be calculated using the formula arctan (x×d / H) based on trigonometric functions, where x1 and x2 are different scanning angles for different scanning points, d is the distance between adjacent scanning points, i.e., the equal spacing resolution in this embodiment, and H is the height of the isosceles triangle formed by the scanning boundary schematic area and the laser trip line (see the attached diagram for the scanning boundary schematic area and the laser trip line). Figure 2 ). The scanning method with equal spacing resolution implemented in this embodiment can further simplify the subsequent method for calculating the width of the target to be measured.

[0077] In some embodiments, calculating the width to be measured based on the position of the valid point includes:

[0078] Each time a target scanning point is detected as a valid point, the preset target weight is automatically increased, wherein the initial value of the target weight is 0;

[0079] When it is detected that the number of scanning points is equal to the number threshold, the width to be measured is obtained based on the target weight and the spacing between adjacent scanning points.

[0080] Specifically, since the present application adopts a scanning method with equal spacing resolution, the calculation method of the width to be measured can be simplified in this embodiment. Each time a valid point is detected, the target weight is automatically incremented, wherein the initial value of the target weight is 0. Thus, in a complete frame of scanning results, the value of the target weight is the number of valid points. The calculation of the width to be measured can be simplified to w=k×d, wherein k is the value of the target weight in a complete frame of scanning results, and d is the width between adjacent scanning points. In this embodiment, the widths between adjacent scanning points are the same. Through this embodiment, the value of the width to be measured of the target to be measured can be completed quickly and accurately.

[0081] This application also provides a preferred embodiment of a vehicle detection method, Figure 5 The figure is a flow chart of a vehicle detection method in a preferred embodiment. The scanning points emitted by the laser scanning device are arranged in a row and located at the trip wire of the laser scanning device. Accordingly, when calculating the width of the object to be detected, the width at the location of the scanning points is also calculated. Therefore, if the position of the object to be detected changes, the width of the object to be detected calculated based on the scanning points will also change accordingly.

[0082] Step S510 initializes the laser scanning device and snapshot camera. Initialization includes calibrating the laser scanning device when there are no objects to be measured on the road. A frame is scanned as reference data when there are no objects to be measured. Each scanned point in the frame carries its own point number and preset distance information. Each scanned point is stored with its corresponding point number and preset distance information. The snapshot camera's snapshot function is then unlocked.

[0083] At the start of vehicle detection, step S520, the laser scanning device obtains the point distance information and point number information corresponding to each scanning point. It then verifies whether the difference between the obtained point distance information and the preset distance information is greater than a preset distance threshold. If so, the scanning point is identified as a valid point. At the beginning of each frame, the obtained scanning points are numbered starting from 0 according to the point counter, thereby obtaining the point number information for each point. The number of scanning points in each frame is fixed. When a valid point is detected, the target weight value is automatically incremented, and the target weight value is initially 0.

[0084] In step S530, when the number of acquired scanning points reaches a preset threshold, a frame is considered complete, and the width of the object to be measured is calculated based on the number of valid points. If the width exceeds a first width threshold, the detected object is considered a vehicle. If the snapshot camera's capture function is unlocked at this time, a capture signal is generated, controlling the camera to capture a snapshot of the object, and simultaneously resetting the point counter.

[0085] Step S540: After the snapshot camera completes a snapshot process based on the snapshot signal, the snapshot camera is locked, and then the laser scanning device is continued to perform scanning processing, and the width of the object to be measured is calculated to detect whether the width of the object to be measured is less than the second width threshold. If so, jump to step S541; if not, jump to step S542.

[0086] Step S541 : When the width of the object to be measured is calculated to be less than the second width threshold, it is determined that the object to be measured has left, and the snapshot camera is unlocked to prepare for the next snapshot of the vehicle.

[0087] In step S542, upon detecting that the width of the object to be measured is not less than the second width threshold, the time the object to be measured remains in the scanning range is calculated. If the residence time of the object to be measured exceeds a preset time threshold, an alarm signal is generated. There are various methods for calculating the residence time of the object to be measured in the scanning range, including but not limited to continuously scanning the object with a laser scanning device and continuously calculating the width of the object to be measured. If the width of the object to be measured is detected to exceed the first width threshold, and / or if the width of the object to be measured is detected to be less than the first width threshold but greater than the second width threshold, the snapshot camera is deemed to be triggered once (it is understood that since the snapshot camera is in a locked state at this time, although a trigger signal is present, the snapshot camera will not perform a snapshot process). The number of triggers is counted. If the number of triggers is greater than the preset trigger threshold, it is deemed that the vehicle has remained in the vehicle for too long.

[0088] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.

[0089] Based on the same inventive concept, embodiments of the present application further provide a vehicle detection device for implementing the aforementioned vehicle detection method. The solution provided by this device is similar to the solution described in the aforementioned method. Therefore, the specific limitations of one or more vehicle detection device embodiments provided below can be found in the above-described limitations of the vehicle detection method and will not be further elaborated here.

[0090] In one embodiment, Figure 6 As shown, a vehicle detection device is provided, including: an acquisition module 61, a calculation module 62 and a generation module 63, wherein:

[0091] An acquisition module 61 is configured to scan the object to be measured using a preset laser scanning device to acquire at least one scanning point, wherein each scanning point carries information on the distance between the scanning point and the laser scanning device;

[0092] The calculation module 62 is used to sequentially take each scanning point as a target scanning point, calculate the difference between the point distance information of the target scanning point and the corresponding preset distance information, and identify the target scanning point as a valid point if the difference is greater than a preset distance threshold;

[0093] The generation module 63 is used to calculate the measured width of the object to be measured based on the orientations of all valid points when it is detected that the number of acquired scanning points is equal to a preset number threshold. When the measured width is greater than the preset first width threshold, a capture signal is output to the preset capture camera, and the capture processing is performed by the capture camera.

[0094] Each module in the vehicle detection device described above may be implemented in whole or in part through software, hardware, or a combination thereof. Each module may be embedded in or independent of a processor in a computer device in the form of hardware, or may be stored in a memory in the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.

[0095] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 7As shown. The computer device includes a processor, a memory, and a network interface connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is used to store vehicle detection-related data. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a vehicle detection method is implemented.

[0096] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0097] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0098] Scanning the object to be measured by a preset laser scanning device to obtain at least one scanning point, wherein each scanning point carries point distance information of the scanning point from the laser scanning device;

[0099] Each scanning point is taken as a target scanning point in turn, and the difference between the point distance information of the target scanning point and the corresponding preset distance information is calculated. If the difference is greater than the preset distance threshold, the target scanning point is identified as a valid point;

[0100] When it is detected that the number of acquired scanning points is equal to a preset number threshold, the measured width of the object to be measured is calculated based on the orientation of all valid points. When the measured width is greater than the preset first width threshold, a capture signal is output to the preset capture camera, and the capture processing is performed by the capture camera.

[0101] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:

[0102] Scanning the object to be measured by a preset laser scanning device to obtain at least one scanning point, wherein each scanning point carries point distance information of the scanning point from the laser scanning device;

[0103] Each scanning point is taken as a target scanning point in turn, and the difference between the point distance information of the target scanning point and the corresponding preset distance information is calculated. If the difference is greater than the preset distance threshold, the target scanning point is identified as a valid point;

[0104] When it is detected that the number of acquired scanning points is equal to a preset number threshold, the measured width of the object to be measured is calculated based on the orientation of all valid points. When the measured width is greater than the preset first width threshold, a capture signal is output to the preset capture camera, and the capture processing is performed by the capture camera.

[0105] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0106] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the above-mentioned embodiments. In particular, any reference to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processors involved in the various embodiments provided herein may be, but are not limited to, general-purpose processors, central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), programmable logic devices (PLDs), data processing logic devices based on quantum computing, and the like.

[0107] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0108] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. A vehicle detection method, characterized in that: The method comprises: Scanning the object to be measured by a preset laser scanning device to obtain at least one scanning point, wherein each scanning point carries information about the distance between the scanning point and the point of the laser scanning device; Taking each of the scanning points as a target scanning point in turn, calculating the difference between the point distance information of the target scanning point and the corresponding preset distance information, and identifying the target scanning point as a valid point if it is detected that the difference is greater than a preset distance threshold; When it is detected that the number of the acquired scanning points is equal to a preset number threshold, the measured width of the object to be measured is calculated based on the orientations of all the valid points. When the measured width is greater than the preset first width threshold, a capture signal is output to a preset capture camera, and capture processing is performed through the capture camera.

2. The method according to claim 1, characterized in that Before scanning the object to be measured by a preset laser scanning device to obtain at least one scanning point, the method further includes: In a preset calibration scenario, the laser scanning device is used to scan to obtain at least one scanning point, wherein each scanning point carries the preset distance information of the scanning point from the laser scanning device and point number information, and the point number information is used to correspond the obtained point distance information with the preset distance information; The preset distance information and point number information corresponding to each scanning point are saved and processed.

3. The method according to claim 1, characterized in that After the snapshot camera performs snapshot processing, the method further includes: The snapshot function of the snapshot camera is locked, and the laser scanning device is continuously used for scanning processing until it is detected that the object to be measured leaves.

4. The method according to claim 3, characterized in that The method further comprises: When it is detected that the residence time of the object to be measured exceeds a preset time threshold, an alarm signal is generated.

5. The method according to claim 3, wherein: After completing the capture of the object to be measured, scanning the object to be measured by the laser scanning device to obtain at least one scanning point; Traversing each of the acquired scanning points in sequence, and detecting the valid points among the scanning points; When the number of the detected scanning points is equal to the number threshold, the width to be measured is calculated based on the orientation of the valid points. When the width to be measured is less than a preset second width threshold, it is determined that the object to be measured has left and the snapshot camera is unlocked, wherein the second width threshold is less than the first width threshold.

6. The method according to claim 1, wherein The scanning mode of the laser scanning device is an equal-pitch resolution scanning mode, wherein the spacing between adjacent scanning points is equal.

7. The method according to claim 6, characterized in that The calculating the width to be measured based on the orientation of the effective point includes: Each time a target scanning point is detected as a valid point, a preset target weight is automatically incremented, wherein the initial value of the target weight is 0; When it is detected that the number of the scanning points is equal to the number threshold, the width to be measured is obtained based on the target weight and the distance between adjacent scanning points.

8. A vehicle detection device, characterized in that: The device comprises: An acquisition module is used to scan the object to be measured by a preset laser scanning device to obtain at least one scanning point, wherein each scanning point carries point distance information of the scanning point from the laser scanning device; a calculation module, configured to sequentially use each of the scanning points as a target scanning point, calculate a difference between the point distance information of the target scanning point and the corresponding preset distance information, and identify the target scanning point as a valid point if it is detected that the difference is greater than a preset distance threshold; A generation module is used to calculate the measured width of the object to be measured based on the orientations of all the valid points when it is detected that the number of the acquired scanning points is equal to a preset number threshold; when the measured width is greater than a preset first width threshold, output a capture signal to a preset capture camera, and perform capture processing through the capture camera.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.