A sensor device and control method for high precision tracking of a laser line
By combining a dark environment box structure and an omnidirectional rotation adjustment mechanism with an adaptive vision algorithm, the problems of high precision and anti-interference in laser tracking technology under strong light conditions are solved, achieving high-precision and low-cost laser line tracking, which is suitable for construction robots.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- DECORATION CO LTD OF CHINA CONSTR 3RD ENG BUREAU
- Filing Date
- 2026-05-27
- Publication Date
- 2026-06-30
AI Technical Summary
Existing laser tracking technologies have shortcomings in terms of measurement accuracy, ambient light adaptability, cost control, and the real-time performance and robustness of control methods, making it difficult to achieve high-precision, anti-interference, and low-cost laser line tracking in strong light environments.
The dark environment box structure consisting of a front cylinder and a rear cylinder mechanically attenuates ambient light, and combined with an omnidirectional rotation adjustment mechanism and visual algorithms such as the adaptive super green index, it achieves high-precision real-time tracking of the laser line.
Ensuring clear acquisition of laser line patterns in strong light environments improves recognition accuracy to ±0.5mm, reduces hardware costs, and achieves ±360° omnidirectional real-time tracking, adapting to precise positioning under complex working conditions.
Smart Images

Figure CN122307580A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the technical field of construction robots and automation equipment, specifically relating to a sensor device and control method for high-precision tracking of laser lines. Background Technology
[0002] With the development of technology and the rise of construction robots, more intelligent technologies are being applied to them, gradually replacing manual labor in high-precision, highly repetitive construction tasks. Laser tracking sensors, as a high-precision spatial measurement device, have become a core support for intelligent construction due to their high-precision positioning capabilities. By dynamically tracking the target point at the robot's end effector, laser tracking sensors collect position data in real time and compare it with the theoretical trajectory, feeding back the deviation value to the control system for compensation and adjustment, thereby achieving closed-loop control and precise positioning of the robot.
[0003] Currently, laser tracking technologies applied in construction robots are mainly divided into two categories. The first type of technology is based on direct identification of laser light intensity. It uses matrix or linear array photosensitive elements to capture laser line images and determines the position of the laser line by analyzing the light intensity distribution. This approach can achieve a measurement accuracy of 0.05mm in laboratory or low-light environments, and the photosensitive elements are relatively inexpensive. However, its working principle makes the photosensitive element quite sensitive to ambient light. When the ambient light intensity exceeds 3000 lux, such as when the robot is working near door or window openings, the ambient light will directly illuminate the surface of the photosensitive element, causing it to saturate or even overexpose, submerging the laser signal in the background light and resulting in recognition failure. To alleviate this problem, the conventional approach is to add a filter to the front of the photosensitive element to filter out some of the ambient light. However, while blocking ambient light, the filter also attenuates the laser energy to the same extent, resulting in reduced laser line brightness, blurred imaging, and thus shortening the effective recognition distance of the sensor. Therefore, in this type of approach, there is an inherent contradiction between ambient light suppression capability and recognition distance.
[0004] The second type of technology is based on laser carrier frequency identification. Its receiver locates the laser by sensing specific frequency characteristics in the transmitted signal and can operate normally in environments with strong light exceeding 40,000 lux. However, this approach has relatively low accuracy, typically around 1 mm, making it difficult to meet the high precision requirements of construction processes such as tile laying and wall treatment. Furthermore, because carrier identification requires strict pairing of the transmitter and receiver, users must select specific models from the same brand, limiting equipment selection and increasing procurement costs, which is detrimental to the mass production and widespread adoption of construction robots.
[0005] At the control method level, existing laser tracking sensors typically employ traditional image processing algorithms for laser line identification and localization, such as edge detection and Hough transform. While these algorithms perform well under ideal lighting conditions, they often suffer from problems like high computational load, poor real-time performance, and weak anti-interference capabilities in the complex lighting environment and dynamic interference of construction sites. For example, when people move or objects temporarily obstruct the light path, misidentification can easily occur, leading to incorrect compensation actions; when the laser line width changes or its edges become blurred due to distance variations, the recognition accuracy of traditional algorithms drops significantly. Furthermore, existing methods often separate image processing from mechanical control, failing to fully utilize the sensor's physical structural parameters to simplify calculations, thus limiting the system's response speed.
[0006] In summary, existing laser tracking technologies still have many shortcomings in terms of measurement accuracy, ambient light adaptability, cost control, and the real-time performance and robustness of control methods. There is an urgent need for a laser line tracking sensor device and control method that can balance high precision, strong anti-interference capability, low cost, and simple and efficient control methods. Summary of the Invention
[0007] To address the shortcomings of existing laser tracking technologies in terms of measurement accuracy, ambient light adaptability, cost control, and the real-time performance and robustness of control methods, this invention provides a sensor device and control method for high-precision laser line tracking. The device utilizes a dark environment box structure composed of a front and rear cylinder to achieve mechanical attenuation of ambient light. Its control method employs visual algorithms such as dimensionality reduction and downsampling, and adaptive super-green index to accurately identify the center coordinates of the laser line and perform geometric compensation to achieve dynamic tracking.
[0008] The technical solution of this invention is implemented as follows: A high-precision laser line tracking sensor device includes a base plate, an omnidirectional rotation adjustment mechanism, a photosensitive unit, and a control unit; the omnidirectional rotation adjustment mechanism is mounted on the base plate, the photosensitive unit is mounted on the omnidirectional rotation adjustment mechanism, and the control unit is electrically connected to the photosensitive unit and the omnidirectional rotation adjustment mechanism respectively; The photosensitive unit includes a cylindrical housing, a semi-transparent diffuser element, and a photosensitive sensor; the semi-transparent diffuser element is disposed inside the cylindrical housing, and the photosensitive sensor is disposed inside the cylindrical housing and faces the semi-transparent diffuser element. The cylindrical shell includes a front cylinder and a rear cylinder connected to each other. The internal spaces of the front cylinder and the rear cylinder together form a dark environment box. The semi-transparent diffuser element is located inside the dark environment box. The front end of the front cylinder is provided with a light inlet, the area of the light inlet is S, and the axial depth of the front cylinder is L. When S is measured in square millimeters and L is measured in millimeters, the numerical values of S and L satisfy the following ratio relationship: 30 ≤ S / L ≤ 80. The photosensitive unit is used to acquire the laser line pattern projected on the semi-transparent diffuse element. The control unit calculates the compensation amount based on the laser line pattern and drives the omnidirectional rotation adjustment mechanism to adjust the posture of the photosensitive unit.
[0009] This invention incorporates a dark environment chamber composed of a front cylinder and a rear cylinder at the front end of the photosensitive unit. The ratio of the light inlet area S to the axial depth L of the front cylinder is limited to a range of 30 to 80, achieving mechanical attenuation of ambient light and ensuring that the photosensitive sensor can clearly capture laser line patterns even in strong light environments. Simultaneously, the control unit calculates compensation amounts in real time based on the captured laser line pattern and drives an omnidirectional rotation adjustment mechanism to adjust the posture of the photosensitive unit, achieving high-precision real-time tracking of the laser line. This invention effectively solves the problem of recognition failure in strong light environments while ensuring imaging quality, and combines high precision, strong anti-interference capabilities, and structural stability.
[0010] As a further improvement to the above solution, the omnidirectional rotation adjustment mechanism includes a self-rotating component and a lifting component. The self-rotating component is used to drive the photosensitive unit to rotate horizontally, and the lifting component is used to drive the photosensitive unit to move up and down.
[0011] By decomposing the omnidirectional rotation adjustment mechanism into independently driven self-rotating components and lifting components, which are responsible for the two degrees of freedom of horizontal rotation and vertical lifting respectively, the motion decoupling of the horizontal and vertical adjustment of the photosensitive unit is achieved. This avoids mutual interference when a single mechanism handles two dimensions of motion at the same time, and improves the independence of tracking adjustment and control accuracy.
[0012] As a further improvement to the above solution, the front cylinder has a small end boss, the rear cylinder has a cavity and a stepped surface located at the bottom of the cavity, the small end boss of the front cylinder is inserted into the cavity of the rear cylinder, and the translucent diffuser element is pressed against the stepped surface.
[0013] By inserting the small end boss of the front cylinder into the concave cavity of the rear cylinder, the semi-transparent diffuser element is pressed tightly onto the stepped surface, achieving precise positioning and reliable fixation of the element, avoiding displacement and loosening under vibration conditions, and ensuring optical path stability and imaging consistency.
[0014] As a further improvement to the above solution, the self-rotating assembly includes a rotating flange, a primary rotating seat, a transition bushing, and a secondary rotating seat; the primary rotating seat is fixed to the upper surface of the rotating flange, the transition bushing is fitted onto the outer ring of the primary rotating seat, and the inner ring of the secondary rotating seat is fitted onto the outer ring of the transition bushing.
[0015] The multi-stage fitting structure of rotating flange, primary rotating seat, transition bushing and secondary rotating seat enables the horizontal and stable rotation of the photosensitive unit. The multi-stage fitting design improves the rotation accuracy and structural stability.
[0016] As a further improvement to the above solution, the lifting assembly includes a lead screw motor, a lifting plate, and a connecting seat. When the threaded shaft of the lead screw motor rotates, it drives the lifting plate and the photosensitive unit to rise and fall.
[0017] The screw-driven lifting mechanism consists of a screw motor, a lifting plate, and a connecting seat. The rotation of the screw shaft drives the photosensitive unit to rise and fall, achieving precise displacement compensation in the height direction. The structure is simple and reliable with high transmission accuracy.
[0018] As a further improvement to the above solution, a limiting component is also included, which includes a limiting pin fixed to the base plate and a limiting block fixed to the photosensitive unit; the limiting component is used to limit the horizontal rotation angle range of the photosensitive unit to ±360°.
[0019] By using the mechanical cooperation of the limiting pin and the limiting block, the horizontal rotation range of the photosensitive unit is limited to within ±360°, which not only ensures the flexibility of omnidirectional tracking, but also avoids cable entanglement or structural damage caused by excessive rotation, thereby improving the safety and service life of the device.
[0020] A control method for a high-precision laser line tracking sensor device, employing the sensor device as described above, includes the following steps: S1. Image Acquisition: The laser line pattern projected onto the semi-transparent diffuse element is acquired in real time by a photosensitive sensor; S2. Visual Processing: Perform dimensionality reduction and downsampling on the laser line pattern to extract the center coordinates of the laser line; S3. Deviation Judgment and Compensation Calculation: Based on the center coordinates of the laser line, identify whether the left or right end of the laser line pattern has a shortened unilateral shadow due to the obstruction of the front cylinder edge, and whether there is a vertical offset ΔH between the center and the calibrated laser line target position. Combined with the axial depth L of the front cylinder, calculate the horizontal compensation angle θ and the height compensation amount. S4. Tracking Compensation: Based on the horizontal compensation angle θ and the height compensation amount, the omnidirectional rotation adjustment mechanism is driven to adjust the posture of the photosensitive unit to achieve real-time tracking of the laser line.
[0021] By reducing the computational load and improving real-time performance through dimensionality reduction and downsampling, two types of features are identified: shortening of unilateral shadows and vertical offset. The horizontal compensation angle and height compensation are calculated by combining the axial depth L of the front cylinder, thus realizing independent identification and accurate compensation of horizontal angle deviation and height deviation, forming a complete closed-loop tracking control.
[0022] As a further improvement to the above scheme, the deviation judgment and compensation calculation includes the following steps: Identify whether the left or right end of the laser line pattern shows a shortened shadow on one side, and whether there is a vertical offset ΔH between the center and the calibrated laser line target position: If no unilateral shadow appears and there is no vertical offset, then the judgment is that there is no deviation; If the left or right end of the laser line pattern shows a shortening of the shadow on one side without vertical offset, it is determined that there is a horizontal angle deviation. Based on the shadow width b formed by the shortening of the shadow on one side and the axial depth L of the front cylinder, the horizontal compensation angle θ is calculated according to the formula θ= arctan(b / L), and the height compensation amount is 0. If there is no shortening of the shadow on one side, but there is a vertical offset ΔH between the center of the laser line pattern and the calibrated laser line target position, it is determined that there is a height deviation. The absolute value of the vertical offset ΔH is used as the height compensation amount, and the horizontal compensation angle θ is 0. If the left or right end of the laser line pattern shows a shortened shadow on one side and a vertical offset ΔH, it is determined that there is both a horizontal angle deviation and a height deviation. Based on the shadow width b and the axial depth L of the front cylinder, the horizontal compensation angle θ is calculated according to the formula θ = arctan(b / L), and the absolute value of the vertical offset ΔH is used as the height compensation amount.
[0023] By identifying two independent features—shortening of unilateral shadows and vertical offset—and covering four cases—no deviation, horizontal only, height only, and both—accurate differentiation of offset types is achieved. The horizontal compensation angle is directly calculated using a geometric formula, and the height compensation amount is taken as the absolute value of the vertical offset. The compensation logic is clear and the calculation is simple.
[0024] As a further improvement to the above solution, the tracking compensation includes the following steps: If it is determined that there is a horizontal angle deviation and the left end of the laser line pattern shows a shortened shadow on one side, then drive the self-rotating component to rotate the horizontal compensation angle θ counterclockwise. If it is determined that there is a horizontal angle deviation and the right end of the laser line pattern shows a shortened shadow on one side, then drive the self-rotating component to rotate the horizontal compensation angle θ clockwise. If it is determined that there is a height deviation and the vertical offset ΔH is positive, then the lifting component is driven to rise, and the rising height is the height compensation amount. If a height deviation is determined and the vertical offset ΔH is negative, the lifting assembly is driven to descend, and the descent height is the height compensation amount. If it is determined that both horizontal angle deviation and height deviation exist simultaneously, the self-rotating component is first driven to rotate the horizontal compensation angle θ to perform angle compensation, and then the lifting component is driven to move the height compensation amount to perform height compensation.
[0025] Based on the orientation of the shortening of the shadow on one side and the sign of the vertical offset, the direction of the compensation action is precisely matched, and the compensation is performed in the order of horizontal first and then vertical. This achieves decoupling of the two degrees of freedom of horizontal and vertical motion, avoids mutual interference, and ensures that the compensation action corresponds precisely to the type of deviation.
[0026] As a further improvement to the above solution, the visual processing includes the following steps: Adaptive super-green index extraction: acquire color images, calculate the average grayscale image and its brightness standard deviation σ, adaptively select the super-green index model based on the σ value, and convert the color image into an analysis grayscale image that highlights the laser line features; Sparse sampling of ROI in strips: Based on the preset laser line recognition direction, the strip sampling direction is determined, the adaptive strip width is calculated, and sampling is performed from the center of the image to both sides at intervals to obtain a compact sampling image; Threshold segmentation: Adaptive threshold binarization is performed on the compact sampling image to obtain a binarized image with clear laser line edges; Edge coordinate extraction and cluster analysis: The straight line segment features of the laser line edge are extracted from the binarized image, the corresponding one-dimensional coordinate point set is extracted according to the recognition direction, and the point set is clustered using an adaptive cluster radius to determine the center coordinates of the laser line.
[0027] By using adaptive super-green index extraction to enhance laser line features under different lighting conditions, combined with strip ROI sparse sampling to reduce computation, and then using adaptive threshold segmentation and cluster analysis to accurately extract center coordinates, the interference of background noise is effectively eliminated, thus improving recognition accuracy and robustness.
[0028] As a further improvement to the above scheme, the adaptive super-green index extraction specifically includes the following steps: The average grayscale image of the color image is calculated by applying different weights to the brightness of the three channels. Calculate the standard deviation σ of the brightness of each pixel in the average grayscale image; Based on the range of the standard deviation σ of the average grayscale image brightness, an adaptive ultragreen index model is selected for calculation to obtain the grayscale image used for analysis: like If the image contrast is too low and there is no green laser line feature, no valid data will be returned directly. like Then, an enhanced super green index is used to stretch the red and green channels of the original three-channel image to different color levels, followed by saturation cropping of the red and green channels. ; in, To analyze the brightness value of the pixel in the i-th column and j-th row of the grayscale image; This represents the brightness value of the pixel in the i-th column and j-th row of the green channel of the color image. This represents the brightness value of the pixel in the i-th column and j-th row of the red channel of the color image. and These are the maximum and minimum brightness values of the green channel in the color image, respectively. and These are the maximum and minimum brightness values of the red channel in the color image, respectively. like Then, the standard super-green index is used to directly perform saturation clipping of the red-green channels: ; The row and column containing the brightest point in the grayscale image used for calculation and analysis are denoted as the coordinates of the reference point. .
[0029] By calculating the standard deviation σ of the average grayscale image, an enhanced or standard super-green index model is adaptively selected based on the image contrast. In low contrast, the red and green channels are stretched to highlight the weak laser line features, while in high contrast, direct saturation cropping is performed for rapid extraction. This effectively avoids missed detections in low contrast and misidentifications in high contrast, thus improving the accuracy and robustness of laser line extraction.
[0030] As a further improvement to the above scheme, the strip ROI sparse sampling specifically includes: The strip sampling direction is determined based on the preset laser line recognition direction; Calculate the adaptive strip width; Starting from the center of the image, samples are taken at intervals on both sides to obtain a compact sampling image.
[0031] The sampling direction is determined by identifying the laser line, and sampling is performed at intervals from the center of the image to both sides. While preserving the core area information of the laser line, the number of pixels involved in the calculation is greatly reduced, which effectively reduces the amount of computation in image processing and improves the real-time performance of processing.
[0032] As a further improvement to the above scheme, the edge coordinate extraction and cluster analysis specifically include: Extract the straight line segment features of the laser line edge from the binarized image; Extract the corresponding one-dimensional coordinate point set based on the direction of the identified laser line; The cluster radius is adaptively calculated based on the inclination angle of the straight segment: When identifying the horizontal portion of a horizontal laser line or a cross laser line. ; When identifying the vertical portion of a vertical laser line or a cross laser line, ; in, Where is the cluster radius, Let the initial radius be , For reference length, It is the mean of the angle between the straight line segment and the horizontal line; Cluster analysis of the point set is performed to obtain the coordinates of the laser line center; The clustering results are validated.
[0033] By extracting the features of straight line segments and adaptively calculating the cluster radius based on the tilt angle for cluster analysis, the edge points of the same laser line can be accurately classified, effectively eliminating interference from dark lines and noise. After verification, the center coordinates of the laser line are accurately determined, improving the recognition accuracy and anti-interference ability.
[0034] Compared with traditional processing methods, the present invention has the following advantages: (1) Traditional light intensity recognition schemes are prone to recognition failure due to overexposure of photosensitive elements when the ambient light exceeds 3000 lux. This invention uses a dark environment box structure composed of a front cylinder and a rear cylinder, and limits the ratio of the light inlet area S to the axial depth L of the front cylinder to the range of 30 to 80, to achieve mechanical attenuation of ambient light. It can still clearly collect laser line patterns in strong light environment, effectively avoiding the problem of recognition failure.
[0035] (2) Although existing carrier recognition schemes are resistant to strong light, their accuracy is only about 1 mm, which is difficult to meet the requirements of high-precision construction. This invention adopts visual algorithms such as dimensionality reduction and downsampling, adaptive super green index extraction and cluster analysis, combined with the geometric compensation formula θ=arctan(b / L) based on the axial depth L of the front cylinder, which improves the recognition accuracy to ±0.5 mm while ensuring real-time processing, which is significantly better than the traditional scheme.
[0036] (3) Carrier identification schemes require strict pairing of transmitters and receivers, which limits equipment selection and increases costs. This invention is based on a low-cost photosensitive sensor, eliminating the need for a dedicated paired transmitter. Through a combination of structural design and algorithm optimization, it significantly reduces hardware costs while ensuring high accuracy and strong anti-interference capabilities, making it easy to scale up and promote.
[0037] (4) By using the omnidirectional rotation adjustment mechanism composed of the self-rotating component and the lifting component, combined with the judgment logic of four types of offset and the compensation sequence of horizontal first and then height, the ±360° omnidirectional real-time tracking of the laser line is realized, ensuring the precise positioning of the robot end in complex working conditions. Attached Figure Description
[0038] Figure 1 This is a schematic cross-sectional view of the sensor device of the present invention; Figure 2 This is a schematic diagram of the overall structure of the sensor device of the present invention; Figure 3 This is a schematic diagram showing the horizontal angular deviation between the sensor device and the laser line of the present invention; Figure 4 This is a schematic diagram showing the height direction deviation between the sensor device and the laser line of the present invention; Figure 5 This is a flowchart of the tracking compensation process of the present invention; Figure 6 This is a flowchart of the visual processing algorithm of the present invention; Figure 7 This is a schematic diagram of the horizontal laser line recognition results of the present invention; Figure 8 This is a diagram showing the static recognition test results of the present invention.
[0039] Figure label: 1. Lead screw motor; 2. Connecting seat; 3. Lifting plate; 4. Base plate; 5. Self-rotating assembly; 6. Secondary rotating seat; 7. Transition bushing; 8. Primary rotating seat; 9. Photosensitive sensor; 10. Rear cover; 11. Rear cylinder; 12. Semi-transparent diffuser element; 13. Front cylinder; 14. Limit pin; 15. Limit block; 16. Fixing frame. Detailed Implementation
[0040] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0041] Example This embodiment provides a sensor device and control method for high-precision tracking of laser lines, enabling high-precision real-time tracking of laser lines.
[0042] like Figure 1-2 As shown, the sensor device includes a base plate 4, an omnidirectional rotation adjustment mechanism mounted on the base plate 4, a photosensitive unit mounted on the omnidirectional rotation adjustment mechanism, and a control unit. The control unit is electrically connected to both the photosensitive unit and the omnidirectional rotation adjustment mechanism.
[0043] The photosensitive unit includes a cylindrical housing, a semi-transparent diffuser element 12, and a photosensor 9. The cylindrical housing is composed of a front cylinder 13 and a rear cylinder 11 connected to each other. The internal spaces of the front cylinder 13 and the rear cylinder 11 together form a dark environment chamber, and the semi-transparent diffuser element 12 is located inside the dark environment chamber. The front end of the front cylinder 13 has a light inlet for receiving laser lines emitted by an external laser emitter. The area of the light inlet is S (unit: mm²), and the axial depth of the front cylinder 13 is L (unit: mm), and the numerical values of S and L satisfy the following ratio: 30 ≤ S / L ≤ 80.
[0044] From an optical principle perspective, the S / L value is related to the equivalent field of view of the dark environment chamber. A larger S / L value indicates a relatively larger light inlet or a relatively shorter front tube, allowing the dark environment chamber to receive incident light over a wider angle range, but correspondingly weakening its attenuation capability for oblique ambient light; a smaller S / L value enhances the attenuation capability for ambient light, but narrows the effective incident angle range of the laser line.
[0045] This embodiment is mainly applied to high-precision measurement scenarios for construction robots. Its measurement range (i.e., the displacement range of the laser line on the target surface that the photosensitive unit needs to detect) is typically 30mm to 80mm. To obtain the best imaging quality and anti-interference effect within this range, the lateral dimension of the light inlet needs to be matched with the measurement range. Assuming the light inlet is square with a side length of a (mm), then the area of the light inlet is S = a². When the side length a of the light inlet ranges from 30mm to 80mm, and the axial depth L of the front cylinder is comparable to a, the value of S / L ranges from 30 to 80.
[0046] When the S / L value is below 30, the light inlet size is too small. When the laser line deviates within the measurement range, some light may be blocked by the edge of the front cylinder, resulting in a decrease in the brightness of the light spot on the semi-transparent diffuser element 12, reduced imaging clarity of the photosensitive sensor 9, and a shortened recognition distance. When the S / L value is above 80, the light inlet size is too large or the front cylinder is too short. Oblique ambient light can reach the semi-transparent diffuser element 12 without sufficient attenuation, causing the photosensitive sensor 9 to be prone to overexposure in strong light environments, increasing the probability of recognition failure. Only when the S / L is strictly controlled within the range of 30 to 80 can the comprehensive effects of covering the entire measurement range, ensuring laser energy, and sufficiently attenuating ambient light be achieved simultaneously.
[0047] In this embodiment, after the laser beam is emitted from the transmitter, it propagates almost in a straight line along the optical axis. After entering the dark environment chamber through the light inlet, it is directly projected onto the surface of the semi-transparent diffuser element 12. Its propagation path almost does not touch the inner walls of the front cylinder 13 and the rear cylinder 11, so the energy loss is minimal. Ambient light comes from various directions. When obliquely incident ambient light enters the dark environment chamber through the light inlet, its propagation direction makes an angle with the optical axis, and most of it directly illuminates the inner wall of the front cylinder 13. Since the inner wall of the front cylinder 13 is a non-optically reflective surface, the ambient light undergoes multiple diffuse reflections and absorptions on its surface. Each reflection significantly attenuates the energy, and after several reflections, it reaches the surface of the semi-transparent diffuser element 12 at a negligible level. This purely mechanical optical path confinement method achieves angle-selective attenuation of the incident light, suppressing ambient light while maintaining almost no loss of laser energy.
[0048] In this embodiment, the front cylinder 13 and the rear cylinder 11 are connected by a plug-in method: the front cylinder 13 has a small end boss, and the rear cylinder 11 has a cavity and a stepped surface at the bottom of the cavity. The small end boss of the front cylinder 13 is inserted into the cavity of the rear cylinder 11 and presses the semi-transparent diffuser element 12 tightly onto the stepped surface, thereby achieving precise positioning and reliable fixation of the semi-transparent diffuser element 12, avoiding displacement and loosening under vibration conditions, and ensuring optical path stability and imaging consistency.
[0049] The photosensitive sensor 9 is integrated with the rear cover 10. The rear cover 10 is mounted on the rear end of the rear cylinder 11 via a mounting bracket 16, so that the photosensitive sensor 9 faces the semi-transparent diffuser element 12. This allows the sensor to acquire the laser line pattern projected onto the semi-transparent diffuser element 12 and transmit the image data to the control unit. The photosensitive sensor 9 can be a CMOS or CCD image sensor, and its output is connected to the control unit via a signal line.
[0050] The omnidirectional rotation adjustment mechanism includes a self-rotating component 5 and a lifting component. The self-rotating component 5 includes a rotating flange, a primary rotating seat 8, a transition bushing 7, and a secondary rotating seat 6, achieving smooth and precise horizontal rotation of the photosensitive unit through a multi-stage fitting structure. The lifting component includes a lead screw motor 1, a lifting plate 3, and a connecting seat 2. The threaded shaft of the lead screw motor 1 engages with the internal threaded rod of the lifting plate 3 to drive the photosensitive unit to rise and fall. The photosensitive unit is mounted on the self-rotating component 5 and the lifting component, and can achieve ±360° horizontal rotation and vertical lifting under the drive of the control unit, thereby dynamically tracking the laser line.
[0051] In this embodiment, the base plate 4 is also provided with a limiting component, which includes a limiting pin 14 fixed to the base plate 4 and a limiting block 15 fixed to the photosensitive unit. When the photosensitive unit rotates horizontally to the limit position of ±360° under the drive of the self-rotating component 5, the limiting block 15 abuts against the limiting pin 14, thereby mechanically limiting the horizontal rotation range of the photosensitive unit and preventing excessive rotation from causing cable entanglement or structural damage.
[0052] like Figure 3 As shown, when there is a horizontal angular deviation between the laser emitter and the sensor device, the laser line is blocked by the front edge of the front cylinder 13, and the shadow formed on the semi-transparent diffuse element 12 becomes shorter on one side, with a shadow width of b.
[0053] like Figure 4 As shown, when there is a deviation in the height direction, the center of the laser line pattern will have a vertical offset ΔH from the position of the calibrated target.
[0054] like Figure 5-6 As shown, the control method is executed by the control unit, achieving high-precision real-time tracking of the laser line through a combination of visual processing and geometric compensation. Specific steps include: S1. Image Acquisition. The control unit acquires the laser line pattern projected on the semi-transparent diffuser element 12 in real time through the photosensitive sensor 9, obtaining raw image data containing laser line information.
[0055] S2. Visual Processing. The control unit performs dimensionality reduction and downsampling on the acquired laser line pattern to extract the center coordinates of the laser line. This step is achieved through the following sub-steps: First, acquire a color image, apply different weights to the brightness of the three channels, and calculate the average brightness value of each pixel in the grayscale image: ; in, It is the brightness of the i-th element in the average grayscale image. , It is the BGR component after Gamma correction; Then, calculate the standard deviation of the brightness of each pixel in the average grayscale image. : ; in, Let be the brightness value of the i-th pixel in the average grayscale image. This represents the average brightness of each pixel in the average grayscale image. This represents the total number of pixels.
[0056] Since laser lines are typically green, to highlight the characteristics of the laser lines and suppress background interference, the control unit uses the standard deviation of the average grayscale image as the branch condition for extracting the super-green index, thus obtaining the grayscale image for analysis.
[0057] like If the image contrast is too low and there is no green laser line feature, no valid data will be returned directly. like Then, an enhanced super green index is used to stretch the red and green channels of the original three-channel color image to different color levels, and then saturate-cropping the red and green channels is performed: ; in, To analyze the brightness value of the pixel in the i-th column and j-th row of the grayscale image; This represents the brightness value of the pixel in the i-th column and j-th row of the green channel of the color image. This represents the brightness value of the pixel in the i-th column and j-th row of the red channel of the color image. and These are the maximum and minimum brightness values of the green channel in the color image, respectively. and These are the maximum and minimum brightness values of the red channel in the color image, respectively. like Then, the standard super-green index is used to directly perform saturation clipping of the red-green channels: ; The row and column containing the brightest point in the grayscale image used for calculation and analysis are denoted as the coordinates of the reference point. .
[0058] Because the laser line brightness is uneven, the brightest point deviates from the center of the laser line. Therefore, when there is no laser line and the background brightness is uneven, a standard deviation in the average grayscale image brightness will appear. In such cases, the resulting grayscale image used for analysis may lead to misidentification. Therefore, in this embodiment, the grayscale image was not used. Used as the coordinates of the laser line.
[0059] Then, the control unit determines the strip sampling direction based on the preset laser line recognition direction. In this embodiment, the preset direction includes three modes: horizontal laser line, vertical laser line, or cross laser line.
[0060] First, the adaptive strip width is calculated. In this embodiment, it is taken as 1 / 30 of the shorter side of the image frame, and at least 10 pixels. ; in, For the strip width, and These represent the image width and image height of the grayscale image used for analysis, respectively.
[0061] Then, starting from the center of the image, sampling is performed at intervals along the width of the image to both sides, resulting in a compact sampled image with the same height but halved width. This interval sampling method reduces the number of pixels involved in the calculation by about 50%, effectively reducing the computational load of image processing and improving real-time performance while preserving the key positional information of the laser lines.
[0062] Next, the control unit performs adaptive threshold binarization on the compact sampled image, dynamically adjusts the segmentation threshold according to local image features, and obtains a binarized image with clear laser line edges, so that the laser line edges can be clearly separated from the background.
[0063] Subsequently, edge coordinate extraction and cluster analysis are performed. The control unit extracts the straight line segment features of the laser line edge from the binarized image and extracts the corresponding one-dimensional coordinate point set according to the recognition direction. Since the laser line may have uneven brightness, background noise, and other interference, the control unit adaptively calculates the cluster radius based on the mean α of the angle between the straight line segment and the horizontal line. When identifying the horizontal portion of a horizontal laser line or a cross laser line. ; When identifying the vertical portion of a vertical laser line or a cross laser line, ; in, The cluster radius; The initial radius; For reference length, in this embodiment, half the width of the image is used when identifying horizontal laser lines, and half the height of the image is used when identifying vertical laser lines.
[0064] After clustering is completed, the clustering results will be subject to three levels of verification to ensure the reliability of the identification results: First-level verification: Calculate the total length of the identified line segments in the binarized image and determine if it is not less than half the height or width of the image. If the total length of the line segments is too small, it indicates that there may be no valid laser line features in the image, and the current recognition result is deemed invalid, returning "no valid data".
[0065] The second layer of verification involves counting the number of clusters obtained from clustering. Based on the actual shape of the laser lines, the correct number of clusters should be between 1 and 4 (e.g., a single horizontal line, a single vertical line, or a cross). If the number of clusters exceeds this range, it indicates excessive interference, and the recognition result is deemed invalid, returning "no valid data."
[0066] The third layer of verification calculates the distance between the centers of the two furthest clusters. Since the maximum width of the laser line projected onto the target is no more than 8mm, if the distance between the cluster centers is greater than 8mm (converted to pixel distance based on the pixel precision of the camera image), it indicates that these clusters may come from different light sources or noise, and the recognition result is deemed invalid, returning no valid data.
[0067] After the above three-layer verification, if the clustering results meet the requirements, the center coordinates of the laser line are determined based on the number of clusters as the final output, which is used for subsequent deviation judgment and compensation calculation.
[0068] like Figure 7 As shown, taking the identification of a horizontal laser line as an example, the row coordinates of the edge straight line segment are taken to form a one-dimensional vector. Two clusters are obtained through cluster analysis. After verification and confirmation, the center of the distance between the centers of the two clusters is taken as the final center coordinates of the laser line.
[0069] S3. Deviation judgment and compensation calculation.
[0070] Based on the center coordinates extracted in step S2, the control unit identifies the unilateral shadow features and vertical offset of the laser line pattern, and calculates the compensation amount by combining this with the axial depth L of the front cylinder 13. The specific judgment logic is as follows: The control unit first identifies whether the laser line pattern has a unilateral shadow and whether there is a vertical offset ΔH between the center and the calibrated laser line target position, and classifies the identification results into four cases: If the left or right end of the laser line pattern shows a shortening of the shadow on one side without vertical offset, it is determined that there is a horizontal angle deviation. Based on the shadow width b formed by the shortening of the shadow on one side and the axial depth L of the front cylinder, the horizontal compensation angle θ is calculated according to the formula θ= arctan(b / L), and the height compensation amount is 0. If there is no shortening of the shadow on one side, but there is a vertical offset ΔH between the center of the laser line pattern and the calibrated laser line target position, it is determined that there is a height deviation. The absolute value of the vertical offset ΔH is used as the height compensation amount, and the horizontal compensation angle θ is 0. If the shadow on one side of the laser line pattern shortens and there is a vertical offset ΔH, it is determined that there is both horizontal angle deviation and height deviation. Based on the shadow width b and the axial depth L of the front cylinder, the horizontal compensation angle θ is calculated according to the formula θ= arctan(b / L), and the absolute value of the vertical offset ΔH is used as the height compensation amount. If there is no shortening of the shadow on one side and no vertical shift, then the judgment is correct.
[0071] In this embodiment, there may be situations where people walk or other objects temporarily obstruct the laser beam path, causing a momentary change in the acquired shadow width b. To solve this problem, a Kalman filter algorithm is introduced to filter the real-time acquired b value, effectively suppressing signal changes caused by temporary obstruction and avoiding false triggering of compensation actions.
[0072] S4, Tracking Compensation.
[0073] Based on the judgment result and compensation amount in step S3, the control unit drives the omnidirectional rotation adjustment mechanism to perform compensation: If there is no deviation in the judgment, no compensation is performed, and the photosensitive unit maintains its current posture.
[0074] If only a horizontal angular deviation exists, the rotation direction is determined based on the side where the shadow is located, driving the self-rotating component 5 to rotate by a compensation angle θ, causing the photosensitive unit to rotate in the direction of eliminating the shadow. In this embodiment, when the shadow is on the left, it indicates that the laser line is off to the right, requiring counterclockwise rotation to swing the photosensitive unit to the left to align with the laser line; when the shadow is on the right, it indicates that the laser line is off to the left, requiring clockwise rotation to swing the photosensitive unit to the right to align with the laser line. Through continuous adjustment, the shadow in the laser line pattern disappears, restoring a complete laser line pattern.
[0075] If only a height deviation exists, the direction of movement is determined by the sign of the vertical offset ΔH, driving the lifting assembly to move. The movement height is the height compensation amount ΔH. In this embodiment, if ΔH is positive, indicating that the laser line is biased upwards, the lifting assembly is driven to rise, causing the photosensitive unit to move upwards; if ΔH is negative, indicating that the laser line is biased downwards, the lifting assembly is driven to descend, causing the photosensitive unit to move downwards. This continues until the center of the laser line coincides with the calibrated target position of the laser line.
[0076] If both horizontal and vertical deviations exist simultaneously, the self-rotating component 5 is driven first to compensate for the angle based on the side where the shadow is located, eliminating the horizontal deviation. Then, the lifting component is driven to compensate for the height based on the vertical offset direction, ensuring a reasonable compensation sequence and motion decoupling. This compensation sequence of horizontal first and then height can avoid mutual interference between the two degrees of freedom, improving tracking stability.
[0077] After compensation is completed, return to step S1, image acquisition step, to form a real-time dynamic tracking closed loop.
[0078] To verify the overall technical effectiveness of the device and control method in this embodiment, a static recognition test was conducted in an indoor environment. The test conditions were: ambient light intensity of 3165 lux, S / L=80, and the laser emitter and sensor were 7m apart horizontally and stationary. The control unit continuously collected the position coordinates of the laser line on the semi-transparent diffuser element 12 according to the above steps, with a sampling time of 1 minute and a sampling point count of 3000+.
[0079] like Figure 8 As shown, the test results show that the maximum value of the recognition result is 29.05mm, the minimum value is 28.7mm, the average value is 28.86mm, and the data fluctuation range is -0.16mm to +0.19mm, which means that the recognition accuracy can reach ±0.2mm at a distance of 7m.
[0080] Within a working distance of 15m, the recognition accuracy of this embodiment is better than ±0.5mm, which is significantly higher than that of existing carrier recognition schemes (±1mm / 10m).
[0081] Furthermore, dynamic response verification was conducted for the S / L=30 configuration. Under harsh operating conditions (the laser emitter and sensor are 0.5m apart, and the robot's walking direction is perpendicular to the line connecting them), the maximum required sensor tracking angular velocity is approximately 0.3 rad / s. Due to the obstruction of the front cylinder 13, the time for the laser line to change from its full length to half its length is approximately 200ms. The image processing and compensation command output cycle of the control unit is approximately 30ms, meaning that at least 6 update commands can be output within 200ms, which is sufficient to achieve real-time tracking adjustment, proving that S / L=30 still meets the dynamic tracking requirements.
[0082] Based on the disclosure and teachings of the foregoing specification, those skilled in the art can make changes and modifications to the above embodiments. Therefore, the present invention is not limited to the specific embodiments disclosed and described above, and some modifications and changes to the invention should also fall within the protection scope of the claims of the present invention. Furthermore, although some specific terms are used in this specification, these terms are only for convenience of explanation and do not constitute any limitation on the present invention.
Claims
1. A sensor device for high-precision tracking of laser lines, comprising a base plate, an omnidirectional rotation adjustment mechanism, a photosensitive unit, and a control unit; the omnidirectional rotation adjustment mechanism is mounted on the base plate, the photosensitive unit is mounted on the omnidirectional rotation adjustment mechanism, and the control unit is electrically connected to the photosensitive unit and the omnidirectional rotation adjustment mechanism respectively; The photosensitive unit includes a cylindrical housing, a semi-transparent diffuser element, and a photosensitive sensor; the semi-transparent diffuser element is disposed inside the cylindrical housing, and the photosensitive sensor is disposed inside the cylindrical housing and faces the semi-transparent diffuser element; characterized in that... The cylindrical shell includes a front cylinder and a rear cylinder connected to each other. The internal spaces of the front cylinder and the rear cylinder together form a dark environment box. The semi-transparent diffuser element is located inside the dark environment box. The front end of the front cylinder is provided with a light inlet, the area of the light inlet is S, and the axial depth of the front cylinder is L. When S is measured in square millimeters and L is measured in millimeters, the numerical values of S and L satisfy the following ratio relationship: 30 ≤ S / L ≤ 80. The photosensitive unit is used to acquire the laser line pattern projected on the semi-transparent diffuse element. The control unit calculates the compensation amount based on the laser line pattern and drives the omnidirectional rotation adjustment mechanism to adjust the posture of the photosensitive unit.
2. The sensor device according to claim 1, characterized in that, The omnidirectional rotation adjustment mechanism includes a self-rotating component and a lifting component. The self-rotating component is used to drive the photosensitive unit to rotate horizontally, and the lifting component is used to drive the photosensitive unit to move up and down.
3. The sensor device according to claim 1, characterized in that, The front cylinder has a small end boss, and the rear cylinder has a cavity and a stepped surface at the bottom of the cavity. The small end boss of the front cylinder is inserted into the cavity of the rear cylinder and presses the translucent diffuser element against the stepped surface.
4. The sensor device according to claim 2, characterized in that, The self-rotating assembly includes a rotating flange, a primary rotating seat, a transition bushing, and a secondary rotating seat; the primary rotating seat is fixed to the upper surface of the rotating flange, the transition bushing is fitted onto the outer ring of the primary rotating seat, and the inner ring of the secondary rotating seat is fitted onto the outer ring of the transition bushing.
5. The sensor device according to claim 2, characterized in that, The lifting assembly includes a lead screw motor, a lifting plate, and a connecting seat. When the threaded shaft of the lead screw motor rotates, it drives the lifting plate and the photosensitive unit to rise and fall.
6. The sensor device according to claim 1, characterized in that, It also includes a limiting component, which includes a limiting pin fixed to the base plate and a limiting block fixed to the photosensitive unit; the limiting component is used to limit the horizontal rotation angle range of the photosensitive unit to ±360°.
7. A control method for a sensor device for high-precision tracking of laser lines, employing the sensor device as described in claims 1-6, characterized in that, Includes the following steps: S1. Image Acquisition: The laser line pattern projected onto the semi-transparent diffuse element is acquired in real time by a photosensitive sensor; S2. Visual Processing: Perform dimensionality reduction and downsampling on the laser line pattern to extract the center coordinates of the laser line; S3. Deviation Judgment and Compensation Calculation: Based on the center coordinates of the laser line, identify whether the left or right end of the laser line pattern has a shortened unilateral shadow due to the obstruction of the front cylinder edge, and whether there is a vertical offset ΔH between the center and the calibrated laser line target position. Combined with the axial depth L of the front cylinder, calculate the horizontal compensation angle θ and the height compensation amount. S4. Tracking Compensation: Based on the horizontal compensation angle θ and the height compensation amount, the omnidirectional rotation adjustment mechanism is driven to adjust the posture of the photosensitive unit to achieve real-time tracking of the laser line.
8. The control method according to claim 7, characterized in that, The deviation judgment and compensation calculation include the following steps: Identify whether the left or right end of the laser line pattern shows a shortened shadow on one side, and whether there is a vertical offset ΔH between the center and the calibrated laser line target position: If no unilateral shadow appears and there is no vertical offset, then the judgment is that there is no deviation; If the left or right end of the laser line pattern shows a shortening of the shadow on one side without vertical offset, it is determined that there is a horizontal angle deviation. Based on the shadow width b formed by the shortening of the shadow on one side and the axial depth L of the front cylinder, the horizontal compensation angle θ is calculated according to the formula θ= arctan(b / L), and the height compensation amount is 0. If there is no shortening of the shadow on one side, but there is a vertical offset ΔH between the center of the laser line pattern and the calibrated laser line target position, it is determined that there is a height deviation. The absolute value of the vertical offset ΔH is used as the height compensation amount, and the horizontal compensation angle θ is 0. If the left or right end of the laser line pattern shows a shortened shadow on one side and a vertical offset ΔH, it is determined that there is both a horizontal angle deviation and a height deviation. Based on the shadow width b and the axial depth L of the front cylinder, the horizontal compensation angle θ is calculated according to the formula θ = arctan(b / L), and the absolute value of the vertical offset ΔH is used as the height compensation amount.
9. The control method according to claim 8, characterized in that, Tracking and compensation includes the following steps: If it is determined that there is a horizontal angle deviation and the left end of the laser line pattern shows a shortened shadow on one side, then drive the self-rotating component to rotate the horizontal compensation angle θ counterclockwise. If it is determined that there is a horizontal angle deviation and the right end of the laser line pattern shows a shortened shadow on one side, then drive the self-rotating component to rotate the horizontal compensation angle θ clockwise. If it is determined that there is a height deviation and the vertical offset ΔH is positive, then the lifting component is driven to rise, and the rising height is the height compensation amount. If a height deviation is determined and the vertical offset ΔH is negative, the lifting assembly is driven to descend, and the descent height is the height compensation amount. If it is determined that both horizontal angle deviation and height deviation exist simultaneously, the self-rotating component is first driven to rotate the horizontal compensation angle θ to perform angle compensation, and then the lifting component is driven to move the height compensation amount to perform height compensation.
10. The control method according to claim 7, characterized in that, The visual processing includes the following steps: Adaptive super-green index extraction: acquire color images, calculate the average grayscale image and its brightness standard deviation σ, adaptively select the super-green index model based on the σ value, and convert the color image into an analysis grayscale image that highlights the laser line features; Sparse sampling of ROI in strips: Based on the preset laser line recognition direction, the strip sampling direction is determined, the adaptive strip width is calculated, and sampling is performed from the center of the image to both sides at intervals to obtain a compact sampling image; Threshold segmentation: Adaptive threshold binarization is performed on the compact sampling image to obtain a binarized image with clear laser line edges; Edge coordinate extraction and cluster analysis: The straight line segment features of the laser line edge are extracted from the binarized image, the corresponding one-dimensional coordinate point set is extracted according to the recognition direction, and the point set is clustered using an adaptive cluster radius to determine the center coordinates of the laser line.
11. The control method according to claim 10, characterized in that, The adaptive super-green index extraction specifically includes the following steps: The average grayscale image of the color image is calculated by applying different weights to the brightness of the three channels. Calculate the standard deviation σ of the brightness of each pixel in the average grayscale image; Based on the range of the standard deviation σ of the average grayscale image brightness, an adaptive ultragreen index model is selected for calculation to obtain the grayscale image used for analysis: like If the image contrast is too low and there is no green laser line feature, no valid data will be returned directly. like Then, an enhanced super green index is used to stretch the red and green channels of the original three-channel image to different color levels, followed by saturation cropping of the red and green channels. ; in, To analyze the brightness value of the pixel in the i-th column and j-th row of the grayscale image; This represents the brightness value of the pixel in the i-th column and j-th row of the green channel of the color image. This represents the brightness value of the pixel in the i-th column and j-th row of the red channel of the color image. and These are the maximum and minimum brightness values of the green channel in the color image, respectively. and These are the maximum and minimum brightness values of the red channel in the color image, respectively. like Then, the standard super-green index is used to directly perform saturation clipping of the red-green channels: ; The row and column containing the brightest point in the grayscale image used for calculation and analysis are denoted as the coordinates of the reference point. .
12. The control method according to claim 10, characterized in that, The sparse sampling of the striped ROI specifically includes: The strip sampling direction is determined based on the preset laser line recognition direction; Calculate the adaptive strip width; Starting from the center of the image, samples are taken at intervals on both sides to obtain a compact sampling image.
13. The control method according to claim 10, characterized in that, The edge coordinate extraction and cluster analysis specifically include: Extract the straight line segment features of the laser line edge from the binarized image; Extract the corresponding one-dimensional coordinate point set based on the direction of the identified laser line; The cluster radius is adaptively calculated based on the inclination angle of the straight segment: When identifying the horizontal portion of a horizontal laser line or a cross laser line. ; When identifying the vertical portion of a vertical laser line or a cross laser line, ; in, Where is the cluster radius, Let the initial radius be , For reference length, It is the mean of the angle between the straight line segment and the horizontal line; Cluster analysis of the point set is performed to obtain the coordinates of the laser line center; The clustering results are validated.