Position detection method and device based on laser ranging, electronic equipment and medium

By constructing a transformation matrix between the first and second coordinate systems and combining it with the offset distance of the laser rangefinder, the calculation process for laser rangefinder detection is simplified, and the efficiency of obtaining the position of the target in the gate is improved.

CN120991705APending Publication Date: 2025-11-21ROUTON ELECTRONICS CO LTD +1
View PDF 13 Cites 0 Cited by

Patent Information

Application Number
CN202510975304.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-15
Publication Date
2025-11-21

AI Technical Summary

Technical Problem

Existing laser ranging detection methods have low computational efficiency in turnstiles, resulting in low detection efficiency.

Method used

By collecting position data based on a laser rangefinder, a first coordinate system is constructed and then converted into a second coordinate system. By combining the transformation matrix and offset distance, the calculation process is simplified to obtain the three-dimensional coordinate data of the detected target.

Benefits of technology

It improves the computational efficiency of detection location, simplifies the process of obtaining detection location, and reduces computational complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120991705A_ABST
    Figure CN120991705A_ABST
Patent Text Reader

Abstract

The invention provides a position detection method and device based on laser ranging, electronic equipment and a storage medium, and relates to the technical field of gate detection. The method comprises the following steps: acquiring position data of a detection target based on a laser distance measuring sensor; converting the position data of the detection target into a three-dimensional coordinate system number under a first coordinate system; acquiring a conversion matrix for converting the first coordinate system into the second coordinate system; the offset distance of the laser distance measuring sensor on the Y axis of the second coordinate system relative to the gate center is obtained; and based on the conversion matrix and the offset distance, converting the three-dimensional coordinate system number into three-dimensional coordinate data of the detection target in the second coordinate system to obtain a detection position of the detection target. According to the invention, the coordinate system is converted into the three-dimensional coordinate data according to the conversion matrix and the offset distance, the calculation of obtaining the detection position is simplified, and the efficiency of obtaining the detection position is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of gate detection technology, and in particular to a position detection method, device, electronic device and storage medium based on laser ranging. Background Technology

[0002] With the widespread use of turnstiles in various locations, the requirements for their functionality, cost, size, and installation are becoming increasingly stringent. Currently, ordinary turnstiles still use the traditional infrared beam method to detect targets, requiring a relatively long turnstile enclosure as a passageway. This method also suffers from problems such as low detection resolution, large blind spots, numerous signal cables, and high overall cost.

[0003] Currently, laser-based rangefinders have made significant progress in miniaturization, high precision, and low cost. Using laser rangefinders to replace infrared photodiodes for target detection in turnstiles is a feasible solution.

[0004] However, existing laser ranging detection methods mostly use neural network models, which are computationally complex and thus result in low detection efficiency. Summary of the Invention

[0005] This invention provides a position detection method, device, electronic device, and storage medium based on laser ranging, which solves the problem of low computational efficiency in laser ranging detection in the prior art and improves the computational efficiency of laser ranging detection.

[0006] This invention provides a position detection method based on laser ranging, comprising: acquiring position data of a target based on a laser ranging sensor installed on a gate; converting the position data of the target into three-dimensional coordinate coefficients in a first coordinate system; the origin of the first coordinate system is the laser ranging sensor, and the Y-axis of the first coordinate system is the illumination direction of the laser ranging sensor; obtaining a transformation matrix from the first coordinate system to a second coordinate system; the origin of the second coordinate system is the center of the gate, and the Y-axis of the second coordinate system is the direction of the gate passage; obtaining the offset distance of the laser ranging sensor relative to the center of the gate on the Y-axis of the second coordinate system; and based on the transformation matrix and the offset distance, converting the three-dimensional coordinate coefficients into three-dimensional coordinate data of the target in the second coordinate system to obtain the detection position of the target.

[0007] The laser ranging-based position detection method provided by the present invention collects position data of the target based on a laser ranging sensor installed on a turnstile, including: collecting position data of interference objects in the background of the turnstile based on the laser ranging sensor; collecting the original position data of the target against the background of the turnstile when the target passes through the turnstile; cropping the interference object position data from the original position data to obtain the original position data of the target after one cropping; and cropping the original position data again based on the effective detection range of the turnstile channel to obtain the position data of the target.

