Height detection method and device, electronic equipment and storage medium

By judging the accuracy of vehicle height detection by using the image data of the first and second photographing equipment, the problem of height detection deviation in the prior art is solved, and higher detection accuracy is achieved.

CN120107329APending Publication Date: 2025-06-06ZHEJIANG UNIVIEW TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311666160.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-06
Publication Date
2025-06-06

AI Technical Summary

Technical Problem

There are large deviations in height detection in the prior art, especially when the vehicle is loaded or installed with other ultra-high objects or is blocked by objects.

Method used

The detection height of the detection target is determined based on the first image captured by the first photographing device, and the estimated position is determined by using the second photographing device, and the accuracy of the detection height is judged by comparing it with the actual position, thereby improving the accuracy of the height detection.

Benefits of technology

It effectively reduces the deviation of height detection and improves the accuracy of vehicle height detection, especially when the vehicle is loaded or blocked by objects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120107329A_ABST
    Figure CN120107329A_ABST
Patent Text Reader

Abstract

The invention provides a height detection method and device, electronic equipment and a storage medium, and the method comprises the steps: determining the detection height of a detection target based on a first image obtained by photographing the detection target through first photographing equipment; determining an estimated position of a second shooting device based on the detection height and a second image shot by the second shooting device for the detection target; judging whether the detection height of the detection target is accurate or not based on the estimated position of the second shooting equipment and the actual position of the second shooting equipment; under the condition that the detection height of the detection target is determined to be accurate, the detection height of the detection target is determined based on the detection height; the estimated position of the second shooting equipment is analyzed through the detection height and the second image shot by the second shooting equipment on the detection target, and the accuracy of the detection height of the detection target is reversely deduced through comparison verification with the actual position of the second shooting equipment, so that the accuracy of height detection is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of automatic detection technology, and in particular to a height detection method, device, electronic equipment and storage medium. Background Art

[0002] When a vehicle is equipped with extra-high items, it is easy to cause collisions with low-hanging objects (such as bridges, tunnels) or power lines and other facilities during driving because the vehicle cannot clearly know the actual height of the vehicle body.

[0003] In the related technology, electronic height limit is mainly achieved by capturing images through a fixed checkpoint, obtaining the highest pixel point through the image contour, and calculating the highest point of the vehicle through the proportional relationship between the pixel and the real object. The advantage of this implementation method is that it is more suitable for container-type and flat vehicles, but when the vehicle is loaded or installed with other super-high objects or there are objects blocking the view, there will be large deviations in height detection. Summary of the invention

[0004] The present invention provides a height detection method, device, electronic equipment and storage medium, which are used to solve the defect of large deviation in height detection in the prior art and improve the accuracy of vehicle height detection.

[0005] The present invention provides a height detection method, comprising:

[0006] Determine a detection height of the detection target based on a first image captured by a first shooting device.

[0007] Determine an estimated position of the second shooting device based on the detection height and a second image of the detection target captured by the second shooting device;

[0008] Based on the estimated position of the second shooting device and the actual position of the second shooting device, determining whether the detection height of the detection target is accurate;

[0009] In the case where it is determined that the detection height of the detection target is accurate, determining the actual height of the detection target based on the detection height;

[0010] The actual position of the second shooting device is different from the actual position of the first shooting device.

[0011] According to a height detection method provided by the present invention, the method of determining the estimated position of the second shooting device based on the detected height and a second image of the detection target captured by the second shooting device includes:

[0012] Based on the second image, obtaining a pixel height of the detection target in the second image;

[0013] Based on the detection height, the pixel height of the detection target in the second image, and the height of the second shooting device, obtaining a plane distance between the second shooting device and the position information of the detection target when the second image is shot;

[0014] An estimated position of the second photographing device is determined based on the plane distance, the position information of the detection target when the second image is photographed, and the photographing direction of the second photographing device.

[0015] According to a height detection method provided by the present invention, the method of obtaining a plane distance between the second shooting device and the position information of the detection target when the second image is shot based on the detection height, the pixel height of the detection target in the second image, and the height of the second shooting device, includes:

[0016] Based on the detection height, the pixel height and the height of the second shooting device, a plane distance between the second shooting device and the position information of the detection target when the second image is shot is calculated by a first formula;

[0017] Wherein, the first formula is expressed as:

[0018]

[0019] H C is the height of the second camera, H A is the detection height, H AP is the pixel height, F is the shooting focal length of the second shooting device; and L is the plane distance.

[0020] According to a height detection method provided by the present invention, judging whether the detection height of the detection target is accurate based on the estimated position of the second shooting device and the actual position of the second shooting device includes:

[0021] In a case where the distance between the estimated position of the second shooting device and the actual position of the second shooting device is greater than a preset deviation, determining that the detection height of the detection target is inaccurate;

[0022] In a case where the distance between the estimated position of the second photographing device and the actual position of the second photographing device is less than or equal to a preset deviation, it is determined that the detection height of the detection target is accurate.

[0023] According to a height detection method provided by the present invention, the method further comprises:

[0024] When it is determined that the detection height of the detection target is inaccurate, at least one of the following is performed:

[0025] discarding the detection height of the detection target; or,

[0026] The first image and / or the second image are photographed again, and height detection is performed based on the first image and / or the second image photographed again.

