A method for detecting the three-dimensional position of a target based on dual cameras and lasers

Through the combination of dual cameras and lasers, the continuous reliability problem of two-dimensional image tracking in complex scenarios is solved, three-dimensional coordinate calculation and multi-object detection are realized, and the efficiency and accuracy of intelligent monitoring are improved.

CN116385539BActive Publication Date: 2025-08-19ANHUI UNIVERSITY OF ARCHITECTURE
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310355091.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-06
Publication Date
2025-08-19
Estimated Expiration
2043-04-06

AI Technical Summary

Technical Problem

In the prior art, moving target tracking based on two-dimensional images is difficult to achieve continuous and reliable tracking in complex monitoring scenarios, and cannot meet the needs of target tracking in multi-camera systems.

Method used

The target three-dimensional position detection method based on dual cameras and lasers is adopted. By setting up a horizontal and vertical camera and laser rangefinder, combining angle sensors and adjustment motors, the coordinates of the object in the three-dimensional space are calculated, and the background subtraction method is used to judge the motion state of the object.

Benefits of technology

It realizes accurate calculation of the three-dimensional coordinates of the object and multi-object detection, which can judge the object occlusion relationship, and improves the efficiency and accuracy of intelligent monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116385539B_ABST
    Figure CN116385539B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for detecting the three-dimensional position of a target based on dual cameras and lasers, belonging to the field of position detection technology, and comprising the following steps: determining a coordinate system, adjusting the positions of a horizontal camera and a vertical camera, processing object occlusion relationships, determining the three-dimensional coordinates of the object, and detecting target motion. By providing two cameras and a laser rangefinder, the present invention utilizes the laser rangefinder, the computing modules within the horizontal camera, and the vertical camera to accurately calculate the coordinates of an object. The obtained coordinates are more accurate than those of previous technologies. Furthermore, when multiple objects are present within the detection area, the occlusion relationships between the objects can be determined. Background subtraction can also be used to determine whether the target object is in motion. The method has the functions of multi-target detection and tracking, greatly improving efficiency and better completing intelligent monitoring tasks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of position detection technology, and in particular to a method for detecting the three-dimensional position of a target based on dual cameras and lasers. Background Art

[0002] In various types of intelligent video surveillance, with the increasing complexity of monitoring scenes, moving target tracking based on two-dimensional images can no longer meet the needs of continuous and reliable tracking. Since each image obtained by the camera is affected by multiple factors such as its position and direction as well as the surrounding environmental conditions, even the images obtained by different cameras for the same scene are not exactly the same.

[0003] The most reliable feature for multi-camera target tracking is its 3D spatial coordinates. Therefore, the positioning of moving targets in 3D space has become a key technology for target tracking in multi-camera systems. Target tracking and multi-target detection are also gaining increasing attention, and this research is attracting increasing attention from researchers. Therefore, a method for 3D target position detection based on dual cameras and lasers is proposed to address this issue. Summary of the Invention

[0004] The purpose of the present invention is to solve the problem that the existing technology of moving target tracking based on two-dimensional images can no longer meet the requirements of continuous and reliable tracking, and to propose a target three-dimensional position detection method based on dual cameras and lasers.

[0005] In order to achieve the above object, the present invention adopts the following technical solutions:

[0006] A method for detecting the three-dimensional position of a target based on dual cameras and lasers includes the following steps:

[0007] S1. Determine the coordinate system: Set a horizontal camera, a laser rangefinder, and an adjustment motor in a horizontal position, set the direction to the X axis, and set the distance between the laser rangefinder and the origin of the coordinate system to L1. Set a vertical camera, a laser rangefinder, and an adjustment motor in a vertical position, set the direction to the Z axis, and set the distance between the laser rangefinder and the origin of the coordinate system to L2.

[0008] S2. Adjust the positions of the horizontal camera and the vertical camera: When there is an object within the detection range, the motor is adjusted to control the horizontal camera, the vertical camera, and the laser rangefinder to swing left and right. The laser rangefinder measures multiple sets of distances S1 and S2 between the laser rangefinder and the object and sends them to the comparison module for comparison. The comparison module feeds back the shortest distances S1 and S2 to the microcontroller, which controls the motor to rotate the laser rangefinder, the horizontal camera, and the vertical camera to positions with distances S1 and S2.