[0008] According to the laser ranging-based position detection method provided by the present invention, the position data includes a first angle between the ray direction of the detected target and the Y-axis of the first coordinate system, a second angle between the ray direction and the X-axis of the first coordinate system, and the target distance of the detected target relative to the laser ranging sensor. The three-dimensional coordinate coefficients include X-axis coordinate coefficients, Y-axis coordinate coefficients, and Z-axis coordinate coefficients. Converting the position data of the detected target into three-dimensional coordinate coefficients in the first coordinate system includes: calculating the X-axis coordinate coefficients, Y-axis coordinate coefficients, and Z-axis coordinate coefficients based on the first angle, the second angle, and the target distance.

[0009] According to the laser ranging-based position detection method provided by the present invention, the X-axis coordinate coefficient, Y-axis coordinate coefficient, and Z-axis coordinate coefficient are calculated based on a first included angle, a second included angle, and a target distance. The method includes: when the target distance is a first distance between the target and the plane where the laser ranging sensor is located, obtaining the X-axis coordinate coefficient based on the tangent of the first included angle and the cosine of the second included angle; determining the Y-axis coordinate coefficient as a set value; and obtaining the Z-axis coordinate coefficient based on the tangent of the first included angle and the sine of the second included angle.

[0010] According to the laser ranging-based position detection method provided by the present invention, the X-axis coordinate coefficient, Y-axis coordinate coefficient, and Z-axis coordinate coefficient are calculated based on a first included angle, a second included angle, and a target distance. The method includes: when the target distance is a second distance between the target and the laser ranging sensor, obtaining the X-axis coordinate coefficient based on the sine of the first included angle and the cosine of the second included angle; obtaining the Y-axis coordinate coefficient based on the cosine of the first included angle; and obtaining the Z-axis coordinate coefficient based on the sine of the first included angle and the sine of the second included angle.

[0011] According to the laser ranging-based position detection method provided by the present invention, the effective detection range of the gate channel is obtained based on the following steps: obtaining the effective detection range of the gate channel based on three-dimensional coordinate coefficients, transformation matrix, length of the gate channel, width of the gate channel, and height of the gate channel.

[0012] According to the laser ranging-based position detection method provided by the present invention, the transformation matrix for transforming from a first coordinate system to a second coordinate system is obtained, including: obtaining the rotation angle of the first coordinate system relative to the second coordinate system based on the horizontal angle between the Y-axis of the first coordinate system and the Y-axis of the second coordinate system; obtaining the pitch angle of the first coordinate system relative to the second coordinate system based on the vertical angle between the Y-axis of the first coordinate system and the Y-axis of the second coordinate system; and constructing the transformation matrix based on the sine, cosine, sine, and cosine values ​​of the rotation angle and the pitch angle.

[0013] The present invention also provides a laser ranging-based position detection device, comprising: a data acquisition module for acquiring position data of a target based on a laser ranging sensor installed on a gate; a first conversion module for converting the position data of the target into three-dimensional coordinate coefficients in a first coordinate system; the origin of the first coordinate system is the laser ranging sensor, and the Y-axis of the first coordinate system is the illumination direction of the laser ranging sensor; a first acquisition module for acquiring a transformation matrix from the first coordinate system to a second coordinate system; the origin of the second coordinate system is the center of the gate, and the Y-axis of the second coordinate system is the gate channel direction; a second acquisition module for acquiring the offset distance of the laser ranging sensor relative to the center of the gate on the Y-axis of the second coordinate system; and a second conversion module for converting the three-dimensional coordinate coefficients into three-dimensional coordinate data of the target in the second coordinate system based on the conversion matrix and the offset distance, so as to acquire the detection position of the target.

[0014] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement any of the laser ranging-based position detection methods described above.

[0015] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the laser ranging-based position detection methods described above.

[0016] This invention provides a laser ranging-based position detection method, device, electronic equipment, and storage medium. Based on a laser ranging sensor installed on a turnstile, it collects position data of the target; converts the target's position data into three-dimensional coordinate coefficients in a first coordinate system; the origin of the first coordinate system is the laser ranging sensor, and the Y-axis of the first coordinate system is the illumination direction of the laser ranging sensor; a transformation matrix is ​​obtained to convert the first coordinate system to a second coordinate system; the origin of the second coordinate system is the center of the turnstile, and the Y-axis of the second coordinate system is the direction of the turnstile channel; the offset distance of the laser ranging sensor relative to the center of the turnstile on the Y-axis of the second coordinate system is obtained; based on the transformation matrix and the offset distance, the three-dimensional coordinate coefficients are converted into three-dimensional coordinate data of the target in the second coordinate system to obtain the target's detection position. This invention simplifies the calculation of obtaining the detection position and improves the efficiency of obtaining the detection position by converting the coordinate coefficients into three-dimensional coordinate data according to the transformation matrix and the offset distance. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0018] Figure 1 This is a schematic flowchart of the laser ranging-based position detection method provided by the present invention.