[0027] The present invention provides a height detection method, comprising:

[0028] In the process of detecting the movement of the target, performing the first process at least once;

[0029] Determine the accurate actual height of the detection target based on the actual height of the detection target obtained in the last first process;

[0030] The first process includes: using a first photographing device and a second photographing device corresponding to the real-time position information of the detection target to perform at least one second process;

[0031] The second process includes:

[0032] Determine a detection height of the detection target based on a first image captured by a first shooting device.

[0033] Determine an estimated position of the second shooting device based on the detection height and a second image of the detection target captured by the second shooting device;

[0034] Based on the estimated position of the second shooting device and the actual position of the second shooting device, determining whether the detection height of the detection target is accurate;

[0035] In the case where it is determined that the detection height of the detection target is accurate, determining the actual height of the detection target based on the detection height;

[0036] The actual position of the second shooting device is different from the actual position of the first shooting device.

[0037] The present invention provides a height detection device, comprising:

[0038] A height detection module, used to determine a detection height of the detection target based on a first image captured by a first shooting device of the detection target;

[0039] a position estimation module, configured to determine an estimated position of the second shooting device based on the detection height and a second image of the detection target captured by the second shooting device;

[0040] a judging module, configured to judge whether the detection height of the detection target is accurate based on the estimated position of the second shooting device and the actual position of the second shooting device;

[0041] A height determination module, configured to determine an actual height of the detection target based on the detection height when the detection height of the detection target is determined to be accurate;

[0042] The actual position of the second shooting device is different from the actual position of the first shooting device.

[0043] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of any of the above-mentioned height detection methods are implemented.

[0044] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the height detection methods described above are implemented.

[0045] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the steps of any one of the height detection methods described above are implemented.

[0046] The height detection method, device, electronic device and storage medium provided by the present invention, after determining the detection height of the detection target based on a first image taken by a first shooting device, further adopt a second shooting device to shoot the detection target, and analyze the estimated position of the second shooting device based on the detection height and the second image taken by the second shooting device to the detection target, and verify the validity of the estimated position of the second shooting device obtained by the current analysis by comparing with the actual position of the second shooting device, thereby reversely deducing the accuracy of the detection height of the detection target, and when the detection height of the detection target is accurate, the detection height of the detection target is obtained, thereby improving the accuracy of height detection. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0048] Figure 1 This is one of the flow charts of the height detection method provided by the embodiment of the present invention;

[0049] Figure 2 It is a schematic diagram of a height detection method provided by the related art;

[0050] Figure 3 is a schematic diagram of a height detection method provided by an embodiment of the present invention;

[0051] Figure 4 This is the second flow chart of the height detection method provided by the embodiment of the present invention;

[0052] Figure 5 This is a third flow chart of the height detection method provided by an embodiment of the present invention;

[0053] Figure 6 is a schematic structural diagram of a height detection device provided by an embodiment of the present invention;

[0054] Figure 7 An example physical structure diagram of an electronic device is provided. DETAILED DESCRIPTION

[0055] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings 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 creative work are within the scope of protection of the present invention.

[0056] First, the following contents are introduced:

[0057] Fixed cameras taking pictures at a specific angle are only suitable for regular and flat vehicles. When the vehicle is loaded or installed with other super-high objects or there are objects blocking the view, the vehicle height obtained only by the outline obtained through the front-facing photo will have a large deviation from the actual height.

[0058] For example, Figure 2 It is a schematic diagram of a height detection method provided by related technology, such as Figure 2 As shown in the figure, when the vehicle is farther away from the camera, the pixel distance between point A and point B on the captured image is closer; when the angle between the current camera's capture angle of view and the vehicle is large, due to object occlusion, only the point of the distant object can be captured (as the angle of view decreases, the distant point gradually gets closer). At this time, if the height of the object point is calculated only by the pixel ratio, there will be a large error between the calculated height and the actual height (the heights of points A and B appear similar).

[0059] The height detection method, device, electronic device and storage medium provided by the present invention can improve the accuracy of height detection.

[0060] The height detection method, device, electronic device and storage medium of the present invention are described below in conjunction with the accompanying drawings.

[0061] Figure 1 is one of the flow charts of the height detection method provided by the embodiment of the present invention, such as Figure 1 As shown, the method includes:

[0062] Step 100, determining a detection height of the detection target based on a first image captured by a first shooting device.

[0063] Optionally, the detection target may be an object in a stationary state, or an object in a moving state, or an object switching from a stationary state to a moving state, or an object switching from a moving state to a stationary state;

[0064] For example, the detection target can be a vehicle traveling on the road, such as a vehicle loaded with goods, or a vehicle equipped with equipment;

[0065] For example, the detection target may be a passenger car operating on a highway, a cargo transport vehicle, a semi-trailer tractor, a heavy-duty truck, a motorhome, or a car or off-road vehicle with items fixed on the roof, and the present invention is not limited to this; accordingly, the present invention needs to detect not only the height of the vehicle itself, but the height of the whole composed of the vehicle and the items loaded or installed thereon.

[0066] Optionally, the first photographing device may be a fixed photographing device around the detection target.

