Total station automatic focusing and reflector plate identification method and system based on intelligent image

By using a coaxial camera and image recognition technology, the total station can achieve fully automatic and high-precision reflector identification and aiming, solving the problems of cumbersome operation, low efficiency and low degree of automation of traditional total stations, and is suitable for surveying tasks in complex environments.

CN122043702APending Publication Date: 2026-05-15CHANGZHOU XINRUIDE INSTR
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-02-09
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Traditional total stations are cumbersome and inefficient when identifying reflectors, and are prone to fatigue and errors. They also have a low degree of automation, and existing automatic target recognition technologies are not effective or fail to identify reflectors, making it difficult to guarantee accuracy and reliability.

Method used

Employing coaxial camera, autofocus, and image recognition technologies, the system achieves fully automatic, high-precision reflector identification and aiming through system initialization, autofocus control, image preprocessing, reflector area extraction and recognition, angle deviation calculation, and servo drive.

Benefits of technology

It achieves high-precision, fully automatic reflector identification and aiming of total stations, improving operational efficiency and automation level, and is suitable for surveying tasks in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122043702A_ABST
    Figure CN122043702A_ABST
Patent Text Reader

Abstract

The invention provides a total station automatic focusing and reflector plate identification method and system based on intelligent image.The method relates to the technical field of engineering surveying, and comprises the steps that a stepping motor is controlled to drive a focusing lens barrel to move step by step in the direction of an optical axis, a coaxial camera collects images at all positions and calculates definition evaluation values to complete coarse adjustment and fine adjustment focusing, and the focusing precision is improved; and automatic focus locking is realized. The center coordinates of the reflector plate are determined through image preprocessing and reflector plate area recognition, the horizontal and vertical angle deviation can be calculated, sighting is achieved by driving a horizontal servo motor and a vertical servo motor to rotate automatically, and closed-loop control can be completed through iterative correction. The system is composed of a coaxial camera, a focusing execution mechanism, a master control module, an image processing module, an angle calculation module and a servo driving module, a coaxial optical path structure is adopted to eliminate parallax errors, the system has the high-precision automatic focusing, intelligent recognition and rapid automatic sighting capabilities, and the automation level and the measurement precision of the total station can be remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of engineering surveying technology, specifically relating to a method and system for automatic focusing and reflector identification of a total station based on intelligent imagery. Background Technology

[0002] When using a traditional total station for coordinate measurement, stakeout, and deformation monitoring, the operator must first roughly aim at the reflector using a coarse sight, and then manually locate and precisely aim at the reflector through the eyepiece. This process relies entirely on human judgment and has the following significant drawbacks: Limitations: When aiming near the zenith of the target, it requires the use of other tools such as a curved eyepiece, making the operation cumbersome.

[0003] Inefficient: Especially in complex operations that require frequent changes of measuring points, repeated manual aiming is time-consuming and labor-intensive.

[0004] Prone to fatigue and errors: Prolonged visual operation can easily lead to visual fatigue, thereby introducing subjective aiming errors and affecting measurement accuracy.

[0005] Low level of automation: In monitoring scenarios, the total station cannot automatically rotate and aim at the target, which limits the full automation of the monitoring process.

[0006] Currently, there are some high-end total stations on the market with Automatic Target Recognition (ATR) capabilities. However, the automatic target recognition is only applicable to cooperative prisms, and the recognition effect is poor or impossible for reflective targets that are cheaper and easier to use. In addition, most existing vision-assisted solutions use off-axis cameras, which have parallax problems, require complex calibration and conversion, and make it difficult to guarantee accuracy and reliability.

[0007] Therefore, there is an urgent need for a high-precision technical solution that can effectively identify reflectors and achieve fully automatic aiming. Summary of the Invention

[0008] In view of the above-mentioned problems in the prior art, the purpose of the present invention is to provide a control system for automatic focusing and identification of reflectors in a total station, which realizes fully automatic and high-precision identification and aiming of reflectors without manual intervention through coaxial camera, autofocus and image recognition technology.

