Long-distance image target positioning method and system for auto-collimation surveying instrument
By employing multi-frame modulation differential fusion and sliding window filtering techniques, the image recognition instability problem of autocollimation measurement under complex backgrounds at long distances is solved, achieving high-precision and robust target positioning, which is suitable for portable surveying instruments and embedded robot measurement systems.
Patent Information
- Application Number
- CN202511887015.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-15
- Publication Date
- 2026-03-20
AI Technical Summary
In complex background conditions at long distances, autocollimation measurement methods are difficult to effectively improve image recognition capabilities and the stability and robustness of measurement results. In particular, in traditional methods, the image imaging process is affected by various factors, leading to inaccurate target positioning and degraded system performance.
A multi-frame modulation differential fusion mechanism is adopted, which combines the modulation response characteristics of the self-collimating light source with the nonlinear randomness of background interference. By acquiring multiple frames of images under different modulation states and performing pixel-level differential and weighted fusion processing, a target enhancement image is generated. Stable self-collimating target center coordinates are output through multi-time period target image mean superposition processing and sliding window non-uniform weighted filtering module.
It significantly improves the recognition stability and extraction accuracy of self-collimated targets, enhances the imaging stability and system robustness of images, and is suitable for portable surveying instruments and embedded robot measurement systems, especially for achieving high-precision and high-robustness automatic target recognition in resource-constrained industrial application scenarios.
Smart Images

