Binocular and multi-view displacement measurement method, device, equipment, medium and product

By linking the main camera and the sub-camera and using sub-pixel offset correction technology, the problem of misjudgment in displacement monitoring caused by thermal expansion and contraction of the equipment was solved, and higher precision in determining displacement and direction was achieved.

CN119618081BActive Publication Date: 2026-03-31杭州鲁尔物联科技有限公司
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-12
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Existing displacement monitoring methods are prone to misjudgment due to changes in the fixed position of the equipment and temperature. In particular, when there is vibration or temperature change, the image movement caused by thermal expansion and contraction of the internal structure of the monitoring equipment can lead to misjudgment of the displacement of the monitored target.

Method used

By connecting the main camera and the sub-camera, the sub-pixel offset of the main camera is compensated by the sub-pixel offset of the sub-camera. Combined with the image analysis of the main target and the sub-target, the displacement and direction of the object to be monitored are determined, thereby improving the monitoring accuracy.

Benefits of technology

This effectively avoids misjudgment of displacement caused by changes in the internal structure of the equipment, and improves the accuracy and precision of displacement monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119618081B_ABST
    Figure CN119618081B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on binocular and multi-eye displacement measurement method, device, equipment, medium and product.The method comprises: obtaining the main image corresponding to the object to be monitored based on the main camera shooting, and the sub-image corresponding to the first object based on at least one sub-camera connected with the main camera shooting;Based on main image and predetermined main target reference image, determine the first sub-pixel offset of main target, based on sub-image and predetermined sub-target reference image, determine the second sub-pixel offset of sub-target;The target sub-pixel offset of main target is obtained by correcting the first sub-pixel offset based on the second sub-pixel offset;The displacement of the object to be monitored is determined based on the physical size of main target, main target reference image, camera deployment attribute and target sub-pixel offset.It is realized by the sub-pixel offset corresponding to sub-camera to compensate the sub-pixel offset corresponding to main camera, determine the displacement of the object to be monitored, improve the accuracy of displacement monitoring.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of displacement monitoring technology, and in particular to a method, device, equipment, medium, and product based on binocular and multi-view displacement measurement. Background Technology

[0002] Displacement monitoring is an important means of understanding the safety status and deformation trend of a structure. Accurate displacement monitoring of structural objects with potential safety hazards can facilitate the timely detection of dangers and reduce the occurrence of safety accidents.

[0003] Existing displacement monitoring methods primarily rely on fixed monitoring equipment. This equipment captures images of a target on the monitored object, and the target's offset is determined based on these images, thus identifying the displacement of the monitored object. However, if the monitoring equipment's fixed position changes (e.g., due to vibration) or temperature fluctuations, its internal structure may expand or contract, causing the equipment to move. This movement results in shifted monitoring images, potentially leading to misjudgments of the target's displacement. Summary of the Invention

[0004] This invention provides a method, apparatus, device, medium, and product based on binocular and multi-view displacement measurement, which enables the use of the sub-pixel offset of the sub-camera to compensate for the sub-pixel offset of the main camera when the main camera and sub-camera are interconnected, thereby determining the magnitude and direction of the displacement of the object to be monitored and improving the accuracy of displacement monitoring.

[0005] According to one aspect of the present invention, a binocular and multi-view displacement measurement method is provided, the method comprising:

[0006] The system acquires a main image corresponding to the object to be monitored, captured by a main camera, and a sub-image corresponding to a first object, captured by at least one sub-camera connected to the main camera; wherein the object to be monitored includes a main target; the first object includes sub-targets; the first object is an object with a fixed position; and the field of view of the sub-camera changes with the field of view of the main camera.

[0007] Based on the main image and a pre-determined main target reference image, a first sub-pixel offset of the main target is determined, and based on the sub-image and a pre-determined sub-target reference image, a second sub-pixel offset of the sub-target is determined; wherein, the main target reference image is an initial frame captured by the main camera on the main target; and the sub-target reference image is an initial frame captured by the sub-camera on the sub-target.

[0008] The first sub-pixel offset is corrected based on the second sub-pixel offset to obtain the target sub-pixel offset of the main target;

[0009] Based on the physical size of the main target, the reference image of the main target, the camera deployment attributes, and the target sub-pixel offset, the magnitude and direction of the displacement of the object to be monitored are determined.

[0010] According to another aspect of the present invention, a binocular and multi-view displacement measurement device is provided, the device comprising:

[0011] An image acquisition module is used to acquire a main image corresponding to the object to be monitored, captured by a main camera, and a sub-image corresponding to a first object, captured by at least one sub-camera connected to the main camera; wherein the object to be monitored includes a main target; the first object includes sub-targets; the first object is an object with a fixed position; and the field of view of the sub-camera changes with the field of view of the main camera.

[0012] The first sub-pixel offset determination module is used to determine the first sub-pixel offset of the main target based on the main image and a pre-determined main target reference image, and to determine the second sub-pixel offset of the sub-target based on the sub-image and a pre-determined sub-target reference image; wherein, the main target reference image is an initial frame captured by the main camera on the main target; and the sub-target reference image is an initial frame captured by the sub-camera on the sub-target.

[0013] The target sub-pixel offset determination module is used to correct the first sub-pixel offset based on the second sub-pixel offset to obtain the target sub-pixel offset of the main target;

[0014] The displacement determination module is used to determine the magnitude and direction of the displacement of the object to be monitored based on the physical size of the main target, the reference image of the main target, the camera deployment attributes, and the target sub-pixel offset.

[0015] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0016] At least one processor; and a memory communicatively connected to said at least one processor; wherein,

[0017] The memory stores a computer program that can be executed by the at least one processor, which enables the at least one processor to perform the binocular and multi-view displacement measurement method according to any embodiment of the present invention.

[0018] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the binocular and multi-view displacement measurement method according to any embodiment of the present invention.

[0019] According to another aspect of the present invention, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the binocular and multi-view displacement measurement method as described in any embodiment of the present invention.

[0020] The technical solution of this invention involves acquiring a main image corresponding to the object to be monitored, captured by a main camera, and a sub-image corresponding to a first object, captured by at least one sub-camera connected to the main camera. The object to be monitored includes a main target; the first object includes sub-targets; the first object is a fixed-position object; the field of view of the sub-cameras changes with the field of view of the main camera; based on the main image and a pre-determined main target reference image, a first sub-pixel offset of the main target is determined, and based on the sub-images and a pre-determined sub-target reference image, a second sub-pixel offset of the sub-target is determined; wherein the main target reference image is an initial frame captured by the main camera on the main target; the sub-target reference image is an initial frame captured by the sub-camera on the sub-target; the first sub-pixel offset is corrected based on the second sub-pixel offset to obtain the target sub-pixel offset of the main target. Displacement Measurement: Based on the physical size of the main target, the main target reference image, camera deployment attributes, and target sub-pixel offset, this method determines the magnitude and direction of the displacement of the monitored object. It solves the problem of misjudging target deformation caused by thermal expansion and contraction of the internal structure of the equipment in existing technologies. By connecting the main camera and sub-cameras, it determines the first sub-pixel offset of the main target using the main image and a pre-determined main target reference image. Simultaneously, it determines the second sub-pixel offset of the sub-target using the sub-image and a pre-determined sub-target reference image. The first sub-pixel offset of the sub-camera is used to compensate for the second sub-pixel offset of the main camera, thus obtaining the target sub-pixel offset of the main target. This improves the accuracy of offset determination, thereby enhancing the accuracy of determining the magnitude and direction of the displacement of the monitored object and effectively avoiding misjudgment of target displacement.

