A method for center localization of tunnel target identification
Patent Information
- Application Number
- CN202411157360.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-21
- Publication Date
- 2026-09-01
- Estimated Expiration
- 2044-10-21
AI Technical Summary
然而,传统的全站仪使用方法存在需要安装反射棱镜、容易出现人为误差以及监测频率不足等问题
[0012]Compared with existing technologies, the advantages of this invention are as follows: This invention provides a vector feature localization algorithm and a statistical feature verification algorithm for the sub-pixel level center coordinates of a specific target, ensuring the uniqueness and reliability of the measurement results. The algorithm of this invention can achieve target detection capability of approximately 5 Hz, greatly improving real-time performance. It features high speed and high precision, while reducing the requirements for system hardware, making the system widely applicable to tunnel deformation monitoring.
Smart Images

Figure CN119131072B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of tunnel monitoring technology, specifically relating to a method for locating the center of a tunnel target identification. Background Technology
[0002] During and after tunnel construction, long-term monitoring of tunnel support deformation and ground settlement is necessary to ensure personnel safety and tunnel structural stability. However, traditional total station methods suffer from drawbacks such as the need for reflective prisms, susceptibility to human error, and insufficient monitoring frequency. Laser measurement technology, on the other hand, is limited by its high equipment cost and also suffers from insufficient monitoring frequency and excessive cost. The development of monocular camera measurement technology has enabled tunnel deformation monitoring to deploy cameras and multiple observation points at extremely low cost, achieving 24 / 7 uninterrupted online observation.
[0003] With the development and widespread application of computer vision technology, monocular camera target detection and measurement technology is playing an increasingly important role in more and more fields, especially in autonomous driving and industrial automation. In recent years, due to its advantages such as low cost, simplicity, compact structure, multi-target detection, and high precision, monocular vision measurement has also gradually begun to be applied in daily deformation monitoring of tunnels. The core of this technology lies in the precise positioning algorithm of the target center. Summary of the Invention
[0004] This invention addresses the problems existing in the prior art by proposing a method for locating the center of a tunnel target identification system. This method can achieve a target detection capability of about 5 Hz, which greatly improves real-time performance and features high speed and high precision. It also reduces the requirements of the measurement system hardware, making the system widely applicable to tunnel deformation monitoring projects.
[0005] To achieve the above objectives, the present invention provides a method for locating the center of a tunnel target identification, comprising the following steps: Step 1) Perform distortion correction and cropping on the single-frame data acquired by the monocular camera; Step 2) Extract edge pixels from the cropped target pattern using the adaptive Canny operator. Based on the edge gradient values, sub-pixel edge points are fitted using the following formula: ; in, and The gradient direction values at the current point are set to {0,1}, and g(A), g(B), and g(C) are the gradient values at points A, B, and C, respectively. Step 3): performing boundary search on the above result by using an 8-neighborhood method, breaking at corner points and inflection points to form new search line segments, and finally completing directional linking of all edge lines; Step 4): eliminating short arcs, straight line arcs and invalid arcs from the generated arcs; Step 5): performing effective arc aggregation on the larger arcs remained after step 4), sorting the arc data by arc length, performing ellipse fitting sequentially from large arcs to small arcs to obtain fitted ellipse data, and extracting effective arcs belonging to the target circle by using a constraint strategy; Step 6): after extracting effective arcs, fitting the target ellipse by a least square method, performing quality evaluation on the fitted ellipse equation, judging whether points are on the ellipse edge, eliminating invalid points and performing iterative ellipse fitting again with the remaining points, wherein the center of the obtained ellipse is the precise center coordinate of the target circle.
[0006] Further, the definitions of corner points and inflection points in step 3) are: Corner point: if the angle difference between the connecting lines of two adjacent points is greater than a given threshold T=90°, it is a corner point; Inflection point: let θ = 5, extract edge points into continuous short arcs with θ as a step, calculate the convex-concave property of each section of arc, and when the convex-concave property changes, the changing position is an inflection point.
[0007] Further, the determination of short arcs, straight line arcs and invalid arcs in step 4) is: The judgment threshold for short arcs is taken as T=25, let L i <T, eliminate the arc segment; Straight line arcs and invalid arcs: define the two end points of the arc as and , then draw a straight line parallel to the line connecting the two end points at the midpoint of the arc, then draw perpendicular lines from the two end points to the straight line, the two perpendicular foot points are respectively and , the four points form a rectangle, the short side is MQ and the long side is MN , define , set a threshold TL=0.05, then when μ< TL, the arc is defined as a straight line arc or an invalid arc, and the arc is eliminated.
[0008] Further, the constraint strategy in step 5) adopts the following four constraint strategies: A. Area constraint if ellipses fitted by two ellipse arcs belong to the same cluster, the ratio of the areas of the two ellipses is eliminate arcs with smaller areas based on large arcs; B. Center point distance constraint If the ellipse fitted by the two elliptical arc segments belongs to the same cluster, then the distance between the centers of the two ellipses is less than 0.1×S, where S is the length of the major axis a of the ellipse. C. Position constraint of circumscribed quadrilateral If the ellipses fitted by two elliptical arc segments belong to the same cluster, then the circumscribed quadrilaterals must intersect. The larger arc segment is used as the base arc, and the smaller arc segments that do not intersect are eliminated. D. Fitting ellipse flattening constraint; During the installation process, the target surface is often not parallel to the imaging surface. As a result, the target circle becomes an ellipse during imaging due to perspective difference. The flattening of this ellipse is proportional to the angle α between the target surface and the parallel plane.
[0009] Furthermore, the criterion for determining whether the midpoint in step 6) lies on the ellipse is: Pick The points are valid points; ; In the above formula ρ The angle between the center line of the ellipse and the X-axis. For the major axis of the ellipse and It is the minor axis of the ellipse; Ratio of valid points to total points If Tp < 0.8, invalid points are removed and the remaining points are used to iterate and fit the ellipse again until Tp > 0.8. The center of the ellipse obtained is the accurate coordinate of the target circle center.
[0010] Furthermore, this method also includes step 7) result verification: take a circular window with a radius of 20 pixels at the center coordinates of the target circle, and use statistical methods to verify the accuracy of the center coordinates. If the above result coordinates are indeed the center of the target, the gray-scale centroid of the black and white triangle region will coincide with the result coordinates, and the distance error is less than the threshold of 1 pixel, thereby verifying the accuracy of the result.
[0011] Furthermore, in step 7), the window circle Mid-gray center of gravity The calculation method is as follows: ; In the formula For the weights, (u,v)∈Window Circle .
[0012] Compared with existing technologies, the advantages of this invention are as follows: This invention provides a vector feature localization algorithm and a statistical feature verification algorithm for the sub-pixel level center coordinates of a specific target, ensuring the uniqueness and reliability of the measurement results. The algorithm of this invention can achieve target detection capability of approximately 5 Hz, greatly improving real-time performance. It features high speed and high precision, while reducing the requirements for system hardware, making the system widely applicable to tunnel deformation monitoring. Attached Figure Description
[0013] Figure 1 The hardware system architecture for tunnel deformation monitoring.
[0014] Figure 2 This is a schematic diagram of an active target.
[0015] Figure 3 This is a diagram illustrating the unique target bounding box obtained by cropping.
[0016] Figure 4 This is a schematic diagram for fitting sub-pixel edge points.
[0017] Figure 5 This is a schematic diagram of corner points and inflection points.
[0018] Figure 6 This is a rectangular diagram.
[0019] Figure 7 This is a schematic diagram illustrating the calculation of the flattening of the imaging ellipse.
[0020] Figure 8 This is a schematic diagram of a circular window.
[0021] Figure 9 This is a schematic diagram of the center coordinates for actual continuous measurement. Detailed Implementation
[0022] The embodiments of the present invention will be described in detail below with reference to the accompanying drawings and examples, so as to fully understand how the present invention uses technical means to solve technical problems and achieve technical effects and to implement it accordingly.
[0023] Before introducing the method of this invention, a brief description of the supporting hardware equipment and connections is given first. The equipment and supporting system software developed according to this invention are applied to tunnel deformation monitoring, and the system architecture is as follows: Figure 1As shown, the system includes a monocular monitoring camera, an active target, a cloud IoT platform, and a software system embedding the algorithm of this invention. The monocular camera and target are installed inside the tunnel as needed and connected to mains power. The monocular camera periodically acquires images of the target at a set frequency and transmits the acquired image data to the IoT cloud via a 5G wireless network through a built-in Linux host. Once the data arrives at the IoT cloud, it immediately notifies the remote computer software system for data processing, obtaining real-time monitoring information on the target's location. The monocular camera used is a Hikvision MV-CU120-10UM 1200W monochrome camera.
[0024] The active target used in the system of this invention is as follows: Figure 2 As shown, the light source board has a circular carbon plate and a barcode plate. The central area of the circular carbon plate has a detection zone, which includes one or more hollow areas. The barcode plate is made of carbon plate and is located below the circular carbon plate. A patent has been applied for for this active target.
[0025] First, the monocular camera needs to be calibrated before measurement, using the Zhang Zhengyou calibration method. This is used to correct camera distortion and obtain the camera's intrinsic and extrinsic parameters to improve the precision of image processing and the accuracy of pose calculation.
[0026] Secondly, target image data is collected and uploaded to the IoT cloud via a 5G network. A remote computer receives the uploaded image data and performs real-time calculations. Before this, the initial site setup requires configuration and initialization of the target area location. The YOLOv7 neural network is used for initial target detection. The YOLOv7 model has been pre-trained and can accurately identify targets with light sources in low-light environments.
[0027] Then, the center of the identified target is precisely located within the bounding box. Since there is only one target pattern within the bounding box, the target image is less affected by background interference, which greatly improves the recognition accuracy. The specific process of this invention is described below. A method for centering a tunnel target is performed according to the following steps: Step 1) Perform distortion correction and cropping on the single-frame data acquired by the monocular camera. For example... Figure 3 The image shown is a single-frame dataset acquired by a monocular camera. Distortion correction and cropping are performed, with a cropping window of 640×640 pixels and a displacement step size equal to the minimum target size (100 pixels). The acquired image size is 4024×3036 pixels. The cropped dataset contains approximately 811 images. Each image is then used for identification, and finally, the resulting bounding boxes are normalized to obtain unique target localization boxes.
[0028] Step 2) Extract edge pixels from the cropped target pattern using the adaptive Canny operator. ,like Figure 4As shown in the figure, sub-pixel edge points are fitted based on the edge gradient value, and the formula is:
[0029] Wherein, and are gradient direction values of the current point, which take values {0,1}, and g(A), g(B), g(C) are the gradient values at points A, B and C, respectively.
[0030] Step 3) For the above result, perform boundary search using the 8-neighborhood method, break at corner points and inflection points to form new search line segments, and finally complete the directional linking of all edge lines; the corner points and inflection points are as Figure 5 shown, defined as follows: Corner point: If the angle difference between the connecting lines of two adjacent points is greater than a given threshold T=90°, it is a corner point; Inflection point: Let θ = 5, extract edge points into continuous short arcs with θ as the step, calculate the convex-concave property of each arc segment, and when the convex-concave property changes, the changing position is the inflection point.
[0031] Step 4) Eliminate short arc segments, straight arc segments and invalid arc segments from the generated arcs; The judgment threshold for short arc segments is T=25, so arc segments where L i < T are eliminated; Straight arc segments and invalid arc segments: Define the two end points of the arc segment as and , then draw a straight line parallel to the line connecting the two end points at the midpoint of the arc segment, then draw perpendicular lines from the two end points to this straight line, and the two vertical feet are and , the four points form a rectangle as shown in Figure 6 , the short side is MQ and the long side is MN , define , set the threshold TL=0.05, then when μ< TL, the arc is defined as a straight arc segment or invalid arc segment, and the arc segment is eliminated.
[0032] Step 5) Since the main pattern of the target pattern is a target circle and there is a small amount of background texture noise, the larger arc segments remaining after step 4) must be the boundaries of the target circle. Therefore, the arc segment data is sorted by arc length, and ellipses are fitted in descending order to obtain fitted ellipse data. The following constraint strategy is used to extract effective arc segments belonging to the target circle; A. Area constraint If the ellipses fitted by two elliptical arc segments belong to the same cluster, the ratio of the areas of the two ellipses is based on the large arc segment, arc segments with smaller areas are eliminated; B. Center point distance constraint If the ellipse fitted by the two elliptical arc segments belongs to the same cluster, then the distance between the centers of the two ellipses is less than 0.1×S, where S is the length of the major axis a of the ellipse. C. Position constraint of circumscribed quadrilateral If the ellipses fitted by two elliptical arc segments belong to the same cluster, then the circumscribed quadrilaterals must intersect. The larger arc segment is used as the base arc, and the smaller arc segments that do not intersect are eliminated. D. Fitting ellipse flattening constraint; During the installation process, the target surface is often not parallel to the imaging surface. As a result, the target circle becomes an ellipse during imaging due to perspective difference. The flattening of this ellipse is proportional to the angle α between the target surface and the parallel plane.
[0033] like Figure 7 As shown, in practical use, the target is always installed facing the camera, and the deflection angle is always within a certain range. Assuming α < 45°, the flattening of the imaging ellipse is:
[0034] In the formula, L is the imaging object distance and R is the radius of the target circle. The larger the flattening e, the larger the flattening e. When α < 45°, e < 0.3. Considering the fitting error, a threshold can be set. Te = 0.35, for The fitted elliptical arc segments are discarded.
[0035] Step 6) After extracting the effective arc segments, the target ellipse is fitted using the least squares method. The quality of the fitted ellipse equation is evaluated to determine whether the points are on the edge of the ellipse. After removing invalid points, the remaining points are used to iterate and fit the ellipse again. The center of the ellipse obtained is the accurate coordinate of the center of the target circle.
[0036] The judgment criteria are: Pick The points are valid points;
[0037] In the above formula ρ The angle between the center line of the ellipse and the X-axis. For the major axis of the ellipse and It is the minor axis of the ellipse; Ratio of valid points to total points If Tp < 0.8, invalid points are removed and the remaining points are used to iterate and fit the ellipse again until Tp > 0.8. The center of the ellipse obtained is the accurate coordinate of the target circle center.
[0038] Step 7) Result Verification: (e.g.) Figure 8As shown, a circular window with a radius of 20 pixels is taken at the center coordinates of the target circle. The accuracy of the center coordinates is verified by statistical methods. If the above result coordinates are indeed the center of the target, the gray-scale centroid of the black and white triangle region will coincide with the result coordinates, and the distance error is less than the threshold of 1 pixel. This verifies the accuracy of the result.
[0039] The gray-level centroid can be viewed as a weighted centroid method with the square of the gray level as the weight. Using the gray-level centroid method to extract the center of the image patch achieves higher positioning accuracy. This method does not require image binarization, avoiding the introduction of integer errors. The gray-level centroid S(x0,y0) in f(u,v) is calculated as follows: Window circle Mid-gray center of gravity The calculation method is as follows:
[0040] In the formula For the weights, (u,v)∈Window Circle .
[0041] The center coordinate displacement data continuously obtained by the method of this invention are as follows: Figure 9 As shown in the figure, the center positioning error of this method is better than 0.1mm in target monitoring at a distance of 10m.
[0042] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for locating the center of a tunnel target identification, characterized in that: Follow these steps: Step 1) Perform distortion correction and cropping on the single-frame data acquired by the monocular camera; Step 2) Extract edge pixels from the cropped target pattern using the adaptive Canny operator. Based on the edge gradient values, sub-pixel edge points are fitted using the following formula: ; in, and The gradient direction values at the current point are set to {0,1}, and g(A), g(B), and g(C) are the gradient values at points A, B, and C, respectively. Step 3) Based on the above results, use the 8-neighborhood method to perform boundary search, and break at corners and inflection points to form new search line segments, finally completing the directed connection of all edge lines; The definitions of corner points and inflection points are: Corner point: If the angle difference between the lines connecting two adjacent points is greater than a given threshold T=90°, Then it is a corner point; Inflection point: Let θ = 5, extract the edge points into continuous short arc segments with θ as the step size, calculate the concavity and convexity of each arc segment, and the point where the concavity and convexity change is the inflection point. Step 4) Remove short arc segments, straight arc segments, and invalid arc segments from the generated arc segments; the definitions of short arc segments, straight arc segments, and invalid arc segments are: The short arc segment judgment threshold is set as T=25, and L i arc segments with <T are eliminated; Straight-line arc segments, invalid arc segments: Define the two endpoints of the arc segment as and Then, draw a straight line parallel to the two endpoints from the midpoint of the arc. Next, draw perpendicular lines from the two endpoints to this line, with the two perpendicular points being... and A rectangle formed by four points, with the shorter side being MQ and the longer side being MN, is defined as follows: If the threshold TL=0.05 is set, then when μ<TL, it is defined as a straight arc segment or an invalid arc segment, and the arc segment is discarded. Step 5) Aggregate the larger arc segments remaining after Step 4) into effective arc segments, sort the arc segment data by arc length, fit ellipses from largest to smallest, obtain the fitted ellipse data, and use constraint strategies to extract the effective arc segments belonging to the target circle. Step 6) After extracting the effective arc segments, the target ellipse is fitted using the least squares method. The quality of the fitted ellipse equation is evaluated to determine whether the points are on the edge of the ellipse. After removing invalid points, the remaining points are used to iterate and fit the ellipse again. The center of the ellipse obtained is the accurate coordinate of the center of the target circle.
2. The method for locating the center of a tunnel target identification according to claim 1, characterized in that: The constraint strategy in step 5) adopts the following four constraint strategies: A. Area Constraint If the ellipses fitted by the two elliptical arc segments belong to the same cluster, then the ratio of the areas of the two ellipses is... Based on the large arc segment as the base arc, smaller arc segments are eliminated; B. Center point distance constraint If the ellipse fitted by the two elliptical arc segments belongs to the same cluster, then the distance between the centers of the two ellipses is less than 0.1×S, where S is the length of the major axis a of the ellipse. C. Position constraint of circumscribed quadrilateral If the ellipses fitted by two elliptical arc segments belong to the same cluster, then the circumscribed quadrilaterals must intersect. The larger arc segment is used as the base arc, and the smaller arc segments that do not intersect are eliminated. D. Fitting ellipse flattening constraint; During the installation process, the target surface is often not parallel to the imaging surface. As a result, the target circle becomes an ellipse during imaging due to perspective difference. The flattening of this ellipse is proportional to the angle α between the target surface and the parallel plane.
3. The method for locating the center of a tunnel target identification according to claim 2, characterized in that: The criterion for determining whether the midpoint in step 6) lies on the ellipse is: Pick The points are valid points; ; In the above formula ρ The angle between the center line of the ellipse and the X-axis. For the major axis of the ellipse and It is the minor axis of the ellipse; Ratio of valid points to total points If Tp < 0.8, invalid points are removed and the remaining points are used to iterate and fit the ellipse again until Tp > 0.
8. The center of the ellipse obtained is the accurate coordinate of the target circle center.
4. The method for locating the center of a tunnel target identification according to claim 3, characterized in that: It also includes step 7) Result verification: Take a circular window with a radius of 20 pixels at the center coordinates of the target circle, and use statistical methods to verify the accuracy of the center coordinates. If the above result coordinates are indeed the center of the target, the gray-scale centroid of the black and white triangle region will coincide with the result coordinates, and the distance error is less than the threshold of 1 pixel, thereby verifying the accuracy of the result.
5. The method for locating the center of a tunnel target identification according to claim 4, characterized in that: Step 7) Window circle Mid-gray center of gravity The calculation method is as follows: ; In the formula For the weights, (u,v)∈Window Circle .
Citation Information
Patent Citations
Pose calculation method based on combination target, system, medium and equipment
CN108765489A
Easily-expandable high-precision target center coordinate extraction method
CN115713540A