Three-dimensional deformation monitoring method, device, computer equipment and storage medium
Through the three-dimensional deformation monitoring method of dual-target L-shaped point distribution and monocular camera, the problems of calibration errors and sensitivity of light changes in the camera are solved, and high-precision three-dimensional deformation monitoring and unlimited measurement range are achieved.
Patent Information
- Application Number
- CN202210805281.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-08
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2042-07-08
AI Technical Summary
In the prior art, a three-dimensional deformation monitoring system based on binocular vision is difficult to achieve high-precision structural deformation monitoring due to the large calibration error of the camera's internal and external parameters, sensitivity to light changes and high calculation complexity, and the camera baseline limits the measurement range.
The dual-target L-shaped dot distribution method is adopted to obtain pictures of the monitoring area using a monocular camera. Through pre-processing, edge gradient matching, sub-pixel fitting and three-dimensional deformation variable aggregation, avoid internal and external parameter calibration of the camera, adapt to a variable monitoring environment, and simplify the calculation process.
High-precision three-dimensional deformation monitoring is realized, and the camera baseline has an unlimited measurement range, which improves the stability and measurement efficiency of the system.
Smart Images

Figure CN115049718B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a three-dimensional deformation monitoring method, and more specifically to a three-dimensional deformation monitoring method, device, computer equipment and storage medium. Background Art
[0002] With the development of the economy, the market demand for vision-based deformation monitoring technology will become increasingly greater, especially in the fields of safety warning and quality control. The three-dimensional deformation monitoring of objects has strong application needs in many industrial scenarios. Currently, the three-dimensional deformation monitoring of structures is commonly used based on binocular vision stereo matching technology. Its main process includes: calibration of camera internal and external parameters; binocular correction; binocular stereo matching to generate disparity maps; obtaining depth information; and calculating the three-dimensional deformation of the structure before and after.
[0003] Due to differences in camera production processes, existing technologies have large errors in the calibration of internal and external parameters of binocular systems, resulting in system errors and making it difficult to achieve high-precision deformation monitoring of structures; binocular vision algorithms are very sensitive to changes in lighting and are very unstable in outdoor scenes; the computational complexity is high; and because the measurement range is closely related to the baseline formed by the distance between the two cameras: the larger the baseline, the longer the measurement range; the smaller the baseline, the closer the measurement range, the camera baseline limits the measurement range.
[0004] Therefore, it is necessary to design a new method to avoid the calibration of camera internal and external parameters, cope with the changing monitoring environment, simplify the calculation process, and have an unlimited measurement range of the camera baseline. Summary of the Invention
[0005] The purpose of the present invention is to overcome the defects of the prior art and provide a three-dimensional deformation monitoring method, device, computer equipment and storage medium.
[0006] To achieve the above objectives, the present invention adopts the following technical solution: a three-dimensional deformation monitoring method, comprising:
[0007] Obtain an image of the monitoring area where targets are installed in a dual-target L-shaped pattern on the monitoring target;
[0008] Preprocessing the image to obtain a preprocessing result;
[0009] Performing edge gradient matching on the preprocessing result to obtain a matching result;
[0010] Performing sub-pixel fitting on the matching result to obtain a fitting result;
[0011] The fitting results are aggregated into three-dimensional deformation variables to obtain monitoring results.
[0012] A further technical solution is: preprocessing the image to obtain a preprocessing result includes:
[0013] Performing grayscale processing on the image to obtain a grayscale image;
[0014] The grayscale image is smoothed and denoised and the ROI region is detected to obtain a preprocessing result.
[0015] A further technical solution is: performing edge gradient matching on the preprocessing result to obtain a matching result, including:
[0016] Gray-scaling the picture and the template image according to the preprocessing result;
[0017] Calculating edge gradient images in the X-axis and Y-axis directions of the picture and the template image respectively to obtain a gradient feature matrix of the picture and a gradient feature matrix of the template image;
[0018] The gradient feature matrix of the picture and the gradient feature matrix of the template image are matched for pixel similarity to obtain a matching result.
[0019] A further technical solution is that the gradient feature matrix of the picture and the gradient feature matrix of the template image are matched for pixel similarity to obtain a matching result, including:
[0020] A standard correlation coefficient matching algorithm is used to evaluate the similarity between the gradient feature matrix of the image and the gradient feature matrix of the template image to obtain a similarity matching matrix in pixel dimension to form the matching result.
[0021] A further technical solution is: performing sub-pixel fitting on the matching result to obtain a fitting result includes:
[0022] Filtering eight neighborhoods of the pixel position with the highest matching degree in the matching result, and performing binomial surface fitting to obtain a surface;
[0023] The sub-pixel positions of the extreme points of the surface are extracted to obtain fitting results.
[0024] A further technical solution is: performing three-dimensional deformation aggregation on the fitting results to obtain monitoring results, including:
[0025] Extracting the horizontal target image size and the vertical target image size;
[0026] Calculate the scale conversion factors for the horizontal and vertical planes respectively;
[0027] Multiplying the fitting result by the corresponding scale conversion factor to obtain the actual high-precision two-dimensional deformation variables of the two planes;
[0028] The average value of the overlap direction of the two planes in the actual high-precision two-dimensional deformation variables of the two planes is the deformation variable in the overlap direction of the horizontal plane and the vertical plane;
[0029] Calculate the residual amount of the coincidence direction;
[0030] The corresponding residual amount is subtracted from the deformation amount in the overlapping direction of the horizontal plane and the vertical plane to obtain the monitoring result.
[0031] The present invention also provides a three-dimensional deformation monitoring device, comprising:
[0032] An acquisition unit is used to acquire an image of a monitoring area where targets are installed in a dual-target L-shaped arrangement on a monitoring target;
[0033] A preprocessing unit, configured to preprocess the image to obtain a preprocessing result;
[0034] A matching unit, configured to perform edge gradient matching on the preprocessing result to obtain a matching result;
[0035] A fitting unit, configured to perform sub-pixel fitting on the matching result to obtain a fitting result;
[0036] The aggregation unit is used to aggregate the three-dimensional deformation of the fitting result to obtain the monitoring result.
[0037] Its further technical solution is: the pre-processing unit includes:
[0038] A grayscale subunit, configured to perform grayscale processing on the image to obtain a grayscale image;
[0039] The detection subunit is used to perform smoothing and denoising on the grayscale image and detect the ROI region to obtain a preprocessing result.
[0040] The present invention further provides a computer device, comprising a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the above method when executing the computer program.
[0041] The present invention also provides a storage medium, wherein the storage medium stores a computer program, and the computer program implements the above method when executed by a processor.
[0042] Compared with the prior art, the present invention has the following advantages: the present invention adopts a dual-target L-shaped arrangement and a monocular camera to obtain images of the monitoring area, thus avoiding the calibration of the camera's internal and external parameters. After preprocessing the images, the present invention performs edge gradient matching, sub-pixel fitting, and three-dimensional shape aggregation, which can cope with changing monitoring environments, simplifies the calculation process, and has an unlimited measurement range for the camera baseline.
[0043] The present invention will be further described below with reference to the accompanying drawings and specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0045] Figure 1 A schematic diagram of an application scenario of the three-dimensional deformation monitoring method provided by an embodiment of the present invention;
[0046] Figure 2 A schematic diagram of a flow chart of a three-dimensional deformation monitoring method provided by an embodiment of the present invention;
[0047] Figure 3 A schematic diagram of a sub-process of a three-dimensional deformation monitoring method provided by an embodiment of the present invention;
[0048] Figure 4 A schematic diagram of a sub-process of a three-dimensional deformation monitoring method provided by an embodiment of the present invention;
[0049] Figure 5 A schematic diagram of a sub-process of a three-dimensional deformation monitoring method provided by an embodiment of the present invention;
[0050] Figure 6 A schematic diagram of a sub-process of a three-dimensional deformation monitoring method provided by an embodiment of the present invention;
[0051] Figure 7 A schematic diagram of an L-shaped point distribution provided by an embodiment of the present invention;
[0052] Figure 8 A schematic block diagram of a three-dimensional deformation monitoring device provided in an embodiment of the present invention;
[0053] Figure 9 A schematic block diagram of a preprocessing unit of a three-dimensional deformation monitoring device provided in an embodiment of the present invention;
[0054] Figure 10 A schematic block diagram of a matching unit of a three-dimensional deformation monitoring device provided in an embodiment of the present invention;
[0055] Figure 11 A schematic block diagram of a fitting unit of a three-dimensional deformation monitoring device provided in an embodiment of the present invention;
[0056] Figure 12 A schematic block diagram of an aggregation unit of a three-dimensional deformation monitoring device provided in an embodiment of the present invention;
[0057] Figure 13 A schematic block diagram of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0058] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0059] It will be understood that when used in this specification and the appended claims, the terms “comprises” and “comprising” indicate the presence of described features, integers, steps, operations, elements and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0060] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the present invention. As used in the specification and appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms unless the context clearly indicates otherwise.
[0061] It should be further understood that the term "and / or" used in the present description and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0062] See also Figure 1 and Figure 2 , Figure 1 Schematic diagram of an application scenario of the three-dimensional deformation monitoring method provided by an embodiment of the present invention. Figure 2 This is a schematic flow chart of a three-dimensional deformation monitoring method provided in an embodiment of the present invention. This method is applied to a server. The server exchanges data with a camera, avoiding calibration of camera intrinsic and extrinsic parameters by using partially known quantities of the monitored target. Furthermore, the proposed matching algorithm is highly adaptable to changes in illumination, achieving high-precision three-dimensional deformation monitoring of the target structure through a monocular vision algorithm.
[0063] Figure 2 FIG. 1 is a flow chart of a three-dimensional deformation monitoring method provided by an embodiment of the present invention. Figure 2 As shown, the method includes the following steps S110 to S150.
[0064] S110: Acquire a picture of a monitoring area where targets are installed in a dual-target L-shaped arrangement on the monitoring target.
[0065] See also Figure 7 To achieve high-precision 3D deformation monitoring using monocular vision, a dual-target L-shaped layout is used on the monitoring target, with the monocular camera mounted at a 45-degree angle. This L-shaped layout, combined with certain image algorithm techniques, enables the effective 3D deformation monitoring of the monocular system.
[0066] S120: Preprocess the image to obtain a preprocessing result.
[0067] In this embodiment, the preprocessing result refers to the detection frame formed by the area where the target is located.
[0068] In one embodiment, see Figure 3 , the above-mentioned step S120 may include steps S121 to S122.
[0069] S121 , performing grayscale processing on the image to obtain a grayscale image.
[0070] In this embodiment, the grayscale image refers to an image formed after grayscale processing is performed on the image.
[0071] S122: performing smoothing and denoising on the grayscale image and detecting the ROI region to obtain a preprocessing result.
[0072] In the preprocessing stage, the initial image is first grayscaled to obtain a grayscale image, and then the grayscale image is smoothed and denoised using a 5*5 Gaussian kernel. The Gaussian function is: A 5x5 Gaussian template is obtained, and the processed image is Gaussian filtered pixel by pixel. The filtered image is first binarized using the template's local mean, and then contour detection is performed to obtain the position information of the matching target. This is used for extracting the template image and subsequently evaluating matching accuracy. During the preprocessing phase, the target position information is also used to calculate the coordinates of the search area for subsequent frames, known as the ROI (Region of Interest). This avoids full-image matching, improves algorithm efficiency, and simplifies the calculation process.
[0073] S130 , performing edge gradient matching on the preprocessing result to obtain a matching result.
[0074] In this embodiment, the matching result refers to a similarity matching matrix in the pixel dimension.
[0075] In one embodiment, see Figure 4 , the above-mentioned step S130 may include steps S131 to S133.
[0076] S131, gray-scaling the picture and the template image according to the preprocessing result;
[0077] S132 , respectively calculating edge gradient images of the picture and the template image in the X-axis and Y-axis directions to obtain a gradient feature matrix of the picture and a gradient feature matrix of the template image.
[0078] Grayscale the image to be matched and the template image according to the ROI area, and then use Calculate the CGI (edge gradient image in the X-axis direction, candidate_gradient_image) and TGI (edge gradient image in the Y-axis direction, Template_gradient_image) of the image to be matched and the template image respectively.
[0079] S133 , performing pixel similarity matching on the gradient feature matrix of the picture and the gradient feature matrix of the template image to obtain a matching result.
[0080] In this embodiment, a standard correlation coefficient matching algorithm is used to evaluate the similarity between the gradient feature matrix of the image and the gradient feature matrix of the template image to obtain a similarity matching matrix in the pixel dimension to form the matching result.
[0081] A gradient feature matrix is constructed to match the feature matrices of the image and the template image, and pixel-by-pixel similarity matching is performed on the TGI on the CGI of the subsequent image frame to be matched. Specifically, a standard correlation coefficient matching algorithm is used to evaluate the similarity between the TGI and the window CGI in the ROI area of the frame to be matched, thereby obtaining a similarity matching matrix in the pixel dimension.
[0082] S140: Perform sub-pixel fitting on the matching result to obtain a fitting result.
[0083] In this embodiment, the fitting result refers to the result of sub-pixel fitting of the similarity matching matrix in the pixel dimension.
[0084] In one embodiment, see Figure 5 , the above-mentioned step S140 may include steps S141 to S142.
[0085] S141, screening the eight neighborhoods of the pixel position with the highest matching degree in the matching result, and performing binomial surface fitting to obtain a surface;
[0086] S142: Extract the sub-pixel position of the extreme point of the surface to obtain a fitting result.
[0087] Specifically, through edge gradient matching, a pixel-dimensional matching similarity matrix can be obtained for each frame of the image to be matched. In order to further improve the matching accuracy, the eight neighborhoods of the pixel with the highest matching degree are selected for binomial surface fitting, and the sub-pixel position of the extreme point of the surface is extracted as the final matching result to form the fitting result.
[0088] S150: Perform three-dimensional deformation aggregation on the fitting result to obtain a monitoring result.
[0089] In this embodiment, the monitoring result refers to the result formed by aggregating the three-dimensional deformation variables of the fitting result.
[0090] In one embodiment, see Figure 6 , the above-mentioned step S150 may include steps S151 to S156.
[0091] S151. Extract the horizontal target image size and the vertical target image size.
[0092] like Figure 7 As shown in the figure, an L-shaped dual-target arrangement is placed on the monitoring target to monitor pixel deformation on the horizontal and vertical planes respectively. Given the actual size of the L-shaped dual-target, Target_width, the image size of the horizontal target, horizontal_width, and the image size of the vertical target, vertical_width, are extracted by combining image algorithm technology.
[0093] S152. Calculate the horizontal and vertical scale conversion factors respectively.
[0094] In this embodiment, the horizontal scale conversion factor HSF and the vertical scale conversion factor VSF are calculated respectively using HSF=Target_width / horizontal_width and VSF=Target_width / vertical_width.
[0095] S153 : Multiply the fitting result by a corresponding scale conversion factor to obtain actual high-precision two-dimensional deformation variables of the two planes.
[0096] Through the edge gradient matching algorithm, the two-dimensional sub-pixel deformation variables (Pixel_displacement) of the horizontal and vertical planes of the L-shaped target can be obtained respectively. Multiplying by the corresponding scale conversion factor (HSF / VSF) can obtain the actual high-precision two-dimensional deformation variables of the two planes.
[0097] S154, taking the average of the actual high-precision two-dimensional deformation variables of the two planes in the direction of the two planes coinciding as the deformation variable in the direction of the horizontal plane and the vertical plane coinciding;
[0098] S155, calculating the residual amount of the coincidence direction;
[0099] Specifically, the residuals of the horizontal and vertical planes in the direction of overlap are calculated. The original vertical value in the overlap direction is subtracted from the calculated mean. Similarly, the original horizontal value in the overlap direction is subtracted from the calculated mean. This gives the residuals of the two planes, which are used to calibrate the deformation in the direction where the two planes do not overlap.
[0100] S156. Subtract the corresponding residual from the deformation in the overlapping direction of the horizontal plane and the vertical plane to obtain a monitoring result.
[0101] The two planes have one directional axis that overlaps. In order to aggregate the two two-dimensional deformation variables into a three-dimensional deformation variable, the mean of the deformation variables in the overlapping direction is taken as the final deformation variable in that direction, and the residuals H_residual and V_residual of the two planes are calculated respectively; the deformation variables in the non-overlapping directions of the horizontal and vertical planes are subtracted from the corresponding residuals, thereby constructing the deformation variables of the monitoring target in the three directions of the X-axis, Y-axis, and Z-axis, and ultimately achieving the effect of high-precision three-dimensional deformation monitoring using monocular vision.
[0102] The above-mentioned 3D deformation monitoring method uses a dual-target L-shaped layout and a monocular camera to obtain images of the monitoring area, avoiding the calibration of the camera's internal and external parameters. After preprocessing the image, edge gradient matching, sub-pixel fitting, and 3D deformation aggregation are performed. It can cope with changing monitoring environments, simplifies the calculation process, and has an unlimited measurement range for the camera baseline.
[0103] Figure 8 FIG is a schematic block diagram of a three-dimensional deformation monitoring device 300 provided by an embodiment of the present invention. Figure 8 As shown, corresponding to the above three-dimensional deformation monitoring method, the present invention also provides a three-dimensional deformation monitoring device 300. The three-dimensional deformation monitoring device 300 includes a unit for executing the above three-dimensional deformation monitoring method, and the device can be configured in a server. Specifically, please refer to Figure 8 The three-dimensional deformation monitoring device 300 includes an acquisition unit 301 , a pre-processing unit 302 , a matching unit 303 , a fitting unit 304 and an aggregation unit 305 .
[0104] The acquisition unit 301 is used to obtain a picture of the monitoring area on the monitoring target where the targets are installed in a dual-target L-shaped layout; the preprocessing unit 302 is used to preprocess the picture to obtain a preprocessing result; the matching unit 303 is used to perform edge gradient matching on the preprocessing result to obtain a matching result; the fitting unit 304 is used to perform sub-pixel fitting on the matching result to obtain a fitting result; and the aggregation unit 305 is used to perform three-dimensional deformation aggregation on the fitting result to obtain a monitoring result.
[0105] In one embodiment, if Figure 9 As shown, the pre-processing unit 302 includes a grayscale sub-unit 3021 and a detection sub-unit 3022 .
[0106] The grayscale subunit 3021 is used to grayscale the image to obtain a grayscale image; the detection subunit 3022 is used to smooth and denoise the grayscale image and detect the ROI area to obtain a preprocessing result.
[0107] In one embodiment, if Figure 10 As shown, the matching unit 303 includes a picture processing subunit 3031 , an image calculation subunit 3032 and a similarity matching subunit 3033 .
[0108] The image processing subunit 3031 is used to grayscale the image and the template image according to the preprocessing result; the image calculation subunit 3032 is used to calculate the edge gradient images of the image and the template image in the X-axis and Y-axis directions respectively to obtain the gradient feature matrix of the image and the gradient feature matrix of the template image; the similarity matching subunit 3033 is used to perform pixel similarity matching on the gradient feature matrix of the image and the gradient feature matrix of the template image to obtain a matching result.
[0109] In one embodiment, the similarity matching subunit 3033 is used to use a standard correlation coefficient matching algorithm to evaluate the similarity between the gradient feature matrix of the image and the gradient feature matrix of the template image to obtain a similarity matching matrix in the pixel dimension to form the matching result.
[0110] In one embodiment, if Figure 11 As shown, the fitting unit 304 includes a screening subunit 3041 and an extraction subunit 3042 .
[0111] The screening subunit 3041 is used to screen the eight neighborhoods of the pixel position with the highest matching degree in the matching result, and perform binomial surface fitting to obtain a surface; the extraction subunit 3042 is used to extract the sub-pixel position of the extreme point of the surface to obtain a fitting result.
[0112] In one embodiment, if Figure 12 As shown, the aggregation unit 305 includes a size extraction subunit 3051, a factor calculation subunit 3052, a multiplication subunit 3053, a mean determination subunit 3054, a residual calculation subunit 3055 and a subtraction subunit 3056.
[0113] The size extraction subunit 3051 is used to extract the horizontal target image size and the vertical target image size; the factor calculation subunit 3052 is used to calculate the scale conversion factors of the horizontal and vertical planes respectively; the multiplication subunit 3053 is used to multiply the fitting result by the corresponding scale conversion factor to obtain the actual high-precision two-dimensional deformation variables of the two planes; the mean determination subunit 3054 is used to take the mean of the actual high-precision two-dimensional deformation variables of the two planes in the direction of overlap of the two planes as the deformation variable in the direction of overlap of the horizontal and vertical planes; the residual calculation subunit 3055 is used to calculate the residual in the overlap direction; the subtraction subunit 3056 is used to subtract the corresponding residual from the deformation variable in the direction of overlap of the horizontal and vertical planes to obtain the monitoring result.
[0114] It should be noted that those skilled in the art can clearly understand that the specific implementation process of the above-mentioned three-dimensional deformation monitoring device 300 and each unit can refer to the corresponding description in the aforementioned method embodiment. For the convenience and brevity of description, it will not be repeated here.
[0115] The three-dimensional deformation monitoring device 300 can be implemented in the form of a computer program. The computer program can be used in Figure 13 Runs on the computer equipment shown.
[0116] See also Figure 13 , Figure 13 1 is a schematic block diagram of a computer device provided in an embodiment of the present application. The computer device 500 may be a server, wherein the server may be an independent server or a server cluster composed of multiple servers.
[0117] See Figure 13 The computer device 500 includes a processor 502 , a memory, and a network interface 505 connected via a system bus 501 , wherein the memory may include a non-volatile storage medium 503 and an internal memory 504 .
[0118] The non-volatile storage medium 503 can store an operating system 5031 and a computer program 5032. The computer program 5032 includes program instructions, which, when executed, can enable the processor 502 to perform a three-dimensional deformation monitoring method.
[0119] The processor 502 is used to provide computing and control capabilities to support the operation of the entire computer device 500.
[0120] The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503 . When the computer program 5032 is executed by the processor 502 , the processor 502 can execute a three-dimensional deformation monitoring method.
[0121] The network interface 505 is used to communicate with other devices through the network. Figure 13 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present application, and does not constitute a limitation on the computer device 500 to which the solution of the present application is applied. The specific computer device 500 may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0122] The processor 502 is configured to execute a computer program 5032 stored in the memory to implement the following steps:
[0123] Acquire a picture of a monitoring area on a monitoring target where targets are installed in a dual-target L-shaped arrangement; preprocess the picture to obtain a preprocessing result; perform edge gradient matching on the preprocessing result to obtain a matching result; perform sub-pixel fitting on the matching result to obtain a fitting result; and perform three-dimensional shape variable aggregation on the fitting result to obtain a monitoring result.
[0124] In one embodiment, when the processor 502 implements the step of preprocessing the image to obtain a preprocessing result, the processor 502 specifically implements the following steps:
[0125] The image is grayscaled to obtain a grayscale image; the grayscale image is smoothed and denoised and the ROI region is detected to obtain a preprocessing result.
[0126] In one embodiment, when the processor 502 performs edge gradient matching on the preprocessing result to obtain a matching result, the processor 502 specifically implements the following steps:
[0127] Grayscale the image and the template image according to the preprocessing result; calculate the edge gradient images of the image and the template image in the X-axis and Y-axis directions respectively to obtain the gradient feature matrix of the image and the gradient feature matrix of the template image; perform pixel similarity matching on the gradient feature matrix of the image and the gradient feature matrix of the template image to obtain a matching result.
[0128] In one embodiment, when the processor 502 performs pixel similarity matching on the gradient feature matrix of the image and the gradient feature matrix of the template image to obtain a matching result, the processor 502 specifically implements the following steps:
[0129] A standard correlation coefficient matching algorithm is used to evaluate the similarity between the gradient feature matrix of the image and the gradient feature matrix of the template image to obtain a similarity matching matrix in pixel dimension to form the matching result.
[0130] In one embodiment, when the processor 502 performs sub-pixel fitting on the matching result to obtain the fitting result, the processor 502 specifically implements the following steps:
[0131] The eight neighborhoods of the pixel position with the highest matching degree in the matching result are screened, and binomial surface fitting is performed to obtain a surface; and the sub-pixel position of the extreme point of the surface is extracted to obtain a fitting result.
[0132] In one embodiment, when the processor 502 implements the step of aggregating the three-dimensional deformation of the fitting result to obtain the monitoring result, the processor 502 specifically implements the following steps:
[0133] Extract the horizontal target image size and the vertical target image size; calculate the horizontal and vertical scale conversion factors respectively; multiply the fitting results by the corresponding scale conversion factors to obtain the actual high-precision two-dimensional deformation variables of the two planes; take the average of the actual high-precision two-dimensional deformation variables of the two planes in the direction of the overlap of the two planes as the deformation variable in the direction of the overlap of the horizontal and vertical planes; calculate the residual amount in the overlap direction; subtract the corresponding residual amount from the deformation variable in the direction of the overlap of the horizontal and vertical planes to obtain the monitoring result.
[0134] It should be understood that in the embodiment of the present application, the processor 502 may be a central processing unit (CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.
[0135] Those skilled in the art will appreciate that all or part of the steps in the method of the above-described embodiment can be implemented by instructing the relevant hardware through a computer program. The computer program includes program instructions, which can be stored in a storage medium that is computer-readable. The program instructions are executed by at least one processor in the computer system to implement the steps in the method of the above-described embodiment.
[0136] Therefore, the present invention also provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program, wherein when the computer program is executed by a processor, the processor performs the following steps:
[0137] Acquire a picture of a monitoring area on a monitoring target where targets are installed in a dual-target L-shaped arrangement; preprocess the picture to obtain a preprocessing result; perform edge gradient matching on the preprocessing result to obtain a matching result; perform sub-pixel fitting on the matching result to obtain a fitting result; and perform three-dimensional shape variable aggregation on the fitting result to obtain a monitoring result.
[0138] In one embodiment, when the processor executes the computer program to implement the step of preprocessing the image to obtain a preprocessing result, the processor specifically implements the following steps:
[0139] The image is grayscaled to obtain a grayscale image; the grayscale image is smoothed and denoised and the ROI region is detected to obtain a preprocessing result.
[0140] In one embodiment, when the processor executes the computer program to implement the step of performing edge gradient matching on the preprocessing result to obtain a matching result, the processor specifically implements the following steps:
[0141] Grayscale the image and the template image according to the preprocessing result; calculate the edge gradient images of the image and the template image in the X-axis and Y-axis directions respectively to obtain the gradient feature matrix of the image and the gradient feature matrix of the template image; perform pixel similarity matching on the gradient feature matrix of the image and the gradient feature matrix of the template image to obtain a matching result.
[0142] In one embodiment, when the processor executes the computer program to implement the step of performing pixel similarity matching on the gradient feature matrix of the image and the gradient feature matrix of the template image to obtain a matching result, the processor specifically implements the following steps:
[0143] A standard correlation coefficient matching algorithm is used to evaluate the similarity between the gradient feature matrix of the image and the gradient feature matrix of the template image to obtain a similarity matching matrix in pixel dimension to form the matching result.
[0144] In one embodiment, when the processor executes the computer program to implement the step of performing sub-pixel fitting on the matching result to obtain a fitting result, the processor specifically implements the following steps:
[0145] The eight neighborhoods of the pixel position with the highest matching degree in the matching result are screened, and binomial surface fitting is performed to obtain a surface; and the sub-pixel position of the extreme point of the surface is extracted to obtain a fitting result.
[0146] In one embodiment, when the processor executes the computer program to implement the step of aggregating the three-dimensional deformation of the fitting result to obtain the monitoring result, the processor specifically implements the following steps:
[0147] Extract the horizontal target image size and the vertical target image size; calculate the horizontal and vertical scale conversion factors respectively; multiply the fitting results by the corresponding scale conversion factors to obtain the actual high-precision two-dimensional deformation variables of the two planes; take the average of the actual high-precision two-dimensional deformation variables of the two planes in the direction of the overlap of the two planes as the deformation variable in the direction of the overlap of the horizontal and vertical planes; calculate the residual amount in the overlap direction; subtract the corresponding residual amount from the deformation variable in the direction of the overlap of the horizontal and vertical planes to obtain the monitoring result.
[0148] The storage medium may be any computer-readable storage medium that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk.
[0149] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the composition and steps of each example according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0150] In the several embodiments provided herein, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the various units is merely a logical functional division, and actual implementation may employ other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be omitted or not implemented.
[0151] The steps in the methods of the embodiments of the present invention may be adjusted in order, combined, or deleted as needed. The units in the devices of the embodiments of the present invention may be combined, divided, or deleted as needed. Furthermore, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit.
[0152] If this integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the existing technology, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, terminal, or network device, etc.) to execute all or part of the steps of the method described in various embodiments of the present invention.
[0153] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and such modifications or substitutions are intended to be within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.
Claims
1. A three-dimensional deformation monitoring method, characterized in that: include: Use a monocular camera to obtain images of the monitoring area where targets are installed in a dual-target L-shaped layout on the monitoring target; Preprocessing the image to obtain a preprocessing result; Performing edge gradient matching on the preprocessing result to obtain a matching result; Performing sub-pixel fitting on the matching result to obtain a fitting result; Performing three-dimensional deformation aggregation on the fitting results to obtain monitoring results; The performing three-dimensional deformation aggregation on the fitting result to obtain the monitoring result includes: Extracting the horizontal target image size and the vertical target image size; Calculate the scale conversion factors for the horizontal and vertical planes respectively; Multiplying the fitting result by the corresponding scale conversion factor to obtain the actual high-precision two-dimensional deformation variables of the two planes; The average value of the overlap direction of the two planes in the actual high-precision two-dimensional deformation variables of the two planes is the deformation variable in the overlap direction of the horizontal plane and the vertical plane; Calculate the residuals of the horizontal and vertical planes respectively; The monitoring result is obtained by subtracting the corresponding residual from the deformation in the non-coincident direction between the horizontal and vertical planes.
2. The three-dimensional deformation monitoring method according to claim 1, characterized in that: The preprocessing of the image to obtain a preprocessing result includes: Performing grayscale processing on the image to obtain a grayscale image; The grayscale image is smoothed and denoised and the ROI region is detected to obtain a preprocessing result.
3. The three-dimensional deformation monitoring method according to claim 1, characterized in that: The performing edge gradient matching on the preprocessing result to obtain a matching result includes: Gray-scaling the picture and the template image according to the preprocessing result; Calculating edge gradient images in the X-axis and Y-axis directions of the picture and the template image respectively to obtain a gradient feature matrix of the picture and a gradient feature matrix of the template image; The gradient feature matrix of the picture and the gradient feature matrix of the template image are matched for pixel similarity to obtain a matching result.
4. The three-dimensional deformation monitoring method according to claim 3, characterized in that: The performing pixel similarity matching on the gradient feature matrix of the picture and the gradient feature matrix of the template image to obtain a matching result includes: A standard correlation coefficient matching algorithm is used to evaluate the similarity between the gradient feature matrix of the image and the gradient feature matrix of the template image to obtain a similarity matching matrix in pixel dimension to form the matching result.
5. The three-dimensional deformation monitoring method according to claim 1, characterized in that: The performing sub-pixel fitting on the matching result to obtain a fitting result includes: Filtering eight neighborhoods of the pixel position with the highest matching degree in the matching result, and performing binomial surface fitting to obtain a surface; The sub-pixel positions of the extreme points of the surface are extracted to obtain fitting results.
6. A three-dimensional deformation monitoring device, characterized in that: include: An acquisition unit is used to use a monocular camera to acquire an image of a monitoring area where targets are installed in a dual-target L-shaped arrangement on the monitoring target; A preprocessing unit, configured to preprocess the image to obtain a preprocessing result; A matching unit, configured to perform edge gradient matching on the preprocessing result to obtain a matching result; A fitting unit, configured to perform sub-pixel fitting on the matching result to obtain a fitting result; an aggregation unit, configured to aggregate the three-dimensional deformation of the fitting result to obtain a monitoring result; The polymeric unit comprises: A size extraction subunit is used to extract the horizontal target image size and the vertical target image size; a factor calculation subunit is used to calculate the scale conversion factors of the horizontal and vertical planes respectively; a multiplication subunit is used to multiply the fitting result by the corresponding scale conversion factor to obtain the actual high-precision two-dimensional deformation variables of the two planes; a mean determination subunit is used to convert the mean of the actual high-precision two-dimensional deformation variables of the two planes in the overlapping direction of the two planes into the deformation variable in the overlapping direction of the horizontal and vertical planes; a residual calculation subunit is used to calculate the residual in the overlapping direction; a subtraction subunit is used to subtract the corresponding residual from the deformation variable in the non-overlapping direction of the horizontal and vertical planes to obtain the monitoring result.
7. The three-dimensional deformation monitoring device according to claim 6, characterized in that: The pre-processing unit comprises: A grayscale subunit, configured to perform grayscale processing on the image to obtain a grayscale image; The detection subunit is used to perform smoothing and denoising on the grayscale image and detect the ROI region to obtain a preprocessing result.
8. A computer device, characterized in that: The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 5 when executing the computer program.
9. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Integrated template matching method and device, computer equipment and storage medium
CN114373086A
Target object displacement monitoring method and device, computer equipment and storage medium
CN114387306A