A method for accurately measuring the distance of a target object during the rotation of a gimbal

By using a laser rangefinder parallel to the camera's optical axis during the pan-tilt-zoom (PTZ) rotation, target detection and ranging scanning are performed. The PTZ angle is adjusted to achieve accurate ranging, solving the problems of inaccurate ranging and discontinuous scanning in existing technologies and improving monitoring efficiency.

CN117629145BActive Publication Date: 2026-06-26HANGZHOU EBOYLAMP ELECTRONICS CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HANGZHOU EBOYLAMP ELECTRONICS CO LTD
Filing Date
2023-11-14
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

In existing technologies, the method of measuring distance through pixels suffers from inaccurate calculations and occlusion effects, and frequent interruptions of PTZ scanning affect the continuity of monitoring; existing laser ranging solutions interrupt the scanning process, resulting in discontinuous scanning.

Method used

During the rotation of the gimbal, the laser rangefinder is parallel to the optical axis of the camera. The target object is detected and scanned by the horizontal and vertical rotation of the gimbal. The miss distance of the target object is calculated. The angle of the gimbal is adjusted so that the laser rangefinder can accurately hit the target object for distance measurement.

Benefits of technology

It enables precise ranging of targets during gimbal rotation, solving the problems of inaccurate ranging results and discontinuous scanning, and improving monitoring efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117629145B_ABST
    Figure CN117629145B_ABST
Patent Text Reader

Abstract

The application discloses a kind of in the process of rotating head to target object is accurately ranged method, laser range finder is equipped on the rotating head camera, and the optical axis of laser range finder is parallel with the optical axis of the camera head of rotating head camera.This in the process of rotating head to target object is accurately ranged method is scanned in the process of target object detection by rotating head camera, target object is identified, then the target object in the region is scanned, and the angle of rotating head camera is adjusted, so that the angle of rotating head camera is aligned with each target object in the region, so that the light beam of laser range finder can be just hit on target object, accurately range target object, solve the problem that the result of ranging is not accurate in prior art algorithm by pixel, or it can frequently interrupt scanning process, so that scanning process is discontinuous, influence monitoring effect, reduce work efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of precision ranging, specifically relating to a method for accurately measuring the distance to a target object during the rotation of a gimbal. Background Technology

[0002] A pan-tilt-zoom (PTZ) camera scans and inspects a certain area from a high vantage point. When a target is detected, its distance needs to be measured. Knowing the distance between the target and the photoelectric sensor, and combining this with the GPS coordinates of the current photoelectric device and the vertical angle between the target and the sensor, the target's GPS location can be determined. Currently, there are two common distance measurement schemes for surveillance methods:

[0003] Scheme 1 uses a pixel-based ranging algorithm. The algorithm determines the type of the target object and its pixel size in the video footage recorded during the scanning process. Based on the type, it obtains the typical size of the target object. Then, combining this with the camera's pixel size and the current focal length, it calculates the distance to the target object.

[0004] However, the problems with Solution 1 are as follows: First, the size of the target object may differ from the normal size, resulting in inaccurate distance calculations. Second, when the target object is partially occluded, the pixel value of the target object outlined by the algorithm is also reduced, leading to significant deviations in calculations based on this pixel value. Third, using pixels as the scale has too low precision, and the target object may not fill the entire pixel at the edge, resulting in inaccurate calculations.

[0005] Scheme 2 involves stopping the gimbal after detecting a target. Based on the target's miss distance identified by the algorithm, the vertical angular offset of the target relative to the current gimbal center is calculated. The gimbal is then controlled to rotate to the target's position before laser ranging is performed.

[0006] However, the problem with Option 2 is that it frequently interrupts the scanning process, making the scanning process discontinuous and unable to achieve the monitoring effect. Summary of the Invention

[0007] The purpose of this invention is to address the problems mentioned in the background art by proposing a method for accurately measuring the distance to a target object during the rotation of a gimbal.