[0009] S3. Processing object occlusion: The angle sensor determines the deflection angle α of the horizontal camera relative to the initial position and the deflection angle β of the vertical camera relative to the initial position based on the number of rotations of the Lego axis driven by the adjustment motor. α is transmitted to the horizontal camera to obtain the coordinates (x, y1) of the object on the xoy plane. β is transmitted to the vertical camera to obtain the coordinates (y2, z) of the object on the zoy plane. If the difference y1-y2 is zero, it means that the objects detected by the horizontal camera and the vertical camera are the same object.

[0010] If there are two objects in the detection area, the horizontal camera obtains the coordinates of object A on the xoy plane (x1, y1) and the coordinates of object B on the xoy plane (x2, y2); the vertical camera obtains the coordinates of object A on the zoy plane (y1, z1) and the coordinates of object B on the zoy plane (y2, z2). If x1 = x2, y1 = y2 and z1 > z2, it means that object A blocks object B in the z-axis direction.

[0011] If x1=x2, y1>y2, and z1=z2, it means that object A blocks object B in the Y-axis direction; if x1>x2, y1=y2, and z1=z2, it means that object A blocks object B in the X-axis direction;

[0012] S4. Determine the three-dimensional coordinates of the object: If there is only one object in the detection area, the three-dimensional coordinates (x, y, z) of the object are obtained based on the coordinates (x, y) of the object on the xoy plane and the coordinates (y, z) of the zoy plane;

[0013] S5. Detection of target motion: First, use the formula to calculate the difference between the background image and the current image, then binarize the difference image and perform connectivity analysis on the binarized image. When the area (number of pixels) of a connected region is greater than a certain threshold, it is considered that the target is detected, and this connected region is considered to be the extracted target image. The images captured by the horizontal camera and the vertical camera are respectively subjected to background subtraction operations to determine whether the object is moving. If the horizontal camera or the vertical camera recognizes the movement of the object through the image, it is determined that the object is moving.

[0014] Preferably, a rotating frame is installed at the bottom end of the horizontal camera, the longitudinal camera and the laser rangefinder, the adjusting motor is arranged below the rotating frame, the output end of the adjusting motor is fixedly connected to a Lego shaft, an angle sensor is arranged on the outside of the Lego shaft, and the top end of the Lego shaft is fixedly connected to the rotating frame.

[0015] Preferably, a control box is installed on the rotating frame, and a single chip microcomputer, a reset module and a comparison module are installed in the control box.

[0016] Preferably, the angle sensor, laser rangefinder, adjustment motor, horizontal camera and vertical camera are electrically connected, and a calculation module is provided inside the horizontal camera and the vertical camera. The calculation module, reset module and comparison module establish an information transmission connection with the single-chip microcomputer, and the calculation module establishes an information transmission connection with the comparison module.

[0017] Preferably, the calculation module includes calculation formulas for the object coordinates x, y1, y2 and z coordinates, the calculation formula for the coordinate x is: L1-S1×cosα, the calculation formula for the coordinate y1 is: S1×Sinα, the calculation formula for the coordinate y2 is: S2×sinβ, and the calculation formula for the coordinate z is: L2-S2×cosβ.

[0018] Preferably, the reset module is used to restore the horizontal camera and the vertical camera to their initial positions after completing the detection operation.

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

[0020] 1. The present invention can accurately calculate the coordinates of an object by setting up two cameras and a laser rangefinder, and using the calculation modules inside the laser rangefinder, the horizontal camera, and the vertical camera. The obtained coordinates are more accurate than those of previous technologies. At the same time, when there are multiple objects in the detection area, the occlusion relationship between the objects can be determined. At the same time, the background subtraction method can be used to determine whether the target object is in motion. It has the function of multi-target detection and tracking, which can greatly improve efficiency and better complete intelligent monitoring tasks. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 This is a schematic diagram of the structure of the coordinate system in a method for detecting the three-dimensional position of a target based on dual cameras and lasers proposed in the present invention;

[0022] Figure 2 This is a schematic diagram of the structure of a single-chip microcomputer controlling a horizontal camera and a vertical camera in a method for detecting a three-dimensional position of an object based on dual cameras and lasers proposed in the present invention;

[0023] Figure 3 This is a structural block diagram of target motion detection in a target three-dimensional position detection method based on dual cameras and lasers proposed in the present invention;

[0024] Figure 4 This is a flowchart of a method for detecting the three-dimensional position of a target based on dual cameras and lasers proposed by the present invention.

[0025] In the figure: 1. Adjustment motor; 2. Angle sensor; 3. Longitudinal camera; 4. Laser rangefinder; 5. Horizontal camera. DETAILED DESCRIPTION