[0019] Figure 2 This is a schematic diagram showing the relative positions of the laser ranging sensor and the gate provided by the present invention.

[0020] Figure 3 This is a schematic diagram of the position detection device based on laser ranging provided by the present invention.

[0021] Figure 4 This is a schematic diagram of the structure of the electronic device provided by the present invention.

[0022] Figure label: 10: Laser rangefinder sensor; 20: Turnstile gate; 30: Turnstile column. Detailed Implementation

[0023] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0024] The following is combined with Figures 1-4 The present invention describes a laser ranging-based position detection method, apparatus, and electronic device.

[0025] Figure 1 This is a flowchart illustrating the laser ranging-based position detection method provided by the present invention, as shown below. Figure 1 As shown, the laser ranging-based position detection method includes steps S100 to S500, and the specific steps are as follows.

[0026] S100: Based on the laser rangefinder sensor installed on the gate, it collects and detects the position data of the target.

[0027] like Figure 2 As shown, the laser rangefinder 10 is mounted on the gate post 30 of the turnstile. Figure 1 As shown, laser rangefinders are installed on both the front and rear sides of the turnstile 20. Detected targets include people and objects preparing to pass through the turnstile.

[0028] When the target is within the detection range of the laser rangefinder, its position data is acquired. The target's position data is acquired based on the laser rangefinder's horizontal field of view (FoVh), vertical field of view (FoVv), and resolution. Resolution includes horizontal resolution (RH) and vertical resolution (RV).

[0029] Based on the laser rangefinder sensor installed on the gate, the position data of the target is collected, including the following steps: Based on a laser rangefinder sensor, data on the location of interfering objects in the background of the gate are collected. When the target passes through the turnstile, the original position data of the target against the background of the turnstile is collected; By cropping the location data of interfering objects from the original location data, the original location data of the detected target after one cropping is obtained; Based on the effective detection range of the turnstile channel, the original position data after one cropping is cropped again to obtain the position data of the detection target.

[0030] The laser rangefinder sensor is equipped with a background learning function during installation. This function allows the laser rangefinder sensor to collect data on the location of interfering objects in the background of the gate (background values).

[0031] When the target passes through the turnstile, the original position data of the target against the background of the turnstile is collected. Based on the location data of the interfering objects (background values), the original position data is cropped to obtain the original position data after cropping.

[0032] Obtain the effective detection range of the turnstile channel. Based on this effective detection range, perform channel trimming on the original position data after one trimming to obtain the final position data of the detection target.

[0033] Furthermore, the location data of the detected targets undergoes preprocessing such as noise filtering, target segmentation, and target connection to obtain preprocessed location data. Subsequently, the preprocessed location data is converted into three-dimensional coordinate coefficients in the first coordinate system.

[0034] This invention achieves the cropping of the original position data by using the location data of interference objects in the background of the turnstile and the effective detection range of the turnstile channel, thereby improving the effectiveness of the position data of the detected target and reducing the amount of subsequent calculation of the position data of the detected target.

[0035] S200: Converts the position data of the detected target into three-dimensional coordinate coefficients in the first coordinate system.

[0036] The origin of the first coordinate system is the laser rangefinder sensor, and the Y-axis of the first coordinate system is the illumination direction of the laser rangefinder sensor.

[0037] A first coordinate system is constructed with the laser rangefinder sensor as the origin and the direction of illumination from the laser rangefinder sensor as the Y-axis. This first coordinate system is a three-dimensional coordinate system. The X-axis, Y-axis, and Z-axis of the first coordinate system are mutually perpendicular.

[0038] The position data of the detected target is converted into X-axis coordinate coefficients, Y-axis coordinate coefficients and Z-axis coordinate coefficients in the first coordinate system, and then the three-dimensional coordinate coefficients are obtained.

[0039] S300: Obtain the transformation matrix from the first coordinate system to the second coordinate system.

[0040] The origin of the second coordinate system is the center of the gate, and the Y-axis of the second coordinate system is the direction of the gate channel.

[0041] A second coordinate system is constructed with the center of the turnstile as the origin and the direction of the turnstile channel as the Y-axis. This second coordinate system is a three-dimensional coordinate system. The Z-axis of the second coordinate system is perpendicular to the ground, and the X-axis is perpendicular to the turnstile channel.

[0042] Based on the deviation angle between the Y-axis of the first coordinate system and the Y-axis of the second coordinate system, construct a transformation matrix to transform from the first coordinate system to the second coordinate system. For example, the transformation matrix is ​​a 3×3 matrix.