[0008] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0009] This invention proposes a method for accurately measuring the distance to a target object during gimbal rotation. The method includes a laser rangefinder mounted on the gimbal camera, with the optical axis of the laser rangefinder parallel to the optical axis of the gimbal camera's lens.

[0010] The camera is driven to scan and capture images of target objects in the area from the starting point to the ending point by the horizontal and vertical rotation of the gimbal. Real-time images are received and target recognition is performed. Each target object is marked with a rectangular frame.

[0011] An XY coordinate system is established with the center point of the camera image as the origin, pixels as the scale, and the center point of each rectangle as the coordinates of the target object. The pixel value of each target object's coordinates relative to the origin is calculated and used as the miss distance information.

[0012] Based on the miss distance information and the horizontal and vertical angles of the gimbal at the moment each target was detected, the horizontal angle θ of each target relative to the gimbal is calculated. p 1 and vertical angle θ t 1;

[0013] Then, by rotating the pan-tilt head, the camera is moved from the end point of the area back to the beginning point. During this process, target range scanning is performed on the area, and the pan-tilt head rotates sequentially to the θ position of each target object. p 1 and θ t 1. Make each target object coincide with the origin in sequence, turn on the laser rangefinder to measure the distance of each target object, and obtain accurate distance information.

[0014] Preferably, when the scanning area is non-circular, the target detection scan is a scan that moves from the start point of the area to the end point of the area, and the target ranging scan is a scan that moves from the end point of the area to the start point of the area.

[0015] Preferably, when the scanning area is circular, the starting point and the ending point are the same, the target detection scan is the first scan, and the target ranging scan is the second scan.

[0016] Preferably, during the process of rotating the pan-tilt unit to drive the camera to perform target ranging and scanning of the area, the θ value of the pan-tilt unit rotating to each target object at the current position with a preset horizontal angular velocity is first calculated. p The required time T1 is then used to calculate the angle θ of the gimbal rotating to the corresponding target object, based on the angular acceleration in the vertical direction and the maximum vertical angular velocity. t For a given target object, given the time T1 and T2, determine whether the ranging requirement is met at the current moment, i.e., whether the horizontal and vertical angles of the pan-tilt unit should be rotated to the corresponding target object's θ. p 1 and θ t 1.

[0017] Preferably, for a target object, when T2 > T1, the ranging requirement is not met, and the horizontal and vertical angles of the gimbal are no longer rotated to θ of the target object. p 1 and θ t1. Continue to determine whether the next target object meets the requirements for ranging;

[0018] For a target object, when T2≤T1, the ranging requirement is met. Rotate the horizontal and vertical angles of the gimbal to θ of the target object. p 1 and θ t 1.

[0019] Preferably, the horizontal displacement of the target object relative to the origin is ±X, and the vertical displacement is ±Y. The pixel size at the current camera resolution is P, and the camera's focal length is f. The formula for calculating the off-target distance information as the offset angle of the target object relative to the gimbal is as follows:

[0020] Horizontal target miss angle:

[0021] Vertical target miss angle:

[0022] Preferably, the horizontal angle θ of each target relative to the gimbal is calculated based on the miss distance information, the current horizontal angle and vertical angle of the gimbal. p 1 and vertical angle θ t 1. The specific calculation formula is as follows:

[0023] The horizontal angle of the gimbal at the moment each target is detected is θ. p The vertical angle is θ t Then the horizontal angle θ of the target object relative to the gimbal is... p 1 and vertical angle θ t The calculation formula is as follows:

[0024] θ p 1 = θ p +θ p '

[0025] θ t 1 = θ t +θ t '.

[0026] Preferably, during the process of rotating the pan-tilt unit to drive the camera to perform target ranging and scanning of the area, the θ value of the pan-tilt unit rotating to each target object at the current position with a preset horizontal angular velocity is first calculated. p The required time T1 is then used to calculate the angle θ of the gimbal rotating to the corresponding target object, based on the angular acceleration in the vertical direction and the maximum vertical angular velocity. t For a given target object, given the time T1 and T2, determine whether the ranging requirement is met at the current moment, i.e., whether the horizontal and vertical angles of the pan-tilt unit should be rotated to the corresponding target object's θ. p 1 and θ t1. Includes:

[0027] During the target ranging and scanning process, the horizontal angle of the current position of the gimbal is θ. pn The vertical angle is θ tn If the horizontal angular velocity of the gimbal is a° / s, then the formula for calculating time T1 is as follows:

[0028]

[0029] The maximum vertical angular velocity is b° / s, and the angular acceleration is c° / s. 2 Then the formula for calculating time T2 is as follows:

[0030] When deceleration is required before the angular acceleration reaches b° / s, the formula for calculating time T2 is as follows:

[0031]

[0032] When the angular acceleration reaches b° / s and continues for a period of time before decelerating to a stop, the formula for calculating time T2 is as follows:

[0033]

[0034] Where T1 and T2 are both in seconds, θ pn θ tn θ p 1. θ t 1. θ p ' and θ t The units for all ' are degrees.

[0035] Preferably, the laser rangefinder is a laser rangefinder with a fast reflector.

[0036] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0037] This method for accurately measuring the distance to a target object during the rotation of a PTZ camera identifies the target object during the target object detection and scanning process. Then, it performs target object distance measurement scanning on the target objects in that area and adjusts the angle of the PTZ camera to align with each target object in the area. This ensures that the laser rangefinder beam hits the target object precisely, enabling accurate distance measurement. This method solves the problems of inaccurate distance measurement results caused by the algorithm's pixel-based distance measurement, or the frequent interruptions in the scanning process, which lead to discontinuous scanning, affect monitoring effectiveness, and reduce work efficiency. Attached Figure Description

[0038] Figure 1 This is a schematic diagram of the structure of the pan-tilt camera of the present invention;

[0039] Figure 2 This is a schematic diagram showing the distance between the target object and the origin in the camera image of this invention;

[0040] Figure 3 This is a schematic diagram of the scanning trajectory of the pan-tilt camera of the present invention when there is no target object.

[0041] Figure 4 This is a schematic diagram of the scanning trajectory of the pan-tilt camera of the present invention when it detects a target object;

[0042] Figure 5 This is a schematic diagram showing the circular trajectory of the scanning area of ​​the PTZ camera of the present invention.

[0043] Figure 6 This is a schematic diagram of one embodiment of the present invention for calculating time T2;

[0044] Figure 7 This is a schematic diagram of another embodiment of the present invention for calculating time T2. Detailed Implementation

[0045] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0046] It should be noted that when a component is referred to as being "connected" to another component, it can be directly connected to the other component or there may be an intervening component. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein in the specification of this application is for the purpose of describing particular embodiments only and is not intended to limit the application.

[0047] like Figure 1-7 As shown, a method for accurately measuring the distance to a target object during the rotation of a gimbal is described. A laser rangefinder is mounted on the gimbal camera, and the optical axis of the laser rangefinder is parallel to the optical axis of the gimbal camera. The method for accurately measuring the distance to the target object during the rotation of the gimbal includes: (The order of the following steps is not limited; the order of the steps can be changed according to the actual situation, or they can be performed simultaneously.)

[0048] First, it should be noted that, as Figure 1 The diagram shows a pan-tilt camera, where A represents the pan-tilt unit, B represents the laser rangefinder, and C and D represent the infrared camera and the visible light camera, respectively. The horizontal and vertical rotation of the pan-tilt unit are controlled by motors.

[0049] S1. By rotating the pan-tilt unit horizontally and vertically, the camera is driven to scan and capture images of target objects in the area from the starting point to the ending point. Real-time images are received and target recognition is performed. Each target object is marked with a rectangular frame.

[0050] Specifically, the target detection scan is the process of discovering the target (the first scan), and the target ranging scan is the second scan. Target recognition can be performed by the target recognition software of the PTZ camera; the specific recognition process is existing technology and will not be described in detail here. In this embodiment, area scanning is mainly performed by the horizontal rotation of the PTZ, with a smaller angle of vertical rotation. Targets within the area are either moving slowly (considered stationary in this embodiment) or stationary.