[0026] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0027] Reference Figure 1-4 , a method for detecting the three-dimensional position of a target based on dual cameras and lasers, comprising the following steps:

[0028] S1. Determine the coordinate system: Set the horizontal camera 5, the laser rangefinder 4, and the adjustment motor 1 in the horizontal position, set the direction to the X axis, and set the distance between the laser rangefinder 4 and the origin of the coordinate system to L1. Set the vertical camera 3, the laser rangefinder 4, and the adjustment motor 1 in the vertical position, set the direction to the Z axis, and set the distance between the laser rangefinder 4 and the origin of the coordinate system to L2.

[0029] S2. Adjust the positions of the horizontal camera 5 and the vertical camera 3: When there is an object within the detection range, the motor 1 is adjusted to control the horizontal camera 5, the vertical camera 3, and the laser rangefinder 4 to swing left and right. The laser rangefinder 4 can measure multiple sets of distances S1 and S2 between the laser rangefinder 4 and the object and send them to the comparison module for comparison. The comparison module feeds back the shortest distances S1 and S2 to the single-chip microcomputer, and the single-chip microcomputer controls the motor 1 to rotate the laser rangefinder 4, the horizontal camera 5, and the vertical camera 3 to positions where the distances are S1 and S2;

[0030] S3. Processing object occlusion relationships: The angle sensor 2 determines the deflection angle α of the horizontal camera 5 relative to the initial position and the deflection angle β of the vertical camera 3 relative to the initial position based on the number of rotations of the Lego axis driven by the adjustment motor 1. α is transmitted to the horizontal camera 5 to obtain the coordinates (x, y1) of the object on the xoy plane. β is transmitted to the vertical camera 3 to obtain the coordinates (y2, z) of the object on the zoy plane. If the difference y1-y2 is zero, it indicates that the objects detected by the horizontal camera 5 and the vertical camera 3 are the same object.

[0031] If there are two objects in the detection area, the horizontal camera 5 can obtain the coordinates of object A on the xoy plane (x1, y1) and the coordinates of object B on the xoy plane (x2, y2); the vertical camera 3 can obtain the coordinates of object A on the zoy plane (y1, z1) and the coordinates of object B on the zoy plane (y2, z2). If x1=x2, y1=y2 and z1>z2, it means that object A blocks object B in the z-axis direction.

[0032] If x1=x2, y1>y2, and z1=z2, it means that object A blocks object B in the Y-axis direction; if x1>x2, y1=y2, and z1=z2, it means that object A blocks object B in the X-axis direction;

[0033] S4. Determine the three-dimensional coordinates of the object: If there is only one object in the detection area, the three-dimensional coordinates (x, y, z) of the object can be obtained based on the coordinates (x, y) of the object on the xoy plane and the coordinates (y, z) of the zoy plane;

[0034] S5. Detection of target motion: First, use the formula to calculate the difference between the background image and the current image, then binarize the differential image, and perform connectivity analysis on the binarized image. When the area (number of pixels) of a connected region is greater than a certain threshold, it is considered that the target is detected, and this connected region is considered to be the extracted target image. The images captured by the horizontal camera 5 and the vertical camera 3 are respectively subjected to background subtraction operations to determine whether the object is moving. If the horizontal camera 5 or the vertical camera 3 recognizes the movement of the object through the image, it is determined that the object is moving.

[0035] It is worth noting that: when there are multiple objects in the detection area, the laser rangefinder 4 will measure the minimum distance between it and the objects one by one, so that the single-chip microcomputer controls the camera to measure the coordinates of each object one by one; the background subtraction method is an existing technology, and the formula used is a well-known technology for technicians in this field, so it will not be repeated here.

[0036] A rotating frame is installed at the bottom end of the horizontal camera 5, the longitudinal camera 3 and the laser rangefinder 4, and the adjustment motor 1 is arranged below the rotating frame. The output end of the adjustment motor 1 is fixedly connected to the Lego shaft, and an angle sensor 2 is arranged on the outside of the Lego shaft. The top of the Lego shaft is fixedly connected to the rotating frame.

[0037] It is worth noting that the use of the angle sensor 2 is a prior art and will not be described in detail here.

[0038] A control box is installed on the rotating frame, and a single chip microcomputer, a reset module and a comparison module are installed in the control box.

[0039] Taking further advantage: the comparison module is used to compare multiple sets of distances between the laser rangefinder 4 and the object, thereby facilitating finding the shortest distance between the laser rangefinder 4 and the object.