[0067] Optionally, the first image can be obtained by photographing the detection target based on the first shooting device, and the contour information of the detection target in the first image can be obtained based on the first image, so as to obtain the pixel height of the detection target in the first image, and calculate the detection height of the vehicle according to the pixel ratio of the first image; the first shooting device can take multiple first images, that is, multiple detection heights of the vehicle can be obtained based on the multiple first images, that is, the detection height of the vehicle can be formed.

[0068] Optionally, a first image can be obtained by photographing the detection target based on a first shooting device, and contour information of the detection target in the first image can be obtained based on the first image, thereby obtaining the pixel height of the detection target in the first image, and calculating the detection height of the vehicle according to the pixel ratio of the first image; wherein, the pixel ratio of the first image can be obtained based on the conversion relationship between the pixel height of the vehicle body and the actual height of the vehicle body, or based on the conversion relationship between the pixel width of the vehicle body and the actual width of the vehicle body, wherein the actual height or width of the vehicle body can be obtained by retrieving relevant registration information of the vehicle from the vehicle management office after recognizing the license plate number based on the first image.

[0069] Optionally, at least one first image may be obtained based on continuous or discontinuous photographing of the detection target by the first photographing device, and the pixel height of the detection target in the at least one first image may be obtained based on contour information of the detection target in the at least one first image, and the detection height of the vehicle may be calculated based on the pixel ratio of the at least one first image.

[0070] For example, taking the detection target as a vehicle, a fixed camera (first shooting device) installed at a checkpoint that the vehicle reaches or passes through when driving is used to capture the detection target to obtain a first image, and pixel contour information of the vehicle is obtained based on the first image, including contour information of the vehicle body. After recognizing the license plate number based on the first image, relevant registration information of the vehicle is retrieved from the vehicle management office to obtain parameters such as the actual body length and actual body width of the vehicle. Based on parameters such as the actual body length and actual body width of the vehicle and the contour information of the vehicle body, the pixel ratio of the first image is obtained, and the height of the vehicle is calculated based on the pixel contour information of the vehicle and the pixel ratio of the first image.

[0071] Optionally, the detection height in each embodiment of the present invention may be a single value, or a value range consisting of multiple values, that is, a detection height range.

[0072] In one embodiment, taking the detection target as a vehicle and the first shooting device as a bayonet camera installed at a bayonet that the vehicle reaches or passes through when driving as an example, determining the detection height of the detection target may include the following process:

[0073] (1) Obtain standard parameter information of the detection target;

[0074] Analyze at least one first image captured by the bayonet camera to obtain the license plate number of the detection target, and then retrieve relevant registration information of the detection target from the vehicle management office according to the license plate number of the detection target, so as to obtain parameter-related information of the detection target, such as actual vehicle body length, actual vehicle body width and other parameters;

[0075] (2) Obtaining the proportional relationship between pixel height and true height;

[0076] Based on at least one first image of the detection target captured by the bayonet camera, all captured data of the detection target under the current bayonet are obtained, and the pixel height HP of the vehicle body under each captured data is recorded (the present invention takes the vehicle body height as an example for explanation, and the actual calculation process can refer to the length or width or height of multiple parts of the vehicle) and the angle θ between the bayonet camera and the vehicle body. Combined with the actual height HR of the vehicle body, the pixel ratio relationship of the image taken by the bayonet camera can be calculated. The calculation results are shown in Table 1 below.

[0077] Table 1

[0078]

[0079] According to the information in Table 1, the conversion relationship between pixel height and actual height is obtained by fitting, as shown below:

[0080] Hreal=Hpix×S(HP, HR, θ);

[0081] Among them, Hreal is the actual height of the vehicle body of the detection target, Hpix is ​​the pixel height of the vehicle body of the detection target, and the S function is the conversion relationship function obtained by fitting using Table 1;

[0082] (3) Calculate the height range of the detection target based on the conversion relationship;

[0083] According to the pixel height of the detection target in the first image captured by the bayonet camera, the detection height range of the detection target can be obtained by substituting the conversion relationship function of step (2) into it.

[0084] Step 110, determining an estimated position of the second shooting device based on the detection height and a second image of the detection target captured by the second shooting device;

[0085] Step 120, judging whether the detection height of the detection target is accurate based on the estimated position of the second shooting device and the actual position of the second shooting device;

[0086] Specifically, due to inaccurate height detection in some scenarios, such as when the vehicle is loaded or installed with other super-high objects or there are objects blocking it, the vehicle height obtained only by obtaining the outline through the front-facing snapshot will have a large deviation from the actual height. Therefore, the present invention can use a second shooting device to shoot the detection target, and analyze the estimated position of the second shooting device based on the detection height and the second image of the detection target taken by the second shooting device, and verify the validity of the estimated position of the second shooting device obtained by the current analysis by comparing it with the actual position of the second shooting device, so as to reversely infer the accuracy of the detection height of the detection target.

[0087] Optionally, the estimated position in each embodiment of the present invention may be a single position, or may be a range consisting of multiple positions, ie, an estimated position range.

