CN-121982098-A - Displacement monitoring method and system based on movable monocular camera
Abstract
The invention discloses a displacement monitoring method and a system based on a movable monocular camera, and particularly relates to the technical field of camera displacement monitoring; the method comprises the steps of acquiring a reference target and a target image to be detected through initial synchronous acquisition, acquiring a reference target initial pixel size, an initial center coordinate and a target initial center coordinate to be detected, acquiring an image again when the pose of a monocular camera changes, acquiring the pixel size and the center coordinate after the reference target changes, calculating an image scaling factor, determining an image coordinate transformation parameter, constructing a dynamic coordinate transformation relation to obtain a target theoretical pixel coordinate to be detected, and calculating a displacement according to the deviation between an actual pixel coordinate of the target to be detected and the theoretical pixel coordinate. The invention can realize stable calculation of the displacement of the target to be detected under the condition of monocular camera pose change, and improves the applicability and measurement consistency of the displacement monitoring process.
Inventors
- YANG SHUO
- YAO CHANGHONG
- WANG LEI
- CHEN ZILONG
- JIANG QIAN
Assignees
- 徐州工程学院
- 徐州中泰智能科技有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20251229
Claims (8)
- 1. The displacement monitoring method based on the movable monocular camera is characterized by comprising the following steps of: S1, synchronously acquiring images of a reference target and a target to be detected in an initial state, and extracting an initial pixel size, an initial center coordinate and an initial center coordinate of the reference target; S2, when the pose of the monocular camera changes, images of the reference target and the target to be detected are collected again, and the changed pixel size and the changed center coordinate of the reference target are extracted; S3, calculating an image scaling factor according to the initial pixel size and the changed pixel size of the reference target, and determining an image coordinate transformation parameter according to the initial center coordinate and the changed center coordinate of the reference target and by combining a preset coordinate transformation model; s4, constructing a dynamic coordinate transformation relation based on the image scaling factors and the image coordinate transformation parameters; S5, substituting the initial center coordinates of the target to be detected into a dynamic coordinate transformation relation to obtain theoretical pixel coordinates of the target to be detected; S6, determining actual pixel coordinates of the target to be detected based on the acquired image of the target to be detected, calculating deviation between the actual pixel coordinates and the theoretical pixel coordinates, and generating displacement of the target to be detected.
- 2. The displacement monitoring method based on the movable monocular camera according to claim 1, wherein images of a reference target and a target to be detected are synchronously acquired in an initial state, and an initial pixel size, an initial center coordinate and an initial center coordinate of the reference target are extracted, specifically: synchronously imaging a monitoring area by using a monocular camera to obtain image information containing a reference target and a target to be detected, and carrying out space consistency check on the image information; determining an initial pixel size of the reference target by a contour of the reference target; Determining an initial center coordinate of the reference target based on the geometric center of the reference target; And determining initial center coordinates of the target to be detected based on the geometric center of the target to be detected.
- 3. The displacement monitoring method based on the movable monocular camera according to claim 2, wherein when the monocular camera is changed in pose, the images of the reference target and the target to be detected are collected again, and the pixel size and the center coordinate after the change of the reference target are extracted, specifically: When the position or the posture of the monocular camera changes, re-imaging the monitoring area by using the monocular camera to obtain a change image of the reference target; Determining a contour region of the reference target in a change image of the reference target by a contour matching method based on an initial pixel size and an initial center coordinate of the reference target; the post-change pixel size and post-change center coordinates of the reference target are calculated based on the contour region.
- 4. The method for monitoring displacement based on a movable monocular camera according to claim 3, wherein the image scaling factor is calculated according to an initial pixel size and a changed pixel size of the reference target, and the image coordinate transformation parameters are determined according to an initial center coordinate and a changed center coordinate of the reference target by combining a preset coordinate transformation model, wherein the image coordinate transformation parameters are specifically: Determining an image scaling factor by calculating a ratio between the initial pixel size and the changed pixel size based on the initial pixel size and the changed pixel size of the reference target; And determining the pixel displacement of the central position of the reference target by adopting a two-dimensional coordinate difference value calculation method based on the initial central coordinate and the changed central coordinate of the reference target, and determining the image coordinate transformation parameters by combining a preset coordinate transformation model.
- 5. The displacement monitoring method based on the movable monocular camera according to claim 4, wherein the dynamic coordinate transformation relation is constructed based on the image scaling factor and the image coordinate transformation parameter, specifically: Performing scale unification processing on the center coordinates of the reference target after the change and the initial center coordinates of the target to be detected based on the image scaling factors to obtain scale unification coordinate data; Performing coordinate system alignment processing on the scale unified coordinate data based on the image coordinate transformation parameters to obtain aligned coordinate data; And extracting a dynamic coordinate transformation relation parameter set containing a scaling mapping item and a translation mapping item based on the aligned coordinate data, and forming a dynamic coordinate transformation relation according to the dynamic coordinate transformation relation parameter set.
- 6. The displacement monitoring method based on the movable monocular camera according to claim 5, wherein the initial center coordinates of the target to be measured are substituted into the dynamic coordinate transformation relationship to obtain theoretical pixel coordinates of the target to be measured, specifically: performing coordinate mapping operation on the initial center coordinates of the target to be detected based on the dynamic coordinate transformation relation to obtain mapping center coordinate data; Performing rounding alignment processing on the mapping center coordinate data to obtain theoretical pixel coordinates; Consistency rechecking is carried out on the theoretical pixel coordinates and the center coordinates after the reference targets in the alignment coordinate data are changed so as to obtain rechecked result data; and outputting theoretical pixel coordinates of the target to be tested when the recheck result data meet the preset consistency condition.
- 7. The displacement monitoring method based on the movable monocular camera according to claim 6, wherein the actual pixel coordinates of the target to be detected are determined based on the acquired image of the target to be detected, and the deviation between the actual pixel coordinates and the theoretical pixel coordinates is calculated to generate the displacement of the target to be detected, specifically: Determining the outline of the appearance area of the target to be detected and obtaining the actual pixel coordinates of the target to be detected based on the geometric center; Carrying out coordinate difference value operation on the actual pixel coordinates of the target to be detected and the theoretical pixel coordinates of the target to be detected to obtain deviation data; and forming a displacement vector based on the deviation data and calculating a displacement vector modulus value as the displacement of the target to be detected.
- 8. A mobile monocular camera-based displacement monitoring system for implementing a mobile monocular camera-based displacement monitoring method as claimed in any one of claims 1 to 7, comprising: The initial acquisition module is used for synchronously acquiring images of the reference target and the target to be detected in an initial state and extracting an initial pixel size, an initial center coordinate and an initial center coordinate of the reference target; The re-acquisition updating module is used for re-acquiring images of the reference target and the target to be detected when the pose of the monocular camera changes, and extracting the changed pixel size and the changed center coordinate of the reference target; The parameter calculation module is used for calculating an image scaling factor according to the initial pixel size and the changed pixel size of the reference target, and determining an image coordinate transformation parameter according to the initial center coordinate and the changed center coordinate of the reference target by combining a preset coordinate transformation model; the relation construction module is used for constructing a dynamic coordinate transformation relation based on the image scaling factors and the image coordinate transformation parameters; Substituting the initial center coordinates of the target to be detected into a dynamic coordinate transformation relation to obtain theoretical pixel coordinates of the target to be detected; The displacement judging module is used for determining the actual pixel coordinates of the target to be detected based on the acquired image of the target to be detected, calculating the deviation between the actual pixel coordinates and the theoretical pixel coordinates and generating the displacement of the target to be detected.
Description
Displacement monitoring method and system based on movable monocular camera Technical Field The invention relates to the technical field of camera displacement monitoring, in particular to a displacement monitoring method and system based on a movable monocular camera. Background In the building construction process, a visual measurement method is generally utilized to realize displacement monitoring of a target object so as to ensure the safety and stability of engineering operation or construction process. The monocular camera measuring method is widely used for various displacement monitoring scenes. However, in an actual monitoring site, the monocular camera is affected by installation conditions, environmental interference, or human factors, and variations in position or attitude are inevitably generated, resulting in variations in imaging dimensions and viewing angles. The existing monocular camera displacement monitoring method generally assumes that the camera position is fixed, and lacks an effective processing mechanism for changing the image scale and the visual angle caused by changing the camera position or the camera posture, so that error accumulation which is difficult to identify is generated in a monitoring result, and long-term monitoring precision is obviously reduced. In order to solve the above problems, a technical solution is now provided. Disclosure of Invention In order to overcome the above-mentioned drawbacks of the prior art, embodiments of the present invention provide a displacement monitoring method and system based on a movable monocular camera to solve the above-mentioned problems in the prior art. In order to achieve the above purpose, the present invention provides the following technical solutions: A displacement monitoring method based on a movable monocular camera comprises the following steps: S1, synchronously acquiring images of a reference target and a target to be detected in an initial state, and extracting an initial pixel size, an initial center coordinate and an initial center coordinate of the reference target; S2, when the pose of the monocular camera changes, images of the reference target and the target to be detected are collected again, and the changed pixel size and the changed center coordinate of the reference target are extracted; S3, calculating an image scaling factor according to the initial pixel size and the changed pixel size of the reference target, and determining an image coordinate transformation parameter according to the initial center coordinate and the changed center coordinate of the reference target and by combining a preset coordinate transformation model; s4, constructing a dynamic coordinate transformation relation based on the image scaling factors and the image coordinate transformation parameters; S5, substituting the initial center coordinates of the target to be detected into a dynamic coordinate transformation relation to obtain theoretical pixel coordinates of the target to be detected; S6, determining actual pixel coordinates of the target to be detected based on the acquired image of the target to be detected, calculating deviation between the actual pixel coordinates and the theoretical pixel coordinates, and generating displacement of the target to be detected. In a preferred embodiment, images of the reference target and the target to be detected are synchronously acquired in an initial state, and an initial pixel size, an initial center coordinate and an initial center coordinate of the target to be detected are extracted, specifically: synchronously imaging a monitoring area by using a monocular camera to obtain image information containing a reference target and a target to be detected, and carrying out space consistency check on the image information; determining an initial pixel size of the reference target by a contour of the reference target; Determining an initial center coordinate of the reference target based on the geometric center of the reference target; And determining initial center coordinates of the target to be detected based on the geometric center of the target to be detected. In a preferred embodiment, when the pose of the monocular camera changes, images of the reference target and the target to be detected are collected again, and the changed pixel size and the changed center coordinates of the reference target are extracted, specifically: When the position or the posture of the monocular camera changes, re-imaging the monitoring area by using the monocular camera to obtain a change image of the reference target; Determining a contour region of the reference target in a change image of the reference target by a contour matching method based on an initial pixel size and an initial center coordinate of the reference target; the post-change pixel size and post-change center coordinates of the reference target are calculated based on the contour region. In a preferred embodiment, the image scaling fac