[0040] The angle sensor 2, the laser rangefinder 4, the adjustment motor 1, the horizontal camera 5 and the vertical camera 3 are connected. The horizontal camera 5 and the vertical camera 3 are internally provided with a calculation module. The calculation module, the reset module and the comparison module establish an information transmission connection with the single-chip microcomputer, and the calculation module establishes an information transmission connection with the comparison module.

[0041] The calculation module contains the calculation formulas for the object coordinates x, y1, y2 and z coordinates. The calculation formula for the coordinate x is: L1-S1×cosα, the calculation formula for the coordinate y1 is: S1×Sinα, the calculation formula for the coordinate y2 is: S2×sinβ, and the calculation formula for the coordinate z is: L2-S2×cosβ.

[0042] The reset module is used to restore the horizontal camera 5 and the vertical camera 3 to their initial positions after completing the detection operation.

[0043] The regulating motor is an existing technology, and its model is KYDAS96300-1E. It can realize the function of driving the Lego axis to rotate, and will not be described in detail here.

[0044] When the present invention is in use, when there is an object within the detection range, the horizontal camera 5 and the vertical camera 3 will capture the picture and feed it back to the single chip microcomputer. The single chip microcomputer controls the horizontal camera 5, the vertical camera 3 and the laser rangefinder 4 to swing left and right by adjusting the motor 1. The laser rangefinder 4 can measure multiple sets of distances S1 and S2 between the laser rangefinder 4 and the object and send them to the comparison module for comparison. The comparison module feeds back the shortest distances S1 and S2 to the single chip microcomputer. The single chip microcomputer controls the adjustment motor 1 to rotate the laser rangefinder 4, the horizontal camera 5 and the vertical camera 3 to positions where the distances are S1 and S2.

[0045] The angle sensor 2 determines the angle α of the horizontal camera 5 relative to the initial position and the angle β of the vertical camera 3 relative to the initial position according to the number of revolutions driven by the adjustment motor 1. The angle sensor 2 transmits α to the horizontal camera 5 to obtain the coordinates (x, y1) of the object on the xoy plane. At the same time, the angle sensor 2 transmits β to the vertical camera 3 to obtain the coordinates (y2, z) of the object on the zoy plane. If the difference between y1 and y2 is zero, it means that the objects detected by the horizontal camera 5 and the vertical camera 3 are the same object, and the three-dimensional coordinates of the object are (x, y, z).

[0046] If there are two objects in the detection area, the horizontal camera 5 can obtain the coordinates of object A on the xoy plane (x1, y1) and the coordinates of object B on the xoy plane (x2, y2); the vertical camera 3 can obtain the coordinates of object A on the zoy plane (y1, z1) and the coordinates of object B on the zoy plane (y2, z2). If x1=x2, y1=y2 and z1>z2, it means that object A blocks object B in the z-axis direction.

[0047] If x1=x2, y1>y2, and z1=z2, it means that object A blocks object B in the Y-axis direction; if x1>x2, y1=y2, and z1=z2, it means that object A blocks object B in the X-axis direction;

[0048] After the three-dimensional coordinates of the object are determined, the formula is used to calculate the difference between the background image and the current image, and then the differential image is binarized, and the connectivity analysis is performed on the binarized image. When the area (number of pixels) of a connected region is greater than a certain threshold, it is considered that the target is detected, and this connected region is considered to be the extracted target image. The images captured by the horizontal camera 5 and the vertical camera 3 are respectively subjected to background subtraction operations to determine whether the object is moving. If the horizontal camera 5 or the vertical camera 3 recognizes that the object is moving through the image, it is determined that the object is moving.

[0049] The above description is only a preferred specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any technician familiar with the technical field, within the technical scope disclosed by the present invention, who makes equivalent replacements or changes based on the technical solution and inventive concept of the present invention, should be covered by the scope of protection of the present invention.

Claims