[0043] Based on the above embodiments, obtaining the transformation matrix from the first coordinate system to the second coordinate system includes the following steps: Based on the angle between the Y-axis of the first coordinate system and the Y-axis of the second coordinate system in the horizontal direction, obtain the rotation angle of the first coordinate system relative to the second coordinate system. Based on the vertical angle between the Y-axis of the first coordinate system and the Y-axis of the second coordinate system, the pitch angle of the first coordinate system relative to the second coordinate system is obtained. A transformation matrix is ​​constructed based on the sine, cosine, sine, and cosine values ​​of the rotation angle.

[0044] The transformation matrix is ​​as follows.

[0045] ; in, For pitch angle, For rotation angle, The cosine value of the pitch angle. The sine of the rotation angle. The cosine of the rotation angle. The sine value of the pitch angle. This is the transformation matrix.

[0046] This invention constructs a transformation matrix based on the sine, cosine, pitch, and y-angle values ​​of the rotation angle, thereby realizing the conversion of three-dimensional coordinate coefficients into three-dimensional coordinate data and simplifying the process of calculating the detection position.

[0047] S400: Obtain the offset distance of the laser rangefinder sensor relative to the center of the gate on the Y-axis of the second coordinate system.

[0048] Obtain the position of the laser rangefinder sensor relative to the center of the gate, and obtain the offset distance.

[0049] S500: Based on the transformation matrix and offset distance, the three-dimensional coordinate coefficients are converted into three-dimensional coordinate data in the second coordinate system to obtain the detection position of the target.

[0050] Based on the transformation matrix, the 3D coordinate coefficients are converted into initial 3D coordinate data in the second coordinate system. Then, based on the offset distance, the Y-coordinate of the initial 3D coordinate data in the second coordinate system is corrected to obtain the detection position of the target (3D coordinate data in the second coordinate system). The calculation formula for the 3D coordinate data is as follows. The 3D coordinate data includes the X-axis coordinate, Y-axis coordinate, and Z-axis coordinate in the second coordinate system.

[0051] ; in, The x-axis coordinates in the second coordinate system The Y-axis coordinate in the second coordinate system The Z-axis coordinate in the second coordinate system To detect the pixels of the target (Location data) X-axis coordinate coefficients in the first coordinate system. To detect the pixels of the target Y-axis coordinate coefficients in the first coordinate system To detect the pixels of the target Z-axis coordinate coefficients in the first coordinate system Let the values ​​in the first row and first column of the transformation matrix be the values. Let be the value in the second row and first column of the transformation matrix. Let be the value in the third row and first column of the transformation matrix. The values ​​in the second row and second column of the transformation matrix are... The value in the third row and second column of the transformation matrix. The value in the third row and third column of the transformation matrix. The values ​​in the second row and third column of the transformation matrix are... This is the offset distance. To detect the pixels of the target The target distance relative to the laser rangefinder.

[0052] Furthermore, two laser rangefinders are installed on each side of the turnstile in one direction. These laser rangefinders are connected wirelessly via Bluetooth. Each laser rangefinder sends its acquired detection position to the other for data overlay analysis, resulting in a fused detection position of the target. This fused detection position is then reported to the turnstile's main control board. The main control board combines the fused detection positions from both the entry and exit directions to perform target identification and tracking.

[0053] The laser ranging-based position detection method provided in this invention collects the position data of the target based on a laser ranging sensor installed on a turnstile; converts the target's position data into three-dimensional coordinate coefficients in a first coordinate system; the origin of the first coordinate system is the laser ranging sensor, and the Y-axis of the first coordinate system is the illumination direction of the laser ranging sensor; a transformation matrix is ​​obtained to transform the first coordinate system to a second coordinate system; the origin of the second coordinate system is the center of the turnstile, and the Y-axis of the second coordinate system is the direction of the turnstile channel; the offset distance of the laser ranging sensor relative to the center of the turnstile on the Y-axis of the second coordinate system is obtained; based on the transformation matrix and the offset distance, the three-dimensional coordinate coefficients are converted into three-dimensional coordinate data of the target in the second coordinate system to obtain the target's detection position. This invention simplifies the calculation of obtaining the detection position and improves the efficiency of obtaining the detection position by converting the coordinate coefficients into three-dimensional coordinate data according to the transformation matrix and the offset distance.