[0051] S2. Establish an XY axis coordinate system with the center point of the camera image as the origin, use pixels as the scale, and use the center point of each rectangle as the coordinates of the target object. Calculate the pixel value of each target object's coordinates relative to the origin and use it as the miss distance information.

[0052] It should be noted that the XY-axis coordinate system is established with the center point of the camera image as the origin (target). If the coordinates of one of the targets in the XY-axis coordinate system are (X1, Y1), then X1 represents the degree of offset of the target from the target in the horizontal direction, and Y1 represents the degree of offset of target 1 from the target in the vertical direction.

[0053] Specifically, the process of converting the miss distance information into an angle is as follows:

[0054] The horizontal displacement of the target object relative to the origin is ±X, and the vertical displacement is ±Y. The pixel size at the current camera resolution is P, and the camera's focal length is f. The formula for converting the miss distance information into the target object's offset angle relative to the gimbal is as follows:

[0055] Horizontal target miss angle:

[0056] Vertical target miss angle:

[0057] S3. Based on the miss distance information and the horizontal and vertical angles of the gimbal at the moment each target is detected, calculate the horizontal angle θ of each target relative to the gimbal. p 1 and vertical angle θ t 1;

[0058] Then, by rotating the pan-tilt head, the camera is moved from the end point of the area back to the beginning point. During this process, target range scanning is performed on the area, and the pan-tilt head rotates sequentially to the θ position of each target. p 1 and θ t1. Make each target object coincide with the origin in sequence, turn on the laser rangefinder to measure the distance of each target object, and obtain accurate distance information.

[0059] Specifically, the horizontal angle of the gimbal at the moment each target is detected is θ. p The vertical angle is θ t (This can be read directly from the motor encoder of the gimbal), then the horizontal angle θ of the target object relative to the gimbal. p 1 and vertical angle θ t The calculation formula is as follows:

[0060] θ p 1 = θ p +θ p '

[0061] θ t 1 = θ t +θ t '

[0062] When the gimbal is rotated to a horizontal angle of θ p 1. The vertical angle is θ t At time 1, the target object coincides with the center point of the camera image, and the laser rangefinder beam can hit the target object to measure its distance.

[0063] The laser rangefinder is a laser rangefinder with a fast reflector (which is existing technology), so that the image of the target object is kept in the dark at the moment of laser ranging, thus enabling the laser rangefinder to accurately measure distances during movement. At the same time, other laser rangefinders that support accurate distance measurement during movement can also be used.

[0064] like Figure 2 As shown, point O represents the center point of the camera image, and point E represents the target object in the image.

[0065] When the scanning area is non-circular (the start and end points are different), the target detection scan moves from the start point to the end point of the area, while the target ranging scan moves from the end point to the start point. See the scan trajectory below. Figure 3 The camera scans back and forth within the area. When there is no target object, the solid and dashed lines overlap. Figure 3 The solid and dashed lines are separated for ease of display. The solid line represents the first single-pass scan when the target is detected, while the dashed line represents the second scan when the target is confirmed, which is a reverse scan.

[0066] The scanning trajectory after the target object is detected during the target object detection scanning process (first scan) is shown below. Figure 4If target object 1 and target object 2 are detected during the first scan, then during the target ranging scan (second scan), the horizontal and vertical angles of the target objects relative to the gimbal are calculated based on the targets detected in the first scan. For example, the vertical angle is adjusted starting at point A so that the horizontal and vertical angles of the gimbal reach the θ corresponding to target object 2 simultaneously. p 1 and θ t 1. At this point, laser ranging is performed to obtain the distance to target 2. After ranging is completed, the vertical angle is adjusted so that the horizontal and vertical angles of the gimbal reach the θ corresponding to target 1 simultaneously. p 1 and θ t 1. At this time, laser ranging is performed to obtain the distance to target 2. When the ranging of target 1 is completed, if there is another target, the vertical angle is adjusted again. If there is no new target, the scanning trajectory is returned to the original.