[0021] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0022] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0023] Figure 1 This is a flowchart of a binocular and multi-view displacement measurement method provided in Embodiment 1 of the present invention;

[0024] Figure 2 This is a schematic diagram illustrating the connection structure between the main camera and the sub-camera according to Embodiment 1 of the present invention;

[0025] Figure 3 This is a schematic diagram illustrating the connection structure between the main camera and the sub-camera according to Embodiment 1 of the present invention;

[0026] Figure 4 This is a schematic diagram illustrating the connection structure between the main camera and the sub-camera according to Embodiment 1 of the present invention;

[0027] Figure 5 This is a schematic diagram illustrating the connection structure between the main camera and the sub-camera according to Embodiment 1 of the present invention;

[0028] Figure 6 This is a schematic diagram illustrating the connection structure between the main camera and the sub-camera according to Embodiment 1 of the present invention;

[0029] Figure 7 This is a schematic diagram illustrating the head-up view of the main camera according to Embodiment 1 of the present invention;

[0030] Figure 8 This is a schematic diagram illustrating the upward-looking state of the main camera according to Embodiment 1 of the present invention;

[0031] Figure 9 This is a schematic diagram illustrating the top-down view of the main camera according to Embodiment 1 of the present invention;

[0032] Figure 10 This is a flowchart of a binocular and multi-view displacement measurement method provided in Embodiment 2 of the present invention;

[0033] Figure 11 This is a schematic diagram of a binocular and multi-view displacement measurement device according to Embodiment 3 of the present invention;

[0034] Figure 12 This is a schematic diagram of the structure of an electronic device that implements the binocular and multi-view displacement measurement method according to an embodiment of the present invention. Detailed Implementation

[0035] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0036] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0037] Example 1

[0038] Figure 1 This is a flowchart of a binocular and multi-view displacement measurement method according to Embodiment 1 of the present invention. This embodiment is applicable to situations where displacement monitoring of an object to be detected is performed. This method can be executed by a binocular and multi-view displacement measurement device, which can be implemented in hardware and / or software and can be configured in a computing device. Figure 1 As shown, the method includes:

[0039] S110. Acquire a main image corresponding to the object to be monitored based on the main camera, and a sub-image corresponding to the first object based on at least one sub-camera connected to the main camera; the object to be monitored includes a main target; the first object includes a sub-target.

[0040] The object to be monitored can be any object whose displacement needs to be monitored, such as various buildings and structures like dams, tunnels, and bridges; or slopes, riverbeds, or roads. The first object is a fixed and structurally stable object, meaning its position in space is fixed and will not move, change position, deform, or be damaged; that is, the sub-target position on the first object is assumed to remain unchanged. The main camera and sub-camera can be physically connected, such as by screws, clamps, or magnetic attraction. The main camera and sub-camera form a single unit, and the sub-camera's field of view changes with the main camera's field of view. The field of view refers to the range of the scene that the camera lens can capture. It can be understood that when the main camera moves, its field of view changes, and correspondingly, the sub-camera's position moves with the main camera, changing its field of view. The main camera is used to acquire overall or partial images of the object to be monitored. The sub-camera is used to acquire overall or partial images of the first object. The main target is installed on the displacement monitoring part of the object to be monitored, and the sub-target is installed on the first object. The installation method can be threaded installation, insertion installation, or adhesive installation, etc. The geometry of the main target and the sub-target can be circular, square, elliptical, or other geometric shapes.

[0041] In practical applications, the positions of the main camera and the sub-cameras can be fixed. The main camera acquires images of the main target on the object to be monitored, while the sub-cameras acquire images of the sub-targets on the first object. The main image corresponding to the object to be monitored, captured by the main camera at the same time, and the sub-image corresponding to the first object, captured by at least one sub-camera connected to the main camera, can be acquired in real-time or periodically. Based on the main image and the sub-images, a comprehensive determination can be made as to whether the object to be monitored has undergone deformation.

[0042] For example, see Figures 2 to 6 The main camera and the sub-camera are considered as a whole. Of course, the structural forms of the main camera and sub-camera include, but are not limited to, those of other types. Figures 2 to 6 The structure is shown. The main camera and sub-cameras can be placed back-to-back or in the same direction. Multiple main and sub-cameras are deployed at preset locations, and multiple main targets are deployed at each displacement monitoring point of the object to be monitored, while multiple sub-targets are deployed on the first object. When deploying the main and sub-cameras, the field of view of the main camera in the main camera includes the main target; the field of view of the sub-cameras in the main camera includes the sub-target, so that the main camera can acquire a main image including the main target, and the sub-cameras can acquire sub-images including the sub-targets. The main image and sub-images with the same timestamp are obtained for displacement monitoring of the object to be monitored.

[0043] S120. Based on the main image and a pre-determined main target reference image, determine the first sub-pixel offset of the main target, and based on the sub-image and a pre-determined sub-target reference image, determine the second sub-pixel offset of the sub-target.

[0044] The primary target reference image is the initial frame captured by the primary camera on the primary target. Specifically, it refers to the first image captured of the primary target of the monitored object when the initial shooting angle of the primary camera remains unchanged and the monitored object has not undergone deformation. The primary target reference image includes the primary target. The secondary target reference image is the initial frame captured by the secondary camera on the secondary target. Specifically, it refers to the first image captured of the secondary target of the first object when the initial shooting angle of the secondary camera remains unchanged. The secondary target reference image includes the secondary target.

[0045] Understandably, when the main camera moves or the monitored object deforms, the main camera's field of view changes, resulting in a difference between the positional information of the main target in the main image and the positional information of the main target in the reference image. This difference is called the first sub-pixel offset. The sub-pixel offset can be used to characterize the sub-pixel level positional change of the object in the image.

[0046] In this embodiment, the position information of the main target in the main image and the corresponding position information of the main target in the main target reference image can be sub-differentiated to obtain the sub-pixel offsets of the main target in the horizontal and vertical directions, which are used as the first sub-pixel offsets. Simultaneously, the position information of the sub-target in the sub-image and the corresponding position information of the sub-target in the sub-target reference image can be sub-differentiated to obtain the sub-pixel offsets of the sub-target in the horizontal and vertical directions, which are used as the second sub-pixel offsets.

[0047] S130. Correct the first sub-pixel offset based on the second sub-pixel offset to obtain the target sub-pixel offset of the main target.

[0048] In this embodiment, the first sub-pixel offset can be corrected based on the second sub-pixel offset of the sub-target to obtain the corrected target sub-pixel offset. Specifically, this can be achieved by: inputting the second sub-pixel offset into the master-sub-camera calibration model to obtain the estimated sub-pixel movement offset corresponding to the master camera; and correcting the first sub-pixel offset based on the estimated sub-pixel movement offset to obtain the target sub-pixel offset of the master target.

