Method, device, storage medium and electronic device for realizing structural vibration mode visualization
By combining block matching, gradient optical flow, singular value decomposition and other technologies, the problem of insensitivity and artifacts in subtle motion detection in the existing technology is solved, and high-quality structural mode visualization and efficient motion amplification are achieved.
Patent Information
- Application Number
- CN202210794490.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-07
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2042-07-07
AI Technical Summary
Existing methods based on Lagrangian perspective and Eulerian video amplification have the problems of being insensitive to subtle motions and insufficient anti-noise performance in structural modal testing, and phase-based motion processing methods can produce artifacts and have complex algorithms. High degree.
A combined displacement extraction algorithm and motion compensation technology based on block matching and gradient optical flow are used to preprocess the video data through singular value decomposition, spatial Gaussian blur and variational mode decomposition algorithms to reduce the complexity of motion amplification and improve the accuracy of tiny Moving magnification reduces artifacts.
It improves the magnification of small movements in video data, reduces the generation of artifacts during motion amplification, obtains high-quality visual structural vibration shapes, reduces the complexity of the algorithm, and improves operating efficiency.
Smart Images

Figure CN115082513B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of structural vibration analysis, and in particular to a method, a device, a storage medium and an electronic device for realizing visualization of structural vibration modes. Background Art
[0002] Structural modal parameters include modal frequency, damping ratio and modal vibration shape. These characteristic parameters can not only help analyze the motion process of the system, but also have important significance for structural health monitoring and system modeling. In recent years, with the development of high-speed imaging technology, vision-based measurement technology has been widely used as a non-contact measurement method for observing structural vibration. Compared with contact sensors, vision-based non-contact measurement equipment regards each pixel as a visual sensor, and the vibration signal at any point can be extracted, thereby realizing non-contact full-field measurement.
[0003] As a technique for visualizing subtle changes in videos, motion magnification methods enhance spatial vibrations in videos by manipulating in-plane pixels (Lagrangian perspective) or temporal pixel grayscale changes (Eulerian perspective). The motion processing method based on the Lagrangian perspective achieves motion magnification by moving pixels on the image plane, so this method does not produce artifacts, and the only limitation of magnification is the image size. However, due to its insensitivity to subtle motions and limited anti-noise performance, motion magnification based on the Lagrangian perspective is rarely used in structural modal testing. In the Euler video magnification method (EVM), unlike the linear method that increases noise power, the phase-based motion processing method performs better in noise control and supports a larger magnification factor, but it will produce artifacts during the magnification process and the algorithm complexity is high. Based on the shortcomings of the above two methods, it is urgent to propose a new method to solve the above problems. Summary of the invention
[0004] The purpose of the present invention is to provide a method, device, storage medium and electronic device for realizing structural vibration mode visualization, so as to solve the deficiencies in the prior art, improve the magnification of small motions in video data, and effectively reduce the artifacts generated during the motion magnification process, thereby obtaining high-quality visualized structural vibration modes, and reducing the complexity of motion magnification by using a combined displacement extraction algorithm based on block matching and gradient optical flow and motion compensation, thereby improving the operating efficiency of the algorithm.
[0005] An embodiment of the present application provides a method for visualizing a structural vibration mode, the method comprising:
[0006] Acquire initial motion video data of the structural part to be measured;
[0007] Preprocessing the initial motion video data of the structural part to be measured to obtain target motion video data;
[0008] Determine the motion vector field of the target motion video data by using a combined displacement extraction algorithm based on block matching and gradient optical flow;
[0009] According to the motion vector field and the motion compensation algorithm, the structural vibration shape visualization of the structural component to be measured is achieved.
[0010] Optionally, the preprocessing of the initial motion video data of the structural component to be measured to obtain target motion video data includes:
[0011] For each frame of the image in the initial motion video data of the structural component to be measured, a singular value decomposition algorithm is used to obtain a first vibration signal contained in each frame of the image and a corresponding initial spatial weight;
[0012] Using a spatial Gaussian blur algorithm, high-frequency components of the initial spatial weights are filtered out to obtain target spatial weights;
[0013] Decoupling the first vibration signal using a variational mode decomposition algorithm to obtain a second vibration signal;
[0014] Each frame of the image in the initial motion video data of the structural component to be measured is processed according to the target spatial weight and the second vibration signal to obtain target motion video data.
[0015] Optionally, the using a singular value decomposition algorithm to obtain the first vibration signal contained in each frame of the image and the corresponding initial spatial weight includes:
[0016] Acquire a matrix generated by pixel grayscale information of each frame of the initial motion video data;
[0017] According to the matrix and using a singular value decomposition algorithm, the pixel grayscale change data of each frame of the image is subjected to dimension reduction and noise reduction to obtain a first vibration signal contained in each frame of the image and a corresponding initial spatial weight.
[0018] Optionally, the step of performing dimension reduction and noise reduction on the pixel grayscale change data of each frame of the image based on the matrix and using a singular value decomposition algorithm to obtain a first vibration signal contained in each frame of the image and a corresponding initial spatial weight includes:
[0019] Mapping the pixel grayscale change data of each frame of image into the matrix space;
[0020] Using transformation relationships The first vibration signal contained in each frame of the image and the corresponding initial spatial weight are obtained, wherein D is a matrix generated by the pixel grayscale information of each frame of the initial motion video data, c is the total number of pixel coordinates, l is the number of video frames contained in the initial motion video data, r is the total number of singular values obtained after decomposition, and u i (x, y) is a left singular vector, representing the initial spatial weight, and the s i For the retained singular values, the v i (t) is a right singular vector, representing the first vibration signal in time series, and the left singular vector is orthogonal to the right singular vector, and T represents matrix transpose.
[0021] Optionally, the processing, according to the target spatial weight and the second vibration signal, of each frame of the initial motion video data of the structural component to be measured to obtain the target motion video data includes:
[0022] According to the target space weight and the second vibration signal, the formula Each frame of the initial motion video data of the structure to be measured is processed to obtain target motion video data, wherein the is the image grayscale of each frame in the target motion video data, and the G k (x, y) is the target space weight, and the IMF η,k (t) is the second vibration signal, and f(x, y) is the motion equation of the structural part to be measured at the initial moment.
[0023] Optionally, the determining the motion vector field of the target motion video data by using a combined displacement extraction algorithm based on block matching and gradient optical flow includes:
[0024] A combined displacement extraction algorithm based on block matching and gradient optical flow is used to extract the motion vector field between the initial frame and any frame image, and the motion vector field between the initial frame and any frame image is smoothed using spatial mean filtering to determine the motion vector field of the target motion video data.
[0025] Optionally, the visualization of the structural vibration mode of the structural component to be measured according to the motion vector field and the motion compensation algorithm includes:
[0026] Determine a first motion vector for each pixel in the image according to the motion vector field and the motion compensation algorithm;
[0027] Based on the first motion vector and using a pre-selected magnification factor, calculating a second motion vector for each pixel;
[0028] A corresponding second motion vector is applied to each pixel in the image to realize visualization of the structural vibration mode of the structural component to be measured.
[0029] Another embodiment of the present application provides a device for realizing structural vibration mode visualization, the device comprising:
[0030] An acquisition module, used for acquiring initial motion video data of the structural part to be measured;
[0031] A processing module, used for preprocessing the initial motion video data of the structural part to be measured to obtain target motion video data;
[0032] A determination module, used to determine the motion vector field of the target motion video data by using a combined displacement extraction algorithm based on block matching and gradient optical flow;
[0033] The implementation module is used to realize the visualization of the structural vibration mode of the structural part to be measured according to the motion vector field and the motion compensation algorithm.
[0034] Optionally, the processing module includes:
[0035] An acquisition unit, configured to acquire, for each frame of image in the initial motion video data of the structural component to be measured, a first vibration signal contained in each frame of image and a corresponding initial spatial weight by using a singular value decomposition algorithm;
[0036] A first obtaining unit is used to filter out high-frequency components of the initial spatial weights by using a spatial Gaussian blur algorithm to obtain target spatial weights;
[0037] a second obtaining unit, configured to decouple the first vibration signal by using a variational mode decomposition algorithm to obtain a second vibration signal;
[0038] The third obtaining unit is used to process each frame of the initial motion video data of the structural component to be measured according to the target spatial weight and the second vibration signal to obtain target motion video data.
[0039] Optionally, the acquisition unit includes:
[0040] A first acquisition subunit, used for acquiring a matrix generated by pixel grayscale information of each frame of the initial motion video data;
[0041] The second acquisition subunit is used to perform dimension reduction and noise reduction on the pixel grayscale change data of each frame of the image according to the matrix and using a singular value decomposition algorithm to obtain the first vibration signal contained in each frame of the image and the corresponding initial spatial weight.
[0042] Optionally, the second acquiring subunit includes:
[0043] A mapping subunit, used for mapping the pixel grayscale change data of each frame of the image into the matrix space;
[0044] The third acquisition subunit is used to utilize the transformation relationship The first vibration signal contained in each frame of the image and the corresponding initial spatial weight are obtained, wherein D is a matrix generated by the pixel grayscale information of each frame of the initial motion video data, c is the total number of pixel coordinates, l is the number of video frames contained in the initial motion video data, r is the total number of singular values obtained after decomposition, and u i (x,y) is a left singular vector, representing the initial spatial weight, and the s i For the retained singular values, the v i (t) is a right singular vector, representing the first vibration signal in time series, and the left singular vector is orthogonal to the right singular vector, and T represents matrix transpose.
[0045] Optionally, the third obtaining unit includes:
[0046] The fourth acquisition subunit is used to obtain the target space weight and the second vibration signal using the formula Each frame of the initial motion video data of the structure to be measured is processed to obtain target motion video data, wherein the is the image grayscale of each frame in the target motion video data, and the G k (x, y) is the target space weight, and the IMF η,k (t) is the second vibration signal, and f(x, y) is the motion equation of the structural part to be measured at the initial moment.
[0047] Optionally, the determining module includes:
[0048] The first determination unit is used to extract the motion vector field between the initial frame and any frame image by using a combined displacement extraction algorithm based on block matching and gradient optical flow, and to smooth the motion vector field between the initial frame and any frame image by using a spatial mean filter to determine the motion vector field of the target motion video data.
[0049] Optionally, the implementation module includes:
[0050] A second determining unit, configured to determine a first motion vector for each pixel in the image according to the motion vector field and the motion compensation algorithm;
[0051] a calculation unit, configured to calculate a second motion vector for each pixel based on the first motion vector and using a pre-selected magnification factor;
[0052] The implementation unit is used to apply a corresponding second motion vector to each pixel in the image to realize the visualization of the structural vibration mode of the structural component to be measured.
[0053] Yet another embodiment of the present application provides a storage medium, wherein the storage medium stores a computer program, wherein the computer program is configured to execute the above-mentioned method when running.
[0054] Yet another embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the method described above.
[0055] Compared with the prior art, the present invention first obtains initial motion video data of the structural part to be measured, preprocesses the initial motion video data of the structural part to be measured, obtains target motion video data, and uses a combined displacement extraction algorithm based on block matching and gradient optical flow to determine the motion vector field of the target motion video data. According to the motion vector field and the motion compensation algorithm, the structural vibration mode of the structural part to be measured is visualized, the magnification of small motions in the video data is improved, and the artifacts generated in the motion magnification process are effectively reduced, and high-quality visualized structural vibration modes are obtained. In addition, the complexity of motion magnification is reduced by using a combined displacement extraction algorithm based on block matching and gradient optical flow and motion compensation, thereby improving the operation efficiency of the algorithm. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 A hardware structure block diagram of a computer terminal for implementing a method for visualizing a structural vibration mode provided by an embodiment of the present invention;
[0057] Figure 2 A schematic flow chart of a method for implementing structural vibration mode visualization provided by an embodiment of the present invention;
[0058] Figure 3 A schematic diagram of a pixel block motion vector field obtained through initial motion video data provided by an embodiment of the present invention;
[0059] Figure 4 A schematic diagram of a pixel block motion vector field obtained through target motion video data provided by an embodiment of the present invention;
[0060] Figure 5 A schematic diagram of a smoothed pixel block motion vector field provided by an embodiment of the present invention;
[0061] Figure 6 A comparative schematic diagram of a structural vibration mode visualization implemented by different methods provided in an embodiment of the present invention;
[0062] Figure 7 A schematic diagram of the structure of a device for realizing visualization of structural vibration modes provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0063] The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, but should not be construed as limiting the present invention.
[0064] An embodiment of the present invention provides a method for realizing visualization of structural vibration modes, which can be applied to electronic devices such as computer terminals, specifically ordinary computers, tablets, etc.
[0065] The following describes it in detail by taking running on a computer terminal as an example. Figure 1 The hardware structure block diagram of a computer terminal for implementing a method for visualizing a structural vibration mode provided by an embodiment of the present invention. Figure 1 As shown, the computer terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Optionally, the computer terminal may also include a transmission device 106 for communication functions and an input and output device 108. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above-mentioned computer terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0066] The memory 104 can be used to store software programs and modules of application software, such as program instructions / modules corresponding to the implementation method of the structural vibration mode visualization in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, implementing the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0067] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of a computer terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0068] As a technique for visualizing subtle changes in videos, motion magnification methods enhance spatial vibrations in videos by manipulating in-plane pixels (Lagrangian perspective) or temporal pixel grayscale changes (Eulerian perspective). Among them, the motion processing method based on the Lagrangian perspective achieves motion magnification by moving pixels on the image plane, so this method will not produce artifacts, and the only limitation of magnification is the image size. However, due to its insensitivity to subtle motion and limited anti-noise performance, motion magnification based on the Lagrangian perspective is rarely used in structural modal testing. In the Euler video magnification method (EVM), unlike the linear method that increases noise power, the phase-based motion processing method performs better in noise control and supports a larger magnification factor, but it will produce artifacts during the magnification process and the algorithm complexity is high. Based on the shortcomings of the above methods, a structural vibration mode visualization method based on a hybrid method is proposed.
[0069] See also Figure 2 , Figure 2 A schematic flow chart of a method for implementing structural vibration mode visualization provided by an embodiment of the present invention may include the following steps:
[0070] S201: Acquire initial motion video data of a structural component to be measured.
[0071] Specifically, a measurement platform can be built and a camera can be used to obtain initial motion video data of the structure to be measured. In practical applications, the structure to be measured can be beams, columns, shear walls, trusses, car bodies, etc. It can be understood that the embodiments of the present invention do not limit the specific form of the structure, and any physical component used to bear force or play a supporting or connecting role can be used as a structure.
[0072] In practical applications, structural vibration can be expressed as a linear combination of modal responses. Specifically, the formula Characterizes the structural vibration, where p(t) is the vibration displacement at time t, n is the modulus, φ i is the i-th order mode shape, q i (t) is the modal coordinate at time t.
[0073] It should be noted that, based on the Euler perspective, the temporal pixel grayscale change can represent the spatial motion of the structure in the image plane, so the formula I(x, y, t) = f(x + δ x (t), y+δ y (t)), represents the relationship between the observed image grayscale and motion, where I(x, y, t) is the image grayscale of the structure to be measured at the position (x, y) at time t, f is the motion equation, δ x (t) and δ y (t) are the displacements in the horizontal and vertical directions, respectively.
[0074] S202: Preprocessing the initial motion video data of the structural component to be measured to obtain target motion video data.
[0075] Specifically, preprocessing the initial motion video data of the structure to be measured to obtain target motion video data may include:
[0076] Step 1: For each frame of image in the initial motion video data of the structural component to be measured, a singular value decomposition algorithm is used to obtain a first vibration signal contained in each frame of image and a corresponding initial spatial weight.
[0077] Specifically, based on the Euler perspective, the time-series pixel grayscale change can represent the structural spatial vibration in the image plane, so using the singular value decomposition algorithm to obtain the first vibration signal contained in each frame of the image and the corresponding initial spatial weight may include:
[0078] 1. Obtain a matrix generated by the pixel grayscale information of each frame of the initial motion video data.
[0079] 2. According to the matrix and using a singular value decomposition algorithm, the pixel grayscale change data of each frame of the image is reduced in dimension and denoised to obtain a first vibration signal contained in each frame of the image and a corresponding initial spatial weight.
[0080] Specifically, according to the matrix, and using a singular value decomposition algorithm, the pixel grayscale change data of each frame of the image is reduced in dimension and noise to obtain the first vibration signal contained in each frame of the image and the corresponding initial spatial weight, including:
[0081] Mapping the pixel grayscale change data of each frame of image into the matrix space;
[0082] Using transformation relationships The first vibration signal contained in each frame of the image and the corresponding initial spatial weight are obtained, wherein D is a matrix generated by the pixel grayscale information of each frame of the initial motion video data, c is the total number of pixel coordinates, l is the number of video frames contained in the initial motion video data, r is the total number of singular values obtained after decomposition, and u i (x,y) is a left singular vector, representing the initial spatial weight, and the s i For the retained singular values, the v i (t) is a right singular vector, representing the first vibration signal in time series, and the left singular vector is orthogonal to the right singular vector, and T represents matrix transpose.
[0083] It should be noted that the observed image grayscale can also be expressed by the signal obtained after singular value decomposition, which can be expressed by the formula Characterization, where f(x, y) is the motion equation of the structure to be measured at the initial moment. The components obtained after singular value decomposition contain both signals related to vibration and noise unrelated to vibration. By screening the signals related to vibration The retained singular value components can be considered to be approximately equal to the linear combination of the structural modal response, where r is the total number of singular values obtained after decomposition, k is the number of vibration-related components in the singular value decomposition, and n is the number of activated modes. k u k (x,y)v k (t)T can represent one or more vibration modes, but the vibration signal v in each singular value component k (t) T It is still coupled and the signal needs to be decoupled through appropriate decoupling methods.
[0084] Step 2: Using the spatial Gaussian blur algorithm, filter out the high-frequency components of the initial spatial weights to obtain the target spatial weights.
[0085] For example, the initial spatial weight s k u k The high-frequency components in (x, y) contain meaningless information, so the spatial Gaussian blur algorithm is used to filter out the spatial weight s k u k The high-frequency component of (x,y) is updated to G k (x,y), where G k (x, y) = (s k u k (x, y))*G, where G is the Gaussian kernel.
[0086] Step 3: Decouple the first vibration signal using a variational mode decomposition algorithm to obtain a second vibration signal.
[0087] Specifically, the variational mode decomposition algorithm is used to analyze the vibration-related signal v k Decoupling is performed and the vibration signal is updated to IMF η,k (t).
[0088] Exemplarily, the coupled first vibration signal v k (t) T The variational mode decomposition algorithm is used to decompose it into c signal components, and according to the formula Calculate the energy ratio and retain the signal components with high energy ratio, where IMF k,c (t) is the signal component obtained by applying the variational mode decomposition algorithm to the coupled signal, c is the number of signal components decomposed from the same coupled vibration signal, E k,c is the energy ratio of the signal component to the corresponding coupled signal. Calculate the IMF of all retained signal components k,c The correlation coefficient between (t) and the signal components with large correlation coefficient are grouped together, and the total number of groups is η. The signals of each group are recombined into a new signal IMF. η,k (t),IMF η,k (t) is the coupled signal v k (t) T The signal obtained after decoupling.
[0089] Step 4: Process each frame of the initial motion video data of the structural component to be measured according to the target spatial weight and the second vibration signal to obtain target motion video data.
[0090] Specifically, according to the target space weight and the second vibration signal, the formula Each frame of the initial motion video data of the structure to be measured is processed to obtain target motion video data, wherein the is the image grayscale of each frame in the target motion video data, and the G k (x, y) is the target space weight, and the IMF η,k (t) is the second vibration signal, and f(x, y) is the motion equation of the structural part to be measured at the initial moment.
[0091] Exemplarily, according to the decoupled second vibration signal IMF η,k (t) and the updated target space weight G k (x,y), using the formula The original motion in the initial motion video data is superimposed with a single mode of motion to obtain target motion video data.
[0092] S203: Determine the motion vector field of the target motion video data by using a combined displacement extraction algorithm based on block matching and gradient optical flow.
[0093] Specifically, the motion vector field of the target motion video data is determined by using a combined displacement extraction algorithm based on block matching and gradient optical flow, including:
[0094] A combined displacement extraction algorithm based on block matching and gradient optical flow is used to extract the motion vector field between the initial frame and any frame image, and the motion vector field between the initial frame and any frame image is smoothed using spatial mean filtering to determine the motion vector field of the target motion video data.
[0095] Specifically, based on the Lagrangian perspective, a combined displacement extraction algorithm based on block matching and gradient optical flow is used to extract the pixel block motion vector field between the initial frame and any frame image, and the motion vector field is smoothed using spatial mean filtering.
[0096] For example, because the local motion of the structural part to be measured can be regarded as rigid motion, the combined displacement extraction algorithm based on block matching and gradient optical flow extracts the displacement of pixel blocks between frames. Compared with extracting the displacement of single pixels between frames one by one, it reduces a lot of computing time and improves the efficiency of algorithm operation.
[0097] The pixels in the image are divided into independent m×n pixel blocks, where m is the number of pixels in the pixel block row and n is the number of pixels in the pixel block column. The pixel block displacement is divided into the whole pixel displacement part and the sub-pixel displacement part using the combined displacement extraction algorithm based on block matching and gradient optical flow.
[0098] Specifically, the combined displacement extraction algorithm based on block matching and gradient optical flow obtains the displacement of the pixel block in the x and y directions. The vector synthesized by the displacement in the x and y directions constitutes the motion vector in the motion vector field. The motion vector field describes the actual displacement amount and the actual displacement direction of the corresponding pixel block. The vector length corresponds to the displacement amount, and the vector direction corresponds to the displacement direction. The actual displacement of the pixel block can be decomposed into integer pixel displacement and sub-pixel displacement. Based on the formula:
[0099]
[0100] Among them, δ η,x (t) and δ η,y (t) are the horizontal and vertical displacements of the pixel blocks in the target motion video data, and are the integer pixel displacements in the horizontal and vertical directions, and are the sub-pixel displacements in the horizontal and vertical directions, respectively.
[0101] The displacement of the whole pixel can be completed by a three-step search method, and the displacement of the sub-pixel can be approximately estimated by a first-order Taylor expansion.
[0102]
[0103] Among them, f(x+δ η,x (t), y+δ η,y (t)) is the pixel displacement equation, is the integer pixel displacement equation, and These are the sub-pixel displacement equations in the horizontal and vertical directions respectively.
[0104] It should be noted that in order to ensure the spatial continuity of the visualized vibration shape, the motion vector field matrix can be smoothed using a spatial mean filter. In the motion vector field matrix, a template is given to the target element o, which includes the surrounding adjacent elements (H elements around the target element as the center constitute a filter template, which includes the target element itself), and then the average value of all elements in the template is used to replace the original target element value. in, is the updated target element, and sum is the sum of all elements in the template. For edge data, there may be a situation where the template size cannot be filled. At this time, a template is formed based on the elements that can be filled, and the average value of all elements in the template is used to replace the original target element value. The above smoothing operation is performed on each element in the motion vector field matrix to obtain the smoothed pixel block motion vector field.
[0105] See also Figure 3 , Figure 3 A schematic diagram of a pixel block motion vector field obtained through initial motion video data provided by an embodiment of the present invention, Figure 4 A schematic diagram of a pixel block motion vector field obtained through target motion video data provided by an embodiment of the present invention, Figure 4 Figure (a) in Figure 4 Figure (b) in Figure 4 Figure (c) in Figure 4 The (d) diagrams in FIG. 1 and 2 represent the pixel block motion vector fields obtained by superimposing the first four modal motions on the initial motion video data. By comparing Figure 3 and Figure 4It can be observed that the pixel block motion vector field obtained by the target motion video data is better than the pixel block motion vector field obtained by the initial motion video data, and effectively separates and extracts the first four modal motions of the structure. Figure 5 , Figure 5 A schematic diagram of a smoothed pixel block motion vector field provided by an embodiment of the present invention. Figure 4 and Figure 5 It can be observed that the smoothed pixel block motion vector field has higher spatial continuity.
[0106] S204: Visualizing the structural vibration mode of the structural component to be measured according to the motion vector field and the motion compensation algorithm.
[0107] Specifically, realizing the visualization of the structural vibration mode of the structural component to be measured according to the motion vector field and the motion compensation algorithm may include:
[0108] a. Determine the first motion vector of each pixel in the image based on the motion vector field and the motion compensation algorithm.
[0109] b. Based on the first motion vector and using a pre-selected magnification factor, calculate a second motion vector for each pixel.
[0110] c. Applying a corresponding second motion vector to each pixel in the image to visualize the structural vibration mode of the structural component to be measured.
[0111] Specifically, motion compensation is to determine the displacement of each pixel in the image plane based on the obtained inter-frame pixel block motion vector field. First, for the inter-frame pixel block motion vector field, bilinear interpolation is used to obtain the motion vector (Δx, Δy) of each pixel in the pixel block, and then a suitable magnification factor α is selected to multiply the motion vector of each pixel to obtain the amplified motion vector (αΔx, αΔy). The corresponding amplified motion vector (αΔx, αΔy) is applied to each pixel in the image plane to achieve motion amplification of the corresponding vibration mode, thereby obtaining a visualized vibration mode.
[0112] It should be noted that the restriction condition for selecting α is that after the corresponding amplified motion vector is applied to the pixel, the coordinates of the pixel cannot exceed the image boundary.
[0113] See also Figure 6 , Figure 6 A comparative schematic diagram of a structural vibration mode visualization implemented by different methods provided in an embodiment of the present invention, wherein: Figure 6 (a) is a schematic diagram of a visualized structural vibration mode obtained by using the Euler phase amplification method provided in an embodiment of the present invention, Figure 6(b) is a schematic diagram of a visualized structural vibration mode obtained by using a hybrid method provided in an embodiment of the present invention, Figure 6 Each row in represents the first four order visualized structural vibration modes. It can be observed that the visualized structural vibration modes obtained by using the hybrid method of the present invention have fewer artifacts and higher quality.
[0114] It should be noted that directly using the motion processing method based on the Euler perspective to obtain the visual structural vibration mode will produce artifacts. Although the motion processing method based on the Lagrangian perspective to obtain the visual structural vibration mode will not produce artifacts, the motion vector field extracted directly from the initial motion video data using the combined displacement extraction algorithm based on block matching and gradient optical flow is poor, and it is difficult to extract effective motion vectors, which in turn affects the acquisition of the visual structural vibration mode. The motion processing method based on the Euler perspective plays the role of preprocessing the initial motion video data in this application, that is, firstly processing the initial motion video data to extract the vibration signals of each order mode of the structure, and then superimposing each order modal vibration signal on each frame of the initial motion video to obtain the target motion video data, and finally using the combined displacement extraction algorithm based on block matching and gradient optical flow to obtain the motion vector field for the target motion video data. It can be observed that the motion processing method based on the Euler perspective effectively separates and extracts the various order modal motions of the structure, and then the motion compensation algorithm can be used to obtain high-quality visual structural vibration modes.
[0115] It can be seen that the present invention first obtains the initial motion video data of the structural part to be measured, preprocesses the initial motion video data of the structural part to be measured, obtains the target motion video data, and uses the combined displacement extraction algorithm based on block matching and gradient optical flow to determine the motion vector field of the target motion video data. According to the motion vector field and the motion compensation algorithm, the structural vibration mode of the structural part to be measured is visualized, the magnification of small motions in the video data is improved, and the artifacts generated in the motion magnification process are effectively reduced, and high-quality visualized structural vibration modes are obtained. In addition, the complexity of motion magnification is reduced by using the combined displacement extraction algorithm based on block matching and gradient optical flow and motion compensation, thereby improving the operation efficiency of the algorithm.
[0116] Another embodiment of the present application provides a device for realizing structural vibration mode visualization, such as Figure 7 A schematic structural diagram of a device for realizing structural vibration mode visualization is shown, wherein the device comprises:
[0117] An acquisition module 701 is used to acquire initial motion video data of a structural component to be measured;
[0118] The processing module 702 is used to pre-process the initial motion video data of the structure to be measured to obtain target motion video data;
[0119] A determination module 703 is used to determine the motion vector field of the target motion video data by using a combined displacement extraction algorithm based on block matching and gradient optical flow;
[0120] The implementation module 704 is used to realize the visualization of the structural vibration mode of the structural component to be measured according to the motion vector field and the motion compensation algorithm.
[0121] Specifically, the processing module includes:
[0122] An acquisition unit, configured to acquire, for each frame of image in the initial motion video data of the structural component to be measured, a first vibration signal contained in each frame of image and a corresponding initial spatial weight by using a singular value decomposition algorithm;
[0123] A first obtaining unit is used to filter out high-frequency components of the initial spatial weights by using a spatial Gaussian blur algorithm to obtain target spatial weights;
[0124] a second obtaining unit, configured to decouple the first vibration signal by using a variational mode decomposition algorithm to obtain a second vibration signal;
[0125] The third obtaining unit is used to process each frame of the initial motion video data of the structural component to be measured according to the target spatial weight and the second vibration signal to obtain target motion video data.
[0126] Specifically, the acquisition unit includes:
[0127] A first acquisition subunit, used for acquiring a matrix generated by pixel grayscale information of each frame of the initial motion video data;
[0128] The second acquisition subunit is used to perform dimension reduction and noise reduction on the pixel grayscale change data of each frame of the image according to the matrix and using a singular value decomposition algorithm to obtain the first vibration signal contained in each frame of the image and the corresponding initial spatial weight.
[0129] Specifically, the second acquisition subunit includes:
[0130] A mapping subunit, used for mapping the pixel grayscale change data of each frame of the image into the matrix space;
[0131] The third acquisition subunit is used to utilize the transformation relationship The first vibration signal contained in each frame of the image and the corresponding initial spatial weight are obtained, wherein D is a matrix generated by the pixel grayscale information of each frame of the initial motion video data, c is the total number of pixel coordinates, l is the number of video frames contained in the initial motion video data, r is the total number of singular values obtained after decomposition, and ui (x,y) is a left singular vector, representing the initial spatial weight, and the s i For the retained singular values, the v i (t) is a right singular vector, representing the first vibration signal in time series, and the left singular vector is orthogonal to the right singular vector, and T represents matrix transpose.
[0132] Specifically, the third obtaining unit includes:
[0133] The fourth acquisition subunit is used to obtain the target space weight and the second vibration signal using the formula Each frame of the initial motion video data of the structure to be measured is processed to obtain target motion video data, wherein the is the image grayscale of each frame in the target motion video data, and the G k (x, y) is the target space weight, and the IMF η,k (t) is the second vibration signal, and f(x, y) is the motion equation of the structural part to be measured at the initial moment.
[0134] Specifically, the determination module includes:
[0135] The first determination unit is used to extract the motion vector field between the initial frame and any frame image by using a combined displacement extraction algorithm based on block matching and gradient optical flow, and to smooth the motion vector field between the initial frame and any frame image by using a spatial mean filter to determine the motion vector field of the target motion video data.
[0136] Specifically, the implementation module includes:
[0137] A second determining unit, configured to determine a first motion vector for each pixel in the image according to the motion vector field and the motion compensation algorithm;
[0138] a calculation unit, configured to calculate a second motion vector for each pixel based on the first motion vector and using a pre-selected magnification factor;
[0139] The implementation unit is used to apply a corresponding second motion vector to each pixel in the image to realize the visualization of the structural vibration mode of the structural component to be measured.
[0140] Compared with the prior art, the present invention first obtains initial motion video data of the structural part to be measured, preprocesses the initial motion video data of the structural part to be measured, obtains target motion video data, and uses a combined displacement extraction algorithm based on block matching and gradient optical flow to determine the motion vector field of the target motion video data. According to the motion vector field and the motion compensation algorithm, the structural vibration mode of the structural part to be measured is visualized, the magnification of small motions in the video data is improved, and the artifacts generated in the motion magnification process are effectively reduced, and high-quality visualized structural vibration modes are obtained. In addition, the complexity of motion magnification is reduced by using a combined displacement extraction algorithm based on block matching and gradient optical flow and motion compensation, thereby improving the operation efficiency of the algorithm.
[0141] An embodiment of the present invention further provides a storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0142] Specifically, in this embodiment, the above storage medium may be configured to store a computer program for performing the following steps:
[0143] S201: Acquire initial motion video data of the structural part to be measured;
[0144] S202: preprocessing the initial motion video data of the structural part to be measured to obtain target motion video data;
[0145] S203: Determine the motion vector field of the target motion video data by using a combined displacement extraction algorithm based on block matching and gradient optical flow;
[0146] S204: Visualizing the structural vibration mode of the structural component to be measured according to the motion vector field and the motion compensation algorithm.
[0147] Specifically, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.
[0148] Compared with the prior art, the present invention first obtains initial motion video data of the structural part to be measured, preprocesses the initial motion video data of the structural part to be measured, obtains target motion video data, and uses a combined displacement extraction algorithm based on block matching and gradient optical flow to determine the motion vector field of the target motion video data. According to the motion vector field and the motion compensation algorithm, the structural vibration mode of the structural part to be measured is visualized, the magnification of small motions in the video data is improved, and the artifacts generated in the motion magnification process are effectively reduced, and high-quality visualized structural vibration modes are obtained. In addition, the complexity of motion magnification is reduced by using a combined displacement extraction algorithm based on block matching and gradient optical flow and motion compensation, thereby improving the operation efficiency of the algorithm.
[0149] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0150] Specifically, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0151] Specifically, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0152] S201: Acquire initial motion video data of the structural part to be measured;
[0153] S202: preprocessing the initial motion video data of the structural part to be measured to obtain target motion video data;
[0154] S203: Determine the motion vector field of the target motion video data by using a combined displacement extraction algorithm based on block matching and gradient optical flow;
[0155] S204: Visualizing the structural vibration mode of the structural component to be measured according to the motion vector field and the motion compensation algorithm.
[0156] Compared with the prior art, the present invention first obtains initial motion video data of the structural part to be measured, preprocesses the initial motion video data of the structural part to be measured, obtains target motion video data, and uses a combined displacement extraction algorithm based on block matching and gradient optical flow to determine the motion vector field of the target motion video data. According to the motion vector field and the motion compensation algorithm, the structural vibration mode of the structural part to be measured is visualized, the magnification of small motions in the video data is improved, and the artifacts generated in the motion magnification process are effectively reduced, and high-quality visualized structural vibration modes are obtained. In addition, the complexity of motion magnification is reduced by using a combined displacement extraction algorithm based on block matching and gradient optical flow and motion compensation, thereby improving the operation efficiency of the algorithm.
[0157] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
[0158] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0159] In the several embodiments provided by the present invention, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the above units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.
[0160] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0161] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0162] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the above-mentioned methods of each embodiment of the present invention. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0163] The embodiments of the present invention are described in detail above. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A method for realizing structural vibration mode visualization, characterized in that: The method comprises: Acquire initial motion video data of the structural part to be measured; Preprocessing the initial motion video data of the structure to be measured to obtain target motion video data; wherein the preprocessing includes mapping the pixel grayscale change data of each frame of the initial motion video data into a matrix space; using the transformation relationship , obtain the first vibration signal contained in each frame image and the corresponding initial spatial weight, wherein the is a matrix generated by the pixel grayscale information of each frame of the initial motion video data, is the total number of pixel coordinates, is the number of video frames contained in the initial motion video data, is the total number of singular values obtained after decomposition, is the left singular vector, representing the initial spatial weight, is the reserved singular value, is a right singular vector, representing the first vibration signal of the time series, and the left singular vector is orthogonal to the right singular vector, represents the matrix transpose; and, According to the target space weight and the second vibration signal, the formula , processing each frame of the initial motion video data of the structure to be measured to obtain target motion video data, wherein the is the image grayscale of each frame in the target motion video data, is the target space weight, is the second vibration signal, is the motion equation of the structural part to be measured at the initial moment; Determine the motion vector field of the target motion video data by using a combined displacement extraction algorithm based on block matching and gradient optical flow, wherein the motion vector field between the initial frame and any frame image is extracted by using the combined displacement extraction algorithm based on block matching and gradient optical flow, and the motion vector field between the initial frame and any frame image is smoothed by using a spatial mean filter to determine the motion vector field of the target motion video data; According to the motion vector field and the motion compensation algorithm, the structural vibration mode visualization of the structural component to be measured is realized, wherein, according to the motion vector field and the motion compensation algorithm, the first motion vector of each pixel in the image is determined; based on the first motion vector and using a pre-selected magnification factor, the second motion vector of each pixel is calculated; and the corresponding second motion vector is applied to each pixel in the image to realize the structural vibration mode visualization of the structural component to be measured.
2. The method according to claim 1, characterized in that The preprocessing of the initial motion video data of the structure to be measured to obtain target motion video data includes: For each frame of the image in the initial motion video data of the structural component to be measured, a singular value decomposition algorithm is used to obtain a first vibration signal contained in each frame of the image and a corresponding initial spatial weight; Using a spatial Gaussian blur algorithm, high-frequency components of the initial spatial weights are filtered out to obtain target spatial weights; Decoupling the first vibration signal using a variational mode decomposition algorithm to obtain a second vibration signal; Each frame of the image in the initial motion video data of the structural component to be measured is processed according to the target spatial weight and the second vibration signal to obtain target motion video data.
3. The method according to claim 2, characterized in that The method of using a singular value decomposition algorithm to obtain the first vibration signal contained in each frame of the image and the corresponding initial spatial weight includes: Acquire a matrix generated by pixel grayscale information of each frame of the initial motion video data; According to the matrix and using a singular value decomposition algorithm, the pixel grayscale change data of each frame of the image is subjected to dimension reduction and noise reduction to obtain a first vibration signal contained in each frame of the image and a corresponding initial spatial weight.
4. A device for implementing a method for visualizing a structural vibration mode as claimed in any one of claims 1 to 3, characterized in that: The device comprises: An acquisition module, used for acquiring initial motion video data of the structural part to be measured; A processing module is used to pre-process the initial motion video data of the structure to be measured to obtain target motion video data; wherein the pre-processing includes mapping the pixel grayscale change data of each frame of the initial motion video data into a matrix space; using the transformation relationship , obtain the first vibration signal contained in each frame image and the corresponding initial spatial weight, wherein the is a matrix generated by the pixel grayscale information of each frame of the initial motion video data, is the total number of pixel coordinates, is the number of video frames contained in the initial motion video data, is the total number of singular values obtained after decomposition, is the left singular vector, representing the initial spatial weight, is the reserved singular value, is a right singular vector, representing the first vibration signal of the time series, and the left singular vector is orthogonal to the right singular vector, represents the matrix transpose; and, According to the target space weight and the second vibration signal, the formula , processing each frame of the initial motion video data of the structure to be measured to obtain target motion video data, wherein the is the image grayscale of each frame in the target motion video data, is the target space weight, is the second vibration signal, is the motion equation of the structural part to be measured at the initial moment; A determination module, used to determine the motion vector field of the target motion video data by using a combined displacement extraction algorithm based on block matching and gradient optical flow, wherein the motion vector field between the initial frame and any frame image is extracted by using the combined displacement extraction algorithm based on block matching and gradient optical flow, and the motion vector field between the initial frame and any frame image is smoothed by using a spatial mean filter to determine the motion vector field of the target motion video data; An implementation module is used to realize the visualization of the structural vibration mode of the structural part to be measured according to the motion vector field and the motion compensation algorithm, wherein the first motion vector of each pixel in the image is determined according to the motion vector field and the motion compensation algorithm; based on the first motion vector and using a pre-selected magnification factor, the second motion vector of each pixel is calculated; and the corresponding second motion vector is applied to each pixel in the image to realize the visualization of the structural vibration mode of the structural part to be measured.
5. A storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program is configured to execute the method according to any one of claims 1 to 3 when executed.
6. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 3.
Citation Information
Patent Citations
Refining motion vectors in video motion estimation
US20140334547A1
Video-Based Identification of Operational Mode Shapes
US20170221216A1