1. A method for detecting the three-dimensional position of a target based on dual cameras and lasers, characterized in that: The steps include: S1. Determine the coordinate system: set the horizontal camera (5), the laser rangefinder (4) and the adjustment motor (1) in the horizontal position, set the direction to the X axis and set the distance between the laser rangefinder (4) and the origin of the coordinate system to L1; set the vertical camera (3), the laser rangefinder (4) and the adjustment motor (1) in the vertical position, set the direction to the Z axis and set the distance between the laser rangefinder (4) and the origin of the coordinate system to L2; S2, adjusting the positions of the horizontal camera (5) and the vertical camera (3): when there is an object within the detection range, the adjustment motor (1) controls the horizontal camera (5), the vertical camera (3) and the laser rangefinder (4) to swing left and right, the laser rangefinder (4) measures the distances S1 and S2 between the multiple groups of laser rangefinders (4) and the object and sends them to the comparison module for comparison, the comparison module feeds back the shortest distances S1 and S2 to the single chip microcomputer, and the single chip microcomputer controls the adjustment motor (1) to make the laser rangefinder (4), the horizontal camera (5) and the vertical camera (3) rotate to positions where the distances are S1 and S2; S3. Processing object occlusion relationship: The angle sensor (2) determines the angle α of the horizontal camera (5) relative to the initial position and the angle β of the vertical camera (3) relative to the initial position according to the number of revolutions driven by the adjustment motor (1), and transmits α to the horizontal camera (5) to obtain the coordinates (x, y1) of the object on the xoy plane, and transmits β to the vertical camera (3) to obtain the coordinates (y2, z) of the object on the zoy plane. If the difference y1-y2 is zero, it means that the objects detected by the horizontal camera (5) and the vertical camera (3) are the same object; If there are two objects in the detection area, the horizontal camera (5) obtains the coordinates of object A on the xoy plane (x1, y1) and the coordinates of object B on the xoy plane (x2, y2); the vertical camera (3) obtains the coordinates of object A on the zoy plane (y1, z1) and the coordinates of object B on the zoy plane (y2, z2). If x1=x2, y1=y2 and z1>z2, it means that object A blocks object B in the z-axis direction. If x1=x2, y1>y2, and z1=z2, it means that object A blocks object B in the Y-axis direction; if x1>x2, y1=y2, and z1=z2, it means that object A blocks object B in the X-axis direction; S4. Determine the three-dimensional coordinates of the object: If there is only one object in the detection area, the three-dimensional coordinates (x, y, z) of the object are obtained based on the coordinates (x, y) of the object on the xoy plane and the coordinates (y, z) of the zoy plane. S5. Detection of target motion: First, the difference between the background image and the current image is calculated using a formula, and then the difference image is binarized, and the connectivity analysis of the binarized image is performed. When the area (number of pixels) of a connected region is greater than a certain threshold, it is considered that the target is detected, and the connected region is considered to be the extracted target image. The images captured by the horizontal camera (5) and the vertical camera (3) are respectively subjected to background subtraction operations to determine whether the object is moving. If the horizontal camera (5) or the vertical camera (3) recognizes the movement of the object through the image, it is determined that the object is moving.

2. The method for detecting the three-dimensional position of a target based on dual cameras and lasers according to claim 1, wherein: A rotating frame is installed at the bottom ends of the horizontal camera (5), the vertical camera (3) and the laser rangefinder (4); the adjusting motor (1) is arranged below the rotating frame; the output end of the adjusting motor (1) is fixedly connected to a Lego shaft; an angle sensor (2) is arranged on the outside of the Lego shaft; and the top end of the Lego shaft is fixedly connected to the rotating frame.

3. The method for detecting the three-dimensional position of a target based on dual cameras and lasers according to claim 2, wherein: A control box is installed on the rotating frame, and a single chip microcomputer, a reset module and a comparison module are installed in the control box.

4. The method for detecting the three-dimensional position of a target based on dual cameras and lasers according to claim 3, wherein: The angle sensor (2), the laser rangefinder (4), the adjustment motor (1), the transverse camera (5) and the longitudinal camera (3) are electrically connected; a calculation module is provided inside the transverse camera (5) and the longitudinal camera (3); the calculation module, the reset module and the comparison module establish an information transmission connection with the single-chip microcomputer; and the calculation module establishes an information transmission connection with the comparison module.

5. The method for detecting the three-dimensional position of a target based on dual cameras and lasers according to claim 4, characterized in that: The calculation module includes calculation formulas for the object coordinates x, y1, y2 and z coordinates, the calculation formula for the coordinate x is: L1-S1×cosα, the calculation formula for the coordinate y1 is: S1×Sinα, the calculation formula for the coordinate y2 is: S2×sinβ, and the calculation formula for the coordinate z is: L2-S2×cosβ.

6. The method for detecting the three-dimensional position of a target based on dual cameras and lasers according to claim 4, wherein: The reset module is used to restore the horizontal camera (5) and the vertical camera (3) to their initial positions after completing a detection operation.

Citation Information

Patent Citations

  • Three-dimensional locating system and locating method based on laser ranging and computer vision

    CN103557796A

  • Method, system and device for automatically establishing spatial three-dimensional model

    CN111076712A