[0049] The estimated sub-pixel shift offset can be the theoretically expected sub-pixel offset when the main camera captures the main target, assuming a second sub-pixel offset occurs when the sub-camera captures the sub-target. The first sub-pixel offset refers to the actual sub-pixel offset that occurs when the main camera captures the main target. The master-sub-camera calibration model is determined based on the correlation between the pixel offsets of the main camera and the sub-camera. It can be understood that the position of the sub-camera moves with the position of the main camera; the field of view of the sub-camera changes with the field of view of the main camera. Conversely, the position of the main camera also moves with the position of the sub-camera; the field of view of the main camera also changes with the field of view of the sub-camera. In other words, the pixel offset of the sub-camera capturing the sub-target changes with the pixel offset of the main camera capturing the main target, and vice versa. Since the master and sub-cameras are the same device, if the sub-camera image shifts, the master camera image will also shift accordingly. The specific shift amount can be achieved through the master and sub-camera calibration model. The master and sub-cameras are located in the same temperature environment. If the temperature changes, the internal structure of the master camera may undergo thermal expansion and contraction, and the images of the master camera will all experience temperature drift, causing objects in the images to shift. The specific shift relationship can be achieved through the master camera calibration model.

[0050] Based on this, the second sub-pixel offset can be used as input to the master-slave camera calibration model, outputting the estimated sub-pixel movement offset corresponding to the master camera. Furthermore, the difference between the first sub-pixel offset and the estimated sub-pixel movement offset can be calculated, i.e., the first sub-pixel offset minus the estimated sub-pixel movement offset, and the difference is used as the target sub-pixel offset of the master target. The advantage of this setup is that, when the master and slave cameras are interconnected, using the sub-pixel offset corresponding to the slave camera to compensate for the sub-pixel offset corresponding to the master camera, in order to determine the magnitude and direction of the displacement of the object to be monitored, can effectively avoid misjudgment of the displacement of the monitored object caused by thermal expansion and contraction of the internal structure of the master and slave cameras.

[0051] For example, the main and sub-cameras (including the main camera and the sub-camera) can be placed under the same temperature and lighting conditions for calibration, with both the main and sub-targets remaining fixed during calibration. During calibration, the main and sub-cameras can be moved, considering three scenarios: eye-level, upward-looking, and downward-looking. Figure 7 As shown, when the main camera is at eye level, the distance between the main camera and the main target is... The distance between the sub-camera and the sub-target is ;like Figure 8 and Figure 9 As shown, the distance between the main camera and the main target is as follows: (The image shows the distance between the main camera and the main target when the main camera is looking up and down.) The distance between the sub-camera and the sub-target is ; This refers to the angle between the main and sub-cameras and the horizontal plane. A main-sub-camera calibration model can be constructed using the sub-camera pixel offset as the independent variable and the main camera pixel offset as the dependent variable. For example, the main-sub-camera calibration model can be represented as: ; where X S and Y S These are represented as the horizontal sub-pixel offset and the vertical sub-pixel offset in the second sub-pixel offset, respectively; X M and Y M These are represented as the sub-pixel offset in the horizontal direction and the sub-pixel offset in the vertical direction of the target sub-pixel offset, respectively. and This represents the objective function in the master-subcamera calibration model. Objective functions include, but are not limited to, first-order linear functions, nth-order polynomials, nonlinear functions, and neural network functions.

[0052] S140. Based on the physical size of the main target, the reference image of the main target, the camera deployment attributes, and the target sub-pixel offset, determine the magnitude and direction of the displacement of the object to be monitored.

[0053] Physical dimensions can refer to the actual physical quantities of the main target, such as length, radius, diameter, and circumference. Camera deployment attributes can refer to information related to the deployment of the main and sub-cameras, such as camera focal length, camera resolution, camera deployment location, camera deployment orientation, camera deployment angle, distance between the camera and the target, angle between the camera and the horizontal plane, and positional relationship between the main and sub-cameras. Displacement measurement includes measuring the deformation of an object and monitoring its direction of movement. For example, deformation can refer to changes in shape or volume of an object under the action of force, such as bending, torsion, stretching, compression, or other types of deformation. Direction can include tilting, settling, and rising.

[0054] In this embodiment, the target sub-pixel offset can be converted into an actual physical quantity, such as length, by combining the physical size of the main target and the main target reference image; this actual physical quantity is then used as the actual deformation of the object to be monitored. The magnitude and direction of the displacement of the object to be monitored can be determined based on the camera deployment attributes and the actual physical quantity.

[0055] In this embodiment, the magnitude and direction of the displacement of the object to be monitored are determined based on the physical size of the main target, the reference image of the main target, the camera deployment attributes, and the target sub-pixel offset. This includes: determining the transformation parameters based on the physical size of the main target and the second circle attribute corresponding to the main target in the reference image of the main target; determining the actual offset based on the transformation parameters and the target sub-pixel offset; and determining the magnitude and direction of the displacement of the object to be monitored based on the camera deployment attributes and the actual offset.

[0056] The second circle attribute characterizes the theoretical position of the main target in the image captured by the main camera. This attribute may include the radius, diameter, and center position of the main target circle in the reference image, as well as the positions of one or more marker points on the main target. The actual offset includes both the current horizontal and vertical offsets. The horizontal offset characterizes the horizontal movement of the main target, while the vertical offset characterizes the vertical movement of the main target.

[0057] Specifically, the ratio between the physical size of the main target and the number of pixels representing the diameter of the circle in the second circle attribute can be used as a transformation parameter. Then, the target sub-pixel offset and the transformation parameter can be multiplied to obtain the actual offset. Furthermore, the magnitude and direction of the displacement of the object to be monitored can be determined by combining the camera deployment attributes and the actual offset.

[0058] The technical solution provided by this invention involves acquiring a main image corresponding to the object to be monitored, captured by a main camera, and a sub-image corresponding to a first object, captured by at least one sub-camera connected to the main camera. The object to be monitored includes a main target; the first object includes sub-targets; the first object is a fixed-position object; the field of view of the sub-cameras changes with the field of view of the main camera; based on the main image and a pre-determined main target reference image, a first sub-pixel offset of the main target is determined, and based on the sub-images and a pre-determined sub-target reference image, a second sub-pixel offset of the sub-target is determined; wherein, the main target reference image is an initial frame captured by the main camera on the main target; the sub-target reference image is an initial frame captured by the sub-camera on the sub-target; the first sub-pixel offset is corrected based on the second sub-pixel offset to obtain the target sub-pixels of the main target. Offset: Based on the physical size of the main target, the main target reference image, camera deployment attributes, and target sub-pixel offset, the magnitude and direction of the displacement of the object to be monitored are determined. This solves the problem of misjudging the deformation of the monitored target due to thermal expansion and contraction of the internal structure of the equipment in the existing technology. It realizes that by connecting the main camera and the sub-camera, the first sub-pixel offset of the main target is determined by the main image and the pre-determined main target reference image. At the same time, the second sub-pixel offset of the sub-target is determined by the sub-image and the pre-determined sub-target reference image. The first sub-pixel offset of the sub-camera is used to compensate the second sub-pixel offset of the main camera to obtain the target sub-pixel offset of the main target. This improves the accuracy of offset determination, thereby improving the accuracy of determining the magnitude and direction of the displacement of the object to be monitored and effectively avoiding misjudgment of the deformation of the monitored target.

[0059] Example 2

[0060] Figure 10 This is a flowchart of a binocular and multi-view displacement measurement method according to Embodiment 2 of the present invention. Based on the foregoing embodiments, S120 is further refined. Specific implementation details can be found in the technical solution of this embodiment. Technical terms that are the same as or corresponding to those in the above embodiments will not be repeated here.

[0061] like Figure 10 As shown, the method specifically includes the following steps:

