A method for monitoring the displacement of mountain pond dams based on image recognition

By setting targets on the mountain pond and using image recognition algorithms, and using existing video surveillance cameras for monitoring, the problem of lack of efficient monitoring of mountain pond displacement is solved, low-cost, uninterrupted displacement monitoring is achieved, and it is suitable for many applications. A mountain pond.

CN112508982BActive Publication Date: 2024-10-18CHONGQING RUER IOT TECHNOLOGY CO LTD

Patent Information

Application Number
CN202011409045.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-04
Publication Date
2024-10-18
Estimated Expiration
2040-12-04

AI Technical Summary

Technical Problem

The lack of technology for efficiently monitoring the displacement of mountain ponds has resulted in the lack of observation facilities in many mountain ponds, making it difficult for managers to effectively grasp the safe operation status, and conventional monitoring methods require professionals and high costs.

Method used

A mountain pond and dam displacement monitoring method based on image recognition is adopted. Targets are placed on the mountain pond, images are collected using cameras, and the coordinates of the target center are calculated using algorithms to generate time-phase curves to represent the displacement data of the dam. The existing Video surveillance cameras perform contactless measurements.

Benefits of technology

It realizes low-cost, uninterrupted monitoring of mountain pond and dam displacement, can utilize existing video surveillance equipment, reduces deployment costs, and is suitable for a large number of mountain ponds.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112508982B_ABST
    Figure CN112508982B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of geological monitoring technology, and specifically to a method for monitoring the displacement of a mountain pond dam based on image recognition, comprising the following steps: A) laying out targets on the mountain pond dam, establishing initial geodetic coordinates, measuring and recording target coordinates; B) installing a camera near the mountain pond dam, and adjusting the camera angle of view so that it can capture the target; C) acquiring images, and calculating image coordinates based on target coordinates; D) periodically acquiring images, identifying and calculating the coordinates of the target center; E) generating a time-position curve of the target center, and using the time-position curve of the target center as the displacement curve of the mountain pond dam. The substantial effect of the present invention is: utilizing the existing video surveillance cameras of most mountain ponds, integrating a visual perception non-contact measurement algorithm based on image recognition, analyzing and calculating the images collected by the video surveillance cameras, obtaining the overall displacement monitoring data of the mountain pond dam, and obtaining uninterrupted displacement monitoring of the mountain pond dam, and the deployment cost is low.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of geological monitoring, and in particular to a method for monitoring the displacement of a mountain pond dam based on image recognition. Background Art

[0002] Shantang generally refers to a water storage project with a total volume of less than 100,000 cubic meters. Most of my country's Shantangs were built between the 1950s and 1980s, and earth and stone materials were mainly used as dam materials. Limited by the conditions at the time, the construction standards were generally low, the construction quality was poor, and most of them were "three-side" projects or even "three-no" projects. After years of operation, the project facilities are aging and seriously damaged. Due to years of disrepair and mismanagement, most of the Shantangs are currently operating with problems, various dangers and problems are constantly exposed, and the safety situation is not optimistic. Shantangs are managed according to the principle of hierarchical management, and their operation and management authority belongs to towns (townships) and villages. Most of the town (township) and village-level managers lack professional and technical personnel and the necessary management and maintenance knowledge, resulting in many Shantangs being in a self-operating state. Therefore, there are many problems in the operation and management of reservoirs. According to the "Safety Monitoring Design Specifications for Water Conservancy and Hydropower Projects" SL725-2016, the safety monitoring system design of water conservancy and hydropower projects level 1 to 5 water retaining buildings and other level 1 to 3 hydraulic structures can be referred to.