[0067] When the scanning area is circular, the starting and ending points are the same. Target detection scanning is the first circle, and target ranging scanning is the second circle. See the scan trajectory below. Figure 5 .

[0068] In S3, during the process of rotating the pan-tilt unit to drive the camera to perform target ranging and scanning of the area, the first step is to calculate the angle θ of the pan-tilt unit rotating to each target at the current position with a preset horizontal angular velocity. p The required time T1 is then used to calculate the angle θ of the gimbal rotating to the corresponding target object based on the vertical angular acceleration and maximum vertical angular velocity. t For a given target object, given the time T1 and T2, determine whether the ranging requirement is met at the current moment, i.e., whether the horizontal and vertical angles of the pan-tilt unit should be rotated to the corresponding target object's θ. p 1 and θ t 1.

[0069] For a target object, when T2 > T1, the ranging requirement is not met, and the horizontal and vertical angles of the pan-tilt unit are no longer rotated to θ of the target object. p 1 and θ t 1. Continue to determine whether the next target object meets the requirements for ranging;

[0070] For a target object, when T2≤T1, the ranging requirement is met. Rotate the horizontal and vertical angles of the gimbal to θ of the target object. p 1 and θ t 1.

[0071] During the target ranging and scanning process, the horizontal angle of the current position of the gimbal is θ. pn The vertical angle is θ tnIf the horizontal angular velocity of the gimbal is a° / s, then the formula for calculating time T1 is as follows:

[0072]

[0073] The maximum vertical angular velocity is b° / s, and the angular acceleration is c° / s. 2 Then the formula for calculating time T2 is as follows:

[0074] When deceleration is required before the angular acceleration reaches b° / s, the formula for calculating time T2 is as follows (e.g., Figure 6 As shown):

[0075]

[0076] When the angular acceleration reaches b° / s and continues for a period of time before decelerating to a stop, the formula for calculating time T2 is as follows (e.g.) Figure 7 As shown):

[0077]

[0078] Where T1 and T2 are both in seconds, θ p θ t θ p 1. θ t 1. θ p ' and θ t The units for all ' are degrees.

[0079] It should be noted that during the first scan of the PTZ camera's target detection area, the target recognition software identifies the target objects. When multiple target objects are identified, the PTZ camera performs a second scan of the target objects within the area, adjusting the angle of the PTZ (horizontal and vertical) one by one so that each target object coincides with the center point (origin) of the camera's image. This allows the PTZ camera to accurately measure the distance to multiple target objects within the scanning area, improving the efficiency of distance measurement.

[0080] This method for accurately measuring the distance to a target object during the rotation of a PTZ camera identifies the target object during the target object detection and scanning process. Then, it performs target object distance measurement scanning on the target objects in that area and adjusts the angle of the PTZ camera to align with each target object in the area. This ensures that the laser rangefinder beam hits the target object precisely, enabling accurate distance measurement. This method solves the problems of inaccurate distance measurement results caused by the algorithm's pixel-based distance measurement, or the frequent interruptions in the scanning process, which lead to discontinuous scanning, affect monitoring effectiveness, and reduce work efficiency.

[0081] The technical features of the above embodiments can be combined in any way. For the sake of brevity, 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.

[0082] The embodiments described above are merely specific and detailed examples of the embodiments described in this application, and should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the scope of protection of this application. Therefore, the scope of protection of this patent application should be determined by the appended claims.

Claims