[0062] S210. Acquire a main image corresponding to the object to be monitored based on the main camera, and a sub-image corresponding to the first object based on at least one sub-camera connected to the main camera; the object to be monitored includes a main target; the first object includes a sub-target.

[0063] S220. Perform circle fitting based on the first pixel attributes of multiple pixels in the main image to obtain the first circle attribute of the fitted circle of the main target.

[0064] The first pixel attribute includes, but is not limited to, various types of pixel information such as color, brightness, transparency, position, contrast, saturation, color temperature, texture, gradient, and depth. The main target fitted circle refers to the circle obtained by fitting the first pixel attributes of multiple pixels in the main image to a circle. The main target fitted circle can be used to characterize the size and proportion of the main target in the main image. The first circle attributes include, but are not limited to, the diameter, radius, center position of the main target fitted circle, and the positions of one or more marker points on the main target, etc.

[0065] In this embodiment, algorithms such as least squares, Hough transform, and RANSAC (Random Sample Consensus) can be used to analyze the first pixel attribute of pixels in the main image, obtaining a circle as the fitting circle for the main target, and determining the first circle attribute of the fitting circle. Alternatively, interpolation algorithms, such as Lagrange interpolation, bilinear interpolation, or cubic spline interpolation, can be used to insert new points between known pixels in the main image, constructing a circular outline, obtaining the fitting circle for the main target, and extracting the first circle attribute of the fitting circle. The advantage of using interpolation algorithms for circle fitting is that it can improve the accuracy of circle fitting even when pixel distribution is uneven or data points are scarce. Alternatively, the main target in the main image can be identified, and circle fitting can be performed based on the first pixel attribute of the pixels corresponding to the main target to obtain the fitting circle for the main target.

[0066] To improve the accuracy of displacement monitoring, the main image and sub-images can be preprocessed before circular fitting, such as image enhancement, to suppress the differences caused by different lighting conditions on the main image and sub-images, resulting in enhanced main and sub-images.

[0067] In this embodiment, a circle fitting is performed based on the first pixel attributes of multiple pixels in the main image to obtain the first circle attribute of the fitted circle for the main target. This includes: processing the first pixel attributes of each pixel in the main image to obtain a grayscale image; filtering the grayscale image to obtain an image to be edge detected; performing edge detection on the image to be edge detected to determine at least one potential circumferential edge point from multiple pixels in the image to be edge detected; and performing circle fitting based on the position information of the at least one potential circumferential edge point using the least squares method to obtain the first circle attribute of the fitted circle for the main target.

[0068] The first pixel attribute includes at least color. Color can be represented by different combinations of red, green, and blue (RGB). The image to be edge detected can be an image obtained by filtering a grayscale image.

[0069] In this embodiment, a conversion formula can be used to weight the first pixel attribute of each pixel in the main image, converting the pixel color into a grayscale value, thereby converting the main image into a grayscale image. Then, a filtering algorithm can be used to filter the grayscale image to obtain the image to be edge detected. Optionally, the filtering algorithm includes, but is not limited to, amplitude limiting filtering, median filtering, mean filtering, Gaussian filtering, wavelet transform filtering, Kalman filtering, adaptive filtering, and least mean square filtering. Further, a pre-trained edge detection model can be used to process the second pixel attribute of each pixel in the image to be edge detected, extracting the edge contour in the image, and using the pixels on the edge contour as potential circular edge points. The second pixel attribute includes at least grayscale information and positional information. Optionally, the edge detection model can be a model based on the Roberts operator, a model based on the Sobel operator, a model based on the Prewitt operator, a model based on the Laplacian operator, a model based on the Log / Marr operator, or a model based on the Canny operator, etc. The selected potential circular edge points are approximately distributed on a circle. The least squares method can be used to fit a circle based on the positional information of multiple potential circumferential edge points, obtaining the first circle attributes of the fitted circle for the main target. These attributes may include the center and radius.

[0070] For example, the conversion formula can be expressed as: I = a ×R + b ×G + c ×B; where I represents the gray value of a pixel, which is the single-channel brightness value; R, G, and B represent the red, green, and blue components of a pixel, respectively (with values ​​ranging from 0 to 255); a, b, and c are weighted coefficients based on the user's visual sensitivity to different color components, such as a = 0.299, b = 0.587, and c = 0.114.

[0071] Specifically, the method for obtaining the image to be edge detected can be as follows: For each pixel in the grayscale image, the position information of the pixel in the grayscale image can be processed based on a Gaussian filter with a two-dimensional Gaussian distribution function to obtain the Gaussian weight of that pixel. Then, the Gaussian weight and grayscale value of that pixel are weighted to obtain the grayscale information corresponding to that pixel. Accordingly, the grayscale information corresponding to each pixel can be obtained. It is also possible to determine the grayscale information corresponding to the neighboring pixels within a preset neighborhood of that pixel. The grayscale information corresponding to the neighboring pixels can be averaged to obtain an average value, and the grayscale information corresponding to that pixel can be updated based on this average value. Furthermore, by combining the grayscale information corresponding to each pixel, the image to be edge detected is obtained.

[0072] For example, the two-dimensional Gaussian distribution function can be expressed as: G(x, y) = (1 / 2πσ²) exp(- (x² + y²) / 2σ²); where (x, y) represents the two-dimensional coordinates of the pixel; G(x, y) represents the Gaussian weight of the pixel; σ is the standard deviation, which controls the smoothness of the Gaussian filter; and exp is an exponential function.

[0073] The technical solution of this embodiment improves circle fitting efficiency by converting the main image into a grayscale image and filtering the grayscale image. Then, edge detection is performed on the image to be detected, identifying at least one potential circular edge point from multiple pixels in the image. Finally, circle fitting is performed on the position information of the at least one potential circular edge point using the least squares method to obtain the first circle attribute of the fitted circle for the main target. This improves the accuracy of circle fitting and enhances the accuracy of displacement monitoring of the monitored object.

[0074] In this embodiment, edge detection is performed on the image to be edge detected, and at least one potential circumferential edge point is determined from multiple pixels in the image to be edge detected. This includes: performing a convolution operation on the image to be edge detected and a preset operator matrix to obtain the gradient of each pixel in the image to be edge detected, and determining the gradient magnitude of the pixel based on the gradient of the pixel; determining the pixel as a strong edge point when the gradient magnitude of the pixel satisfies a preset strong edge condition, and determining the pixel as a weak edge point when the gradient magnitude of the pixel satisfies a preset weak edge condition; updating the weak edge point to a strong edge point if the preset neighborhood corresponding to the weak edge point contains a strong edge point; and determining potential circumferential edge points from strong edge points and candidate edge points based on preset circle information.

[0075] The preset operator matrix can be a Sobel operator matrix. The preset operator matrix consists of two sets of matrices: a horizontal detection matrix (with one column of 0 elements) and a vertical detection matrix (with one row of 0 elements). The gradient of a pixel can be used to characterize the change in grayscale value of that pixel, reflecting the strength of edges. For example, edges of an image have larger grayscale value changes and therefore larger gradients, while smoother parts of the image have smaller grayscale value changes and correspondingly smaller gradients. The gradient magnitude of a pixel can be used to characterize the rate and magnitude of grayscale change. Generally, a larger magnitude indicates a more drastic grayscale change in the pixel, making it more likely to be an edge or contour in the image. The preset neighborhood can be used to characterize the area surrounding a pixel. For example, the preset neighborhood can be a rectangle (with customizable side lengths), such as a 3×3 rectangle; or it can be a circle (with customizable radius), such as a circle with radius m. The preset strong edge condition can be used to determine whether a pixel is a strong edge point. The preset weak edge condition can be used to determine whether a pixel is a weak edge point. It should be noted that a weak edge point may be a true edge point, or it may be a point caused by noise or color changes. To obtain accurate results for circumferential edge points, weak edge points caused by the latter should be discarded.