[0003] For mountain ponds, the specification does not have clear requirements. Therefore, many mountain ponds, including small reservoirs, are currently without observation facilities, making it difficult for managers and higher-level administrative departments to effectively grasp the safe operation status of mountain ponds. For the displacement monitoring of hydraulic structures such as large and medium-sized reservoirs, leveling and sight lines or triangulation can be used for observation. Generally, level instruments, theodolites or total stations are used for measurement. Automated observation methods can also be used, including lead-wire horizontal displacement monitoring systems, laser alignment observation systems and GPS displacement observation systems. The above-mentioned conventional manual monitoring methods require regular implementation by professionals. For a large number of mountain ponds, the number of professionals may not meet the requirements, and the cost is correspondingly high. The automated monitoring method uses GPS and other equipment to monitor the displacement of the object, which has a higher accuracy and a correspondingly high cost. Summary of the invention

[0004] The technical problem to be solved by the present invention is that there is currently a lack of efficient equipment for monitoring the displacement of mountain ponds. A method for monitoring the displacement of mountain pond dams based on image recognition is proposed. The method uses simple equipment combined with an algorithm to quickly obtain the displacement data of mountain pond dams.

[0005] In order to solve the above technical problems, the technical solution adopted by the present invention is: a method for monitoring the displacement of a mountain pond dam based on image recognition, comprising the following steps: A) placing targets on the mountain pond dam, establishing initial geodetic coordinates, measuring and recording the target coordinates; B) installing a camera near the mountain pond, adjusting the camera angle so that it can capture the target; C) acquiring images, and calculating the image coordinates based on the target coordinates; D) periodically acquiring images, identifying and calculating the coordinates of the target center; E) generating a time-position curve of the target center, and using the time-position curve of the target center as the displacement curve of the mountain pond dam.

[0006] Preferably, the target has a two-dimensional code in black and white. In step D), the two-dimensional code in the periodically collected image is identified as a mark of the pond.

[0007] Preferably, in step D), the method for identifying a two-dimensional code includes: D11) image segmentation: transforming the image perspective to obtain a front view, and using an adaptive threshold method to binarize the image; D12) contour extraction and filtering: extracting the contour of the binarized image, extracting a rectangular contour through polygonal approximation, and removing non-quadrilateral contours; D13) target code extraction: identifying each contour, and assigning a value of 0 or 1 to each contour according to the color within the contour; D14) target identification: rotating the image 90° three times in a row to obtain targets in four directions, and connecting all data bits of the target in sequence into a binary integer. If any of the targets in the four directions matches the code of the preset target, it is considered that the target is found, and the matching code is used as the code of the current two-dimensional code.

[0008] Preferably, in step C), the method for calculating the image coordinates based on the target coordinates includes: C1) detecting the four vertices and the center point of the target in the image, establishing a target coordinate system with the center point as the origin, and obtaining the coordinate values ​​of the four vertices of the target in the target coordinate system; C2) using the four vertices of the target as feature points, constructing a PnP problem in combination with the image, and obtaining the coordinates of the camera by solving the PnP problem.

[0009] Preferably, in step C2), the method of constructing a PnP problem and solving the PnP includes: C21) the image coordinate system is denoted as c, the target coordinate system is denoted as m, and the homogeneous transformation between the two is expressed as:

[0010]

[0011] Represents the homogeneous transformation matrix; C22) Establish a reference coordinate system: Take three known coordinate points P on the target plane i,i∈[1,3] , P i The position in the target coordinate system is P i (x mi ,y mi,z mi ), click P i The coordinates in the image coordinate system are (u i ,v i ), the image coordinate u1 of P1 is the smallest, and it is taken as the origin O of the reference coordinate system r , P2 has the largest u2, and the origin O r The line to P2 is X r Axis, P3 in X r The projection point on the axis is P3′, Y r The axis direction is from P3′ to P3, Z r The axis direction satisfies the right-hand rule, and the reference coordinate system is established;

[0012] C23) According to the method for establishing the reference coordinate system in step C22), according to a point P in the target i The position in the target coordinate system (x mi ,y mi ,z mi ), the position and orientation of the reference coordinate system in the target coordinate system can be obtained and P i The position P in the reference coordinate system ri =(x ri ,y ri ,0), take 4 known coordinate points P on the target plane i,i∈[1,4] , by P i The image coordinates (u i ,v i ), according to the pinhole camera model, point P i Normalize the focal length of the coordinates in the camera system and get