[0054] Based on the above embodiments, the position data includes the first angle between the ray direction of the detected target and the Y-axis of the first coordinate system, the second angle between the ray direction and the X-axis of the first coordinate system, and the target distance of the detected target relative to the laser rangefinder. The three-dimensional coordinate coefficients include X-axis coordinate coefficients, Y-axis coordinate coefficients, and Z-axis coordinate coefficients. Converting the position data of the detected target into three-dimensional coordinate coefficients in the first coordinate system includes: calculating the X-axis coordinate coefficients, Y-axis coordinate coefficients, and Z-axis coordinate coefficients based on the first angle, the second angle, and the target distance.

[0055] The ray direction for detecting the target is the direction of the line connecting the target to the origin of the first coordinate system. Position data includes the first included angle, the second included angle, and the target distance.

[0056] Based on the first included angle, the second included angle, and the target distance, calculate the X-axis coordinate coefficient, Y-axis coordinate coefficient, and Z-axis coordinate coefficient of the detected target in the first coordinate system.

[0057] Based on the collected first included angle, second included angle, and target distance, this invention enables accurate calculation of the X-axis coordinate coefficient, Y-axis coordinate coefficient, and Z-axis coordinate coefficient of the detected target in the first coordinate system.

[0058] Based on the above embodiments, the X-axis coordinate coefficient, Y-axis coefficient, and Z-axis coefficient are calculated based on the first included angle, the second included angle, and the target distance, including the following steps: When the target distance is the first distance between the detected target and the plane where the laser rangefinder sensor is located, the X-axis coordinate coefficient is obtained based on the tangent of the first included angle and the cosine of the second included angle. Set the Y-axis coordinate coefficient to the set value; The Z-axis coordinate coefficients are obtained based on the tangent of the first included angle and the sine of the second included angle.

[0059] When the target distance is the first distance between the detected target and the plane where the laser rangefinder sensor is located, the calculation formulas for the X-axis coordinate coefficient, Y-axis coordinate coefficient, and Z-axis coordinate coefficient are as follows.

[0060] ; in, To detect the pixels of the target The first included angle corresponding to the (location data) For pixels The corresponding second included angle, To detect the pixels of the target The X-axis coordinate coefficient in the first coordinate system is set to 1. To detect the pixels of the target Y-axis coordinate coefficients in the first coordinate system To detect the pixels of the target Z-axis coordinate coefficients in the first coordinate system The tangent of the first included angle is given. Let cosine be the value of the second included angle. It is the sine of the second included angle.

[0061] This invention calculates the X-axis, Y-axis, and Z-axis coordinate coefficients of the detected target in the first coordinate system based on the first included angle, the second included angle, and the target distance, thus simplifying the calculation process of the three-dimensional coordinate coefficients.

[0062] Based on the above embodiments, the X-axis coordinate coefficient, Y-axis coefficient, and Z-axis coefficient are calculated based on the first included angle, the second included angle, and the target distance, including the following steps: When the target distance is the second distance between the detected target and the laser rangefinder, the X-axis coordinate coefficient is obtained based on the sine of the first included angle and the cosine of the second included angle. Based on the cosine value of the first included angle, obtain the Y-axis coordinate coefficient; The Z-axis coordinate coefficients are obtained based on the sine values ​​of the first and second included angles.

[0063] When the target distance is the second distance between the detected target and the laser rangefinder, the calculation formulas for the X-axis coordinate coefficient, Y-axis coordinate coefficient, and Z-axis coordinate coefficient are as follows.

[0064] ; in, To detect the pixels of the target The first included angle corresponding to the (location data) For pixels The corresponding first included angle, To detect the pixels of the target The X-axis coordinate coefficient in the first coordinate system To detect the pixels of the target Y-axis coordinate coefficients in the first coordinate system To detect the pixels of the target Z-axis coordinate coefficients in the first coordinate system Let be the sine of the first included angle. Let cosine be the value of the second included angle. Let cosine be the value of the first included angle. It is the sine of the second included angle.

[0065] This invention employs different algorithms to calculate coordinate coefficients for different target distances, thereby improving the accuracy of coordinate coefficient calculation.

[0066] Based on the above embodiments, the effective detection range of the turnstile channel is obtained based on the following steps: the effective detection range of the turnstile channel is obtained based on the three-dimensional coordinate coefficients, transformation matrix, length of the turnstile channel, width of the turnstile channel, and height of the turnstile channel.

[0067] The effective detection range includes the maximum detection distance in the X-axis direction, the maximum detection distance in the Y-axis direction, and the maximum detection distance in the Z-axis direction. The formula for calculating the effective detection range is as follows.

