Sea wave motion direction inversion method based on adaptive window matching

By using adaptive window matching technology in the inversion of wave motion direction, the window size is dynamically adjusted, which solves the problem that the preset window size cannot contain sufficient feature information, improves the accuracy and calculation efficiency of inversion, and realizes low-cost and high-robust wave motion direction parameters acquisition.

CN119963600AInactive Publication Date: 2025-05-09GUILIN UNIV OF ELECTRONIC TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510031441.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-08
Publication Date
2025-05-09
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the visual observation of the direction of wave motion, the preset size image block cannot effectively contain sufficient image feature information, affecting the speed and accuracy of the inversion. In addition, traditional methods rely on multiple iterations to adjust the window shape and size, resulting in an increase in algorithm complexity and a decrease in computing efficiency.

Method used

The wave motion direction inversion method based on adaptive window matching is adopted to quickly obtain the maximum ripple width of the wave image through binary image adaptation, dynamically adjust the window size, reduce the calculation complexity, and improve the inversion accuracy.

Benefits of technology

It effectively avoids insufficient feature information caused by the preset window size, improves the accuracy and calculation efficiency of wave motion direction inversion, and realizes low-cost, non-contact, and high-robust wave motion direction parameters acquisition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119963600A_ABST
    Figure CN119963600A_ABST
Patent Text Reader

Abstract

The invention discloses a sea wave motion direction inversion method based on adaptive window matching, and the method comprises the steps: carrying out the block binaryzation of an input grayscale image, and obtaining a binaryzation result image; determining the width L of the maximum connected domain according to the number of continuous pixel points with the same pixel value in the transverse and longitudinal directions in the larger connected domain, and setting the size of an initial window according to the width of the maximum connected domain and a set estimated displacement size; performing block matching on the two gray images before and after input according to the size of a window to obtain a displacement vector of each sub-image; synthesizing a prediction image according to the sub-image displacement vector, and calculating the similarity with an actual image; and determining whether to output a wave motion direction vector distribution diagram or to increase the window size to recalculate a displacement vector by judging whether the similarity or the cycle number reaches a preset value. According to the method, the motion direction of the sea wave can be quickly obtained, and the problem that the preset size of the image block in the current visual inversion sea wave block matching cannot contain effective image feature information is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of image processing, and in particular to a method for inverting the direction of ocean wave motion based on adaptive window matching. Background Art

[0002] The direction of wave motion is an important representation of the dynamic characteristics of waves. The change in the direction of wave motion directly determines the path of wave energy propagation. Accurately estimating the direction of wave motion is crucial to the impact resistance design of seawall layout and the optimization of navigation routes. It also has an important impact on the efficiency and safety of various marine engineering and energy development technologies.

[0003] At present, the inversion methods of wave motion direction are mainly divided into two types: buoy observation and radar observation. The former uses a buoy measurement array to invert the wave direction for each measurement "point" through an acceleration sensor, which has high operation and maintenance costs; the latter uses radar wave measurement to obtain wave position change information through multiple scans to obtain the wave motion direction, which can achieve large-scale automatic measurement, but the equipment is expensive and easily affected by the electromagnetic environment. The application of visual observation technology to the inversion of wave elements has been proven to have significant advantages in the inversion of wave motion direction. For example, compared with traditional methods, the method of obtaining the dominant wave motion direction through a three-dimensional image spectrum constructed by continuous images has the advantages of non-contact, low cost, and spatiotemporal continuity. Especially in the continuous inversion of wave motion direction, the visual inversion method can provide more accurate wave motion direction data.