[0013]

[0014] P ri Substituting the coordinates of into formula (1) we get:

[0015]

[0016] From formula (2), we get:

[0017]

[0018] Substituting equation (3) into equation (2), we get

[0019]

[0020] When the number of known points is n, all equations of formula (5) are expanded into 2n equations, and these equations are rewritten into matrix form

[0021] A1H1+A2H2=0#(6)

[0022] Where:

[0023]

[0024]

[0025]

[0026]

[0027] Among them: A1 is a 2n×3 matrix, A2 is a 2n×6 matrix, and obviously, H1 is the vector therefore

[0028]

[0029] Formula (6) is used as the constraint condition for solving formula (6); C24) constructs the objective function shown in formula (8), thereby transforming formula (6) into an optimization problem, that is, keeping the objective function F minimum under any λ condition,

[0030] F=‖A1H1+A2H2‖ 2 +λ(1-‖H1‖ 2 )#(8)

[0031] The solutions of H1 and H2 are given by equations (9) and (10), where H1 is the eigenvector corresponding to the minimum eigenvalue of matrix B,

[0032]

[0033] in:

[0034]

[0035] Using the optimal solution of H1 and H2, we can get the pose transformation of the camera relative to the reference system. The first two columns of and C25) The position transformation of the camera relative to the target coordinate system Calculated by the following formula:

[0036]

[0037] Where: is the pose of the target coordinate system in the reference system, which is obtained by the pose matrix of the reference system in the target coordinate system get, C26) For the four known coordinate points P on the target plane i,i∈[1,4], A1 is an 8×3 matrix, A2 is an 8×6 matrix, there are 8 unknowns in formula (6), there are 8 equations, H1 and H2 can be solved, so far, the rotation matrix between the image coordinate system and the target coordinate system is obtained and translation matrix

[0038] Preferably, in step D), the method for identifying and calculating the coordinates of the target center includes: D21) The relationship between the image coordinate system and the target coordinate system is shown in equation (1), then the homogeneous transformation from the world coordinate system to the target coordinate system is:

[0039]

[0040] in,

[0041] is the coordinate of point P in the world coordinate system,

[0042] is the coordinate of point P in the marker coordinate system,

[0043] When the target point is set to the geometric center of the target,

[0044] D22) Let the origin of the world coordinate system coincide with the origin of the image coordinate system, then The homogeneous coordinates of the geometric center of the target in the world coordinate system are

[0045]

[0046] The image coordinate system is defined as follows, Z c Starting from the optical center of the camera, along the optical axis pointing to the front of the camera, X c Perpendicular to the optical axis and pointing to the left of the camera, Y c Perpendicular to the optical axis and pointing downward from the camera;

[0047] D23) Establish a world coordinate system. The origin of the world coordinate system coincides with the origin of the image coordinate system. The xOy plane of the world coordinate system is parallel to the horizontal plane. The x-axis points to the front of the camera, the y-axis points to the left of the camera, and the z-axis points vertically upward.

[0048]

[0049] in, The rotation matrix caused by the camera installation angle is obtained by the transformation function from Euler angle to rotation matrix. The Euler angle is converted into a homogeneous transformation matrix. The RPY sequence corresponds to the carrier coordinate system yxz, so

[0050]

[0051] is the translation transformation,

[0052]

[0053] is a translation transformation, then

[0054] therefore,

[0055]

[0056]

[0057]

[0058] In formula (19), The inclinometer measures the camera. Known, The coordinates of the target geometric center in the world coordinate system are obtained by step C26).

[0059] Preferably, in step E), the periodically obtained coordinates of the target center are filtered and used to generate a time-position curve of the target center.

[0060] Preferably, in step E), the method of filtering the periodically obtained coordinates of the target center comprises:

[0061] E1) Construct the equation of state:

[0062] X(k+1)=AX(k)+GW(k)

[0063] Z(k+1)=HX(k+1)+V(k+1)

[0064] Wherein, k is the time of the image acquisition in the periodic image acquisition in step D), X(k) is the system state at time k, A is the state transfer matrix, Z(k) is the observation value of the corresponding state at time k, that is, the coordinate value of the target center obtained by calculating the image acquisition at time k, H is the observation matrix, G is the noise driving matrix, W(k) is the white noise, and V(k) is the observation noise;

[0065] E2) Construct the state one-step prediction equation:

[0066]

[0067] E3) Construct the one-step prediction covariance matrix:

[0068] P(k+1|k)=AP(k|k)A T +GQG T

[0069] E4) Status Update:

[0070]

[0071] E5) Construct the filter gain matrix:

[0072]

[0073] E6) Covariance matrix update:

[0074] P(k+1|k+1)=[I n -K(k+1)H]P(k+1|k)

[0075] E7) Consider the coordinate change of the target center as linear motion and construct the kinematic equation of linear motion:

[0076]

[0077] Among them, ΔT is the cycle interval length,

[0078] E8) The state vector of the system is obtained as:

[0079]

[0080] Observations

[0081] Z(k)=[x(k)]

[0082] State transition matrix

[0083]

[0084] Observation Matrix

[0085] H = [1 0]

[0086] Substitute the state equation constructed in step E1) into the filter to complete the filtering.

[0087] The substantial effect of the present invention is that it can utilize the existing video surveillance cameras of most mountain ponds, integrate a visual perception non-contact measurement algorithm based on image recognition, analyze and calculate the images collected by the video surveillance cameras, obtain the overall displacement monitoring data of the mountain pond embankment, obtain uninterrupted displacement monitoring of the mountain pond embankment, and have a low deployment cost. BRIEF DESCRIPTION OF THE DRAWINGS

[0088] Figure 1 This is a schematic diagram of the target installation position in Example 1.

[0089] Figure 2 Schematic diagram of target in Example 1

[0090] Figure 3This is a schematic diagram of the QR code recognition result of Example 1.

[0091] Among them: 1. Target, 2. Mountain pond dam, 3. Mountain pond. DETAILED DESCRIPTION

[0092] The specific implementation of the present invention will be further described below through specific examples in conjunction with the accompanying drawings.

[0093] Embodiment 1:

[0094] A method for monitoring the displacement of a mountain pond dam based on image recognition comprises the following steps: A) Figure 1 As shown in the figure, a target 1 is placed on the mountain pond dam 2, the initial geodetic coordinates are established, and the target coordinates are measured and recorded; B) a camera is installed near the mountain pond 3, and the camera angle of view is adjusted so that it can capture the target 1; C) an image is acquired, and the image coordinates are calculated based on the coordinates of the target 1; D) images are acquired periodically, and the coordinates of the center of the target 1 are identified and calculated; E) a time-position curve of the center of the target 1 is generated, and the time-position curve of the center of the target 1 is used as the displacement curve of the mountain pond dam 2.

[0095] like Figure 2 As shown, the target 1 has a two-dimensional code in black and white. In step D), the two-dimensional code in the periodically collected image is identified as a mark of the pond.

[0096] In step D), the method for identifying a two-dimensional code includes: D11) image segmentation: transforming the image perspective to obtain a front view, and using an adaptive threshold method to binarize the image; D12) contour extraction and filtering: extracting the contour of the binarized image, extracting a rectangular contour through polygon approximation, and removing non-quadrilateral contours; D13) target code extraction: identifying each contour, and assigning a value of 0 or 1 to each contour according to the color within the contour; D14) target identification: rotating the image 90° three times in a row to obtain targets in four directions, and connecting all data bits of the target in sequence into a binary integer. If any of the targets in the four directions matches the code of the preset target, it is considered that the target is found, and the matching code is used as the code of the current two-dimensional code, such as Figure 3 shown.