[0068] ; in, For the calculation of the X-axis, For the calculation of the Y-axis, For the calculation of the Z-axis, This represents the maximum detection distance along the X-axis. The maximum detection distance in the Y-axis direction. This represents the maximum detection distance along the Z-axis. This represents the width of the passageway where the turnstile is located. The height of the passage where the turnstile is located. The length of the passage where the turnstile is located. To detect the pixels of the target X-axis coordinate coefficients in the first coordinate system To detect the pixels of the target Y-axis coordinate coefficients in the first coordinate system To detect the pixels of the target Z-axis coordinate coefficients in the first coordinate system Let the values ​​in the first row and first column of the transformation matrix be the values. Let be the value in the second row and first column of the transformation matrix. Let be the value in the third row and first column of the transformation matrix. The values ​​in the second row and second column of the transformation matrix are... The value in the third row and second column of the transformation matrix. The value in the third row and third column of the transformation matrix. The values ​​in the second row and third column of the transformation matrix are... This represents the offset distance. To detect the pixels of the target The maximum allowable measurement distance within the gate passage area.

[0069] The reason for choosing Pixels as the detection target The maximum allowable measurement distance within the gate access area is because... , and Only pixels were considered in the calculation. The detection limitations in one direction do not simultaneously consider the detection limitations in the XYZ directions. And the pixels used to determine the target detection point... The actual maximum detection distance needs to consider the detection limitations in the XYZ directions simultaneously. Therefore, the selection... , and The minimum value of the three is used as the pixel of the target to be detected. The maximum allowable measurement distance within the gate passage area.

[0070] The laser ranging-based position detection device provided by the present invention is described below. The laser ranging-based position detection device described below and the laser ranging-based position detection method described above can be referred to and correspond to each other.

[0071] like Figure 3 As shown, a position detection device based on laser ranging includes a data acquisition module 301, a first conversion module 302, a first acquisition module 303, a second acquisition module 304, and a second conversion module 305.

[0072] The acquisition module 301 is used to acquire the position data of the target based on the laser rangefinder sensor installed on the gate.

[0073] The first conversion module 302 is used to convert the position data of the detected target into three-dimensional coordinate coefficients in the first coordinate system; the origin of the first coordinate system is the laser rangefinder sensor, and the Y-axis of the first coordinate system is the illumination direction of the laser rangefinder sensor.

[0074] The first acquisition module 303 is used to acquire the transformation matrix from the first coordinate system to the second coordinate system; the origin of the second coordinate system is the center of the gate, and the Y-axis of the second coordinate system is the direction of the gate channel.

[0075] The second acquisition module 304 is used to acquire the offset distance of the laser rangefinder relative to the center of the gate on the Y-axis of the second coordinate system.

[0076] The second conversion module 305 is used to convert the three-dimensional coordinate coefficients into three-dimensional coordinate data of the target in the second coordinate system based on the conversion matrix and the offset distance, so as to obtain the detection position of the target.

[0077] The laser ranging-based position detection device provided in this invention collects the position data of the target based on a laser ranging sensor installed on a turnstile; converts the target's position data into three-dimensional coordinate coefficients in a first coordinate system; the origin of the first coordinate system is the laser ranging sensor, and the Y-axis of the first coordinate system is the illumination direction of the laser ranging sensor; a transformation matrix is ​​obtained to transform the first coordinate system to a second coordinate system; the origin of the second coordinate system is the center of the turnstile, and the Y-axis of the second coordinate system is the direction of the turnstile channel; the offset distance of the laser ranging sensor relative to the center of the turnstile on the Y-axis of the second coordinate system is obtained; based on the transformation matrix and the offset distance, the three-dimensional coordinate coefficients are converted into three-dimensional coordinate data of the target in the second coordinate system to obtain the target's detection position. This invention simplifies the calculation of obtaining the detection position and improves the efficiency of obtaining the detection position by converting the coordinate coefficients into three-dimensional coordinate data according to the transformation matrix and the offset distance.

[0078] In one embodiment, the acquisition module 301 is used to: acquire the location data of interference objects in the background of the gate based on a laser rangefinder; acquire the original location data of the target in the background of the gate when the target passes through the gate; trim the location data of interference objects from the original location data to obtain the original location data of the target after one trimming; and trim the original location data after one trimming again based on the effective detection range of the gate channel to obtain the location data of the target.

[0079] In one embodiment, the position data includes a first angle between the ray direction of the detected target in the first coordinate system and the Y-axis of the first coordinate system, a second angle between the ray direction and the X-axis of the first coordinate system, and the target distance of the detected target relative to the laser rangefinder. The three-dimensional coordinate coefficients include X-axis coordinate coefficients, Y-axis coordinate coefficients, and Z-axis coordinate coefficients. The first conversion module 301 is used to calculate the X-axis coordinate coefficients, Y-axis coordinate coefficients, and Z-axis coordinate coefficients based on the first angle, the second angle, and the target distance.