[0004] At present, a series of scientific research has been carried out in the field of visual observation technology for the direction of wave movement at home and abroad, mainly based on the inversion method of image features. Although this type of inversion method can provide distribution information of the direction of wave movement, there are still the following two problems: First, the image block of the preset size may not effectively contain enough image feature information, affecting the speed and accuracy of the inversion; second, the traditional method completely relies on multiple iterations to adjust the window shape and size to achieve stable tracking. However, constantly adjusting the window shape can easily lead to increased algorithm complexity and decreased computational efficiency. In view of the problem of information loss caused by unreasonable block division in traditional image feature inversion, the present invention proposes a method for dynamically adjusting the window based on the image feature size, which effectively avoids the lack of feature information caused by the preset window size, and ensures the accuracy of the inversion result by fine-tuning the window size several times. Summary of the invention

[0005] In view of the problems arising from using the above-mentioned image features for inverting the direction of wave motion, the present invention provides a method for inverting the direction of wave motion based on adaptive window matching, thereby reducing the computational complexity of wave image tracking and matching and improving the accuracy.

[0006] The technical solution adopted by the present invention to solve its technical problem is:

[0007] A method for inverting the direction of ocean wave motion based on adaptive window matching comprises the following steps:

[0008] Step 1), input two frames of sea wave grayscale images a and b with a specified interval, select the appropriate block length to divide the grayscale image a or grayscale image b. Perform threshold segmentation on each block, stitch and restore the binarized block images to obtain a complete binary image c. When the area of ​​the white area image is much larger than the area of ​​the black area image, invert the pixel values ​​in the black and white image, and use the result as the binarized result image c.

[0009] Step 2), for the binary image c, sort the connected domains from large to small according to the area, and calculate the maximum number of pixels with the same continuous pixel value in the first k connected regions in the row direction and column direction respectively. The wave ripple width of each connected domain is defined as the smaller value of the maximum number of pixels in the row direction and the maximum number of pixels in the column direction. The maximum value L of the ripple width of all connected domains is added to the estimated displacement size as the initial window size for subsequent image block matching, and the maximum number of iterations N is set at the same time.

[0010] Step 3), divide the sub-images of image a and image b according to the initial window size. Use the image block matching algorithm for the corresponding sub-images of image a and b to estimate the location of the corresponding wave in image b of the sub-image of image a at the next moment, and calculate the displacement vector of the sub-image.

[0011] Step 4), according to the corresponding displacement vector of the sub-image of image a, calculate the corresponding position of the sub-image of image a on image b, cover the corresponding position with the sub-image of image a, and synthesize the predicted image f. Calculate the similarity between the predicted image f and image b.

[0012] Step 5), when the predicted image f is close to the actual image b at the next moment, the displacement vector matrix is ​​directly output and the wave motion direction vector distribution map is drawn. Otherwise, the window side length is increased and steps 3-5 are repeated until the predicted image f is close to the actual image b at the next moment, or the maximum number of iterations is reached, and the drawn wave motion direction vector distribution map is output.

[0013] Advantages or beneficial effects of the present invention:

[0014] (1) The present invention uses binary images to adaptively and quickly obtain the maximum ripple width of the wave image, thereby solving the problem that the preset size of the image block in the current visual inversion wave block matching cannot contain effective image feature information.

[0015] (2) The present invention combines the related technologies of image block matching to quickly obtain the displacement information of the waves and synthesize the predicted image, and proposes a method for inverting the wave motion direction based on an adaptive window. Based on the grayscale image set, the wave motion direction is inverted, and the sea surface wave motion direction parameters are obtained in a low-cost, non-contact, high-reliability, high-performance, and uniformly divided manner, with high robustness and high computational efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 Flow chart of the method for inverting the direction of ocean wave motion based on adaptive window matching in an embodiment.

[0017] Figure 2-Figure 8 : is the initial input and detection effect diagram of the wave motion direction inversion method based on adaptive window matching in the embodiment, wherein:

[0018] Figure 2 This is the grayscale result of the first frame image;

[0019] Figure 3 This is the grayscale result of the second frame (0.3s);

[0020] Figure 4 is the binarization result image;

[0021] Figure 5 The result image is the top ten connected domains with marked area size;