[0097] In step C), the method for calculating the image coordinates based on the target coordinates includes: C1) detecting the four vertices and the center point of the target in the image, establishing a target coordinate system with the center point as the origin, and obtaining the coordinate values ​​of the four vertices of the target in the target coordinate system; C2) using the four vertices of the target as feature points, combining the image to construct a PnP problem, and obtaining the coordinates of the camera by solving the PnP problem.

[0098] In step C2), the method of constructing the PnP problem and solving the PnP includes: C21) the image coordinate system is denoted as c, the target coordinate system is denoted as m, and the homogeneous transformation between the two is expressed as:

[0099]

[0100] Represents the homogeneous transformation matrix; C22) Establish a reference coordinate system: Take three known coordinate points P on the target plane i,i∈[1,3] , P i The position in the target coordinate system is P i (x mi ,y mi ,z mi ), click P i The coordinates in the image coordinate system are (u i ,v i ), the image coordinate u1 of P1 is the smallest, and it is taken as the origin O of the reference coordinate system r , P2 has the largest u2, and the origin O r The line to P2 is X r Axis, P3 in X r The projection point on the axis is P3′, Y r The axis direction is from P3′ to P3, Z r The axis direction satisfies the right-hand rule, and the reference coordinate system is established; C23) according to the method for establishing the reference coordinate system in step C22), according to a point P in the target i The position in the target coordinate system (x mi ,y mi ,z mi ), the position and orientation of the reference coordinate system in the target coordinate system can be obtained and P i The position P in the reference coordinate system ri =(x ri ,y ri ,0), take 4 known coordinate points P on the target plane i,i∈[1,4] , by P i The image coordinates (u i ,v i ), according to the pinhole camera model, point P i Normalize the focal length of the coordinates in the camera system and get

[0101]

[0102] P ri Substituting the coordinates of into formula (1) we get:

[0103]

[0104] From formula (2), we get:

[0105]

[0106] Substituting equation (3) into equation (2), we get

[0107]

[0108] When the number of known points is n, all equations of formula (5) are expanded into 2n equations, and these equations are rewritten into matrix form

[0109] A1H1+A2H2=0#(6)

[0110] Where:

[0111]

[0112]

[0113]

[0114]

[0115] Among them: A1 is a 2n×3 matrix, A2 is a 2n×6 matrix, and obviously, H1 is the vector therefore

[0116]

[0117] Formula (6) is used as the constraint condition for solving formula (6); C24) constructs the objective function shown in formula (8), thereby transforming formula (6) into an optimization problem, that is, keeping the objective function F minimum under any λ condition,

[0118] F=‖A1H1+A2H2‖ 2 +λ(1-‖H1‖ 2 )#(8)

[0119] The solutions of H1 and H2 are given by equations (9) and (10), where H1 is the eigenvector corresponding to the minimum eigenvalue of matrix B,

[0120]

[0121] in:

[0122]

[0123] Using the optimal solution of H1 and H2, we can get the pose transformation of the camera relative to the reference system. The first two columns of and C25) The position transformation of the camera relative to the target coordinate system Calculated by the following formula:

[0124]

[0125] Where: is the pose of the target coordinate system in the reference system, which is obtained by the pose matrix of the reference system in the target coordinate system get, C26) For the four known coordinate points P on the target plane i,i∈[1,4] , A1 is an 8×3 matrix, A2 is an 8×6 matrix, there are 8 unknowns in formula (6), there are 8 equations, H1 and H2 can be solved, so far, the rotation matrix between the image coordinate system and the target coordinate system is obtained and translation matrix

[0126] In step D), the method for identifying and calculating the coordinates of the target center includes: D21) The relationship between the image coordinate system and the target coordinate system is shown in equation (1), then the homogeneous transformation from the world coordinate system to the target coordinate system is:

[0127]

[0128] in,

[0129] is the coordinate of point P in the world coordinate system,