[0088] Optionally, taking the detection target as a vehicle as an example, the first shooting device may be a checkpoint camera set at the checkpoint that the vehicle arrives at or passes through, and the second shooting device may be a roadside camera on the road on which the vehicle is traveling; for example, after the first image is obtained by capturing the detection target through the checkpoint camera, the detection height range of the detection target is calculated based on the first image. If there are one or more roadside cameras that have captured the vehicle, the position information of the roadside camera can be obtained based on the detection height range and relevant data analysis of the roadside camera, and then the validity of the estimated position range of the roadside camera obtained by the current analysis can be verified by comparing it with the actual position of the roadside camera, thereby inferring the accuracy of the detection height range of the detection target.

[0089] Optionally, the time when the second shooting device shoots the detection target and the time when the first shooting device shoots the detection target may be the same or different.

[0090] Step 130, when it is determined that the detection height of the detection target is accurate, determining the actual height of the detection target based on the detection height;

[0091] The actual position of the second shooting device is different from the actual position of the first shooting device.

[0092] Specifically, when it is determined that the currently calculated detection height is accurate, the currently calculated detection height can be used as the detection height of the detection target, or the detection height of the detection target can be updated to improve the accuracy of the detection height of the detection target.

[0093] Specifically, when it is determined that the currently calculated detection height is accurate, the multiple currently calculated detection heights can be used as the height range of the detection target, or the height range of the detection target can be updated to improve the accuracy of the height range of the detection target.

[0094] The height detection method provided by the present invention determines the detection height of the detection target based on a first image taken by a first shooting device, further adopts a second shooting device to shoot the detection target, and analyzes the estimated position of the second shooting device based on the detection height and the second image taken by the second shooting device to the detection target, and verifies the validity of the estimated position of the second shooting device currently analyzed by comparing with the actual position of the second shooting device, thereby reversely deducing the accuracy of the detection height of the detection target, and when the detection height of the detection target is accurate, the detection height of the detection target is obtained, thereby improving the accuracy of height detection.

[0095] Optionally, the first shooting device may be a camera device, and the second shooting device may be a road test device near the camera device;

[0096] Optionally, the first shooting device may be a drive test device, and the second shooting device may be a camera device near the drive test device;

[0097] Optionally, the first shooting device may be the first bayonet device of a bayonet, and the second shooting device may be the second bayonet device of the bayonet, and the two bayonet devices of the bayonet are arranged at different positions or have different shooting directions.

[0098] Optionally, the first shooting device may be a drive test device, and the second shooting device may be another drive test device near the drive test device, and the two drive test devices are arranged at different locations or have different shooting directions.

[0099] Optionally, in some embodiments, determining the estimated position of the second shooting device based on the detection height and a second image of the detection target captured by the second shooting device includes:

[0100] Based on the second image, obtaining a pixel height of the detection target in the second image;

[0101] Based on the detection height, the pixel height of the detection target in the second image, and the height of the second shooting device, obtaining a plane distance between the second shooting device and the position information of the detection target when the second image is shot;

[0102] An estimated position of the second photographing device is determined based on the plane distance, the position information of the detection target when the second image is photographed, and the photographing direction of the second photographing device.

[0103] Optionally, the plane distance between the second shooting device and the position information of the detection target when the second image is shot can be a single value, or a range of values ​​consisting of multiple values, that is, a plane distance range.

[0104] Optionally, the pixel height of the detection target in the second image may be a single value or a value range consisting of a plurality of values, that is, a pixel height range.

[0105] Specifically, after adopting the second shooting device to capture the detection target and obtain a second image, the pixel height of the detection target in the second image can be obtained based on the second image, and based on the ratio between the pixel height of the detection target in the second image and the detection height, combined with the height of the second shooting device, the planar distance between the second shooting device and the detection target is calculated, and further combined with the position information of the detection target when the second image is captured and the shooting direction of the second shooting device, the estimated position of the second shooting device is calculated.

[0106] Taking the detection target as an example, the first shooting device can be a checkpoint camera set at the checkpoint that the vehicle arrives at or passes through, and the second shooting device can be a roadside camera on the road on which the vehicle is traveling. After the roadside camera is used to capture the vehicle to obtain a second image, the pixel height range of the vehicle in the second image can be obtained based on the second image, and based on the ratio between the pixel height range of the vehicle in the second image and the detection height range of the vehicle obtained by detecting the first image taken by the checkpoint camera, combined with the height of the roadside camera, the plane distance range between the roadside camera and the vehicle at the time of shooting is calculated, and further combined with the vehicle's position at the time of shooting and the shooting direction of the roadside camera, the estimated position range of the roadside camera is calculated.

[0107] Taking the detection target as an example, the first shooting device can be the first bayonet camera set at the bayonet that the vehicle arrives at or passes through, and the second shooting device can be the second bayonet camera set at the bayonet. After the second image is obtained by photographing the vehicle with the second bayonet camera, the pixel height range of the vehicle in the second image can be obtained based on the second image, and based on the ratio between the pixel height range of the vehicle in the second image and the detection height range of the vehicle obtained by detecting the first image taken by the first bayonet camera, combined with the height of the second bayonet camera, the plane distance range between the second bayonet camera and the vehicle at the time of shooting is calculated, and further combined with the vehicle's position at the time of shooting and the shooting direction of the second bayonet camera, the estimated position range of the second bayonet camera is calculated.