[0009] A method for automatic focusing and reflector recognition of a total station based on intelligent imagery includes the following steps: Step 1, System Initialization and Optical Path Calibration: The main control system initializes the coaxial camera, stepper motor and servo motor, obtains the camera's intrinsic parameters, and calibrates the coaxial relationship between the camera's optical axis and the total station's line of sight. Step 2, Autofocus Control: The main control system controls the stepper motor to drive the focusing lens barrel to move in steps within the set focal length range; the coaxial camera acquires images at each step position, calculates the image sharpness, and determines the contrast peak position by comparing the changing trends of adjacent sharpness values, thereby determining the optimal focal length point to obtain a sharp image of the reflector. Step 3, Image Preprocessing: Process the clear image to distinguish the bright areas of the reflective sheet from the background areas, and obtain a standardized binary image; Step 4: Extraction and Recognition of Reflective Areas: Perform contour detection on the binary image to remove interfering targets, retain areas that conform to the geometric features of the reflective sheet, and calculate the center pixel coordinates of the reflective sheet within the confirmed reflective sheet areas. ; Step 5, Angle Deviation Calculation: Calculate the pixel deviation between the center of the reflector and the center of the line of sight based on the camera's intrinsic parameters. And obtain the corresponding angular deviations in the horizontal and vertical directions; Step 6, Servo Drive and Automatic Alignment: Calculate the required number of servo motor pulse steps based on the angle deviation, generate PWM control signals to drive the horizontal and vertical motors to rotate, so that the center of the total station's line of sight moves to the center position of the reflector. After aiming is completed, the image is reacquired and the deviation is verified to be within the tolerance threshold. If the accuracy requirements are not met, iterative correction is performed until the deviation meets the set conditions.