[0130] is the coordinate of point P in the marker coordinate system,

[0131] When the target point is set to the geometric center of the target,

[0132] D22) Let the origin of the world coordinate system coincide with the origin of the image coordinate system, then The homogeneous coordinates of the geometric center of the target in the world coordinate system are

[0133]

[0134] The image coordinate system is defined as follows, Z c Starting from the optical center of the camera, along the optical axis pointing to the front of the camera, X c Perpendicular to the optical axis and pointing to the left of the camera, Y c Perpendicular to the optical axis and pointing downward from the camera;

[0135] D23) Establish a world coordinate system. The origin of the world coordinate system coincides with the origin of the image coordinate system. The xOy plane of the world coordinate system is parallel to the horizontal plane. The x-axis points to the front of the camera, the y-axis points to the left of the camera, and the z-axis points vertically upward.

[0136]

[0137] in, The rotation matrix caused by the camera installation angle is obtained by the transformation function from Euler angle to rotation matrix. The Euler angle is converted into a homogeneous transformation matrix. The RPY sequence corresponds to the carrier coordinate system yxz, so

[0138]

[0139] is the translation transformation,

[0140]

[0141] is a translation transformation, then

[0142] therefore,

[0143]

[0144]

[0145]

[0146] In formula (19), The inclinometer measures the camera. Known, The coordinates of the target geometric center in the world coordinate system are obtained by step C26).

[0147] In step E), the coordinates of the target center obtained periodically are filtered and used to generate a time-position curve of the target center.

[0148] In step E), the method of filtering the periodically obtained coordinates of the target center includes:

[0149] E1) Construct the equation of state:

[0150] X(k+1)=AX(k)+GW(k)

[0151] Z(k+1)=HX(k+1)+V(k+1)

[0152] Wherein, k is the time of the image acquisition in the periodic image acquisition in step D), X(k) is the system state at time k, A is the state transfer matrix, Z(k) is the observation value of the corresponding state at time k, that is, the coordinate value of the target center obtained by calculating the image acquisition at time k, H is the observation matrix, G is the noise driving matrix, W(k) is the white noise, and V(k) is the observation noise;

[0153] E2) Construct the state one-step prediction equation:

[0154]

[0155] E3) Construct the one-step prediction covariance matrix:

[0156] P(k+1|k)=AP(k|k)A T +GQG T

[0157] E4) Status Update:

[0158]

[0159] E5) Construct the filter gain matrix:

[0160]

[0161] E6) Covariance matrix update:

[0162] P(k+1|k+1)=[I n -K(k+1)H]P(k+1|k)

[0163] E7) Consider the coordinate change of the target center as linear motion and construct the kinematic equation of linear motion:

[0164]

[0165] Among them, ΔT is the cycle interval length,

[0166] E8) The state vector of the system is obtained as:

[0167]

[0168] Observations

[0169] Z(k)=[x(k)]

[0170] State transition matrix

[0171]

[0172] Observation Matrix

[0173] H = [1 0]

[0174] Substitute the state equation constructed in step E1) into the filter to complete the filtering.

[0175] The substantial effect of the present invention is that it can utilize the existing video surveillance cameras of most mountain ponds, integrate a visual perception non-contact measurement algorithm based on image recognition, analyze and calculate the images collected by the video surveillance cameras, obtain the overall displacement monitoring data of the mountain pond embankment, obtain uninterrupted displacement monitoring of the mountain pond embankment, and have a low deployment cost.

[0176] The above-described embodiment is only a preferred solution of the present invention and does not limit the present invention in any form. There are other variations and modifications without exceeding the technical solution described in the claims.

Claims