[0108] Specifically, based on the plane distance range between the second shooting device and the detection target (taking the maximum and minimum values ​​for calculation, such as the maximum value L), combined with the position information of the detection target when the second image is captured and the shooting direction of the second shooting device, when the estimated position range of the second shooting device is calculated, the position information P of the detection target when the second image is captured can be used. A (x, y) and the direction vector D (dx, dy0) of the shooting direction of the second shooting device, the estimated position range P of the roadside camera is calculated C (x, y):

[0109] P C (x, y0 = P A (x, y)+D(dx, dy)*L.

[0110] Optionally, in some embodiments, obtaining the plane distance between the second shooting device and the position information of the detection target when the second image is shot based on the detection height, the pixel height of the detection target in the second image, and the height of the second shooting device includes:

[0111] Based on the detection height, the pixel height and the height of the second shooting device, a plane distance between the second shooting device and the position information of the detection target when the second image is shot is calculated by a first formula;

[0112] Wherein, the first formula is expressed as:

[0113]

[0114] H C is the height of the second camera, H A is the detection height, H AP is the pixel height, F is the shooting focal length of the second shooting device; and L is the plane distance.

[0115] Optionally, based on the maximum value of the detection height range, the maximum value of the pixel height range and the height of the second shooting device, the maximum value of the plane distance range between the second shooting device and the position information of the detection target when the second image is shot can be calculated by a first formula; based on the maximum value of the plane distance range, the plane distance range between the second shooting device and the position information of the detection target when the second image is shot is determined;

[0116] Wherein, the first formula is expressed as:

[0117]

[0118] H C is the height of the second camera, H A is the maximum value of the detection height range, H AP is the maximum value of the pixel height range, F is the shooting focal length of the second shooting device; and L is the maximum value of the plane distance range.

[0119] Specifically, Figure 3 is a schematic diagram of a height detection method provided by an embodiment of the present invention, such as Figure 3 As shown, based on the calculated detection height range of the detection target (taking the maximum and minimum values ​​for calculation), combined with the height H of the second shooting device C , the vertical distance H between the second shooting device and the position of the detection target when the second image is shot can be obtained by calculation AC :H AC =H C -H A Then, the straight-line distance L between the second shooting device and the position of the detection target when the second image is captured can be calculated according to the detection height range of the detection target (taking the maximum and minimum values) AC, and then based on the pixel height H of the detected target in the second image AP , using the imaging formula and the detection height range (maximum and minimum values) H A , the plane distance range between the second shooting device and the position information of the detection target when the second image is shot can be calculated.

[0120] The specific steps for calculating the plane distance range between the second shooting device and the position information of the detection target when the second image is shot are as follows:

[0121] (1) According to the lens imaging principle diagram, the object distance u calculation formula can be derived:

[0122] u = F (1 + h / h');

[0123] Where F is the focal length of the camera, h is the real height of the object, and h′ is the pixel height of the object;

[0124] Since the camera is generally installed at an angle of θ, that is, the height of the detection target in the lens imaging of the second shooting device needs to be multiplied by cosθ, then the straight-line distance L between the second shooting device and the detection target when the second image is captured is AC It can be expressed as:

[0125]

[0126] (2) According to the straight-line distance L AC The expression of can be obtained by obtaining the plane distance L between the second shooting device and the position information of the detection target when the second image is shot, which can be expressed as:

[0127] (3) Further according to the height H of the second shooting device C , through the triangular relationship we can get:

[0128] (4) Substituting cosθ into the above expression of plane distance L, the first formula can be obtained as follows:

[0129]

[0130] Optionally, in some embodiments, judging whether the detection height of the detection target is accurate based on the estimated position of the second shooting device and the actual position of the second shooting device includes:

[0131] In a case where the distance between the estimated position of the second shooting device and the actual position of the second shooting device is greater than a preset deviation, determining that the detection height of the detection target is inaccurate;

[0132] In a case where the distance between the estimated position of the second photographing device and the actual position of the second photographing device is less than or equal to a preset deviation, it is determined that the detection height of the detection target is accurate.

[0133] The position information of the roadside camera obtained by the above calculation is compared with the actual position information of the roadside camera, and the validity of the current position information is verified in combination with the map.

[0134] Specifically, when the estimated position of the second camera device is compared with the actual position of the second camera device to verify the validity of the estimated position of the second camera device obtained by the current analysis, and the accuracy of the detection height of the detection target is deduced from this, if the estimated position of the second camera device obtained based on the detection height of the detection target is inaccurate, it can be determined that the detection height of the detection target is inaccurate; if the estimated position of the second camera device obtained based on the detection height of the detection target is accurate, it can be determined that the detection height of the detection target is accurate;

[0135] Specifically, a preset deviation can be preset. When the distance between the estimated position of the second shooting device and the actual position of the second shooting device is greater than the preset deviation, it is determined that the estimated position of the second shooting device obtained based on the detection height of the detection target is inaccurate, and the detection height of the detection target can be determined to be inaccurate; when the distance between the estimated position of the second shooting device and the actual position of the second shooting device is less than or equal to the preset deviation, it is determined that the estimated position of the second shooting device obtained based on the detection height of the detection target is accurate, and the detection height of the detection target can be determined to be accurate.

[0136] For example, taking the detection target as a vehicle, the first shooting device is a checkpoint camera set at the checkpoint that the vehicle arrives at or passes through, and the second shooting device is a roadside camera of the road on which the vehicle is traveling, after the roadside camera is used to capture the vehicle to obtain a second image, the pixel height of the vehicle in the second image can be obtained based on the second image, and based on the pixel height of the vehicle in the second image, the ratio between the detection height of the vehicle obtained by detecting the first image of the vehicle captured by the checkpoint camera, combined with the height of the roadside camera, the plane distance between the roadside camera and the position of the vehicle at the time of shooting is calculated, and further combined with the position of the vehicle at the time of shooting and the shooting direction of the roadside camera, the estimated position of the roadside camera is calculated; the preset deviation can be 1m, if the deviation between the estimated position and the actual position of the roadside camera is within the preset deviation range (±1m), the detection height of the detection target currently calculated is considered to be true and valid, otherwise the detection height of the detection target currently calculated is considered to be invalid.

[0137] For example, assuming that the detection target is a vehicle, the first shooting device can be the first bayonet camera set at the bayonet that the vehicle arrives at or passes through, and the second shooting device can be the second bayonet camera set at the bayonet. After the second image is obtained by photographing the vehicle with the second bayonet camera, the pixel height of the vehicle in the second image can be obtained based on the second image, and based on the ratio between the pixel height of the vehicle in the second image and the detection height of the vehicle obtained by detecting the first image taken by the first bayonet camera, combined with the height of the second bayonet camera, the plane distance between the second bayonet camera and the position of the vehicle at the time of shooting is calculated, and further combined with the position of the vehicle at the time of shooting and the shooting direction of the second bayonet camera, the estimated position of the second bayonet camera is calculated; the preset deviation can be 1m, if the deviation between the estimated position and the actual position of the second bayonet camera is within the preset deviation range (±1m), the detection height of the detection target currently calculated is considered to be true and valid, otherwise the detection height of the detection target currently calculated is considered to be invalid.

[0138] Optionally, in some embodiments, the method further comprises:

[0139] When it is determined that the detection height of the detection target is inaccurate, at least one of the following is performed:

[0140] discarding the detection height of the detection target; or,

[0141] The first image and / or the second image are photographed again, and height detection is performed based on the first image and / or the second image photographed again.

[0142] Specifically, if the deviation between the estimated position of the second shooting device and the actual position of the second shooting device is large, such as greater than a preset deviation, and / or the estimated position of the second shooting device is located in an area on the map where it is impossible to install a camera, such as inside a factory building, etc., then it can be said that the detection height of the detection target currently detected is inaccurate and requires a secondary correction. The detection height of the detection target currently detected can be discarded; the first image can also be re-shot, and the detection height of the new detection target can be calculated for secondary verification; the second image can also be re-shot, and the estimated position of the second shooting device can be recalculated for secondary verification; the first image and the second image can also be re-shot, and the detection height of the new detection target can be calculated, and secondary verification can be performed based on the recalculated estimated position of the second shooting device.

[0143] For example, taking the detection target as a vehicle, the first shooting device is the checkpoint camera set at the checkpoint that the vehicle arrives at or passes through, and the second shooting device is the roadside camera of the road on which the vehicle is traveling. If there is no roadside camera at the current checkpoint or it is determined through analysis that the deviation between the estimated position and the actual position of the roadside camera is large, the vehicle can drive to the next checkpoint node for secondary or multiple inspections and verifications. If there is no roadside camera at the next checkpoint node, it will continue to drive to the next checkpoint node with a roadside camera for secondary or multiple inspections and verifications. And so on. When the vehicle passes through multiple checkpoints, the accuracy of the detection height of the detection target is continuously corrected until it reaches the set threshold range or until the detection height of the detection target converges.

[0144] Figure 4 FIG. 2 is a flow chart of the height detection method provided by an embodiment of the present invention. Figure 4 As shown, the method includes:

[0145] Step 400, in the process of detecting the movement of the target, executing the first process at least once;

[0146] Step 410, determining the accurate actual height of the detection target based on the actual height of the detection target obtained in the last first process;

[0147] The first process includes: using a first photographing device and a second photographing device corresponding to the real-time position information of the detection target to perform at least one second process;

[0148] The second process includes:

[0149] Determine a detection height of the detection target based on a first image captured by a first shooting device.

[0150] Determine an estimated position of the second shooting device based on the detection height and a second image of the detection target captured by the second shooting device;

[0151] Based on the estimated position of the second shooting device and the actual position of the second shooting device, determining whether the detection height of the detection target is accurate;

[0152] In the case where it is determined that the detection height of the detection target is accurate, determining the actual height of the detection target based on the detection height;

[0153] The actual position of the second shooting device is different from the actual position of the first shooting device.

[0154] Figure 5 FIG. 3 is a flow chart of the height detection method provided by an embodiment of the present invention. Figure 5 As shown, taking the case where the detection target is a vehicle, the first shooting device is a checkpoint camera set at the checkpoint that the vehicle arrives at or passes through, and the second shooting device is a roadside camera of the road on which the vehicle is traveling as an example, after the roadside camera is used to shoot the vehicle to obtain a second image, the pixel height of the vehicle in the second image can be obtained based on the second image, and based on the pixel height of the vehicle in the second image, the ratio of the detection height of the vehicle obtained by detecting the first image of the vehicle shot by the checkpoint camera is combined with the height of the roadside camera to calculate the plane distance between the roadside camera and the position of the vehicle at the time of shooting, and further combined with the position of the vehicle at the time of shooting and the shooting direction of the roadside camera, the estimated position of the roadside camera is calculated; the preset deviation can be 1m, if the estimated position of the roadside camera If the deviation between the current position and the actual position is within the preset deviation range (±1m), the detection height of the detection target currently calculated is considered to be true and valid; otherwise, the detection height of the detection target currently calculated is considered to be invalid, and the vehicle can drive to the next checkpoint node for secondary or multiple inspections and verifications. If there is no roadside camera at the next checkpoint node, continue to drive to the next checkpoint node with a roadside camera for secondary or multiple inspections and verifications (that is, execute the second process at least once), and so on. When the vehicle passes through multiple checkpoints, the accuracy of the detection height of the detection target is continuously corrected (that is, the first process is executed at least once) until the set threshold range is reached or until the detection height of the detection target converges, the accurate actual height of the detection target is obtained.

[0155] In one embodiment, the detection target is a vehicle, the first shooting device is a bayonet camera set at the bayonet that the vehicle reaches or passes, and the second shooting device is a roadside camera of the road on which the vehicle is traveling. The bayonet camera obtains a snapshot of the traveling vehicle, and the detection height of the detection target is calculated based on the snapshot image and the pixel ratio relationship. Then, the detection height of the detection target is corrected, that is, the position of the roadside camera is obtained based on the information analysis of the roadside camera (if any) and the accuracy of the position of the roadside camera is verified. If the position information is within the preset deviation, it is considered that the detection height of the detection target currently calculated is true and accurate, otherwise it is necessary to further perform secondary or multiple corrections on the detection height of the detection target, that is, the vehicle travels to the next bayonet node, and the above steps are repeated in combination with the bayonet camera and the roadside camera until the set threshold range is reached, and the true height of the detection target can be obtained.

[0156] The detection height process of the detection target in the present invention includes: when the detection height deviation of the detection target is large, starting the correction process, and continuously correcting the detection height of the current detection target through the checkpoint nodes encountered during the vehicle driving process until the set threshold range is reached, and the true height of the detection target can be obtained.

[0157] The present invention first obtains the detection height of the vehicle and its mounted object (detection target) through analysis of the captured pictures of the bayonet camera. After obtaining the detection height, the position of the roadside camera is calculated in combination with the information of the roadside camera (if any) and the validity of the position area of ​​the roadside camera is verified. Finally, when the first detection height is invalid, a second or multiple verifications are performed, that is, at the current bayonet or when the vehicle passes through the above-mentioned bayonet node (that is, the bayonet camera and the roadside camera both capture the vehicle), the above steps are repeated to continuously correct the accuracy of the detection height.

[0158] The present invention can solve the problem that when a vehicle is installed or loaded with an object, due to the installation angle and shooting distance of the camera, there is a certain deviation between the height of the vehicle obtained only through the pixel conversion relationship and the actual height. The present invention provides a method for correcting the height range of an object through a roadside camera. As long as there is a roadside camera near the checkpoint and the vehicle is captured, the height of the object can be continuously corrected, ensuring the accuracy of the object height obtained by analysis.

[0159] The height detection device provided by the present invention is described below. The height detection device described below and the height detection method described above can be referenced to each other.

[0160] Figure 6 is a schematic diagram of the structure of a height detection device provided by an embodiment of the present invention, such as Figure 6 As shown, the height detection device 600 includes:

[0161] A height detection module 610 is used to determine a detection height of a detection target based on a first image captured by a first shooting device.

[0162] A position estimation module 620, configured to determine an estimated position of the second shooting device based on the detection height and a second image of the detection target captured by the second shooting device;

[0163] A determination module 630, configured to determine whether the detection height of the detection target is accurate based on the estimated position of the second shooting device and the actual position of the second shooting device;

[0164] A height determination module 640 is used to determine the actual height of the detection target based on the detection height when the detection height of the detection target is determined to be accurate;

[0165] The actual position of the second shooting device is different from the actual position of the first shooting device.

[0166] It should be noted that the height detection device provided by the present invention can implement various embodiments of the height detection method provided by the present invention and achieve the same technical effect, which will not be repeated here.

[0167] Figure 7 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 7 As shown, the electronic device may include: a processor 710, a communication interface 720, a memory 730 and a communication bus 740, wherein the processor 710, the communication interface 720 and the memory 730 communicate with each other through the communication bus 740. The processor 710 may call the logic instructions in the memory 730 to execute the height detection method, including: determining the detection height of the detection target based on the first image captured by the first shooting device on the detection target;

[0168] Determine an estimated position of the second shooting device based on the detection height and a second image of the detection target captured by the second shooting device;

[0169] Based on the estimated position of the second shooting device and the actual position of the second shooting device, determining whether the detection height of the detection target is accurate;

[0170] In the case where it is determined that the detection height of the detection target is accurate, determining the actual height of the detection target based on the detection height;

[0171] The actual position of the second shooting device is different from the actual position of the first shooting device.

[0172] In addition, the logic instructions in the above-mentioned memory 730 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0173] On the other hand, the present invention further provides a computer program product, the computer program product includes a computer program, the computer program can be stored in a computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the height detection method provided by the above methods, including: based on a first image captured by a first shooting device of the detection target, determining the detection height of the detection target;

[0174] Determine an estimated position of the second shooting device based on the detection height and a second image of the detection target captured by the second shooting device;

[0175] Based on the estimated position of the second shooting device and the actual position of the second shooting device, determining whether the detection height of the detection target is accurate;

[0176] In the case where it is determined that the detection height of the detection target is accurate, determining the actual height of the detection target based on the detection height;

[0177] The actual position of the second shooting device is different from the actual position of the first shooting device.

[0178] In another aspect, the present invention further provides a computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to execute the height detection method provided by the above methods, including: determining the detection height of the detection target based on a first image captured by a first shooting device of the detection target;

[0179] Determine an estimated position of the second shooting device based on the detection height and a second image of the detection target captured by the second shooting device;

[0180] Based on the estimated position of the second shooting device and the actual position of the second shooting device, determining whether the detection height of the detection target is accurate;

[0181] In the case where it is determined that the detection height of the detection target is accurate, determining the actual height of the detection target based on the detection height;

[0182] The actual position of the second shooting device is different from the actual position of the first shooting device.

[0183] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0184] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0185] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A height detection method, It is characterized in that include: Determine a detection height of the detection target based on a first image captured by a first shooting device. Determine an estimated position of the second shooting device based on the detection height and a second image of the detection target captured by the second shooting device; Based on the estimated position of the second shooting device and the actual position of the second shooting device, determining whether the detection height of the detection target is accurate; In the case where it is determined that the detection height of the detection target is accurate, determining the actual height of the detection target based on the detection height; The actual position of the second shooting device is different from the actual position of the first shooting device.