Figure CN121708096A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of surveying instruments and image processing technology, and particularly relates to a method and system for long-distance image target localization for an autocollimating surveying instrument. Background Technology
[0002] As surveying technology continues to develop towards higher precision, intelligence, and automation, automated measurement equipment based on robotic platforms is receiving increasing attention. Achieving rapid positioning and precise aiming of measurement targets in complex scenarios has become a crucial requirement for improving the efficiency and adaptability of surveying systems. Autocollimation technology, as a key means of achieving high-precision target alignment and attitude calibration, has been widely used in equipment such as total stations and robotic measurement platforms, and is particularly suitable for high-precision operations such as attitude adjustment and optical axis alignment during the measurement process.
[0003] Existing autocollimation measurement methods typically employ imaging devices to photograph the target and rely on image processing techniques to extract and locate the target center. These technologies are relatively mature for close-range measurements. For example, Chinese patent CN103261838A discloses a self-collimation target measurement structure and method based on a robotic surveying instrument, which achieves automatic aiming and data acquisition at close range through photoelectric acquisition and image analysis. However, as the measurement distance in practical applications continues to increase, traditional autocollimation measurement methods face a series of challenges.
[0004] When the measurement distance exceeds 10 meters, the image imaging process is inevitably affected by various factors, especially the complexity of the background at a distance and the instability of spatial perturbations, which makes the target image easily weakened or even obscured in the field of view. Such interference not only reduces the signal-to-noise ratio of the image but also significantly affects the accuracy of image recognition algorithms in locating self-collimated targets (such as the crosshair reflected from a right-angle prism). In addition, traditional self-collimation systems often rely on fixed filtering strategies or simple image enhancement methods, which are difficult to adapt to the dynamic changes in background interference characteristics and image change patterns under different environments, resulting in a significant decrease in system performance at long distances.
[0005] Therefore, improving the image recognition capability of self-collimating targets and enhancing the stability and robustness of measurement results under complex background conditions at long distances has become one of the key issues in the current technological upgrade of surveying and mapping equipment. This also reflects the urgent need for a new generation of self-collimating measurement systems with long-distance target recognition capabilities, image stabilization processing mechanisms, and high-precision output performance. Summary of the Invention
[0006] To address the aforementioned technical problems, this invention provides a method and system for long-range image target localization using an autocollimating mapping instrument. Specifically, the technical solution provided by this invention is as follows: A method for long-range image target localization for an autocollimating mapper includes the following steps: S1. Autocollimation image acquisition: The autocollimation light source is turned on multiple times during the same period to acquire several modulated image frames. The autocollimation light source has a different modulation state each time it is turned on. Background image frames are acquired when the autocollimation light source is turned off. S2. Image difference processing: Each modulated image frame is pixel-level differentiated from the background image frame, and the difference results are grayscaled and pixel intensity normalized to obtain multiple corresponding primary difference images. S3. Multi-image fusion processing: Image quality is evaluated for each primary difference image, and weighting coefficients are assigned according to the evaluation results to perform weighted fusion of all primary difference images to generate a target enhancement image; S4. Target image overlay processing: Repeat steps S1 to S3 over multiple consecutive time periods to obtain multiple target enhancement images and overlay them with pixel-level average values to generate a stable fused target image. S5. Target center coordinate extraction: Binarize the target fused image, extract the bright spot connected components and filter candidate regions that meet the area and aspect ratio thresholds, and calculate the gray-weighted center of the horizontal and vertical projections of the candidate regions as the horizontal and vertical coordinates. S6. Candidate Region Verification: Perform structural verification on the candidate region. If the verification passes, the horizontal and vertical coordinates of the candidate region are confirmed as valid autocollimation target center coordinates.
[0007] Furthermore, it also includes an output filtering process: repeatedly executing steps S1 to S6 to obtain the center coordinates of multiple autocollimated targets within a continuous time period, constructing a sliding window mechanism, and superimposing and filtering the current autocollimated target center coordinates and historical autocollimated target center coordinates according to a weighting strategy to output stable autocollimated target center coordinates.
[0008] Furthermore, a sliding window filtering module is set up, including an input buffer, an output buffer, a mixing buffer, and a coefficient buffer; The input buffer is used to receive the acquired center coordinates of the autocollimated target in real time and store the n most recent center coordinates in chronological order. When the number is insufficient in the initial stage, it is initialized to 0. The output buffer is used to receive the self-collimating target center coordinates output by the sliding window filtering module in real time, and store the most recent m center coordinates in chronological order. When the number is insufficient in the initial stage, it is initialized to 0. The hybrid buffer is used to merge the center coordinates stored in the input buffer and the output buffer to form a hybrid coordinate sequence of length n+m, and sort them according to their numerical values; The coefficient buffer is used to store the weighted coefficient sequence corresponding to the hybrid buffer. The sum of each weighted coefficient is equal to 1, and for the coordinates with a value of 0 in the hybrid buffer, the corresponding weighted coefficient is set to 0. The result of multiplying the current weighted coefficient sequence and the mixed coordinate sequence and summing them is used as the current output of the sliding window filtering module for the self-collimation target center coordinates.
[0009] Preferably, for the weighted coefficient sequence stored in the coefficient buffer, the weighted coefficients corresponding to the non-zero coordinates of the mixed buffer are set according to the specific measurement environment: for measurement environments with large background fluctuations, the weighted coefficients corresponding to the maximum and minimum coordinates of the mixed buffer are set to zero, and then the remaining coordinates are assigned the same weighted coefficients; for short-term stable measurement environments, the coordinate values near the middle of the mixed coordinate sequence are assigned larger weighted coefficients, while the coordinate values near the two ends are assigned smaller weighted coefficients.
[0010] Further, in step S3, the target enhancement image is:
[0011] in, for t Target enhancement images over a period of time, express t Time period i The primary difference image corresponding to the frame-modulated image frame. , express t The first time period collected i Frame modulation image frames, n for t The total number of modulated image frames acquired during the time period; For the corresponding number i The response weighting coefficients of the frame-modulated image frame, and
[0012] in, This is an image quality evaluation function used to measure the sharpness of primary difference images.
[0013] Furthermore, the image quality evaluation function uses root mean square contrast:
[0014] Alternatively, Sobel edge strength integral can be used:
[0015] Alternatively, a weighted fusion value based on root mean square contrast and Sobel edge intensity integral can be used:
[0016] in, Representing an image I medium pixel The grayscale values, M and N are the image values. I The number of rows and columns, For image I The average gray value; and The Sobel edge detection operator in the image I The gradient response images in the x and y directions. This is the fusion coefficient.
[0017] Furthermore, in step S5, before binarizing the target fused image, median filtering is first performed, and then adaptive threshold segmentation or Otsu's algorithm is used for binarization to obtain a binarized image. The horizontal and vertical coordinates The calculation formula is:
[0018] in, W Indicates the width range of the candidate region. H Indicates the height range of the candidate region. This is the binarized horizontal projection. This is the binarized longitudinal projection.
[0019] Further, in step S6, the structural verification includes the following steps: The Sobel operator is used to extract the edge of the identified candidate region to obtain the edge image. The Hough transform method is used to extract the intersecting line segments in the edge image and obtain the length, angle and intersection position of the intersecting line segments. If the length difference and angle of the intersecting line segments are within the set range and the distance between the intersection position and the horizontal and vertical coordinates of the candidate region meets the set threshold, then the symmetry verification is performed. Otherwise, the candidate region is determined not to be a self-collimating target region. The symmetry verification includes the following steps: taking one of the intersecting line segments as the axis of symmetry, extracting sub-regions of the same size on both sides of the axis of symmetry in the candidate region, calculating the average gray value or gradient intensity of each sub-region and performing normalization comparison. If the difference does not exceed a set threshold, the candidate region is considered to have symmetry and the structure verification is passed; otherwise, it is determined that the coordinates of the intersection point in the candidate region are not autocollimated targets, or that the autocollimated target is close to the edge of the field of view and is a defective target.
[0020] A long-range image target localization system based on the above method includes the following modules: The image acquisition module is used to acquire modulated image frames and background image frames when the self-collimating light source is on and off, during the acquisition phase; A light source modulation module is used to control the self-collimating light source to modulate and output at a preset frequency and brightness. The image difference module is used to perform pixel-level difference between each modulated image frame and the background image frame, and to convert the difference results to grayscale and normalize the pixel intensity to obtain multiple primary difference images. The multi-frame fusion module is used to evaluate the image quality of each primary difference image, and assign weighting coefficients according to the evaluation results to perform weighted fusion of all primary difference images to generate a target enhancement image. The image overlay module is used to perform pixel-level overlay averaging of target enhancement images acquired over multiple time periods to generate a stable fused target image. The coordinate extraction module is used to perform median filtering, threshold segmentation, connected component analysis and projection centroid calculation on the target fused image to extract the target coordinates in the candidate region; The structure verification module is used to perform edge detection and Hough line analysis on the candidate region to determine whether it contains a set of approximately orthogonal line segments and to verify the consistency of their intersection points with the center coordinates. It further performs symmetry detection to confirm whether the candidate region is a valid autocollimation target region.
[0021] Furthermore, the system also includes an output filtering processing unit, which includes a sliding window filtering module for constructing a sliding window mechanism. Based on a non-uniform weighting strategy, the coordinate data of the current time period and the historical time period are fused to output stable self-collimating target center coordinates.
[0022] Compared to existing technologies, this invention significantly improves the stability of target recognition, extraction accuracy, and system robustness in long-distance mapping scenarios, specifically: First, this invention introduces a multi-frame modulation differential fusion mechanism. Combining the modulation response characteristics of a self-collimating light source with the nonlinear randomness of background interference, it effectively improves the signal strength of the target image by acquiring multiple frames of images under different modulation states and performing pixel-level differential and weighted fusion processing. This significantly suppresses imaging interference problems in complex backgrounds such as background clutter, optical noise, and infrared interference. It breaks through the limitations of traditional methods that rely solely on two-frame differential fusion with a switched light source, solving the problems of unstable imaging and difficult identification of weak targets at long distances.
[0023] Secondly, by superimposing the average values of target images from multiple time periods, the imaging stability of the target images is further enhanced, overcoming the image drift, blurring, and breakage caused by factors such as airflow disturbance, thermal jitter, and slight optical path offset in long-distance measurements. This lays a stable and clear image foundation for subsequent center coordinate extraction.
[0024] In terms of target recognition, this invention combines structural verification mechanism with projection centroid calculation. It not only uses the centroid of horizontal and vertical line segments to extract coordinates, but also integrates multi-dimensional morphological features such as the geometric characteristics of the target structure, Sobel edge features, and Hough transform line combination structure. The multiple verification methods enhance the reliability and uniqueness of self-collimating target recognition and significantly reduce the probability of misidentification and false target interference.
[0025] Furthermore, in the output stage, this invention introduces a sliding window non-uniform weighted filtering module, which effectively suppresses short-term coordinate jumps caused by image sensor noise, environmental disturbances, or mechanical jitter by dynamically fusing the coordinate information of the current frame and historical frames, thus ensuring the continuity of the positioning output results and the measurement accuracy.
[0026] Overall, this invention significantly improves the measurement capabilities of traditional autocollimation systems in complex long-distance environments. It can achieve high-precision and robust automatic target recognition without relying on deep learning models and high-computing platforms. It is particularly suitable for resource-constrained industrial applications such as portable surveying instruments and embedded robot measurement systems, and has strong practicality and engineering promotion value. Attached Figure Description
[0027] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with the embodiments of the invention to explain the invention and do not constitute a limitation thereof.
[0028] Figure 1 This is a flowchart of a long-distance image target localization method provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of an image acquired by a mapping instrument containing a self-collimating target, provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of an image acquired by a surveyor with only background information, provided in an embodiment of the present invention. Figure 4 This is a schematic diagram of a self-collimated target image obtained by background subtraction according to an embodiment of the present invention; Figure 5 This is a schematic diagram of the overlay of multi-time period means of the target enhancement image provided in an embodiment of the present invention; Figure 6 This is a schematic diagram of the sliding window filtering module provided in an embodiment of the present invention. Detailed Implementation
[0029] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, 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 some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, other embodiments obtained by those skilled in the art without creative effort are all within the scope of protection of the present invention.
[0030] Example 1 This embodiment provides a method for long-distance image target localization for autocollimation mapping instruments. It addresses the problems of traditional autocollimation measurement being susceptible to background interference, unstable imaging, and large positioning errors in long-distance scenes. Through multi-stage image processing and filtering mechanisms, it achieves stable autocollimation positioning at long distances.
[0031] like Figure 1 As shown, the method mainly includes the following steps: S1. Differential processing of the self-collimated image to remove background interference. Image frames are acquired by the mapping instrument's image acquisition module in two states: with the self-collimating light source on and off. The cross-shaped light source inside the instrument (e.g., red or green) is converted into parallel light by the objective lens optical system. The target (e.g., a plane mirror or right-angle prism) reflects this parallel light, which then enters the objective lens, is refocused, and imaged by the camera as a cross-shaped target (e.g., a plane mirror or right-angle prism). Figure 2 As shown), when the light source is turned off, the image does not contain reflected parallel light from the target (such as...). Figure 3 As shown), performing pixel-level difference operations on the two, followed by grayscale conversion and pixel intensity normalization, can effectively eliminate fixed or slowly varying interference in the background, thereby highlighting the reflective target area (such as...). Figure 4 (As shown), to facilitate target location.
[0032] However, in long-distance autocollimation measurements, the imaging area and brightness of the autocollimated target are limited, while the background area may contain a large amount of non-target information with similar spectra and obvious dynamic disturbances. Therefore, relying solely on pixel-level difference between two frames obtained under conditions of light source on and light source off is often insufficient to reliably extract a clear target area, especially in environments with strong background stray light, airflow disturbances, or interference from similar colors.
[0033] To ensure imaging stability and recognition accuracy, this embodiment further employs a multi-frame modulation differential fusion method. By modulating and controlling the autocollimating mapper's light source, combined with multi-frame image differential fusion processing, the target image signal strength is enhanced while effectively suppressing background noise and optical noise interference. The core idea of this method is that autocollimating targets have the characteristic of synchronously responding to changes in light source modulation, while background interference exhibits randomness and nonlinearity. Therefore, multi-frame differential fusion enhances the modulation consistency signal of the target portion and suppresses non-uniform background noise.
[0034] Specifically, the image acquisition module of the control surveyor is controlled within the same time period. t n frames of modulated images are continuously acquired to form an image sequence. Each frame of the image corresponds to a specific light source modulation state. The light source modulation state includes illumination intensity and modulation frequency, which are set by the mapping instrument controller before sampling to excite the response characteristics of the self-collimated target. Simultaneously, an additional reference image with the self-collimated light source off is acquired within this image sequence. This is a reference image used as the background for the current time period.
[0035] For each frame of modulated image, pixel-by-pixel difference is performed with the reference image frame to obtain a primary difference image, which is then subjected to grayscale conversion and pixel intensity normalization.
[0036] To further enhance the target signal and smooth out occasional noise, this embodiment performs weighted fusion on all primary difference images to obtain the enhanced target image:
[0037] in, for t Target enhancement images over a period of time, express t Time period i The primary difference image corresponding to the frame-modulated image. That is t The first time period collected i Frame-modulated images; For the corresponding number i The response weighting coefficients of the frame-modulated image can be adaptively set according to the sharpness of the primary differential image in each modulation state.
[0038]
[0039] in, This is an image quality evaluation function used to measure the sharpness of primary difference images, such as using root mean square contrast. ,Right now
[0040] in, Representing an image I medium pixel The grayscale value, where M and N are the number of rows and columns of the image. For image I The average gray value.
[0041] Sobel edge strength integral can also be used. ,Right now
[0042] in, and The Sobel edge detection operator in the image I The gradient response images in the x and y directions.
[0043] or Using root mean square contrast Sobel edge strength integral The weighted fusion value, i.e.: , This is the fusion coefficient.
[0044] S2. Differential image overlay processing enhances target imaging stability. During long-distance image acquisition, especially in complex outdoor scenarios where the target distance exceeds 10 meters from the mapping instrument, the target images acquired by the image sensor are highly susceptible to air turbulence disturbances (such as heat flow and wind), light fluctuations, mechanical vibrations, and slight optical path offsets. These factors can cause slight drift, inconsistent brightness, blurred edges, or even intermittent disappearance of the target image between consecutive frames, thereby affecting the accuracy and stability of extracting the center coordinates of the autocollimating crosshair target.
[0045] like Figure 5 As shown, to further suppress the interference of such random perturbation noise, target enhancement images for multiple consecutive time periods are obtained according to the method described in step S1, and then pixel-level mean superposition is performed on them to obtain the final target fusion image, which is used for subsequent target center coordinate extraction. That is, , P This represents the number of time periods.
[0046] S3. Extraction of target center coordinates After the multi-frame modulation differential fusion in step S1 and the superposition processing in step S2, the self-collimated target is in the target fusion image. D The target is clearly highlighted. To extract the center coordinates of the target, a median filter is first applied to the fused image of the target.D Noise reduction is performed, and median filtering can significantly reduce interference from isolated high-frequency pixels (such as hot spots and background reflections). Then, adaptive thresholding or the Otsu algorithm is used for binarization to obtain a binarized image.
[0047] Next, connected component analysis is performed on the binarized image to obtain all independent bright spot regions, and geometric features such as the bounding rectangle, number of pixels, horizontal projection, and vertical projection of each region are extracted. Typically, autocollimated targets contain distinct horizontal and vertical lines; the horizontal lines are nearly perfectly horizontal, and the vertical lines are nearly perfectly vertical, but they lack symmetry. Autocollimated light sources are usually cross-shaped, and the horizontal and vertical lines will have obvious intersection points. Simultaneously, the length and width of the bounding rectangle are significantly larger than the target line width, therefore the area of the bounding rectangle should be significantly larger than the total number of pixels within the region. Furthermore, the horizontal and vertical projections exhibit a peak with a width within a certain range.
[0048] From all connected components, regions with a fill rate less than 0.2 and a projection peak width less than 10 pixels (this threshold is related to camera resolution and light source width; in this embodiment, it is 10 pixels) are selected as candidate targets. Weighted sums of the binarized (using 33% of the peak value as a threshold to remove interference below the threshold) longitudinal and lateral projections are calculated and used as the center coordinates of the target. :
[0049] W Indicates the width range of the candidate region. H Indicates the height range of the candidate region. This is the binarized horizontal projection. This is the binarized longitudinal projection.
[0050] Under long-range imaging conditions, although the autocollimated target has been significantly highlighted in the image after previous image enhancement and fusion processing, there may still be bright reflective points and regular edge objects (such as building corners, poles, and intersecting cables) in the background. Additionally, if the target prism is tilted too much, the autocollimated target may be incomplete. Relying solely on fill rate and projection characteristics may still lead to misidentification, deviation, or even misjudgment of the target. Therefore, to improve the reliability and structural uniqueness of coordinate extraction, this embodiment further introduces a target shape and structure verification mechanism after the above coordinate calculation. Candidate regions are screened one by one from dimensions such as geometric symmetry, structural configuration, and edge combination features to ensure that the final output coordinates truly reflect the autocollimated coordinates.
[0051] First, the Sobel operator is used to extract edges from the identified candidate regions, resulting in an edge image. This operator calculates pixel gradient responses in both the horizontal and vertical directions to identify the edge regions with the most significant grayscale changes in the image. This step effectively outlines the main contour structure of the candidate regions.
[0052] Next, the Hough transform method is used to extract and analyze the direction of straight lines in the edge image. The Hough transform is a robust shape recognition method, especially suitable for extracting targets with specific geometric features. In this scenario, autocollimation imaging typically includes a nearly vertical line and a nearly horizontal line, which should have a significant angular distribution difference (approximately 90°±5′) in the image and an intersection point. By analyzing the peak values in the Hough space, it can be determined whether the candidate region possesses this type of orthogonal straight line combination structure.
[0053] After detecting a set of distinct horizontal and vertical lines in the target area, it is necessary to further verify the consistency of their intersection points, that is, to determine whether these two lines intersect near the previously extracted coordinates. The specific method is to calculate the theoretical intersection point of the two lines and compare it with the extracted projected centroid coordinates. The Euclidean distance between them. If the distance deviation between the two is small, it indicates that the shape center and the brightness center are basically consistent, which has good structural positioning consistency and can further enhance the credibility.
[0054] Finally, to ensure the target imaging quality is up to standard, i.e., that symmetry exists in a small area near the intersection point, this embodiment also designs a vertical / horizontal symmetry judgment mechanism. (Based on the result coordinates...) Using the vertical and horizontal lines as axes of symmetry, extract sub-blocks (e.g., 15-20 pixels each) of several pixels wide from the left and right sides, and top and bottom sides. Calculate the average grayscale value or gradient intensity of these areas and perform normalization comparison. If the difference in mean values between the two sides does not exceed a set threshold (e.g., not exceeding 10%), it can be considered to have good structural symmetry. Otherwise, if a large deviation is found, it indicates that the area may be affected by interfering light spots, occlusion, or a large target offset angle, causing the crosshair target to significantly deviate from the field of view, and should be removed.
[0055] The above processing steps fall under the category of traditional image processing algorithms, possessing high adaptability to low-power, low-computing-power hardware platforms. They can run stably in resource-constrained scenarios such as embedded surveying instruments and robot vision systems without relying on GPUs or AI chips. Furthermore, they offer advantages such as clear algorithm structure, controllable processing flow, and strong robustness, making them particularly suitable for identifying targets with well-defined rules (such as self-collimating target imaging). Of course, in application environments with sufficient computing power (such as mobile platforms or intelligent surveying terminals equipped with AI acceleration units), deep learning-based target detection algorithms (such as YOLO) can also be used to directly detect and locate self-collimating targets.
[0056] S4. Result filtering to improve the stability of positioning results. In long-range autocollimation image recognition, even after steps such as image differencing, fusion, and shape verification, slight coordinate jitter may still exist, but it can still substantially affect the measurement results. This jitter mainly originates from minute noise in the image sensor, residual background disturbances, occasional pixel anomalies, and slight equipment vibrations. Its characteristics are: the continuously output target center coordinates exhibit irregular fluctuations between short frames. Although the error amplitude is small, it can have adverse effects on the final result in high-precision measurements, such as unstable output and discontinuous jumps.
[0057] To this end, this embodiment adds a customized sliding window filtering module to the target coordinate output port to dynamically fuse the coordinate data of the current frame and historical frames, thus establishing a balance between stability and response speed.
[0058] like Figure 6 As shown, the sliding window filtering module mainly includes an input buffer, an output buffer, a mixing buffer, and a coefficient buffer. The input buffer receives the target center coordinates obtained from the detection in real time and stores the n most recent target center coordinates in chronological order; it can be initialized to 0 if the initial number is insufficient. The output buffer receives the target center coordinates obtained from the filtering module in real time and also stores the m most recent target center coordinates in chronological order; it can also be initialized to 0 if the initial number is insufficient. The mixing buffer combines the above two sets of buffer contents to form a mixed coordinate sequence of length n+m, and sorts them according to their numerical values. The coefficient buffer stores the weighted coefficient sequence corresponding to the mixing buffer; the sum of all weighted coefficients equals 1, used to implement non-uniform weighted filtering.
[0059] Since the mixed coordinate sequence in the mixed buffer is sorted by numerical value, the weighting coefficient for coordinates with a value of 0 in the mixed buffer is also 0. The weighting coefficients for non-zero coordinates can be set according to the specific measurement environment and application scenario, for example: (1) Remove the highest and lowest values from the mixed sequence and then fuse the mean of the remaining coordinates, that is, assign the same weighting coefficient; suitable for scenarios with large background fluctuations and frequent outliers.
[0060] (2) Assign a larger weighting coefficient to the coordinate values closer to the middle in the mixed coordinate sequence, and a smaller weighting coefficient to the coordinate values at both ends, to achieve a similar effect to median filtering; suitable for eliminating sudden abnormal values, processing static targets or short-term stable scenarios.
[0061] Example 2 Based on the above method, this embodiment provides a long-range image target positioning system for an autocollimating surveying instrument. The system consists of multiple functional modules, covering the entire process from image acquisition, processing, recognition to final coordinate output, ensuring high-precision and stable target positioning even under conditions of significant long-range background interference.
[0062] First, the system is equipped with an image acquisition module, consisting of a high-resolution image sensor, an imaging lens, and a modulation control circuit. This module is responsible for acquiring multiple frames of images under different light source modulation conditions, providing high-quality image data for subsequent differential and fusion processing. The accompanying light source modulation module uses a controllable LED light source. By adjusting parameters such as frequency and brightness, it excites the synchronous reflection response of the self-collimated target, thereby forming distinct imaging features against a complex background.
[0063] In the image processing stage, the system includes an image preprocessing module that performs grayscale conversion, normalization, and differential operations. Image differential is performed in conjunction with the on / off state of the light source to initially remove static background interference. Subsequently, the target enhancement and fusion module assigns adaptive weighting coefficients to multiple frames of differential images based on image quality evaluation functions (such as root mean square contrast ratio, Sobel edge strength, etc.) to generate a high signal-to-noise ratio target image, improving recognition accuracy from the source. Simultaneously, the image averaging module performs pixel-level averaging overlay on images from multiple time periods, effectively smoothing image jitter and drift caused by factors such as heat flow and vibration, enhancing image stability.
[0064] The system identifies self-collimated targets through a target recognition and coordinate extraction module. It extracts the center coordinates of the target using traditional image processing methods (median filtering, binary segmentation, connected component analysis, image projection, and centroid calculation). The system also verifies the target's geometric characteristics, edge features, and orthogonal structure in Hough space using a structural characteristic verification module to eliminate false targets and ensure the structural reliability and uniqueness of the extracted coordinates.
[0065] To further enhance the stability of the measurement output, the system also integrates a coordinate output and sliding filter module. This module utilizes a sliding window mechanism to fuse coordinate information from historical and current frames, and employs a non-uniform weighting strategy to eliminate short-term errors and jumps, outputting continuous and stable positioning results. The system is centrally managed by the main control processing unit, which controls the operating rhythm of each module, algorithm execution, and data output.
[0066] The above system can execute the long-distance image target localization method described in Embodiment 1, and has the corresponding functional modules and beneficial effects of the method. For technical details not described in detail in this embodiment, please refer to the long-distance image target localization method provided in Embodiment 1 of the present invention.
[0067] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented using software plus a general-purpose hardware platform, or of course, using hardware. Based on this understanding, the above technical solutions, in essence or the parts that contribute to the related technology, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0068] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; under the concept of the present invention, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of the present invention as described above, which are not provided in detail for the sake of brevity; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A method for long-range image target localization for an autocollimating surveying instrument, characterized in that, Including the following steps: S1. Autocollimation image acquisition: The autocollimation light source is turned on multiple times during the same period to acquire several modulated image frames. The autocollimation light source has a different modulation state each time it is turned on. Background image frames are acquired when the autocollimation light source is turned off. S2. Image difference processing: Each modulated image frame is pixel-level differentiated from the background image frame, and the difference results are grayscaled and pixel intensity normalized to obtain multiple corresponding primary difference images. S3. Multi-image fusion processing: Image quality is evaluated for each primary difference image, and weighting coefficients are assigned according to the evaluation results to perform weighted fusion of all primary difference images to generate a target enhancement image; S4. Target image overlay processing: Repeat steps S1 to S3 over multiple consecutive time periods to obtain multiple target enhancement images and overlay them with pixel-level average values to generate a stable fused target image. S5. Target center coordinate extraction: Binarize the target fused image, extract the bright spot connected components and filter candidate regions that meet the area and aspect ratio thresholds, and calculate the gray-weighted center of the horizontal and vertical projections of the candidate regions as the horizontal and vertical coordinates. S6. Candidate Region Verification: Perform structural verification on the candidate region. If the verification passes, the horizontal and vertical coordinates of the candidate region are confirmed as valid autocollimation target center coordinates.
2. The long-distance image target localization method as described in claim 1, characterized in that, It also includes an output filtering process: repeatedly execute steps S1 to S6 to obtain the center coordinates of multiple autocollimated targets within a continuous time period, construct a sliding window mechanism, and perform superposition filtering on the current autocollimated target center coordinates and historical autocollimated target center coordinates according to a weighting strategy to output stable autocollimated target center coordinates.
3. The long-distance image target localization method as described in claim 2, characterized in that, Configure a sliding window filtering module, including an input buffer, an output buffer, a mixing buffer, and a coefficient buffer; The input buffer is used to receive the acquired center coordinates of the autocollimated target in real time and store the n most recent center coordinates in chronological order. When the number is insufficient in the initial stage, it is initialized to 0. The output buffer is used to receive the self-collimating target center coordinates output by the sliding window filtering module in real time, and store the most recent m center coordinates in chronological order. When the number is insufficient in the initial stage, it is initialized to 0. The hybrid buffer is used to merge the center coordinates stored in the input buffer and the output buffer to form a hybrid coordinate sequence of length n+m, and sort them according to their numerical values; The coefficient buffer is used to store the weighted coefficient sequence corresponding to the hybrid buffer. The sum of each weighted coefficient is equal to 1, and for the coordinates with a value of 0 in the hybrid buffer, the corresponding weighted coefficient is set to 0. The result of multiplying the current weighted coefficient sequence and the mixed coordinate sequence and summing them is used as the current output of the sliding window filtering module for the self-collimation target center coordinates.
4. The long-distance image target localization method as described in claim 3, characterized in that, For the weighted coefficient sequence stored in the coefficient buffer, the weighted coefficients corresponding to the non-zero coordinates of the mixed buffer are set according to the specific measurement environment: for measurement environments with large background fluctuations, the weighted coefficients corresponding to the maximum and minimum coordinates of the mixed buffer are set to zero, and then the remaining coordinates are assigned the same weighted coefficients; for short-term stable measurement environments, the coordinate values near the middle of the mixed coordinate sequence are assigned larger weighted coefficients, while the coordinate values near the two ends are assigned smaller weighted coefficients.
5. The long-distance image target localization method as described in claim 1, characterized in that, In step S3, the enhanced target image is: in, for t Target enhancement images over a period of time, express t Time period i The primary difference image corresponding to the frame-modulated image frame. , express t The first time period collected i Frame modulation image frames, n for t The total number of modulated image frames acquired during the time period; For the corresponding number i The response weighting coefficients of the frame-modulated image frame, and in, This is an image quality evaluation function used to measure the sharpness of primary difference images.
6. The long-distance image target localization method as described in claim 5, characterized in that, The image quality evaluation function uses root mean square contrast: Alternatively, Sobel edge strength integral can be used: Alternatively, a weighted fusion value based on root mean square contrast and Sobel edge intensity integral can be used: in, Representing an image I medium pixel The grayscale values, M and N are the image values. I The number of rows and columns, For image I The average gray value; and The Sobel edge detection operator in the image I The gradient response images in the x and y directions. This is the fusion coefficient.
7. The long-distance image target localization method as described in claim 1, characterized in that, In step S5, median filtering is first performed before binarizing the target fused image, and then adaptive threshold segmentation or Otsu's algorithm is used for binarization to obtain a binarized image. The horizontal and vertical coordinates The calculation formula is: Where W represents the width range of the candidate region, and H represents the height range of the candidate region. This is the binarized horizontal projection. This is the binarized longitudinal projection.
8. The long-distance image target localization method as described in claim 1, characterized in that, In step S6, the structural verification includes the following steps: The Sobel operator is used to extract the edge of the identified candidate region to obtain the edge image. The Hough transform method is used to extract the intersecting line segments in the edge image and obtain the length, angle and intersection position of the intersecting line segments. If the length difference and angle of the intersecting line segments are within the set range and the distance between the intersection position and the horizontal and vertical coordinates of the candidate region meets the set threshold, then the symmetry verification is performed. Otherwise, the candidate region is determined not to be a self-collimating target region. The symmetry verification includes the following steps: taking one of the intersecting line segments as the axis of symmetry, extracting sub-regions of the same size on both sides of the axis of symmetry in the candidate region, calculating the average gray value or gradient intensity of each sub-region and performing normalization comparison. If the difference does not exceed a set threshold, the candidate region is considered to have symmetry and the structure verification is passed; otherwise, it is determined that the coordinates of the intersection point in the candidate region are not autocollimated targets, or that the autocollimated target is close to the edge of the field of view and is a defective target.
9. A long-range image target localization system based on the method of any one of claims 1 to 8, characterized in that, Includes the following modules: The image acquisition module is used to acquire modulated image frames and background image frames when the self-collimating light source is on and off. A light source modulation module is used to control the self-collimating light source to modulate and output at a preset frequency and brightness. The image difference module is used to perform pixel-level difference between each modulated image frame and the background image frame, and to convert the difference results to grayscale and normalize the pixel intensity to obtain multiple primary difference images. The multi-frame fusion module is used to evaluate the image quality of each primary difference image, and assign weighting coefficients according to the evaluation results to perform weighted fusion of all primary difference images to generate a target enhancement image. The image overlay module is used to perform pixel-level overlay averaging of target enhancement images acquired over multiple time periods to generate a stable fused target image. The coordinate extraction module is used to perform median filtering, threshold segmentation, connected component analysis and projection centroid calculation on the target fused image to extract the target coordinates in the candidate region; The structure verification module is used to perform edge detection and Hough line analysis on the candidate region to determine whether it contains a set of approximately orthogonal line segments and to verify the consistency of their intersection points with the center coordinates. It further performs symmetry detection to confirm whether the candidate region is a valid autocollimation target region.
10. The long-range image target localization system as described in claim 9, characterized in that, The system also includes an output filtering unit, which includes a sliding window filtering module to construct a sliding window mechanism. Based on a non-uniform weighting strategy, the coordinate data of the current time period and historical time periods are fused to output stable self-collimated target center coordinates.
Citation Information
Patent Citations
Robotic surveying instrument and method for the automated autocollimation of a telescope of a surveying instrument comprising an autocollimation target
CN103261838A
Cited By
Method for recognizing anti-reflective light in a motion capture in an ice-water mixed environment based on a ring-shaped sticker mark
CN122156257A