[0022] Figure 6 (1)-(4) are schematic diagrams of image synthesis;

[0023] Image 7 is the predicted result image of the second synthesized frame (at 0.3s);

[0024] Figure 8 This is the distribution result of the wave movement direction. DETAILED DESCRIPTION

[0025] The present invention is described in detail below in conjunction with the accompanying drawings and embodiments, examples of which are shown in the accompanying drawings. The embodiments described below with reference to the accompanying drawings are exemplary and intended to be used to explain the present invention, but should not be construed as limiting the present invention.

[0026] Example:

[0027] The following describes the wave motion direction inversion method based on adaptive window matching proposed by the present invention with reference to the accompanying drawings.

[0028] like Figure 1 As shown, a method for inverting the direction of wave motion based on adaptive window matching comprises the following steps:

[0029] Step 1), input the grayscale image of the sea wave with an interval of 0.3 seconds between the previous and the next two frames, denoted as image a and image b, and the image size is 819×853 pixels. Image a or image b is divided into blocks with a block size of 200 pixels, and each image block is binarized using the maximum entropy threshold segmentation method. All the block images are merged to obtain a complete binary image. When the area of ​​the white area is larger than twice the area of ​​the black area, the pixel value of the binary image is inverted to obtain the final binary image c; if this condition is not met, the original binary image is directly output as the final result image c, as follows Figure 4 .

[0030] Step 2), the ripple width of the connected domain is defined as the smaller value between the maximum number of continuous white pixels in the row direction and the maximum number of continuous white pixels in the column direction. The top 10 connected domains in terms of area are selected as follows Figure 5 . Calculate the ripple width of these connected domains, and select the maximum ripple width L, plus the estimated displacement value of 20 pixels, as the initial window size (L+20)×(L+20) for subsequent image block matching. At the same time, set the maximum number of iterations to 10.

[0031] Step 3), according to the initial window size obtained in step 2, re-divide the sub-images of image a and image b. Figure 6 (1) and Figure 6 (2) Sub-images a' and b' are at corresponding positions of images a and b respectively. The image block matching algorithm is used for sub-images a' and b'. The specific steps are as follows:

[0032] Take the template image in the central area of ​​sub-image a' (blue dotted area A), the size of the template image is L×L, Figure 6 The corresponding position (yellow dashed area) to area A in (2) is area B. Use the template image to slide on the sub-image b' and calculate the similarity R of the overlapping area. The similarity formula is as follows:

[0033]

[0034] Where x and y are the column and row coordinates of the pixel point in region A in sub-image a'. When the similarity is the largest, Figure 6 (3). The offset of the template image relative to region B is (i, j), that is, the displacement vector of sub-image a' is (i, j). This operation is performed on each sub-image of image a to obtain the displacement vector corresponding to the entire image.

[0035] Step 4), taking sub-image a' of image a as an example, its corresponding displacement vector is (i, j). At the corresponding position b(x+i,y+j) on image b at the next moment, the original image at that position is replaced by sub-image a', and finally the synthetic prediction of the sub-image f' at the corresponding position is realized, as follows Figure 6 (4) By performing this operation on each sub-image of image a, the composite image f can be obtained. Figure 7 As shown. Among them, x and y are the column coordinates and row coordinates of the pixel point of sub-image a' in image a, and the replacement formula is as follows:

[0036]

[0037] The cross-correlation value between the composite image f and the image b at the next moment is calculated according to the image cross-correlation formula.

[0038] Step 5), when the cross-correlation between the synthetic image f and the actual image b at the next moment is lower than 0.9 and the upper limit of the number of iterations is not reached, the window length is increased by one unit and steps 3-5 are repeated; otherwise, the displacement vector matrix is ​​directly output and the wave motion direction vector distribution map is drawn. The result is as follows: Figure 8 shown.