1. A method for monitoring the displacement of a mountain pond dam based on image recognition, characterized in that: The following steps are involved: A) Lay out targets on the mountain pond dam, establish initial geodetic coordinates, measure and record target coordinates; B) Install a camera near the mountain pond dam and adjust the camera angle so that it can capture the target; C) acquiring an image and calculating the image coordinates according to the target coordinates; the method for calculating the image coordinates according to the target coordinates includes: C1) detecting four vertices and a center point of the target in the image, establishing a target coordinate system with the center point as the origin, and obtaining coordinate values ​​of the four vertices of the target in the target coordinate system; C2) Taking the four vertices of the target as feature points, construct the PnP problem in combination with the image, and obtain the coordinates of the camera by solving the PnP problem; D) Periodically collect images, identify and calculate the coordinates of the target center; E) Generate the time-position curve of the target center and use the time-position curve of the target center as the displacement curve of the mountain pond dam.

2. The method for monitoring the displacement of a mountain pond dam based on image recognition according to claim 1, characterized in that: The target has a two-dimensional code in black and white. In step D), the two-dimensional code in the periodically collected image is identified as a mark of the pond.

3. The method for monitoring the displacement of a mountain pond dam based on image recognition according to claim 2 is characterized in that: In step D), the method for identifying the QR code includes: D11) Image segmentation: transform the image perspective to obtain the front view, and use the adaptive threshold method to binarize the image; D12) Contour extraction and filtering: extract the contour of the binarized image, extract the rectangular contour through polygon approximation, and remove the non-quadrilateral contour; D13) Target code extraction: Identify each contour and assign a value of 0 or 1 to each contour based on the color within the contour; D14) Target recognition: Rotate the image 90° three times in a row to obtain targets in four directions, and connect all the data bits of the targets in sequence to form a binary integer. If any of the targets in the four directions matches the code of the preset target, it is considered that the target is found, and the matching code is used as the code of the current QR code.

4. The method for monitoring the displacement of a mountain pond dam based on image recognition according to claim 1, characterized in that: In step C2), the method of constructing a PnP problem and solving the PnP includes: C21) The image coordinate system is denoted as c, the target coordinate system is denoted as m, and the homogeneous transformation between the two is expressed as: represents a homogeneous transformation matrix; C22) Establish reference coordinate system: Take three known coordinate points P on the target plane i,i∈[1,3] , P i The position in the target coordinate system is P i (x mi ,y mi ,z mi ), click P i The coordinates in the image coordinate system are (u i ,v i ), the image coordinate u1 of P1 is the smallest, and it is taken as the origin O of the reference coordinate system r , P2 has the largest u2, and the origin O r The line to P2 is X r Axis, P3 in X r The projection point on the axis is P3′, Y r The axis direction is P3′ pointing to P3, Z r The axis direction satisfies the right-hand rule, and the reference coordinate system is established; C23) According to the method for establishing the reference coordinate system in step C22), according to a point P in the target i The position in the target coordinate system (x mi ,y mi ,z mi ), the position and orientation of the reference coordinate system in the target coordinate system can be obtained and P i The position P in the reference coordinate system ri =(x ri ,y ri ,0), take 4 known coordinate points P on the target plane i,i∈[1,4] , by P i The image coordinates (u i ,v i ), according to the pinhole camera model, point P i Normalize the focal length of the coordinates in the camera system and get P ri Substituting the coordinates of into formula (1) we get: From formula (2), we get: Substituting equation (3) into equation (2), we get When the number of known points is n, all equations of formula (5) are expanded into 2n equations, and these equations are rewritten into matrix form A1H1+A2H2=0#(6) Where: Among them: A1 is a 2n×3 matrix, A2 is a 2n×6 matrix, and obviously, H1 is the vector therefore Formula (7) is used as the constraint condition for solving formula (6); C24) constructs the objective function shown in formula (8), thereby transforming formula (6) into an optimization problem, that is, keeping the objective function F minimum under any λ condition, F=||A1H1+A2H2|| 2 +λ(1-||H1|| 2 )#(8) The solutions of H1 and H2 are given by equations (9) and (10), where H1 is the eigenvector corresponding to the minimum eigenvalue of matrix B, in: Using the optimal solution of H1 and H2, we can get the pose transformation of the camera relative to the reference system. The first two columns of and C25) The position transformation of the camera relative to the target coordinate system Calculated by the following formula: Where: is the pose of the target coordinate system in the reference system, which is obtained by the pose matrix of the reference system in the target coordinate system get, C26) For the four known coordinate points P on the target plane i,i∈[1,4] , A1 is an 8×3 matrix, A2 is an 8×6 matrix, there are 8 unknowns in formula (6), and there are 8 equations, which can solve H1 and H2. So far, the rotation matrix between the image coordinate system and the target coordinate system is obtained. and translation matrix 5. The method for monitoring the displacement of a mountain pond dam based on image recognition according to claim 4 is characterized in that: In step D), the method of identifying and calculating the coordinates of the target center includes: D21) The relationship between the image coordinate system and the target coordinate system is shown in equation (1), and the homogeneous transformation from the world coordinate system to the target coordinate system is: in, is the coordinate of point P in the world coordinate system, is the coordinate of point P in the marker coordinate system, When the target point is set to the geometric center of the target, D22) Let the origin of the world coordinate system coincide with the origin of the image coordinate system, then The homogeneous coordinates of the geometric center of the target in the world coordinate system are The image coordinate system is defined as follows, Z c Starting from the optical center of the camera, along the optical axis pointing to the front of the camera, X c Perpendicular to the optical axis and pointing to the left of the camera, Y c Perpendicular to the optical axis and pointing downward from the camera; D23) Establish a world coordinate system. The origin of the world coordinate system coincides with the origin of the image coordinate system. The xOy plane of the world coordinate system is parallel to the horizontal plane. The x-axis points to the front of the camera, the y-axis points to the left of the camera, and the z-axis points vertically upward. in, The rotation matrix caused by the camera installation angle is obtained by the transformation function from Euler angle to rotation matrix. The Euler angle is converted into a homogeneous transformation matrix. The RPY sequence corresponds to the carrier coordinate system yxz, so is the translation transformation, is a translation transformation, then therefore, In formula (19), The inclinometer measures the camera. Known, The coordinates of the target geometric center in the world coordinate system are obtained by step C26).