[0076] In this embodiment, the image to be edge-detected is convolved with the horizontal detection matrix and the vertical detection matrix in the preset operator matrix to obtain the horizontal gradient matrix and the vertical gradient matrix after horizontal edge detection. The horizontal gradient matrix includes the gradient of each pixel in the image to be edge-detected in the horizontal direction; the vertical gradient matrix includes the gradient of each pixel in the vertical direction. For each pixel in the image to be edge-detected, the gradients in the horizontal and vertical directions of the same pixel can be squared, and then the sum of the two squared values ​​is squared to obtain the gradient magnitude of that pixel. Further, it can be determined whether the gradient magnitude of the pixel satisfies a preset strong edge condition. Optionally, the preset strong edge condition can be that the gradient magnitude is greater than a preset magnitude. If the gradient magnitude of the pixel is greater than the preset magnitude, then the pixel is determined to be a strong edge point. Otherwise, it is determined whether the gradient magnitude of the pixel satisfies a preset weak edge condition. Optionally, the preset weak edge condition can be that the gradient magnitude is within a preset range, such as the upper limit of the preset range being the preset magnitude. If the gradient magnitude of a pixel is within a preset range, the pixel is determined to be a weak edge point. If the gradient magnitude of a pixel is less than the lower limit of the preset range, the pixel can be ignored and no processing is performed. Furthermore, for each weak edge point, a preset neighborhood can be determined centered on that weak edge point, and pixels within that neighborhood can be considered as other pixels. It is then determined whether any of the other pixels contain strong edge points. If so, the weak edge point is considered a candidate edge point. If not, it is ignored and considered noise without processing. Further, preset circle information can be used to determine whether strong edge points and candidate edge points are potential edge points on the circumference, i.e., potential circumferential edge points.

[0077] For example, the formula for calculating the gradient magnitude of a pixel can be expressed as: ;in, and These represent the gradients of the pixel in the horizontal and vertical directions, respectively. This represents the gradient magnitude of a pixel. Furthermore, for each pixel (x, y), if its gradient magnitude satisfies the preset strong edge condition (G > T)... high If the gradient magnitude satisfies the preset strong edge condition (T), then the pixel is marked as a strong edge point; for each pixel (x, y), if its gradient magnitude satisfies the preset strong edge condition (T) low < G≤ T high If G represents the gradient magnitude, then the pixel is marked as a weak edge point; where G represents the gradient magnitude; T high This indicates the preset amplitude, i.e., the upper limit of the preset range; T lowThis is the lower limit of a preset range. Further, it checks whether each weak edge point is connected to at least one strong edge point within its 8-neighbors (8-neighborhood, i.e., the preset neighborhood). If a strong edge point exists in the 8-neighborhood of a weak edge point, the weak edge point is retained and marked as a candidate edge point. If no strong edge point exists in the 8-neighborhood of a weak edge point, the weak edge point is suppressed as a non-edge point.

[0078] In this embodiment, after performing convolution operations on the image to be edge detected and the preset operator matrix to obtain the gradient of each pixel in the image to be edge detected, the gradient angle of the pixel can be determined based on the gradient of the pixel. When the gradient angle of the pixel is an angle in the preset angle, the first pixel adjacent to the pixel is determined from the image to be edge detected based on the gradient angle and position information of the pixel. When the gradient magnitude of the pixel is less than the gradient magnitude of the first pixel adjacent to it, the gradient magnitude of the pixel is updated to a preset threshold to determine whether the updated gradient magnitude of the pixel satisfies the preset strong edge condition or the preset weak edge condition.

[0079] The gradient angle refers to the gradient direction of a pixel, representing the direction of grayscale change. A gradient angle of zero indicates that the pixel has a vertical edge, with the left side darker than the right. Preset angles can include one or more, for example, 0 degrees (horizontal), 45 degrees (diagonal from top right to bottom left), 90 degrees (vertical), and 135 degrees (diagonal from top left to bottom right). The preset threshold can be 0.

[0080] In this embodiment, the gradient of a pixel in the horizontal direction and the gradient in the vertical direction can be divided to obtain a quotient value. The arctangent function is used to determine the arctangent value of the quotient, which can be used as the gradient angle of the pixel. If the gradient angle of the pixel is any of the preset angles, a first neighboring point and a second neighboring point along the gradient angle can be determined based on the pixel's gradient angle and position information. Pixels on the line segment between the first and second neighboring points in the image to be edge detected are designated as the first pixel. Further, if the gradient magnitude of this pixel is less than the gradient magnitude of its adjacent first pixel, the gradient magnitude of this pixel is updated to a preset threshold, i.e., the gradient magnitude of this pixel is suppressed to zero. After updating the gradient magnitude of the pixel, the updated gradient magnitude can be used to determine whether the pixel meets the preset strong edge condition or the preset weak edge condition.

[0081] For example, the formula for calculating the gradient angle of a pixel can be expressed as: ;in, and These represent the gradients of the pixel in the horizontal and vertical directions, respectively. This represents the gradient angle of a pixel; This represents the arctangent function. For a pixel (x, y), if its gradient magnitude G(x, y) is not greater than the adjacent pixel (i.e., the first pixel) along the gradient angle, then the pixel value of the pixel is adjusted to zero.

[0082] In this embodiment, the position information of a pixel includes its horizontal and vertical coordinates. Correspondingly, the method for determining the first and second neighboring points along the gradient angle based on the pixel's gradient angle and position information can be as follows: when the pixel's gradient angle is 0 degrees, determine the difference between the pixel's horizontal coordinate and a preset first value, using this as the first horizontal coordinate; sum the pixel's horizontal coordinate and a preset second value to obtain the second horizontal coordinate; determine the first neighboring point based on the first horizontal coordinate and the pixel's vertical coordinate; and determine the second neighboring point based on the second horizontal coordinate and the pixel's vertical coordinate. For example, if the pixel's position information is (x, y), then the first neighboring point is (x-1, y), the second neighboring point is (x+1, y), and the preset second and first values ​​are both 1.

[0083] When the gradient angle of a pixel is 45 degrees, the ordinate value of the pixel is summed with a preset third value to obtain the first ordinate value; the difference between the ordinate value of the pixel and a preset fourth value is determined as the second ordinate value; the first neighboring point is determined based on the first abscissa and the first ordinate value; the second neighboring point is determined based on the second abscissa and the second ordinate value. For example, if the position information of the pixel is (x, y), then the first neighboring point is (x-1, y+1), the second neighboring point is (x+1, y-1), and the preset second value, preset first value, preset third value, and preset fourth value are all 1.

[0084] When the gradient angle of a pixel is 90 degrees, the first neighboring point is determined based on the pixel's x-coordinate and y-coordinate; the second neighboring point is determined based on the pixel's x-coordinate and y-coordinate. For example, if the pixel's position information is (x, y), then the first neighboring point is (x, y-1) and the second neighboring point is (x, y+1).