[0080] In one embodiment, the first conversion module 301 is configured to: when the target distance is a first distance between the detection target and the plane where the laser rangefinder sensor is located, obtain the X-axis coordinate coefficient based on the tangent of the first included angle and the cosine of the second included angle; determine the Y-axis coordinate coefficient as a set value; and obtain the Z-axis coordinate coefficient based on the tangent of the first included angle and the sine of the second included angle.

[0081] In one embodiment, the first conversion module 301 is used to: when the target distance is the second distance between the detected target and the laser rangefinder, obtain the X-axis coordinate coefficient based on the sine value of the first included angle and the cosine value of the second included angle; obtain the Y-axis coordinate coefficient based on the cosine value of the first included angle; and obtain the Z-axis coordinate coefficient based on the sine value of the first included angle and the sine value of the second included angle.

[0082] In one embodiment, the acquisition module 301 is used to: obtain the effective detection range of the gate channel based on the three-dimensional coordinate coefficients, transformation matrix, length of the gate channel, width of the gate channel, and height of the gate channel.

[0083] In one embodiment, the first acquisition module 303 is configured to: acquire the rotation angle of the first coordinate system relative to the second coordinate system based on the horizontal angle between the Y-axis of the first coordinate system and the Y-axis of the second coordinate system; acquire the pitch angle of the first coordinate system relative to the second coordinate system based on the vertical angle between the Y-axis of the first coordinate system and the Y-axis of the second coordinate system; and construct a transformation matrix based on the sine, cosine, and pitch angle values.

[0084] Figure 4 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 4 As shown, the electronic device may include a processor 410, a communications interface 420, a memory 430, and a communication bus 440. The processor 410, communications interface 420, and memory 430 communicate with each other via the communication bus 440. The processor 410 can call logical instructions in the memory 430 to execute a laser ranging-based position detection method. This method includes: acquiring position data of a target based on a laser ranging sensor installed on the gate; converting the target's position data into three-dimensional coordinate coefficients in a first coordinate system; the origin of the first coordinate system is the laser ranging sensor, and the Y-axis of the first coordinate system is the illumination direction of the laser ranging sensor; obtaining a transformation matrix from the first coordinate system to a second coordinate system; the origin of the second coordinate system is the center of the gate, and the Y-axis of the second coordinate system is the gate channel direction; obtaining the offset distance of the laser ranging sensor relative to the gate center on the Y-axis of the second coordinate system; and based on the transformation matrix and the offset distance, converting the three-dimensional coordinate coefficients into three-dimensional coordinate data of the target in the second coordinate system to obtain the target's detection position.

[0085] Furthermore, the logical instructions in the aforementioned memory 430 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0086] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements the laser ranging-based position detection method provided by the above methods. The method includes: acquiring position data of a target based on a laser ranging sensor installed on a gate; converting the position data of the target into three-dimensional coordinate coefficients in a first coordinate system; the origin of the first coordinate system is the laser ranging sensor, and the Y-axis of the first coordinate system is the illumination direction of the laser ranging sensor; obtaining a transformation matrix from the first coordinate system to a second coordinate system; the origin of the second coordinate system is the center of the gate, and the Y-axis of the second coordinate system is the gate channel direction; obtaining the offset distance of the laser ranging sensor relative to the center of the gate on the Y-axis of the second coordinate system; and converting the three-dimensional coordinate coefficients into three-dimensional coordinate data of the target in the second coordinate system based on the transformation matrix and the offset distance, so as to obtain the detection position of the target.

[0087] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0088] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0089] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A position detection method based on laser ranging, characterized in that, include: The location data of the detected target is collected based on the laser rangefinder sensor installed on the gate. The position data of the detected target is converted into three-dimensional coordinate coefficients in a first coordinate system; the origin of the first coordinate system is the laser rangefinder, and the Y-axis of the first coordinate system is the illumination direction of the laser rangefinder. Obtain the transformation matrix from the first coordinate system to the second coordinate system; the origin of the second coordinate system is the center of the gate, and the Y-axis of the second coordinate system is the direction of the gate channel; Obtain the offset distance of the laser ranging sensor relative to the center of the gate on the Y-axis of the second coordinate system; Based on the transformation matrix and the offset distance, the three-dimensional coordinate coefficients are converted into three-dimensional coordinate data of the detected target in the second coordinate system to obtain the detection position of the detected target.