2. The height detection method according to claim 1, It is characterized in that The step of determining an estimated position of the second shooting device based on the detection height and a second image of the detection target captured by the second shooting device includes: Based on the second image, obtaining a pixel height of the detection target in the second image; Based on the detection height, the pixel height of the detection target in the second image, and the height of the second shooting device, obtaining a plane distance between the second shooting device and the position information of the detection target when the second image is shot; An estimated position of the second photographing device is determined based on the plane distance, the position information of the detection target when the second image is photographed, and the photographing direction of the second photographing device.

3. The height detection method according to claim 2, It is characterized in that The obtaining, based on the detection height, the pixel height of the detection target in the second image, and the height of the second shooting device, a plane distance between the second shooting device and the position information of the detection target when the second image is shot, comprises: Based on the detection height, the pixel height and the height of the second shooting device, a plane distance between the second shooting device and the position information of the detection target when the second image is shot is calculated by a first formula; Wherein, the first formula is expressed as: H C is the height of the second camera, H A is the detection height, H AP is the pixel height, F is the shooting focal length of the second shooting device; and L is the plane distance.

4. The height detection method according to claim 1, It is characterized in that The determining whether the detection height of the detection target is accurate based on the estimated position of the second shooting device and the actual position of the second shooting device includes: In a case where the distance between the estimated position of the second shooting device and the actual position of the second shooting device is greater than a preset deviation, determining that the detection height of the detection target is inaccurate; In a case where the distance between the estimated position of the second photographing device and the actual position of the second photographing device is less than or equal to a preset deviation, it is determined that the detection height of the detection target is accurate.