[0039] Compared with the common wave motion direction image inversion method, the method of the present invention estimates the characteristic width of the wave image, such as Figure 2 As shown in the figure, the image preset block size is reasonable to avoid the situation where the finite number of loop calculation results are too large and the local direction is completely opposite. There will be no mismatching problem in the image matching results of this type of method, which improves the speed and robustness of the image inversion method of the wave motion direction.

[0040] The above-described embodiments are only preferred embodiments of the present invention and are not intended to limit the scope of implementation of the present invention. Therefore, all changes made according to the shape and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for inverting the direction of ocean wave motion based on adaptive window matching, characterized in that: The steps include: Step 1), input two frames of sea wave grayscale images a and b before and after the specified interval, use the image block method for image a or b, and use threshold segmentation to binarize the block image. Then, merge the binarization results of each block to obtain a complete binarized image. Through judgment and inversion operations, ensure that the area occupying a smaller area of ​​the image is a characteristic white part, so as to obtain the final binarized image result c. Step 2), for the binary image c, calculate the maximum number of pixels with the same continuous pixel value in the row direction and column direction of the first k connected domains. The wave ripple width of each connected area is defined as the smaller value of the maximum number of pixels with the same continuous pixel value in the row direction and column direction. The maximum value L of the wave ripple width of the first k connected domains plus the estimated displacement size is selected as the initial window size for subsequent image block matching, and the upper limit N of the number of iterations is set. Step 3), divide the sub-images of image a and image b according to the initial window size, perform offset matching on the sub-images of corresponding positions in image a and image b, obtain the position of the waves corresponding to each sub-image of image a in image b at the next moment, and calculate the displacement vector of each sub-image. Step 4), according to the displacement vector corresponding to the sub-image of image a, calculate the corresponding position of the sub-image of image a on image b, overwrite the original image at that position, and finally synthesize the predicted image f. Calculate the similarity between the predicted image f and the actual image b at the next moment according to the image cross-correlation formula. Step 5), when the predicted image f is not approximately equal to the actual image b at the next moment and the upper limit of the number of loop iterations is not reached, the window side length is increased and steps 3-5 are repeated; otherwise, the wave motion direction vector distribution map is directly output.

2. The method for inverting the direction of ocean wave motion based on adaptive window matching according to claim 1, characterized in that In step 2), the ocean wave ripple width of the connected domain is defined as the smaller value of the maximum number of continuous white pixels in the row direction and the maximum number of continuous white pixels in the column direction. Select the top k connected domains in terms of area. Calculate the ocean wave ripple widths of these connected domains, and select the maximum ripple width L plus the estimated displacement size as the initial window size for subsequent image block matching.

3. The method for inverting the direction of ocean wave motion based on adaptive window matching according to claim 1, characterized in that In step 4), take sub-image a' of image a as an example, its corresponding displacement vector is (i, j). At the corresponding position b(x+i, y+j) on image b at the next moment, the sub-image a' replaces the original image at that position, and finally realizes the synthetic prediction of the sub-image f' at the corresponding position. Perform this operation on each sub-image of image a to obtain the synthetic image f. Among them, x and y are the column coordinates and row coordinates of the pixel point of sub-image a' in image a, m and n are the number of rows and columns of the original image a, and the replacement formula is as follows: The cross-correlation value between the composite image f and the image b at the next moment is calculated according to the image cross-correlation formula.

4. The method for inverting the direction of ocean wave motion based on adaptive window matching according to claim 1, characterized in that In step 5), when the mutual correlation between the synthetic image f and the actual image b at the next moment is lower than the threshold and the upper limit of the number of loop iterations N is not reached, the window side length is increased by one unit and steps 3-5 are repeated; Otherwise, the displacement vector matrix is ​​directly output and the wave motion direction vector distribution diagram is drawn.

Citation Information

Patent Citations

  • A joint inversion device of sea surface wind field and sea waves

    CN104331588A

  • Image processor

    JP2013134114A