2. The position detection method based on laser ranging according to claim 1, characterized in that, The laser rangefinder sensor installed on the gate collects and detects the position data of the target, including: Based on the laser ranging sensor, data on the location of interfering objects in the background of the gate are collected; When the target passes through the gate, the original position data of the target is collected against the background of the gate; The interference object location data is cropped from the original location data to obtain the original location data of the detected target after one cropping. Based on the effective detection range of the turnstile channel, the original position data after the first trimming is trimmed again to obtain the position data of the detection target.

3. The position detection method based on laser ranging according to claim 1, characterized in that, The position data includes a first angle between the ray direction of the detected target and the Y-axis of the first coordinate system, a second angle between the ray direction and the X-axis of the first coordinate system, and the target distance of the detected target relative to the laser rangefinder. The three-dimensional coordinate coefficients include X-axis coordinate coefficients, Y-axis coordinate coefficients, and Z-axis coordinate coefficients. Converting the position data of the detected target into three-dimensional coordinate coefficients in the first coordinate system includes: Based on the first included angle, the second included angle, and the target distance, the X-axis coordinate coefficient, the Y-axis coordinate coefficient, and the Z-axis coordinate coefficient are calculated.

4. The position detection method based on laser ranging according to claim 3, characterized in that, The calculation of the X-axis coordinate coefficient, the Y-axis coordinate coefficient, and the Z-axis coordinate coefficient based on the first included angle, the second included angle, and the target distance includes: When the target distance is the first distance of the detected target relative to the plane where the laser ranging sensor is located, the X-axis coordinate coefficient is obtained based on the tangent of the first included angle and the cosine of the second included angle. The Y-axis coordinate coefficient is set to a predetermined value; The Z-axis coordinate coefficients are obtained based on the tangent of the first included angle and the sine of the second included angle.

5. The position detection method based on laser ranging according to claim 3, characterized in that, The calculation of the X-axis coordinate coefficient, the Y-axis coordinate coefficient, and the Z-axis coordinate coefficient based on the first included angle, the second included angle, and the target distance includes: When the target distance is the second distance between the detected target and the laser ranging sensor, the X-axis coordinate coefficient is obtained based on the sine of the first included angle and the cosine of the second included angle; Based on the cosine value of the first included angle, the Y-axis coordinate coefficient is obtained; The Z-axis coordinate coefficient is obtained based on the sine value of the first included angle and the sine value of the second included angle.

6. The position detection method based on laser ranging according to claim 2, characterized in that, The effective detection range of the turnstile channel is obtained based on the following steps: Based on the three-dimensional coordinate coefficients, the transformation matrix, the length of the gate channel, the width of the gate channel, and the height of the gate channel, the effective detection range of the gate channel is obtained.

7. The position detection method based on laser ranging according to claim 1, characterized in that, The step of obtaining the transformation matrix from the first coordinate system to the second coordinate system includes: Based on the angle between the Y-axis of the first coordinate system and the Y-axis of the second coordinate system in the horizontal direction, the rotation angle of the first coordinate system relative to the second coordinate system is obtained; Based on the vertical angle between the Y-axis of the first coordinate system and the Y-axis of the second coordinate system, the pitch angle of the first coordinate system relative to the second coordinate system is obtained. The transformation matrix is ​​constructed based on the sine, cosine, sine, and cosine values ​​of the rotation angle.

8. A position detection device based on laser ranging, characterized in that, include: The data acquisition module is used to acquire position data of the detected target based on the laser rangefinder sensor installed on the gate. The first conversion module is used to convert the position data of the detected target into three-dimensional coordinate coefficients in a first coordinate system; the origin of the first coordinate system is the laser rangefinder, and the Y-axis of the first coordinate system is the illumination direction of the laser rangefinder. The first acquisition module is used to acquire the transformation matrix from the first coordinate system to the second coordinate system; the origin of the second coordinate system is the center of the gate, and the Y-axis of the second coordinate system is the direction of the gate channel; The second acquisition module is used to acquire the offset distance of the laser ranging sensor relative to the center of the gate on the Y-axis of the second coordinate system; The second conversion module is used to convert the three-dimensional coordinate coefficients into three-dimensional coordinate data of the detected target in the second coordinate system based on the conversion matrix and the offset distance, so as to obtain the detection position of the detected target.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the laser ranging-based position detection method as described in any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the laser ranging-based position detection method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Human head detecting method and human head detecting device

    CN104103077A

  • Barrier information obtaining method and apparatus, and robot

    CN108256430A

  • Positioning system and positioning method for target object

    CN108551658A

  • Safety check device and imaging method thereof

    CN109116433A

  • Pedestrian path sensing system and method based on stereoscopic vision technology

    CN112669497A