5. The height detection method according to claim 1 or 4, It is characterized in that The method further comprises: When it is determined that the detection height of the detection target is inaccurate, at least one of the following is performed: discarding the detection height of the detection target; or, The first image and / or the second image are photographed again, and height detection is performed based on the first image and / or the second image photographed again.

6. A method for detecting height, It is characterized in that include: In the process of detecting the movement of the target, performing the first process at least once; Determine the accurate actual height of the detection target based on the actual height of the detection target obtained in the last first process; The first process includes: using a first photographing device and a second photographing device corresponding to the real-time position information of the detection target to perform at least one second process; The second process includes: Determine a detection height of the detection target based on a first image captured by a first shooting device. Determine an estimated position of the second shooting device based on the detection height and a second image of the detection target captured by the second shooting device; Based on the estimated position of the second shooting device and the actual position of the second shooting device, determining whether the detection height of the detection target is accurate; In the case where it is determined that the detection height of the detection target is accurate, determining the actual height of the detection target based on the detection height; The actual position of the second shooting device is different from the actual position of the first shooting device.

7. A height detection device, It is characterized in that include: A height detection module, used to determine a detection height of the detection target based on a first image captured by a first shooting device of the detection target; a position estimation module, configured to determine an estimated position of the second shooting device based on the detection height and a second image of the detection target captured by the second shooting device; a judging module, configured to judge whether the detection height of the detection target is accurate based on the estimated position of the second shooting device and the actual position of the second shooting device; A height determination module, configured to determine an actual height of the detection target based on the detection height when the detection height of the detection target is determined to be accurate; The actual position of the second shooting device is different from the actual position of the first shooting device.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the program, the steps of the height detection method according to any one of claims 1 to 6 are implemented.

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

10. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the steps of the height detection method according to any one of claims 1 to 6 are implemented.