[0010] Preferably, step 2, autofocus control, includes a coarse search stage, which includes the following process: The main control system controls the stepper motor to drive the focusing lens barrel within the focal length range. by step distance It moves forward step by step, and with each step it moves, it drives the coaxial camera to capture one frame of image. The main control system acquires the sharpness evaluation value of the central region of each frame and records the sharpness change trend of the central region of several consecutive frames. When the sharpness evaluation value is detected to change from rising to falling, the main control system sets the focal peak point. Nearby step distance range [ This will serve as the next stage of fine-tuning. The formula for calculating the sharpness evaluation value in the coarse search phase is as follows:

[0011] in, Indicates the position of the lens tube At that time, the clarity of the image, represents the gradient of the Sobel operator in the horizontal and vertical directions; M×N is the size of the image window.

[0012] Preferably, step 2, autofocus control, includes a fine search phase, which includes the following process: The main control system resets the step distance to Control the stepper motor within the fine-tuning range [ The lens group is moved step by step within the image acquisition process, and the sharpness evaluation process is repeated. The sharpness is compared in real time, and the step position where the sharpness evaluation value reaches the maximum is selected as the optimal focal length point. ; The formula for calculating the sharpness evaluation value in the fine search phase is as follows:

[0013] In the formula, This represents the image grayscale intensity value, indicating the grayscale value at pixel coordinates (x, y). The second derivative represents the change in grayscale.

[0014] Preferably, step 2, autofocus control, includes a position retraction and focus locking phase, which includes the following process: when the optimal focal length point... Once determined, the main control system calculates the number of pulses N required for the stepper motor to retract from the current point, and issues a reverse pulse command to the motor based on this number of pulses N, causing the focusing lens barrel to return to the optimal focal length point. Location; The formula for calculating the number of pulses N is:

[0015] in, This is the displacement in a single step. This is the current location.

[0016] Preferably, step 2, autofocus control, includes a focus verification stage, which includes the following process: the camera is at the optimal focal length point. The image is reacquired at the new location, and the sharpness rating is recalculated. If the image is located at the optimal focal length point twice... The difference in image sharpness evaluation values ​​is less than a set threshold. ,Right now If the difference is not less than the set threshold, then the focus is considered successful. Then it enters the self-correction phase.

[0017] Preferably, the self-correction stage includes the following process: setting the optimal focal length point. Position is the center line, fine-tune step size is Control the stepper motor within the fine-tuning range. The lens group is moved gradually within the lens assembly, and the image acquisition and sharpness evaluation process is repeated. The maximum value point is then used to update the optimal focal length point. Position, and enter the position rollback and focus lock stage to achieve closed-loop fine-tuning.

[0018] Preferably, in step 4, the contour detection process for extracting and recognizing the reflective sheet region, the boundary point set of all highlighted areas is extracted, and then area filtering, convexity detection, polygon fitting, side count filtering, and aspect ratio filtering are performed sequentially to retain the reflective sheet region. The center coordinates of the reflector were calculated using the gray-scale centroid method. The calculation formula is:

[0019] In the formula, This is the grayscale value.

[0020] Preferably, in step 5, the horizontal angle deviation is calculated. The calculation formula is:

[0021] Vertical angle deviation :

[0022] In the formula, The center pixel coordinates of the reflector Here, p represents the coordinates of the principal point corresponding to the center point of the total station's line of sight in the camera's imaging plane, f is the pixel size, and f is the camera's focal length.

[0023] Preferably, the specific process of step 6, servo drive control and automatic aiming, is as follows: Step 6.1: The main control module will determine the angle deviation. Convert to the corresponding pulse counts for horizontal and vertical motors:

[0024] in, These represent the angular resolution for each step of the horizontal and vertical motors, respectively. These represent the number of pulse steps for the horizontal and vertical motor rotations, respectively. Step 6.2: After the motor reaches the target angle, acquire a new image I(x,y) and recalculate the center coordinates of the reflector. And obtain new pixel deviation If the new pixel deviation is less than the pixel deviation threshold, the aiming is considered successful and the process proceeds to the next task; otherwise, the process proceeds to the fine-tuning stage. Step 6.3, Iterative Fine-tuning and Error Compensation: If the deviation still exceeds the limit, the system performs iterative correction, calculating a new angle correction amount for position fine-tuning. The formula for calculating the new angle correction amount is:

[0025] Based on the angle correction, the motor pulse command is regenerated to drive the motor for small angle compensation. After the motor moves to the compensation position, the image is re-acquired and the pixel deviation is calculated for verification. If the deviation change rate is less than the stability threshold δ for two consecutive times, the system is considered stable.

[0026] The second objective of this invention is to provide a control system for automatic focusing and reflector identification in a total station, characterized in that the system, used to implement the aforementioned intelligent image-based automatic focusing and reflector identification method for a total station, comprises: A coaxial camera is used to acquire images of a reflective sheet and output grayscale signals; the optical axis of the photosensitive element of the coaxial camera is strictly coaxial with the line of sight of the total station; The focusing lens barrel assembly is connected to a stepper motor and is used to move the lens group along the optical axis to achieve automatic focusing. The main control module is used to control the stepper motor to perform focus search, sharpness evaluation, focus locking and self-correction, and complete the automatic focus control. The image processing module, connected to the coaxial camera, is used to perform image preprocessing and contour recognition processing, and calculates the center coordinates (u,v) of the reflector using the gray-scale centroid method. The angle calculation module is used to calculate the horizontal and vertical angle deviations. ; The servo drive module, including a horizontal motor and a vertical motor, is used to generate pulse commands based on angular deviations and perform automatic aiming.

[0027] The beneficial effects of this invention are: a method and system for automatic focusing and reflector identification of a total station based on intelligent imagery. By configuring a coaxial camera, the camera's optical axis is completely aligned with the total station's line of sight, ensuring that the imaging coordinates correspond one-to-one with the instrument's mechanical angles. This avoids the parallax error and complex conversion problems present in traditional off-axis cameras, fundamentally improving recognition and aiming accuracy, and achieving high-precision imaging and parallax-free aiming with the coaxial optical path structure.

[0028] Automatic focusing is achieved by driving the focusing lens barrel along the optical axis using a stepper motor. Coarse and fine focusing are achieved by combining the Tenengrad gradient function and the Laplacian variance function. The optimal focal length point is automatically locked by a focus verification and self-correction mechanism. High-contrast, high-resolution images can be obtained under different distances and lighting conditions. It has an adaptive autofocus function, which significantly improves image clarity and measurement stability.

[0029] By employing multi-level image preprocessing and geometric feature filtering algorithms (including area filtering, convexity detection, polygon fitting, and side count and aspect ratio filtering), background interference and non-target light spots are effectively eliminated. Furthermore, the gray-scale centroid method is used to calculate the center position of the reflector, resulting in high recognition accuracy, low false detection rate, and strong stability, thus achieving highly robust reflector recognition in complex backgrounds.

[0030] By employing a pinhole imaging model, pixel offsets are directly converted into the horizontal and vertical angle deviations of the total station. An angle correction and iterative fine-tuning are automatically performed through a servo drive module, realizing closed-loop servo automatic aiming based on visual feedback.

[0031] The main control module of the system can automatically trigger distance measurement or perform other measurement tasks after the aiming is stable, realizing fully unmanned operation of the measurement process, significantly improving work efficiency and automation level, and is particularly suitable for long-term monitoring, unattended stations and surveying tasks in complex environments. Attached Figure Description

[0032] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is a flowchart of the method of the present invention.

[0033] Figure 2 This is a flowchart of the image preprocessing and reflective sheet region extraction method of the present invention. Detailed Implementation

[0034] Example 1 like Figure 1 As shown, a method for automatic focusing and reflector recognition of a total station based on intelligent imagery includes the following steps: Step 1, System Initialization and Optical Path Calibration: Initialize the coaxial camera, stepper motor, and servo motor, and read data including focal length f, pixel size p, and principal point coordinates. The camera's intrinsic parameters are used to ensure that the camera's optical axis is strictly coaxial with the total station's line of sight, providing a geometric basis for subsequent angle deviation calculations.

[0035] Step 2, Autofocus: Control the stepper motor to drive the focusing lens barrel to move step by step along the optical axis, specifically including the following process: Step 2.1: Set the focus parameters, including: Focal range : Indicates the physical travel of the focusing lens barrel.

[0036] Step distance The resolution is determined by the stepper motor.

[0037] Sharpness evaluation threshold T: Used to determine whether the optimal focus has been reached.

[0038] Stepping speed V: Used to control the smooth movement of the motor.

[0039] The main control system sends initial position commands to the stepper motor driver via CAN or serial communication to ensure that the lens assembly is at the focal length starting position. Place.

[0040] Step 2.2, Coarse Search Phase: The main control system controls the stepper motor to drive the focusing lens barrel to advance step by step within the focal length range. Each step forward drives the coaxial camera to capture one frame of image.

[0041] The main control system evaluates the sharpness of the central region of each captured image frame to obtain a sharpness evaluation value. It also records the trend of sharpness change in the central region of several consecutive frames of images.

[0042] When a sharpness evaluation value is detected When the upward trend turns into a downward trend, it indicates that the system has passed the focus peak point. At this point, the main control system sets the step distance range near that point. This will serve as the next stage of fine-tuning.

[0043] In this embodiment, the Tenengrad gradient function is used to calculate the sharpness evaluation value, and the expression is:

[0044] in, Indicates the position of the lens tube At this time, the overall sharpness (clarity) of the image is used to determine whether the current focus is optimal; the higher the value, the clearer the image. represents the gradient of the Sobel operator in the horizontal and vertical directions; M×N is the size of the image window.

[0045] Step 2.2, Detailed Search Phase: The main control system resets the step distance to Once again, control the stepper motor within the fine-tuning range. The lens group is moved step by step within the image acquisition process, and the sharpness evaluation process is repeated. The sharpness is compared in real time, and the step position where the sharpness evaluation value reaches the maximum is selected as the optimal focal length point. .

[0046] During fine-tuning, more stable sharpness metrics can be used, such as employing Laplacian variance to calculate the sharpness evaluation value, expressed as follows:

[0047] In the formula, This is the image grayscale intensity value, representing the grayscale value at pixel coordinates (x, y), derived from the grayscale image captured by the camera. The second derivative represents the change in grayscale, used to reflect changes in image edge intensity or local contrast.

[0048] Step 2.3, Position Rewind and Focus Lock: When the optimal focal length point is reached... Once determined, the main control system calculates the number of pulses N required for the stepper motor to retract from the current point, and issues a reverse pulse command to the motor based on this number of pulses N, causing the focusing lens barrel to return to the optimal focal length point. The position is determined, and a short pause (typically 100–300 ms) is performed to stabilize the position and eliminate mechanical vibration. The formula for calculating the number of pulses N is:

[0049] in, This is the displacement in a single step. This is the current location.

[0050] Step 2.4, Focus Verification: The camera is at the optimal focal length point. The image is reacquired at the new location, and the sharpness rating is recalculated. If the image is located at the optimal focal length point twice... The difference in image sharpness evaluation values ​​is less than a set threshold. ,Right now If the difference is not less than the set threshold, then the focus is considered successful. Then it enters the self-correction phase.

[0051] Step 2.5: Self-correction: Setting the optimal focal point Position is the center line, fine-tune step size is Control the stepper motor within the fine-tuning range. The lens group is moved gradually within the lens assembly, and the image acquisition and sharpness evaluation process is repeated. The maximum value point is then used to update the optimal focal length point. Position, execute step 2.3 to automatically update motor drive commands, and achieve closed-loop fine-tuning.

[0052] Step 2.6, Focusing Complete Signal Output: After focusing is completed, the main control module sends a "Focusing Complete" flag signal to the image recognition module and locks the camera exposure parameters and shutter speed to maintain stable image brightness, providing reliable input for the subsequent reflector recognition stage.

[0053] Through the autofocus process in step 2, the coaxial camera module can automatically search for and accurately locate the focus position on reflective targets at different distances, ensuring that the acquired reflective images have the best clarity and contrast, providing high-quality input for subsequent image recognition and center extraction.

[0054] like Figure 2 As shown, step 3, image preprocessing: After autofocus is complete, the coaxial camera acquires a clear image and performs preprocessing, including the following steps: Step 3.1, Image Acquisition and Caching: After focus is locked, the system uses a coaxial camera to acquire a high-resolution image of the current field of view. The main control module caches the image in RAW format to an internal RAM buffer, ensuring that the image is uncompressed and gamma-corrected to avoid information loss.

[0055] Step 3.2, Color Channel Conversion: Use OpenCV functions to convert the color image into a single-channel grayscale image to achieve image grayscale conversion.

[0056] Step 3.3, Image Smoothing and Noise Reduction: A Gaussian filter is used for smoothing to suppress random noise points and protect the overall brightness structure of the reflective sheet edges. Step 3.4 Adaptive Threshold Segmentation: Otsu's maximum inter-class variance method is used for global adaptive threshold segmentation to achieve image binarization.

[0057] Through the image preprocessing in step 3, the clear image after autofocus can be transformed into a high-contrast structural map, enabling the subsequent reflective sheet recognition algorithm to quickly locate the target area.

[0058] like Figure 2 As shown, step 4, the extraction and identification of the reflective area, is carried out as follows: Step 4.1: Use the OpenCV function (findContours) to extract contours from the binarized image B(x,y). A contour object is generated for each connected highlighted region. And record the set of boundary points. ,area .

[0059] Step 4.2, Area Filtering: For all detected contours Calculate area A i And perform the first screening based on the empirical thresholds Amin and Amax: It is used to eliminate small noise points and excessively large light spots.

[0060] Step 4.3, Convexity Detection: For each candidate contour Perform contour detection and retain only targets with convex contours to ensure that the target boundaries are continuous and regular.

[0061] Step 4.4, Polygon Fitting and Side Count Selection: The Douglas-Peucker algorithm is used to approximate the contour into a polygon, and the number of vertices N of the fitted polygon is counted. p Only the outline with Np=4 is retained, which conforms to the rectangular geometric characteristics of the reflector and is used to exclude non-target objects such as circles, triangles, and complex light spots.

[0062] Step 4.5, Aspect Ratio Screening: Calculate the aspect ratio of the bounding rectangle of each candidate contour, control the aspect ratio within the range of [0.9, 1.1], ensure that the selected target is approximately square (reflective sheets are often marked as square), and further remove background reflective objects.

[0063] Step 4.6: Calculate the center using the gray-scale centroid method: In the confirmed reflective sheet area... In this study, the gray-scale centroid method was used to calculate the center coordinates of the reflector. The calculation formula is:

[0064] In the formula, This is the grayscale value.

[0065] Through the process of extracting and identifying the reflective sheet area in step 4, the reflective sheet can be automatically detected and accurately identified in complex backgrounds, providing high-precision input for the angle deviation calculation in step 5, which can significantly reduce the false detection rate and the missed detection rate.

[0066] Step 5, Angle Deviation Calculation: Based on the center pixel coordinates of the reflector The coordinates of the principal point corresponding to the center point of the total station's line of sight in the camera's imaging plane. Calculate the actual horizontal angular deviation between the total station's line of sight and the reflector target. and vertical angle deviation .

[0067] The specific process is as follows: Step 5.1, Pixel Deviation Calculation: Horizontal deviation:

[0068] Vertical deviation:

[0069] Step 5.2: Calculate the angle deviation based on the camera imaging geometry. According to the pinhole imaging model, pixel offset and spatial angular offset on the imaging plane satisfy an approximately linear relationship:

[0070] Therefore, the horizontal angle deviation is obtained. :

[0071] Vertical angle deviation :

[0072] In the formula, p is the pixel size and f is the camera focal length.

[0073] Through the angle deviation calculation process in step 5, the image spatial offset is converted into instrument angle deviation, realizing the fusion of visual data and mechanical action. A coaxial optical path design is used to minimize the horizontal angle deviation. Vertical angle deviation It directly reflects the true deviation between the line of sight and the reflector without the need for additional correction, achieving a high-precision mapping from image coordinates to the mechanical angles of the total station.

[0074] Step 6, Servo drive control and automatic aiming: Step 6.1: The main control module will determine the angle deviation. Convert to the corresponding pulse counts for horizontal and vertical motors:

[0075] in, These represent the angular resolution for each step of the horizontal and vertical motors, respectively. These represent the number of pulse steps for the horizontal and vertical motor rotations, respectively.

[0076] Step 6.2: Once the motor reaches the target angle, the camera immediately acquires a new image I(x,y) and recalculates the center coordinates of the reflector. And obtain new pixel deviation If the new pixel deviation is less than the pixel deviation threshold, i.e. and If the target is hit, the target is considered to be successfully hit and the next task can be performed; otherwise, the fine-tuning stage will begin.

[0077] Step 6.3, Iterative Fine-tuning and Error Compensation: If the deviation still exceeds the limit, the system performs iterative correction, calculating a new angle correction amount for position fine-tuning. The formula for calculating the new angle correction amount is:

[0078] Based on the angle correction, a new motor pulse command is generated to drive the motor for small-angle compensation. After the motor moves to the compensated position, the image is re-acquired and the pixel deviation is calculated for verification. If the deviation change rate is less than the stability threshold δ for two consecutive iterations, the system is considered stable. This process constitutes a closed-loop automatic aiming algorithm, which typically controls the deviation within 0.1–0.2 pixels in 2–3 iterations.

[0079] Step 7, Automatic Distance Measurement and Task Execution: After aiming is completed, the system can automatically trigger the distance measurement function or other measurement tasks to realize a fully automatic measurement process closed loop.

[0080] Example 2 An intelligent image-based total station autofocus and reflector recognition system is integrated into the total station body to implement the intelligent image-based total station autofocus and reflector recognition method as described in Embodiment 1. The system includes a coaxial camera, a focusing actuator, a main control module, an image processing module, an angle calculation module, a servo drive module, and a distance measurement and task execution module.

[0081] Coaxial cameras are typically composed of high-resolution industrial CMOS cameras. The optical axis of their image sensor is strictly coaxial with the line of sight of the total station, ensuring that the center of the image captured by the camera corresponds to the center pointed to by the line of sight, fundamentally eliminating parallax. Coaxial cameras are used to acquire images from reflective sheets and output grayscale signals.

[0082] The focusing actuator includes a focusing lens barrel assembly and a stepper motor. The focusing lens barrel assembly is connected to the stepper motor. The objective lens group is mounted at the front end of the focusing lens barrel assembly, and the rear end is optically coupled to the main prism group and the beam splitter prism group. The main control module sends pulse commands to the stepper motor based on the sharpness evaluation results, enabling the stepper motor to drive the focusing lens barrel assembly to achieve precise movement along the optical axis, realizing coarse adjustment, fine adjustment, and focus retraction of the lens assembly.

[0083] The image processing module is connected to a coaxial camera and performs image preprocessing and contour recognition. It calculates the center coordinates (u, v) of the reflector using the grayscale centroid method. Image preprocessing includes grayscale conversion, image smoothing and noise reduction, and image binarization. Contour recognition includes area filtering, convexity detection, polygon fitting, side count filtering, and aspect ratio filtering. Through image preprocessing and contour recognition, the automatic detection and accurate recognition of the reflector against complex backgrounds are achieved.

[0084] The angle calculation module is used to calculate the horizontal and vertical angle deviations based on the pinhole imaging model. .

[0085] The servo drive module includes a horizontal motor and a vertical motor, which are used to generate pulse commands based on angular deviations and perform automatic aiming.

[0086] The main control module is used to control the stepper motor to perform focus search, sharpness evaluation, focus locking and self-correction, and complete the automatic focus control.

[0087] The ranging and task execution module is connected to the main control module and is used to automatically trigger ranging or execute preset measurement tasks after aiming is completed.

[0088] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for automatic focusing and reflector identification of a total station based on intelligent imagery, characterized in that, Includes the following steps: Step 1, System Initialization and Optical Path Calibration: The main control system initializes the coaxial camera, stepper motor and servo motor, obtains the camera's intrinsic parameters, and calibrates the coaxial relationship between the camera's optical axis and the total station's line of sight. Step 2, Autofocus Control: The main control system controls the stepper motor to drive the focusing lens barrel to move in steps within the set focal length range; the coaxial camera acquires images at each step position, calculates the image sharpness, and determines the contrast peak position by comparing the changing trends of adjacent sharpness values, thereby determining the optimal focal length point to obtain a sharp image of the reflector. Step 3, Image Preprocessing: Process the clear image to distinguish the bright areas of the reflective sheet from the background areas, and obtain a standardized binary image; Step 4: Extraction and Recognition of Reflective Areas: Perform contour detection on the binary image to remove interfering targets, retain areas that conform to the geometric features of the reflective sheet, and calculate the center pixel coordinates of the reflective sheet within the confirmed reflective sheet areas. ; Step 5, Angle Deviation Calculation: Calculate the pixel deviation between the center of the reflector and the center of the line of sight based on the camera's intrinsic parameters. And obtain the corresponding angular deviations in the horizontal and vertical directions; Step 6, Servo Drive and Automatic Alignment: Calculate the required number of servo motor pulse steps based on the angular deviation, drive the horizontal and vertical motors to rotate, and move the center of the total station's line of sight to the center of the reflector. After aiming is completed, the image is reacquired and the deviation is verified to be within the tolerance threshold. If the accuracy requirements are not met, iterative correction is performed until the deviation meets the set conditions.

2. The method for automatic focusing and reflector identification of a total station based on intelligent imagery according to claim 1, characterized in that, Step 2, autofocus control, includes a coarse search phase, which includes the following process: The main control system controls the stepper motor to drive the focusing lens barrel within the focal length range. by step distance It moves forward step by step, and with each step it moves, it drives the coaxial camera to capture one frame of image. The main control system acquires the sharpness evaluation value of the central region of each frame and records the sharpness change trend of the central region of several consecutive frames. When the sharpness evaluation value is detected to change from rising to falling, the main control system sets the focal peak point. Nearby step distance range [ This will serve as the next stage of fine-tuning. The formula for calculating the sharpness evaluation value in the coarse search phase is as follows: in, Indicates the position of the lens tube At that time, the clarity of the image, represents the gradient of the Sobel operator in the horizontal and vertical directions; M×N is the size of the image window.

3. The method for automatic focusing and reflector identification of a total station based on intelligent imagery according to claim 2, characterized in that, Step 2, autofocus control, includes a fine search phase, which includes the following process: The main control system resets the step distance to Control the stepper motor within the fine-tuning range [ The lens group is moved step by step within the image acquisition process, and the sharpness evaluation process is repeated. The sharpness is compared in real time, and the step position where the sharpness evaluation value reaches the maximum is selected as the optimal focal length point. ; The formula for calculating the sharpness evaluation value in the fine search phase is as follows: In the formula, This represents the image grayscale intensity value, indicating the grayscale value at pixel coordinates (x, y). The second derivative represents the change in grayscale.

4. The method for automatic focusing and reflector identification of a total station based on intelligent imagery according to claim 3, characterized in that, Step 2, autofocus control, includes a position retraction and focus locking phase. The position retraction and focus locking phase includes the following process: when the optimal focal length point... Once determined, the main control system calculates the number of pulses N required for the stepper motor to retract from the current point, and issues a reverse pulse command to the motor based on this number of pulses N, causing the focusing lens barrel to return to the optimal focal length point. Location; The formula for calculating the number of pulses N is: in, This is the displacement in a single step. This is the current location.

5. The method for automatic focusing and reflector identification of a total station based on intelligent imagery according to claim 4, characterized in that, Step 2, autofocus control, includes a focus verification stage, which includes the following process: the camera is at the optimal focal length point. The image is reacquired at the new location, and the sharpness rating is recalculated. If the image is located at the optimal focal length point twice... The difference in image sharpness evaluation values ​​is less than a set threshold. ,Right now If the difference is not less than the set threshold, then the focus is considered successful. Then it enters the self-correction phase.

6. The method for automatic focusing and reflector identification of a total station based on intelligent imagery according to claim 5, characterized in that, The self-correction phase includes the following process: setting the optimal focal length point. Position is the center line, fine-tune step size is Control the stepper motor within the fine-tuning range. The lens group is moved gradually within the lens assembly, and the image acquisition and sharpness evaluation process is repeated. The maximum value point is then used to update the optimal focal length point. Position, and enter the position rollback and focus lock stage to achieve closed-loop fine-tuning.

7. The method for automatic focusing and reflector identification of a total station based on intelligent imagery according to claim 1, characterized in that, Step 4, the contour detection process for extracting and recognizing the reflective sheet region, involves extracting the boundary point set of all highlighted areas and then sequentially performing area filtering, convexity detection, polygon fitting, side count filtering, and aspect ratio filtering to retain the reflective sheet region. The center coordinates of the reflector were calculated using the gray-scale centroid method. The calculation formula is: In the formula, This is the grayscale value.

8. The method for automatic focusing and reflector identification of a total station based on intelligent imagery according to claim 1, characterized in that, Step 5, angular deviation calculation, includes horizontal angle deviation. The calculation formula is: Vertical angle deviation : In the formula, The center pixel coordinates of the reflector Here, p represents the coordinates of the principal point corresponding to the center point of the total station's line of sight in the camera's imaging plane, f is the pixel size, and f is the camera's focal length.

9. The method for automatic focusing and reflector identification of a total station based on intelligent imagery according to claim 1, characterized in that, The specific process of step 6, servo drive control and automatic aiming, is as follows: Step 6.1: Adjust the angle deviation Convert to the corresponding pulse counts for horizontal and vertical motors: in, These represent the angular resolution for each step of the horizontal and vertical motors, respectively. These represent the number of pulse steps for the horizontal and vertical motor rotations, respectively. Step 6.2: After the motor reaches the target angle, acquire a new image I(x,y) and recalculate the center coordinates of the reflector. And obtain new pixel deviation If the new pixel deviation is less than the pixel deviation threshold, the aiming is considered successful and the process proceeds to the next task; otherwise, the process proceeds to the fine-tuning stage. Step 6.3, Iterative Fine-tuning and Error Compensation: If the deviation still exceeds the limit, the system performs iterative correction, calculating a new angle correction amount for position fine-tuning. The formula for calculating the new angle correction amount is: Based on the angle correction, the motor pulse command is regenerated to drive the motor for small angle compensation. After the motor moves to the compensation position, the image is re-acquired and the pixel deviation is calculated for verification. If the deviation change rate is less than the stability threshold δ for two consecutive times, the system is considered stable.

10. A total station autofocus and reflector recognition system based on intelligent imagery, characterized in that, The method for implementing the total station autofocus and reflector recognition method based on intelligent imagery as described in any one of claims 1-9 is characterized by comprising: A coaxial camera is used to acquire images of a reflective sheet and output grayscale signals; the optical axis of the photosensitive element of the coaxial camera is strictly coaxial with the line of sight of the total station; The focusing actuator includes a focusing lens barrel assembly connected to a stepper motor, used to move the lens group along the optical axis to achieve automatic focusing; The main control module is used to control the stepper motor to perform focus search, sharpness evaluation, focus locking and self-correction, and complete the automatic focus control. The image processing module, connected to the coaxial camera, is used to perform image preprocessing and contour recognition processing, and calculates the center coordinates (u,v) of the reflector using the gray-scale centroid method. The angle calculation module is used to calculate the horizontal and vertical angle deviations. ; The servo drive module, including a horizontal motor and a vertical motor, is used to generate pulse commands based on angular deviations and perform automatic aiming.