[0085] When the gradient angle of a pixel is 135 degrees, the first neighboring point is determined based on the first horizontal coordinate and the second vertical coordinate; the second neighboring point is determined based on the second horizontal coordinate and the first vertical coordinate. For example, if the position information of a pixel is (x, y), then the first neighboring point is (x-1, y-1) and the second neighboring point is (x+1, y-1).

[0086] In this embodiment, the method for determining potential circumferential edge points from strong edge points and candidate edge points based on preset circle information can include at least two methods:

[0087] One approach is to treat all strong edge points and all candidate edge points as first edge points; for each first edge point, determine the distance between the position information of the first edge point and the center of the circle in the preset circle information, and determine the difference between this distance and the radius of the circle in the preset circle information, using the absolute value of this difference as the geometric distance difference; if the difference is less than a preset threshold, then the first edge point is determined as a potential circumferential edge point. For example, the formula for calculating the geometric distance difference corresponding to the first edge point can be expressed as: ;in Indicates the first The geometric distance difference corresponding to each of the first edge points Indicates the first The location information of the first edge point This refers to the coordinates of the center of the circle in the preset circle information; R is the radius of the circle. When it is less than T (i.e., the preset threshold), the first... The first edge point is used as the potential circumferential edge point.

[0088] Another approach is to treat all strong edge points and all candidate edge points as first edge points; for each first edge point, determine the angle between the line connecting the first edge point to the center of the circle in the preset circle information and the x-coordinate axis, and determine the angle difference between this angle and the gradient angle of the first edge point; if the angle difference is less than a preset angle error threshold, then the first edge point is determined as a potential circumferential edge point. For example, the formula for calculating the angle difference corresponding to the first edge point can be expressed as: ;in Indicates the first The angle difference corresponding to the first edge point Indicates the first The gradient angle of the first edge point; Indicates the first The angle between the line connecting the first edge point to the center of the circle in the preset circle information and the x-coordinate axis. When Less than When (i.e., when the preset angle error threshold is reached), the first... The first edge point is used as the potential circumferential edge point.

[0089] It should be noted that both of the above methods can be combined to determine whether the first edge point is a potential circumferential edge point. As long as one of the above conditions is met, the first edge point can be considered a potential circumferential edge point. The advantage of determining potential circumferential edge points is that it can improve the accuracy of circle fitting, improve the accuracy of the main target's display representation in the image, and thus improve the accuracy of determining the first sub-pixel offset of the main target.

[0090] S230. Based on the first circle attribute and the second circle attribute corresponding to the main target in the main target reference image, determine the first sub-pixel offset of the main target.

[0091] In this embodiment, the center position in the first circle attribute and the center position in the second circle attribute corresponding to the main target in the main target reference image can be interpolated to obtain the sub-pixel offset of the main target in the horizontal and vertical directions, which is used as the first sub-pixel offset.

[0092] For example, the formula for determining the first sub-pixel offset can be: .in, and These are the sub-pixel offsets of the main target in the horizontal and vertical directions, respectively; Indicates the position of the center of the circle in the first circle attribute; This represents the center position of the main target in the reference image. The formula for determining the second sub-pixel offset can be: .in, and These represent the sub-pixel offsets of the sub-target in the horizontal and vertical directions, respectively. Indicates the position of the center of the circle in the second circle attribute; The center position of the sub-target in the reference image.

[0093] S240. Based on the sub-image and a pre-determined sub-target reference image, determine the second sub-pixel offset of the sub-target.

[0094] It should be noted that the method of determining the second sub-pixel offset of the sub-target based on the sub-image and the pre-determined sub-target reference image is similar to the method of determining the first sub-pixel offset of the main target based on the main image and the pre-determined main target reference image, and will not be elaborated here.

[0095] S250. Correct the first sub-pixel offset based on the second sub-pixel offset to obtain the target sub-pixel offset of the main target.

[0096] S260. Based on the physical size of the main target, the reference image of the main target, the camera deployment attributes, and the target sub-pixel offset, determine the magnitude and direction of the displacement of the object to be monitored.

[0097] The technical solution of this embodiment obtains the first circle attribute of the fitted circle of the main target by performing circle fitting based on the first pixel attribute of multiple pixels in the main image. Then, based on the first circle attribute and the second circle attribute corresponding to the main target in the main target reference image, the first sub-pixel offset of the main target is determined, thereby realizing the sub-pixel level representation of the offset and improving the accuracy of the target offset determination, thus improving the accuracy of displacement monitoring.

[0098] Example 3

[0099] Figure 11 This is a schematic diagram of a binocular and multi-view displacement measurement device according to Embodiment 3 of the present invention. Figure 11 As shown, the device includes: an image acquisition module 310, a first subpixel offset determination module 320, a target subpixel offset determination module 330, and a displacement determination module 340.

[0100] The image acquisition module 310 is used to acquire a main image corresponding to the object to be monitored, captured by the main camera, and a sub-image corresponding to a first object, captured by at least one sub-camera connected to the main camera; wherein the object to be monitored includes a main target; the first object includes sub-targets; the first object is an object with a fixed position; the field of view of the sub-camera changes with the field of view of the main camera; the first sub-pixel offset determination module 320 is used to determine the first sub-pixel offset of the main target based on the main image and a pre-determined main target reference image, and to determine the first sub-pixel offset of the main target based on the sub-image and the pre-determined sub-target. A reference image is used to determine the second sub-pixel offset of the sub-target; wherein the main target reference image is based on the initial frame captured by the main camera on the main target; the sub-target reference image is based on the initial frame captured by the sub-camera on the sub-target; a target sub-pixel offset determination module 330 is used to correct the first sub-pixel offset based on the second sub-pixel offset to obtain the target sub-pixel offset of the main target; a displacement determination module 340 is used to determine the magnitude and direction of the displacement of the object to be monitored based on the physical size of the main target, the main target reference image, camera deployment attributes, and the target sub-pixel offset.

[0101] The technical solution of this embodiment involves acquiring a main image corresponding to the object to be monitored, captured by a main camera, and a sub-image corresponding to a first object, captured by at least one sub-camera connected to the main camera. The object to be monitored includes a main target; the first object includes sub-targets; the first object is a fixed-position object; the field of view of the sub-cameras changes with the field of view of the main camera; based on the main image and a pre-determined main target reference image, a first sub-pixel offset of the main target is determined, and based on the sub-images and a pre-determined sub-target reference image, a second sub-pixel offset of the sub-target is determined; wherein, the main target reference image is an initial frame captured by the main camera on the main target; the sub-target reference image is an initial frame captured by the sub-camera on the sub-target; the first sub-pixel offset is corrected based on the second sub-pixel offset to obtain the target sub-pixels of the main target. Offset; Based on the physical size of the main target, the main target reference image, camera deployment attributes, and target sub-pixel offset, the magnitude and direction of the displacement of the object to be monitored are determined. This solves the problem of misjudging the deformation of the monitored target due to thermal expansion and contraction of the internal structure of the equipment in the existing technology. It realizes that by connecting the main camera and the sub-camera, the first sub-pixel offset of the main target is determined by the main image and the pre-determined main target reference image. At the same time, the second sub-pixel offset of the sub-target is determined by the sub-image and the pre-determined sub-target reference image. The first sub-pixel offset of the sub-camera is used to compensate the second sub-pixel offset of the main camera to obtain the target sub-pixel offset of the main target. This improves the accuracy of offset determination, thereby improving the accuracy of displacement determination of the object to be monitored and effectively avoiding misjudgment of the deformation of the monitored target.