6. A method for monitoring the displacement of a mountain pond dam based on image recognition according to claim 1, 2 or 3, characterized in that: In step E), the coordinates of the target center obtained periodically are filtered and used to generate a time-position curve of the target center.

7. The method for monitoring the displacement of a mountain pond dam based on image recognition according to claim 4, characterized in that: In step E), the method of filtering the periodically obtained coordinates of the target center includes: E1) Construct the equation of state: X(k+1)=AX(k)+GW(k) Z(k+1)=HX(k+1)+V(k+1) Wherein, k is the time of the image acquisition in the periodic image acquisition in step D), X(k) is the system state at time k, A is the state transfer matrix, Z(k) is the observation value of the corresponding state at time k, that is, the coordinate value of the target center obtained by calculating the image acquisition at time k, H is the observation matrix, G is the noise driving matrix, W(k) is the white noise, and V(k) is the observation noise; E2) Construct the state one-step prediction equation: E3) Construct the one-step prediction covariance matrix: P(k+1|k)=AP(k|k)A T +GQG T E4) Status Update: E5) Construct the filter gain matrix: E6) Covariance matrix update: P(k+1|k+1)=[I n -K(k+1)H]P(k+1|k) E7) Consider the coordinate change of the target center as linear motion and construct the kinematic equation of linear motion: Among them, ΔT is the cycle interval length, E8) The state vector of the system is obtained as: Observations Z(k)=[x(k)] State transition matrix Observation Matrix H=[1 0] Substitute into the state equation constructed in step E1) to complete the filtering.

Citation Information

Patent Citations

  • Three-dimensional deformation dynamic measurement system and measurement method based on image recognition

    CN109737883A

  • Bridge deformation monitoring method and device based on visual perception, and equipment

    CN110634138A

Cited By

  • Methods for assigning geographic coordinates

    AT528767A1