1. A method for accurately measuring the distance to a target object during gimbal rotation, characterized in that: A laser rangefinder is installed on a PTZ camera, and the optical axis of the laser rangefinder is parallel to the optical axis of the PTZ camera's lens. The method for accurately measuring the distance to a target object during PTZ rotation includes: The camera is driven to scan and capture images of target objects in the area from the starting point to the ending point by the horizontal and vertical rotation of the gimbal. Real-time images are received and target recognition is performed. Each target object is marked with a rectangular frame. An XY coordinate system is established with the center point of the camera image as the origin, pixels as the scale, and the center point of each rectangle as the coordinates of the target object. The pixel value of each target object's coordinates relative to the origin is calculated and used as the miss distance information. Based on the miss distance information and the horizontal and vertical angles of the gimbal at the moment each target was detected, the horizontal angle of each target relative to the gimbal was calculated. and vertical angle ; Then, by rotating the pan-tilt head, the camera is moved from the end point of the area back to the beginning point. During this process, target range scanning is performed on the area, and the pan-tilt head rotates sequentially to each target object. and This allows each target to coincide with the origin in sequence. Then, the laser rangefinder is turned on to measure the distance to each target and obtain accurate distance information. In the process of rotating the pan-tilt unit to drive the camera to perform target ranging and scanning of the area, the process first calculates the pan-tilt unit's rotation to each target at its current position with a preset horizontal angular velocity. Time required Then, based on the angular acceleration in the vertical direction and the maximum vertical angular velocity, the rotation of the gimbal to the corresponding target object is calculated. Time required For one of the target objects, according to and The size determines whether the current distance measurement requirements are met, i.e., whether the pan-tilt unit should be rotated horizontally and vertically towards the target. and ; For a target object, when If the ranging requirements are not met, the pan-tilt unit will no longer be rotated horizontally and vertically towards the target. and Continue to determine whether the next target object meets the requirements for ranging; For a target object, when At that time, to meet the ranging requirements, rotate the horizontal and vertical angles of the gimbal to the target object. and ; In the process of rotating the pan-tilt unit to drive the camera to perform target distance scanning of the area, the distance of the pan-tilt unit to each target object at the current position is first calculated. Time required Then, based on the angular acceleration in the vertical direction and the maximum vertical angular velocity, the rotation of the gimbal to the corresponding target object is calculated. Time required For one of the target objects, according to and The size determines whether the current distance measurement requirements are met, i.e., whether the pan-tilt unit should be rotated horizontally and vertically towards the target. and ,include: During the target ranging and scanning process, the current horizontal angle of the gimbal is: Vertical angle is The horizontal angular velocity of the gimbal is Then time The calculation formula is as follows: ; Maximum vertical angular velocity is angular acceleration is Then time The calculation formula is as follows: When the angular acceleration has not accelerated to When it is necessary to slow down and stop, the time is... The calculation formula is as follows: ; When the angular acceleration accelerates to After a period of continuous deceleration and then stopping, the time... The calculation formula is as follows: ; in, and The units are all seconds. , , and All units are degrees.

2. The method for accurately measuring the distance to a target object during the rotation of a gimbal, as described in claim 1, is characterized in that: When the scanning area is not circular, the target detection scan is a scan from the start point of the area to the end point of the area, and the target ranging scan is a scan from the end point of the area to the start point of the area.

3. The method for accurately measuring the distance to a target object during the rotation of a gimbal, as described in claim 1, is characterized in that: When the scanning area is circular, the starting point and the ending point are the same. The target detection scan is the first scan, and the target ranging scan is the second scan.

4. The method for accurately measuring the distance to a target object during the rotation of a gimbal, as described in claim 1, is characterized in that: The horizontal displacement of the pixel value of the target object relative to the origin is: The displacement along the vertical direction is The pixel size of the current camera image resolution is The camera's focal length is The formula for converting the miss distance information into the offset angle of the target relative to the gimbal is as follows: Horizontal target miss angle: ; Vertical target miss angle: ; in, and All units are degrees.

5. The method for accurately measuring the distance to a target object during gimbal rotation as described in claim 4, characterized in that: The horizontal angle of each target relative to the gimbal is calculated based on the miss distance information, the current horizontal angle and vertical angle of the gimbal. and vertical angle The specific calculation formula is as follows: The horizontal angle of the gimbal at the moment each target is detected is Vertical angle is The horizontal angle of the target object relative to the gimbal is... and vertical angle The calculation formula is as follows: ; 。 6. The method for accurately measuring the distance to a target object during the rotation of a gimbal, as described in claim 1, is characterized in that: The laser rangefinder is a laser rangefinder with a fast reflector.