[0102] Optionally, based on the above-described device, the first sub-pixel offset determination module 320 includes:

[0103] The first circle attribute determination unit is used to perform circle fitting based on the first pixel attribute of multiple pixels in the main image to obtain the first circle attribute of the fitted circle of the main target.

[0104] The first sub-pixel offset determination unit is used to determine the first sub-pixel offset of the main target based on the first circle attribute and the second circle attribute corresponding to the main target in the main target reference image.

[0105] Based on the above-described device, optionally, the first circle attribute determination unit includes:

[0106] A grayscale image determination unit is used to process the first pixel attribute of each pixel in the main image to obtain a grayscale image; wherein, the first pixel attribute includes at least color;

[0107] The edge detection image determination unit is used to filter the grayscale image to obtain the edge detection image;

[0108] A potential circumferential edge point determination unit is used to perform edge detection on the image to be edge detected and determine at least one potential circumferential edge point from multiple pixels in the image to be edge detected.

[0109] The first circle attribute determination unit is used to perform circle fitting on the position information of at least one of the potential circle edge points based on the least squares method to obtain the first circle attribute of the fitted circle of the main target.

[0110] Based on the above-described device, the optional potential circumferential edge point determination unit includes:

[0111] The gradient magnitude determination unit is used to perform convolution operation on the image to be edge detected and a preset operator matrix to obtain the gradient of each pixel in the image to be edge detected, and to determine the gradient magnitude of the pixel based on the gradient of the pixel.

[0112] The gradient magnitude determination unit is used to determine that the pixel is a strong edge point when the gradient magnitude of the pixel meets the preset strong edge condition, and to determine that the pixel is a weak edge point when the gradient magnitude of the pixel meets the preset weak edge condition.

[0113] The candidate edge point determination unit is used to determine the weak edge point as a candidate edge point if the preset neighborhood corresponding to the weak edge point contains a strong edge point.

[0114] The potential circumferential edge point determination subunit is used to determine potential circumferential edge points from the strong edge points and the candidate edge points based on preset circle information.

[0115] Optionally, based on the above-described apparatus, the apparatus may further include:

[0116] The gradient angle determination unit is used to determine the gradient angle of the pixel based on the gradient of the pixel.

[0117] The first pixel point determination unit is used to determine a first pixel point adjacent to the pixel point from the image to be edge detected based on the gradient angle and position information of the pixel point when the gradient angle of the pixel point is an angle in the preset angle.

[0118] The gradient magnitude update unit is used to update the gradient magnitude of the pixel to a preset threshold when the gradient magnitude of the pixel is less than the gradient magnitude of the first pixel adjacent to it, so as to determine whether the updated gradient magnitude of the pixel satisfies a preset strong edge condition or a preset weak edge condition.

[0119] Based on the above-described apparatus, the optional target sub-pixel offset determination module 330 includes:

[0120] The estimated subpixel movement offset determination unit is used to input the second subpixel offset into the main camera calibration model to obtain the estimated subpixel movement offset corresponding to the main camera.

[0121] The target sub-pixel offset determination unit is used to correct the first sub-pixel offset based on the estimated sub-pixel movement offset to obtain the target sub-pixel offset of the main target.

[0122] Based on the above-mentioned device, the optional displacement determination module 340 includes:

[0123] The conversion parameter determination unit is used to determine the conversion parameters based on the physical size of the main target and the second circle attribute corresponding to the main target in the main target reference image;

[0124] The actual offset determination unit is used to determine the actual offset based on the conversion parameters and the target sub-pixel offset;

[0125] The displacement determination unit is used to determine the magnitude and direction of the displacement of the object to be monitored based on the camera deployment attributes and the actual offset.

[0126] The binocular and multi-view displacement measurement device provided in the embodiments of the present invention can execute the binocular and multi-view displacement measurement method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the method execution.

[0127] Example 4

[0128] Figure 12 This is a schematic diagram of an electronic device implementing the binocular and multi-view displacement measurement method according to embodiments of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0129] like Figure 12As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0130] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0131] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as binocular and multi-view displacement measurement methods.

[0132] In some embodiments, the binocular and multi-view displacement measurement method can be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the binocular and multi-view displacement measurement method described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform the binocular and multi-view displacement measurement method by any other suitable means (e.g., by means of firmware).

[0133] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0134] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0135] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0136] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0137] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0138] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0139] This invention also provides a computer program product, including a computer program that, when executed by a processor, implements the binocular and multi-view displacement measurement method provided in any embodiment of this invention.

[0140] In implementing the computer program product, computer program code for performing the operations of this invention can be written in one or more programming languages ​​or a combination thereof. Programming languages ​​include object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0141] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0142] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A method for measuring displacement based on binocular and multiocular displacement measurement, characterized in that, The method comprises the following steps: acquiring a main image corresponding to a to-be-monitored object captured by a main camera and a sub-image corresponding to a first object captured by at least one sub-camera connected to the main camera; wherein the to-be-monitored object comprises a main target; the first object comprises a sub-target; the first object is a fixed-position object; a field of view of the sub-camera changes following a field of view of the main camera; the main image and the sub-image are images of the same timestamp; determining a first sub-pixel offset of the main target based on the main image and a predetermined main target reference image, and determining a second sub-pixel offset of the sub-target based on the sub-image and a predetermined sub-target reference image; wherein the main target reference image is an initial frame captured by the main camera on the main target; the sub-target reference image is an initial frame captured by the sub-camera on the sub-target; correcting the first sub-pixel offset based on the second sub-pixel offset to obtain a target sub-pixel offset of the main target; determining a displacement size and direction of the to-be-monitored object based on a physical size of the main target, the main target reference image, camera deployment attributes and the target sub-pixel offset; the step of correcting the first sub-pixel offset based on the second sub-pixel offset to obtain the target sub-pixel offset of the main target comprises: inputting the second sub-pixel offset into a main-sub camera calibration model to obtain an estimated sub-pixel movement offset corresponding to the main camera; correcting the first sub-pixel offset based on the estimated sub-pixel movement offset to obtain the target sub-pixel offset of the main target; the main-sub camera calibration model is determined based on an association between a pixel offset of the main camera and a pixel offset of the sub-camera; The main sub-camera comprises a main camera and a sub-camera, and the main sub-camera calibration model is constructed in the following manner: the main sub-camera is placed in the same temperature and same illumination environment, and is calibrated, and the main target and the sub-target are fixed and unchanged in the calibration state; when the calibration is performed, the main sub-camera is moved, and the distance between the main camera and the main target is D m , and the distance between the sub-camera and the sub-target is d s when the main camera is in the horizontal state; the distance between the main camera and the main target is D m / tanθ, and the distance between the sub-camera and the sub-target is d s / tanθ when the main camera is in the upward-looking state and the downward-looking state; θ is the included angle between the main sub-camera and the horizontal plane; when the temperature changes, the internal structure of the main sub-camera expands and shrinks due to heat, the images of the main sub-camera are subject to temperature drift, and the objects in the images are offset; the main sub-camera calibration model is constructed by taking the pixel offset amount of the sub-camera as the independent variable and the pixel offset amount of the main camera as the dependent variable. wherein the main sub-camera calibration model is represented as: X M = f x (X S ); Y M = f y (Y S ); X S and Y S respectively represent the sub-pixel offset in the horizontal direction and the sub-pixel offset in the vertical direction in the second sub-pixel offset; X M and Y M respectively represent the sub-pixel offset in the horizontal direction and the sub-pixel offset in the vertical direction in the target sub-pixel offset; f x () and f y () represent the objective function in the main sub-camera calibration model, and the objective function includes a first-order linear function, an n-order polynomial, a nonlinear function, and a neural network function.

