A prism identification method and a prism center position determination method for a servo total station
Through the maximum inter-class variance method and coordinate projection transformation, combined with high-frequency noise filtering, high-precision prism recognition and central positioning on low-cost hardware are achieved, and the problems of high hardware requirements and imaging quality in the prior art are solved.
Patent Information
- Application Number
- CN202310694093.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-12
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2043-06-12
AI Technical Summary
The existing total station prism recognition method has high hardware requirements and high cost, and the recognition accuracy is greatly affected by imaging quality.
The maximum inter-class variance method is used for background segmentation, combined with coordinate projection transformation and high-frequency noise filtering, and converted into one-dimensional signals through two-dimensional images, prism target area and center position are calculated, reducing the difficulty of hardware and optical design.
In the case of poor imaging quality, the prism recognition and center positioning accuracy are improved, and the production cost of the total station is reduced.
Smart Images

Figure CN116797562B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of prism identification, and in particular to a prism identification method and a prism center position determination method for a servo total station. Background Art
[0002] The total station uses a reflecting prism as a reflector to measure distance. The reflecting prism receives the light signal emitted by the total station and reflects it back. The total station emits a light signal and receives the light signal reflected from the reflecting prism, calculates the phase shift of the light signal, etc., thereby indirectly obtaining the time it takes for light to pass through, and finally measures the distance from the total station to the reflecting prism. Accurate identification of the prism is an important part of the working process of the total station.
[0003] In the prior art, a Chinese patent with authorization announcement number CN105021169B discloses a working method for a total station with automatic target recognition, in which reflected light is reflected onto an image sensor, and then a target image containing reflected light and a target image excluding reflected light are obtained through a CMOS image sensor, the actual noise area is obtained, the actual noise area is subtracted from the target image, a noise-free target image is obtained, and the position of the prism target in the target image is extracted.
[0004] However, this method has high requirements on equipment hardware, high cost, and the recognition accuracy is greatly affected by image quality. Summary of the Invention
[0005] The purpose of the present invention is to provide a prism identification method and a prism center position determination method for a servo total station. When the imaging quality is poor, the prism identification accuracy and the center positioning accuracy are not affected and remain high. The present invention reduces the difficulty of the total station in hardware design and optical design, thereby reducing production costs.
[0006] To achieve the above object, the present invention provides the following technical solutions:
[0007] In a first aspect, the present invention provides a prism identification method for a servo total station, comprising the following steps:
[0008] S1. Turn on the servo total station laser to search for the prism, obtaining an image of the prism target containing reflected light. Then turn off the servo total station laser to obtain a background image without reflected light at the same location. Subtract the background image without reflected light from the prism target image with reflected light to obtain an image containing the prism target.
[0009] S2. Based on step S1, the maximum inter-class variance method is used to obtain the threshold value, and the image containing the prism target is segmented for background, the background noise is filtered out, the grayscale information of the target signal is retained, and then the coordinate projection transformation is performed along the angle α direction. The image is transformed from a two-dimensional matrix into a one-dimensional sequence by accumulating the grayscale energy of the same coordinates. The grayscale energy concentration area in the projection direction is the ROI area, thereby determining the area where the prism target is located.
[0010] Preferably, the specific method for performing coordinate projection transformation along the direction of angle α to determine the area where the prism target is located is:
[0011] The image of size M×N is subjected to two mutually orthogonal coordinate projection transformations, and the grayscale energy values of the same coordinates in each projection direction are accumulated respectively to obtain two signal series of length M and N respectively. The prism target is reflected in the series with highly concentrated energy, which is manifested as peak-like curves with consistent width L and height H in the two series. The starting point to the end point area of the peak-like curve in each series corresponds to the coordinates of the ROI area of the prism target in the two-dimensional image in each projection direction.
[0012] Furthermore, the prism identification method when the multi-prism targets overlap is:
[0013] When the number of peak-like curves in the current angle projection direction is inconsistent with the number of peak-like curves in the mutually orthogonal coordinate projection directions, the peak-like curve intervals in the two projection directions are combined to obtain multiple ROI areas to achieve multi-target recognition.
[0014] Furthermore, when the width L and / or height H of the peak-like curve in the current angle coordinate projection direction is different from the width L and / or height H of the peak-like curve in the mutually orthogonal coordinate projection direction, the coordinate oblique projection transformation is performed at any angle and its orthogonal direction. Taking into account the matrix characteristics of the image, the angle is selected as arctan(i) where i = 1...M and arctan(i) + π / 2, and the grayscale energy value in the projection direction is calculated respectively to obtain the ROI area and distinguish overlapping targets.
[0015] In the second aspect, the present invention provides a method for determining the prism center position of a servo total station, based on the prism identification method described in the first aspect, including the following steps: after filtering out the high-frequency noise of the two orthogonal signals, calculating the peak center position corresponding to the one-dimensional signal, and converting the peak center position to a two-dimensional matrix coordinate value under angles α and α+π / 2 to obtain the prism center position coordinates.
[0016] Preferably, noise reduction is performed by combining Gaussian smoothing of the image before projection and high-frequency noise filtering and signal reconstruction after projection, which can greatly reduce the impact of spot noise and peak-like edges on the accuracy of signal center calculation.
[0017] Furthermore, the calculation method of the class peak center position is:
[0018] Performing Fourier transform on the two signal series respectively, we can get the phases of their respective fundamental frequency signals as p1 and p2. Then the horizontal and vertical coordinates corresponding to the phases of the two signals are:
[0019]
[0020]
[0021] Realize the sub-pixel output of the prism center coordinates, where M and N are the lengths of the two signal sequences respectively.
[0022] The beneficial effects of the present invention are as follows: the present invention completely converts a two-dimensional image into a one-dimensional signal to solve the problem, calculates the coordinates in a phase manner, and does not use complex calculations such as iteration and fitting. With limited hardware resources, the present invention perfectly realizes prism recognition and center positioning, improves the coordinate output accuracy, and in the special case of image blur, the prism recognition accuracy and center positioning accuracy are not affected and remain high. In addition, the present invention reduces the difficulty of the total station in hardware design and optical design, thereby reducing production costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0024] Figure 1 The single prism target image after denoising and retaining grayscale information of the present invention;
[0025] Figure 2 It is a peak-like curve diagram of the target image of the single prism of the present invention after coordinate projection and energy accumulation in the 0° direction;
[0026] Figure 3 It is a peak-like curve diagram after the single prism target image of the present invention is coordinate projected in the 90° direction and energy accumulated;
[0027] Figure 4 The polygonal prism target image after denoising and retaining grayscale information of the present invention;
[0028] Figure 5 It is a peak-like curve diagram after the multi-prism target image of the present invention is coordinate-projected and energy-accumulated in the 0° direction;
[0029] Figure 6 It is a peak-like curve diagram after the multi-prism target image of the present invention is coordinate-projected and energy-accumulated in the 90° direction;
[0030] Figure 7Schematic diagram of the transformation of the oblique projection of the polygonal prism target image coordinates along the pixel direction of the present invention;
[0031] Figure 8 Schematic diagram of the signal after noise reduction and the original signal according to the method of the present invention;
[0032] Figure 9 This is a schematic diagram of an ideal prism image simulating an X-axis coordinate of 455 and a Y-axis coordinate of 221 according to the present invention;
[0033] Figure 10 This is a schematic diagram of the ideal image of the present invention, which is added with 0.05 salt and pepper noise and then blurred by Gaussian with convolution kernel 3*3 and σ=2 to simulate the real measurement image;
[0034] Figure 11 It is a schematic diagram of the number series corresponding to the X-axis after coordinate projection and energy accumulation of the simulated image of the present invention;
[0035] Figure 12 It is a schematic diagram of the Y-axis sequence corresponding to the simulated image of the present invention after coordinate projection and energy accumulation. DETAILED DESCRIPTION
[0036] Example 1
[0037] like Figure 1-3 As shown, the present invention provides a prism identification method for a servo total station, comprising the following steps:
[0038] S1. Turn on the servo total station laser to search for the prism, obtaining an image of the prism target containing reflected light. Then turn off the servo total station laser to obtain a background image without reflected light at the same location. Subtract the background image without reflected light from the prism target image with reflected light to obtain an image containing the prism target.
[0039] S2. Based on step S1, the maximum inter-class variance method is used to obtain the threshold value, and the image containing the prism target is segmented to remove the background noise and retain the grayscale information of the target signal. Figure 1 The image shown is then transformed into a one-dimensional array from a two-dimensional matrix by accumulating the grayscale energy at the same coordinates. The grayscale energy concentration area in the projection direction is the ROI area, thereby determining the area where the prism target is located.
[0040] The specific method of performing coordinate projection transformation along the angle α direction to determine the area where the prism target is located is as follows:
[0041] The image of size M×N is subjected to two mutually orthogonal coordinate projection transformations, and the grayscale energy values of the same coordinates in each projection direction are accumulated respectively to obtain two signal series of length M and N respectively. The prism target is reflected in the series with highly concentrated energy, which is manifested as peak-like curves with consistent width L and height H in the two series. The starting point to the end point area of the peak-like curve in each series corresponds to the coordinates of the ROI area of the prism target in the two-dimensional image in each projection direction.
[0042] In one embodiment, when performing two mutually orthogonal coordinate projection transformations on an image of size M×N, the directions selected are 0° and 90°, and the peak-like curves obtained are as follows: Figure 2 and Figure 3 shown.
[0043] Example 2
[0044] like Figure 4-7 As shown, based on Example 1, the present invention provides a prism recognition method when multiple prism targets coincide with each other, and the specific steps are as follows:
[0045] The same method as in Example 1 was used to obtain Figure 4 The image of the polygonal prism target after denoising with grayscale information retained is shown.
[0046] like Figure 5 As shown in the figure, when the number of peak-like curves in the current angle coordinate projection direction is inconsistent with the number of peak-like curves in the mutually orthogonal coordinate projection directions, the peak-like curve intervals in the two projection directions are combined with each other to obtain multiple ROI areas to achieve multi-target recognition.
[0047] like Figure 6 As shown, when the width L and / or height H of the peak-like curve in the current angle projection direction is different from the width L and / or height H of the peak-like curve in the mutually orthogonal coordinate projection direction, coordinate oblique projection transformation is performed at any angle and its orthogonal direction, as shown in FIG. Figure 7 As shown, considering the matrix characteristics of the image, a fixed angle is selected according to the pixel point, and the angle is selected as arctan(i) where i = 1...M and arctan(i) + π / 2. The grayscale energy value in the projection direction is calculated respectively to obtain the ROI area and distinguish the overlapping targets.
[0048] The other method steps of this embodiment 2 are the same as those of embodiment 1.
[0049] Example 3
[0050] like Figure 8-12 As shown, based on Example 1 or Example 2, the present invention provides a method for determining the center position of a prism of a servo total station, comprising the following steps: Figure 8As shown, after high-frequency noise is filtered out of the two orthogonal signals, the center position of the class peak corresponding to the one-dimensional signal is calculated, and the center position of the class peak is converted to a two-dimensional matrix coordinate value under angles α and α+π / 2 to obtain the coordinates of the prism center position.
[0051] The calculation method of the class peak center position is:
[0052] Performing Fourier transform on the two signal series respectively, we can get the phases of their respective fundamental frequency signals as p1 and p2. Then the horizontal and vertical coordinates corresponding to the phases of the two signals are:
[0053]
[0054]
[0055] Realize the sub-pixel output of the prism center coordinates, where M and N are the lengths of the two signal sequences respectively.
[0056] like Figure 8 As shown in the figure, denoising is performed by combining Gaussian smoothing of the image before projection and high-frequency noise filtering of the signal after projection, which can greatly reduce the influence of spot noise and peak-like edges on the accuracy of signal center calculation. Existing technologies often use the centroid method, parabola fitting, Gaussian curve fitting, etc. to denoise the signal, but the above methods are easily affected by image exposure and atmospheric jitter, which will cause irregular spots to appear on the edge of the prism spot, seriously affecting the calculation of the final coordinate value.
[0057] In one embodiment, Figure 9 is a schematic diagram of an ideal prism image, Figure 10 In order to simulate the actual measurement of the prism image, the method of the present invention is used. When the original imaging quality is poor, the result is as follows: Figure 11 and Figure 12 As shown, the prism recognition accuracy and center positioning accuracy are not affected and remain high.
[0058] The following table compares the center coordinates obtained by the prism center position determination method of the present invention and the other methods mentioned above:
[0059] Original image Signal centroid method Fitting method Image centroid method The present invention X coordinate 455 454.5855 455.2176 453.7729 455.1967 Y coordinate 221 221.2087 220.9319 221.6537 220.9755
[0060] Coordinate difference table with the original coordinates:
[0061]
[0062] It can be seen from the data in the above table that the prism center position determination method of the present invention is significantly better than the comparison method.
[0063] In the first to third embodiments, the maximum inter-class variance is calculated as follows:
[0064] Calculate the threshold value and divide the pixels in the image into two categories: A (prism target grayscale greater than threshold) and B (background grayscale less than threshold). Count the number of pixels of each grayscale value in the image, and set n i is the number of pixels with grayscale i in the image. Since the threshold value range is i∈[0,255], there are n0, n1, n2...n 255 .
[0065] The probability that the grayscale of a pixel in the image is i is: and
[0066] At this time, a threshold is needed to maximize the variance of categories A and B. Use the threshold to traverse all integers from 0 to 255, and take the threshold corresponding to the maximum value among all the corresponding variances.
[0067] When the threshold is k, the probability of a pixel being classified as A is pA(k), and the average grayscale is mA(k); the probability of a pixel being classified as B is pB(k), and the average grayscale is mB(k). The cumulative mean m of the grayscale value k, the grayscale value m of the entire image G .
[0068] Then we have: p A (k)*m A (k)+p B (k)*m B (k) = m G
[0069] p A (k)+p B (k)=1
[0070] The expression for variance is:
[0071] σ 2 =p A (k)*(m A (k)-m G ) 2 +p B (k)*(m B (k)-m G ) 2
[0072] Then: σ 2 =p A (k)*p B (k)*(m B (k)-m A (k)) 2
[0073] in:
[0074]
[0075]
[0076]
[0077]
[0078]
[0079]
[0080] Obtain:
[0081] Then when σ 2 The maximum grayscale value k is the threshold value.
[0082] Setting all pixels in the image that are smaller than the threshold to zero not only removes background noise but also retains the grayscale energy information of the target signal, rather than simply binarizing it.
[0083] The representation of image projection transformation is:
[0084]
[0085] Assuming that the angle between the projection direction and the projection plane xoy is α, and the angle between the projection direction and the positive direction of ox is β, the projection transformation is:
[0086]
[0087] Its projection matrix is:
[0088]
[0089] When orthogonal projection is performed, α = π / 2, cotα = 0, so the homogeneous matrix is:
[0090]
[0091] Therefore, its orthogonal projection matrix is:
[0092]
[0093] The oblique projection transformation is a projection in which the projection direction is not perpendicular to the projection surface, so α≠π / 2, and its oblique projection matrix is:
[0094]
[0095] Because the image is in the form of a two-dimensional array, the angle α is fixed to tanα=m where (m∈[1,M]).
[0096] After the coordinate projection transformation, the energy value needs to be accumulated according to the projection direction α. Let the image matrix be A, then the energy series after the transformation are:
[0097]
[0098]
[0099] Where i∈[1,M],j∈[1,N].
[0100] The formula for Gaussian blur smoothing in two-dimensional space is:
[0101]
[0102] where r 2 =x 2 +y 2 is the blur radius.
[0103] 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 aforementioned embodiments, those skilled in the art will be able to modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein with equivalents. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included within the scope of protection of the present invention.
Claims
1. A prism identification method for a servo total station, characterized in that: The steps include: S1. Turn on the servo total station laser to search for the prism, obtaining an image of the prism target containing reflected light. Then turn off the servo total station laser to obtain a background image without reflected light at the same location. Subtract the background image without reflected light from the prism target image with reflected light to obtain an image containing the prism target. S2. Based on step S1, the maximum inter-class variance method is used to determine the threshold value. The image containing the prism target is segmented, background noise is filtered out, and the grayscale information of the target signal is retained. Then, a coordinate projection transformation is performed along the direction of angle α. By accumulating the grayscale energy at the same coordinate, the image is transformed from a two-dimensional matrix into a one-dimensional array. The grayscale energy accumulation area in the projection direction is the ROI area, thereby determining the area where the prism target is located. Perform two mutually orthogonal coordinate projection transformations on an M×N image, and accumulate the grayscale energy values of the same coordinates in each projection direction to obtain two signal series of length M and N respectively. The prism target is reflected in the series by a high concentration of energy, which is manifested as a peak-like curve with consistent width L and height H in the two series. The starting and ending areas of the peak-like curves in each series correspond to the coordinates of the ROI area of the prism target in the two-dimensional image in each projection direction; When the number of peak-like curves in the current angle projection direction is inconsistent with the number of peak-like curves in the mutually orthogonal coordinate projection directions, the peak-like curve intervals in the two projection directions are combined to obtain multiple ROI areas to achieve multi-target recognition; When the width L and / or height H of the peak-like curve in the current angle coordinate projection direction is different from the width L and / or height H of the peak-like curve in the mutually orthogonal coordinate projection direction, coordinate oblique projection transformation is performed at any angle and its orthogonal direction, and the grayscale energy value in the projection direction is calculated respectively to obtain the ROI area and distinguish overlapping targets; the arbitrary angle is selected as arctan(i) according to the image pixel point, i=1...M, and its orthogonal direction angle is arctan(i)+π / 2.
2. A method for determining the center position of a prism of a servo total station, based on the prism identification method as claimed in claim 1, characterized in that: The method comprises the following steps: performing Gaussian smoothing on the image before projection, filtering out high-frequency noise on two orthogonal signals after projection and reconstructing the signals, calculating the center position of the class peak corresponding to the one-dimensional signal, and converting the class peak center position to a two-dimensional matrix coordinate value under angles α and α+π / 2 to obtain the coordinates of the prism center position; The calculation method of the class peak center position is: Performing Fourier transform on the two signal series respectively, we can get the phases of their respective fundamental frequency signals as p1 and p2. Then the horizontal and vertical coordinates corresponding to the phases of the two signals are: Among them, M and N are the lengths of the two signal sequences respectively.
Citation Information
Patent Citations
Working method of total station for automatic target recognition
CN105021169B
Image embedded processing system and obtaining and positioning method for low-light image light spots
CN103279921A
Method for positioning lamp beads in display screen image, computing equipment and storage medium
CN112767472A