2. The method of claim 1, wherein, the step of determining the first sub-pixel offset of the main target based on the main image and the predetermined main target reference image comprises: performing circle fitting based on first pixel attributes of a plurality of pixel points in the main image to obtain first circle attributes of a main target fitting circle; determining the first sub-pixel offset of the main target based on the first circle attributes and second circle attributes corresponding to the main target in the main target reference image.

3. The method of claim 2, wherein, the step of performing circle fitting based on first pixel attributes of a plurality of pixel points in the main image to obtain first circle attributes of a main target fitting circle comprises: processing the first pixel attributes of each pixel point in the main image to obtain a grayscale image; wherein the first pixel attributes at least include color; performing filter processing on the grayscale image to obtain a to-be-edge-detected image; performing edge detection on the to-be-edge-detected image to determine at least one potential circular edge point from a plurality of pixel points in the to-be-edge-detected image; performing circle fitting on position information of at least one of the potential circular edge points based on a least square method to obtain the first circle attributes of the main target fitting circle.

4. The method of claim 3, wherein, the step of performing edge detection on the to-be-edge-detected image to determine at least one potential circular edge point from a plurality of pixel points in the to-be-edge-detected image comprises: Conducting convolution operation on the image to be edge detected and a preset operator matrix to obtain a gradient of each pixel point in the image to be edge detected, and determining a gradient amplitude of the pixel point based on the gradient of the pixel point; When the gradient amplitude of the pixel point meets a preset strong edge condition, determining that the pixel point is a strong edge point, and when the gradient amplitude of the pixel point meets a preset weak edge condition, determining that the pixel point is a weak edge point; If the preset neighborhood corresponding to the weak edge point contains a strong edge point, regarding the weak edge point as a candidate edge point; Determining a potential circular edge point from the strong edge point and the candidate edge point based on preset circle information.

5. The method of claim 4, wherein, After the convolution operation on the image to be edge detected and the preset operator matrix to obtain the gradient of each pixel point in the image to be edge detected, the method further comprises: Determining a gradient angle of the pixel point based on the gradient of the pixel point; When the gradient angle of the pixel point is an angle in preset angles, determining a first pixel point adjacent to the pixel point from the image to be edge detected based on the gradient angle and position information of the pixel point; When the gradient amplitude of the pixel point is smaller than a gradient amplitude of the first pixel point adjacent to the pixel point, updating the gradient amplitude of the pixel point to a preset threshold value to determine whether the updated gradient amplitude of the pixel point meets the preset strong edge condition or the preset weak edge condition.

6. The method of claim 1, wherein, The determining the displacement size and direction of the to-be-monitored object based on the physical size of the main target, the main target reference image, the camera deployment attribute and the target sub-pixel offset comprises: determining a conversion parameter based on the physical size of the main target and a second circular attribute corresponding to the main target in the main target reference image; determining an actual offset based on the conversion parameter and the target sub-pixel offset; determining the displacement size and direction of the to-be-monitored object based on the camera deployment attribute and the actual offset.

7. A binocular and multiocular displacement measuring apparatus based on, characterized by, Comprise: An image acquisition module is configured to acquire a main image corresponding to a to-be-monitored object captured by a main camera and a sub-image corresponding to a first object captured by at least one sub-camera connected to the main camera; wherein the to-be-monitored object includes a main target; the first object includes a sub-target; the first object is a fixed-position object; the field of view of the sub-camera changes following the field of view of the main camera; the main image and the sub-image are images of the same timestamp; A first sub-pixel offset determination module is configured to determine a first sub-pixel offset of the main target based on the main image and a pre-determined main target reference image, and determine a second sub-pixel offset of the sub-target based on the sub-image and a pre-determined sub-target reference image; wherein the main target reference image is an initial frame captured by the main camera on the main target; and the sub-target reference image is an initial frame captured by the sub-camera on the sub-target; A target sub-pixel offset determination module is configured to correct the first sub-pixel offset based on the second sub-pixel offset to obtain a target sub-pixel offset of the main target. A displacement amount determination module is configured to determine a displacement amount and direction of the object to be monitored based on a physical size of the main target, the main target reference image, camera deployment attributes, and the target sub-pixel offset amount. The target sub-pixel offset amount determination module comprises: a predicted sub-pixel movement offset determination unit configured to input the second sub-pixel offset amount into a main sub-camera calibration model to obtain a predicted sub-pixel movement offset amount corresponding to the main camera; and a target sub-pixel offset determination unit configured to correct the first sub-pixel offset amount based on the predicted sub-pixel movement offset amount to obtain the target sub-pixel offset amount of the main target; the main sub-camera calibration model is determined based on a correlation between a pixel offset amount of the main camera and a pixel offset amount of the sub-camera; and the main sub-camera comprises the main camera and the sub-camera. The device is further configured to place the main sub-camera in the same temperature and same illumination environment, calibrate the main sub-camera, and fix the main target and the sub-target in a calibration state; when calibrating, move the main sub-camera, and when the main camera is in a horizontal state, the distance between the main camera and the main target is D m , and the distance between the sub-camera and the sub-target is d s ; when the main camera is in a downward state or an upward state, the distance between the main camera and the main target is D m / tanθ, and the distance between the sub-camera and the sub-target is d s / tanθ; θ is an included angle between the main sub-camera and the horizontal plane; place the main sub-camera in the same temperature environment, when the temperature changes, the internal structure of the main sub-camera expands or shrinks due to heat, the images of the main sub-camera are subject to temperature drift, and objects in the images are subject to offset, take the pixel offset of the sub-camera as an independent variable, and take the pixel offset of the main camera as a dependent variable to construct the main sub-camera calibration model; the main sub-camera calibration model is represented as: X M =f x (X S ); Y M =f y (Y S ); X S and Y S represent the sub-pixel offset in the horizontal direction and the sub-pixel offset in the vertical direction in the second sub-pixel offset, respectively; X M and Y M represent the sub-pixel offset in the horizontal direction and the sub-pixel offset in the vertical direction in the target sub-pixel offset, respectively; f x () and f y () represent a target function in the main sub-camera calibration model, and the target function includes a first-order linear function, an n-order polynomial, a nonlinear function, and a neural network function.

8. An electronic device, comprising: The electronic device comprises: at least one processor; and a memory connected to the at least one processor in communication; wherein The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the binocular and multi-view displacement measurement method according to any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions for enabling the processor to implement the binocular and multi-view displacement measurement method according to any one of claims 1-6 when executed.

Citation Information

Patent Citations

  • A method for determining an optimal edge of a given region

    CN109558908A

  • Steel rail longitudinal displacement monitoring method and system based on visual monitoring

    CN116295040A

  • X-ray back scattering image deformation correction method, system and device based on visual positioning and medium

    CN118864328A

  • Multi-equipment cascade vision monitoring method and device, electronic equipment and medium

    CN119205608A