Image detection method for underwater anticorrosive coating of marine structure

CN122530787APending Publication Date: 2026-08-07中达丰集团有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
中达丰集团有限公司
Filing Date
2026-06-04
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

[0004]然而,人工巡检主观性强、效率低,难以在连续作业中保持一致性;静态图像比对无法感知涂层表面对周围环境流场的影响,仅能发现已经明显形变的缺陷,对早期鼓泡、微小剥离等尚未产生显著视觉差异的涂层异常缺乏识别能力,导致漏检率较高

Benefits of technology

[0042] This invention utilizes underwater suspended particles as flow tracers. By analyzing the coordinated deflection behavior of multiple particle trajectories within a local area, it can reliably identify weak flow field disturbances induced by early coating defects, significantly reducing random noise interference. Furthermore, by inverting the starting point and direction vector of the trajectory group deflection, the core area of ​​the disturbance source is precisely located, extending the detection results from the affected flow field range to the defect itself, effectively improving the early detection capability and positioning accuracy of underwater anti-corrosion coating anomalies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122530787A_ABST
    Figure CN122530787A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of image detection, and particularly discloses an image detection method for an underwater anticorrosive coating of a marine structure, which extracts particle center coordinates to form trajectory lines, calculates the deviation of each trajectory segment relative to a local mainstream direction by using a sliding window, merges windows with consistent deviation trends and adjacent spaces into continuous disturbance structures, thereby locking a flow field area affected by defects. A deflection starting point and a deflection vector are extracted from each trajectory in the structure, a disturbance source core area is inversely calculated by minimizing a deflection interpretation cost, and finally, a core area boundary line is output. The application converges the detection result from a large-range flow field disturbance to a defect body position by using the cooperative deflection behavior of a trajectory group, and solves the problems of large positioning deviation and difficulty in identifying early micro defects in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image detection technology, and more specifically to an image detection method for underwater anti-corrosion coatings on marine structures. Background Technology

[0002] Existing image detection methods for underwater anti-corrosion coatings of marine structures mainly include manual visual inspection and static image feature comparison.

[0003] Manual visual inspection involves divers or remotely operated underwater vehicles equipped with cameras to capture videos of the coating surface. Operators observe the videos in real time and mark suspected defect locations. Static image feature comparison involves comparing coating surface images taken at different times to identify color changes, texture differences, or visible blistering or peeling patterns.

[0004] However, manual inspection is highly subjective and inefficient, making it difficult to maintain consistency in continuous operations; static image comparison cannot perceive the influence of the coating surface on the surrounding flow field, and can only detect defects that have already been obviously deformed. It lacks the ability to identify coating anomalies such as early blistering and micro-peeling that have not yet produced significant visual differences, resulting in a high rate of missed detection. Summary of the Invention

[0005] The purpose of this invention is to provide an image detection method for underwater anti-corrosion coatings of marine structures, thereby solving the following technical problems.

[0006] The objective of this invention can be achieved through the following technical solutions:

[0007] An image detection method for underwater anti-corrosion coatings on marine structures includes the following steps:

[0008] To acquire images of the anti-corrosion coating on the surface of marine structures, continuously collected by an underwater camera device;

[0009] Extract the centroid coordinates of suspended particulate matter from the image, and connect the centroid coordinates of the same suspended particulate matter in chronological order to form the trajectory line of the suspended particulate matter.

[0010] The image plane is traversed by a sliding window. Multiple trajectory segments are extracted at each window position, and the deviation of the trajectory segments from the local mainstream direction is calculated.

[0011] One or more window positions are marked as cooperative disturbance response units based on the deviation amount, and adjacent cooperative disturbance response units are merged into a continuous disturbance structure;

[0012] Extract the deflection start point and deflection direction vector from each trajectory line within the continuous disturbance structure, and determine the core area of ​​the disturbance source based on the deflection start point and deflection direction vector;

[0013] The boundary line of the core area of ​​the disturbance source is superimposed onto the corresponding position of the original image of the anti-corrosion coating surface, and the superimposed detection image is output.

[0014] As a further aspect of the present invention: the process of acquiring the image is as follows:

[0015] The underwater camera device is fixed to the end of the robotic arm of the remotely controlled underwater robot. The remotely controlled underwater robot adjusts the posture of the robotic arm by using the feedback signal from the sonar ranging sensor to keep the distance between the lens of the underwater camera device and the surface of the anti-corrosion coating at a fixed value.

[0016] Multiple light-emitting diodes are installed around the lens of the underwater camera device. The light emission direction of each light-emitting diode is towards the outer area of ​​the intersection of the lens optical axis and the anti-corrosion coating surface. The remotely controlled underwater robot continuously captures images of the anti-corrosion coating surface during its movement.

[0017] As a further aspect of the present invention: the process of extracting the centroid coordinates is as follows:

[0018] Perform grayscale transformation on each frame of the image, and mark the pixels with grayscale values ​​lower than the background grayscale threshold as candidate points for suspended particulate matter;

[0019] Connectivity labeling is performed on adjacent suspended particulate matter candidate points, and all suspended particulate matter candidate points belonging to the same connected component are grouped into a suspended particulate matter region;

[0020] Calculate the arithmetic mean of the coordinates of all pixels within the suspended particulate area, and use the arithmetic mean as the centroid coordinates of the suspended particulate area in the current image.

[0021] As a further aspect of the present invention, the process of extracting multiple trajectory segments is as follows:

[0022] Set a sliding window of a predetermined size, and the movement compensation of the sliding window in the horizontal and vertical directions is half the width and half the height of the sliding window, respectively;

[0023] At each window position, for a single trajectory line, all centroid coordinates located within the current window boundary are selected and arranged in chronological order to form a continuous centroid coordinate sequence. If the sequence contains more than three centroid coordinates, the sequence is considered as a trajectory segment.

[0024] As a further aspect of the present invention, the process of extracting multiple trajectory segments is as follows:

[0025] Set a sliding window of a predetermined size, and the movement compensation of the sliding window in the horizontal and vertical directions is half the width and half the height of the sliding window, respectively;

[0026] At each window position, for a single trajectory line, all centroid coordinates located within the current window boundary are selected and arranged in chronological order to form a continuous centroid coordinate sequence. If the sequence contains more than three centroid coordinates, the sequence is considered as a trajectory segment.

[0027] As a further aspect of the present invention: the process of marking cooperative disturbance response units is as follows:

[0028] Extract the deviation of all trajectory segments at each window position, calculate the correlation coefficient of the deviation sequence between adjacent window positions, and determine adjacent window positions with a correlation coefficient greater than a preset value as having the same deviation trend;

[0029] Calculate the Euclidean distance between the center points of adjacent windows, and determine the positions of adjacent windows whose Euclidean distance is less than half the width of the sliding window as spatially adjacent;

[0030] Multiple window positions that simultaneously satisfy the conditions of consistent deviation change trends and spatial adjacency are grouped into the same cooperative disturbance response unit, and each cooperative disturbance response unit contains at least one window position.

[0031] As a further aspect of the present invention: the process of obtaining the continuous perturbation structure is as follows:

[0032] Extract the bounding rectangle of the image plane region covered by each cooperative perturbation response unit, calculate the minimum Euclidean distance between two bounding rectangles, and if the minimum Euclidean distance is less than one-quarter of the sliding window width, mark the two cooperative perturbation response units as mergeable units, obtain the union of the center point coordinates of all window positions within the mergeable unit, calculate the convex hull polygon of the union, and take the region inside the convex hull polygon as the continuous perturbation structure after merging.

[0033] As a further aspect of the present invention: the process of extracting the deflection initiation point and deflection magnitude is as follows:

[0034] For each trajectory line within the continuous perturbation structure, calculate the angle value of the tangent direction of each centroid coordinate and the angle difference between the local mainstream direction along the extension direction of the trajectory line.

[0035] When three or more consecutive centroid coordinates have the same sign for the angle difference and the absolute value of the angle difference increases point by point, the first centroid coordinate in the consecutive segment is taken as the deflection starting point.

[0036] Starting from the deflection initiation point, the arithmetic mean of the tangent direction angles of the next five consecutive centroid coordinates is taken as the deflection direction angle, and the unit vector corresponding to the deflection direction angle is taken as the deflection velocity.

[0037] As a further aspect of the present invention, the specific process for determining the core region of the disturbance source is as follows:

[0038] A grid-like set of candidate points is generated within the boundary of a continuous perturbation structure, with the grid spacing equal to the width of one pixel.

[0039] For each candidate point, calculate the Euclidean distance from the candidate point to the deflection start point on the trajectory line and the perpendicular distance from the candidate point to the line containing the corresponding deflection inflection on the trajectory line.

[0040] The weighted sum of Euclidean distance and vertical distance is used as the deflection interpretation cost of candidate points. The candidate point with the minimum deflection interpretation cost is selected as the disturbance source center point. A circle is drawn with the disturbance source center point as the center and half the width of the sliding window as the radius. The circular area is used as the core area of ​​the disturbance source.

[0041] The beneficial effects of this invention compared to the prior art are as follows:

[0042] This invention utilizes underwater suspended particles as flow tracers. By analyzing the coordinated deflection behavior of multiple particle trajectories within a local area, it can reliably identify weak flow field disturbances induced by early coating defects, significantly reducing random noise interference. Furthermore, by inverting the starting point and direction vector of the trajectory group deflection, the core area of ​​the disturbance source is precisely located, extending the detection results from the affected flow field range to the defect itself, effectively improving the early detection capability and positioning accuracy of underwater anti-corrosion coating anomalies. Attached Figure Description

[0043] The invention will now be further described with reference to the accompanying drawings.

[0044] Figure 1 This is a flowchart illustrating an image detection method for underwater anti-corrosion coatings on marine structures according to the present invention. Figure 2 This is a schematic diagram of the process for determining the core region of the disturbance source in this invention. Detailed Implementation

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

[0047] Please see Figures 1-2 As shown, this invention provides an image detection method for underwater anti-corrosion coatings on marine structures, comprising the following steps:

[0048] To acquire images of the anti-corrosion coating on the surface of marine structures, continuously collected by an underwater camera device;

[0049] In a preferred embodiment of the present invention, the process of acquiring an image is as follows:

[0050] The underwater camera device is fixed to the end of the robotic arm of the remotely controlled underwater robot. The remotely controlled underwater robot adjusts the posture of the robotic arm by using the feedback signal from the sonar ranging sensor to keep the distance between the lens of the underwater camera device and the surface of the anti-corrosion coating at a fixed value.

[0051] Multiple light-emitting diodes are installed around the lens of the underwater camera device. The light emission direction of each light-emitting diode is towards the outer area of ​​the intersection of the lens optical axis and the anti-corrosion coating surface. The remotely controlled underwater robot continuously captures images of the anti-corrosion coating surface during its movement.

[0052] Extract the centroid coordinates of suspended particulate matter from the image, and connect the centroid coordinates of the same suspended particulate matter in chronological order to form the trajectory line of the suspended particulate matter.

[0053] In a preferred embodiment of the present invention, the process of extracting the centroid coordinates is as follows:

[0054] First, a grayscale transformation is performed on each frame of image captured by the underwater camera, converting the color image to a grayscale image. A background grayscale threshold of 120 is set. All pixels in the grayscale image are traversed, and pixels with grayscale values ​​below 120 are marked as candidate points for suspended particulate matter. For example, in a certain frame, the pixel at coordinates (15, 30) has a grayscale value of 85, so this point is marked as a candidate point. After marking, a connected component labeling algorithm is performed on all adjacent candidate points for suspended particulate matter in the image. Specifically, if two candidate points are adjacent in the horizontal, vertical, or diagonal direction, they are determined to belong to the same connected component. All candidate points belonging to the same connected component are grouped into the same suspended particulate matter region. For example, a connected component containing three candidate points at coordinates (20, 40), (21, 41), and (20, 42) constitutes a suspended particulate matter region. For each suspended particulate area, calculate the sum of the x-coordinates and y-coordinates of all pixels within that area, then divide by the total number of pixels in the area to obtain the arithmetic mean of the x-coordinates and y-coordinates. For example, if a suspended particulate area contains 5 pixels with coordinates (10, 20), (11, 21), (10, 22), (9, 21), and (11, 20), the sum of their x-coordinates is 10 + 11 + 10 + 9 + 11 = 51, and the sum of their y-coordinates is 20 + 21 + 22 + 21 + 20 = 104. Since the total number of pixels is 5, the centroid x-coordinate is 51 divided by 5, which equals 10.2, and the centroid y-coordinate is 104 divided by 5, which equals 20.8. Use the calculated arithmetic mean as the centroid coordinates of the suspended particulate area in the current image. Repeating this process allows you to extract the centroid coordinates of each suspended particulate from each frame of the image.

[0055] Understandably, underwater anti-corrosion coatings typically have uniform color and relatively stable lighting conditions. Suspended particles, due to their different materials and reflective properties, appear as darker pixels than the background in grayscale images. Therefore, setting a fixed background grayscale threshold can effectively separate particles from the coating background. A single particle occupies a continuous region in the image rather than an isolated pixel. Adjacent candidate points can be grouped into the same region through connected component labeling, thus avoiding the erroneous splitting of a single particle into multiple independent objects. Calculating the arithmetic mean of the coordinates of all pixels within a region essentially finds the geometric center of that region. This center point can represent the spatial position of the particle in the image with sub-pixel precision. Compared to directly using region edges or individual pixels, centroid coordinates are less affected by particle shape changes and image noise. By repeating the above operation for each frame, a stable sequence of the same particle's position at different times can be obtained. These position sequences constitute the particle's trajectory line.

[0056] It's important to note that underwater anti-corrosion coatings are typically composed of polymer materials (such as epoxy resin or polyurethane). These materials have smooth surfaces and uniform colors, reflecting incident light primarily through specular and diffuse reflection, resulting in high reflectivity. Suspended particles (such as rust debris, silt particles, or biodegradation products) are entirely different from coatings. Their surfaces are rough and irregularly shaped, reflecting incident light primarily through scattering. Furthermore, these particles are often dark or black (e.g., ferric oxide, the main component of rust, is reddish-black, and the organic matter in silt is dark brown), absorbing visible light much more readily than the coating surface. When light from an underwater camera shines on the coating surface and suspended particles, the coating reflects most of the light back to the lens, while the suspended particles absorb most of the light and scatter the remaining light in all directions, with only a very small portion returning along the lens direction. Therefore, in grayscale images, pixels corresponding to the coating surface have higher grayscale values, appearing as brighter areas, while pixels corresponding to suspended particles have lower grayscale values, appearing as darker areas.

[0057] The image plane is traversed by a sliding window. Multiple trajectory segments are extracted at each window position, and the deviation of the trajectory segments from the local mainstream direction is calculated.

[0058] In another preferred embodiment of the present invention, the process of extracting multiple trajectory segments is as follows:

[0059] First, set a sliding window of a predetermined size, with a width and height of 100 pixels. The sliding window moves on the image plane according to the following rules: the horizontal movement step is equal to half the width of the sliding window, i.e., 50 pixels; the vertical movement step is equal to half the height of the sliding window, i.e., 50 pixels. Following these step sizes, the sliding window starts from the top left corner of the image plane and moves sequentially to the right and down, traversing the entire image plane.

[0060] At each window position, obtain the boundary range of the current window. The boundary range is determined by the coordinates of the top-left corner and the bottom-right corner of the window. For example, when the top-left corner of the sliding window is (0, 0), the bottom-right corner is (100, 100). Iterate through all the extracted suspended particulate matter trajectory lines. For each trajectory line, obtain a list of all centroid coordinates on that trajectory line. Each centroid coordinate contains the x-value and y-value on the image plane and the corresponding timestamp. Filter out all centroid coordinates located within the current window boundary from this list. The criteria are: the x-value of the centroid coordinate is greater than or equal to the left boundary of the window and less than or equal to the right boundary of the window, and the y-value is greater than or equal to the top boundary of the window and less than or equal to the bottom boundary of the window. Arrange the filtered centroid coordinates in ascending order of timestamp to form a continuous centroid coordinate sequence.

[0061] Check the number of centroid coordinates in the continuous centroid coordinate sequence. If the sequence contains three or more centroid coordinates, for example, a trajectory line has five centroid coordinates within the current window, with timestamps of frame 1, frame 2, frame 3, frame 4, and frame 5, then the entire sequence is considered a trajectory segment. If the sequence contains fewer than three centroid coordinates, such as only two or one, then the sequence is not considered a trajectory segment. For each trajectory line within the current window, repeat the above filtering and judgment operation to extract multiple trajectory segments at the current window position. After the sliding window moves to the next position, repeat the entire process until all window positions have been processed.

[0062] In another preferred embodiment of the present invention, the process of calculating the deviation is as follows:

[0063] First, a trajectory segment is acquired, consisting of a series of centroid coordinates arranged in chronological order. For example, a trajectory segment may contain 5 centroid coordinates, labeled P1, P2, P3, P4, and P5 in order of acquisition time. For each centroid coordinate, its tangent angle is calculated. Specifically, the angle of the line connecting the current centroid coordinate to the next centroid coordinate is taken. For example, if the angle of the line connecting P2 and P3 is 45 degrees, then the tangent angle of P2 is recorded as 45 degrees. For the last point P5 in the trajectory segment, since there are no subsequent points, the angle of the line connecting P5 and the previous point P4 is taken. For example, if the angle of the line connecting P4 and P5 is 46 degrees, then the tangent angle of P5 is recorded as 46 degrees.

[0064] After calculating the tangent angle values ​​for all centroid coordinates, divide all angle values ​​into multiple angle intervals based on their magnitude. The intervals are divided as follows: from 0 degrees to 360 degrees, each interval is 10 degrees; that is, 0 to 9 degrees is interval 1, 10 to 19 degrees is interval 2, and so on. Count the number of centroid coordinates contained in each angle interval. For example, if the tangent angle values ​​for the above 5 centroid coordinates are 44 degrees, 46 degrees, 45 degrees, 47 degrees, and 46 degrees, then these angle values ​​all fall within the interval of 40 to 49 degrees, which contains 5 centroid coordinates; other intervals contain 0. Take the median angle of the angle interval with the most centroid coordinates as the local dominant direction. For the interval of 40 to 49 degrees, its lower boundary is 40 degrees, its upper boundary is 49 degrees, and its median angle is (40+49) / 2=44.5 degrees; therefore, the local dominant direction is taken as 44.5 degrees.

[0065] Then, for each centroid coordinate on the trajectory segment, calculate the difference between its tangent angle and the local mainstream angle. For example, the tangent angle of point P1 is 44 degrees, and the difference is 44 minus 44.5 equals -0.5 degrees; the difference for point P2 is 46 degrees, and the difference is 46 minus 44.5 equals 1.5 degrees. Sum the angle differences of all centroid coordinates and divide by the total number of centroid coordinates to obtain the arithmetic mean. Taking the above five differences of -0.5 degrees, 1.5 degrees, 0.5 degrees, 2.5 degrees, and 1.5 degrees as an example, the sum is 5.5 degrees, divided by 5 equals 1.1 degrees, so the deviation of the trajectory segment is 1.1 degrees. Record the sign of the deviation as the deflection direction of the trajectory segment. If the deviation is positive, the deflection direction is recorded as positive; if it is negative, the deflection direction is recorded as negative. In this example, the deviation of 1.1 degrees is positive, so the deflection direction is positive. By repeating the above process, the deviation and deflection direction of each trajectory segment can be calculated.

[0066] It is important to note that within a localized spatial region, the trajectories of multiple suspended particles are typically dominated by the same flow field. Therefore, the tangent angles of the centroid coordinates on these trajectory segments will be distributed around a dominant flow direction. By statistically analyzing the angles with the most centroid coordinates within a given angle interval and taking the median angle, we are essentially identifying the dominant flow direction within that localized region, which excludes interference from individual anomalous trajectory points. For a single trajectory segment, the difference between the tangent angle of each centroid coordinate and the local dominant flow direction reflects the degree of deflection of the trajectory relative to the surrounding average flow at each point. Taking the arithmetic mean yields a comprehensive deviation, with the positive or negative sign indicating whether the deflection is towards one side of the dominant flow direction or the other. The fundamental principle behind this is that when local defects exist on the coating surface, these defects alter the surrounding flow field, causing the particle trajectories near the defect to undergo organized deflection relative to the local dominant flow direction. The direction and magnitude of this deflection are consistent within the same spatial neighborhood. By defining the deviation as the average angle difference relative to the local dominant flow direction, we can eliminate global offsets caused by camera movement or changes in the overall water flow direction, thus highlighting the local deflection characteristics caused by local defects. This deviation is the basic data for subsequent identification of cooperative disturbance response units and inversion of the core area of ​​disturbance source. Only by accurately obtaining the degree and direction of deflection of each trajectory segment in the local coordinate system can we further determine whether the trend of deviation changes between multiple window positions is consistent, and then merge spatially adjacent windows with cooperative deflection behavior into a continuous disturbance structure. Finally, we can accurately locate the body position of the coating defect from the deflection starting point and the deflection amount.

[0067] One or more window positions are marked as cooperative disturbance response units based on the deviation amount, and adjacent cooperative disturbance response units are merged into a continuous disturbance structure;

[0068] In a preferred embodiment of the present invention, the process of marking cooperative disturbance response units is as follows:

[0069] First, obtain the deviation of all trajectory segments within each window position. Each trajectory segment has a deviation value. Arrange these deviations in the order in which the trajectory segments entered the window to form the deviation sequence for that window position. For example, if a window position contains 3 trajectory segments with deviations of 1.2 degrees, 1.5 degrees, and 1.3 degrees in chronological order, then the deviation sequence for that window is [1.2, 1.5, 1.3]. For two adjacent window positions, extract their respective deviation sequences. Assume that the two sequences have the same length or are aligned to the same length through interpolation. For example, sequence A is [1.2, 1.5, 1.3], and sequence B is [1.3, 1.6, 1.4]. The Pearson correlation coefficient between the two sequences is calculated as follows: First, calculate the mean of sequence A (1.2 + 1.5 + 1.3 = 4.0, divided by 3, we get 1.333), and the mean of sequence B (1.3 + 1.6 + 1.4 = 4.3, divided by 3, we get 1.433). Then, calculate the sum of the products of the differences between each point and the mean, and divide by the product of their respective standard deviations. After obtaining the correlation coefficient, if the value is greater than the preset value of 0.7, it is determined that the deviation trends of the two adjacent window positions are consistent. For example, the correlation coefficient calculated for sequences A and B above is 1.0 (perfectly positive correlation), which is greater than 0.7, therefore it is determined that the trends are consistent. Then, the Euclidean distance between the center points of the two adjacent window positions is calculated. Let the coordinates of the center point of window A be (100, 200), and the coordinates of the center point of window B be (110, 205), then the Euclidean distance is approximately 11.18. The sliding window width is set to 40 pixels, and its half value is 20 pixels. Since 11.18 is less than 20, the two window positions are determined to be spatially adjacent. Two window positions that simultaneously satisfy both the consistent trend of deviation change and spatial adjacency are grouped into the same cooperative perturbation response unit. This process continues to iterate through all adjacent window positions, gradually merging those that meet the conditions. If a window position satisfies the conditions along with multiple surrounding window positions, then these window positions all belong to the same cooperative perturbation response unit. Each cooperative perturbation response unit contains at least one window position. When a window position does not simultaneously satisfy both of the above conditions with any adjacent window, that window position constitutes a separate cooperative perturbation response unit. Repeating the above process allows all window positions on the image plane to be assigned to different cooperative perturbation response units.

[0070] It is understandable that the impact of a local coating defect on the flow field is not isolated to a single window location, but rather causes similar deflection behaviors in the particle trajectories of multiple adjacent windows within a certain spatial range. By calculating the correlation coefficient of the deviation sequence between adjacent windows, it is possible to quantitatively determine whether the deflection change patterns of the trajectory patches within these two windows are synchronized. A correlation coefficient greater than a preset value means that the fluctuations in their deviation over time are consistent, which is the basis for determining that they are affected by the same disturbance source. Simultaneously, only windows that are spatially close can belong to the same disturbance structure. Therefore, defining spatial adjacency by whether the Euclidean distance between their center points is less than half the width of the sliding window ensures that the merged windows are continuously distributed on the image plane. Grouping windows that simultaneously satisfy both consistent deflection trends and spatial adjacency into the same cooperative disturbance response unit essentially aggregates spatially continuous and synchronously responding local regions into a whole. This whole corresponds to the range affected by a potential disturbance source. This approach avoids incorrectly splitting multiple windows caused by the same disturbance source into multiple independent units, and also avoids incorrectly merging windows caused by different disturbance sources. Ultimately, these cooperative disturbance response units become the basic building blocks for the subsequent construction of continuous disturbance structures. Only by accurately dividing each unit can adjacent units be further merged into a larger continuous disturbance structure, thereby providing a spatially complete and clearly defined input region for disturbance source inversion.

[0071] It should be noted that the Pearson correlation coefficient of the deviation sequences between two adjacent sliding window positions is calculated using a pairing method based on shared motion trajectory lines. Specifically, for any two adjacent sliding window positions, the set of motion trajectory line identifiers for all trajectory segments in the first window and the set of motion trajectory line identifiers for all trajectory segments in the second window are obtained respectively. The intersection of these two sets is taken, i.e., the motion trajectory lines that appear in both windows simultaneously. For each motion trajectory line in the intersection, the deviation value of the trajectory segments belonging to that motion trajectory line is extracted in the first window. If multiple trajectory segments of the same motion trajectory line exist in the same window, the arithmetic mean of the deviation values ​​of these segments is taken; similarly, the deviation values ​​of the trajectory segments belonging to that motion trajectory line are extracted in the second window, and the average value is also taken. This results in two deviation sequences of equal length, with the elements in the sequences arranged according to a unified sorting rule for the motion trajectory line identifiers, such as arranged in ascending order of identifier number. Then, the Pearson correlation coefficient between these two sequences is calculated. If the number of motion trajectory lines in the intersection is less than three, it is determined that the adjacent window pair does not meet the condition of consistent deviation trend, because the sample size is insufficient to reliably calculate the correlation coefficient. The pairing method described above ensures the pairwise sample correspondence required for correlation coefficient calculation and can be stably executed even when the number of trajectory segments in the two windows is not equal.

[0072] In another preferred embodiment of the present invention, the process of obtaining the continuous perturbation structure is as follows:

[0073] In a preferred embodiment of the present invention, the operation of obtaining the continuous perturbation structure is performed as follows: First, the bounding rectangle of the image plane region covered by each cooperative perturbation response unit is extracted. Each cooperative perturbation response unit contains multiple window positions, and each window position has a center point coordinate. The minimum and maximum values ​​of the x-coordinate and the minimum and maximum values ​​of the y-coordinate among these center point coordinates are taken, and a rectangle is drawn with (minX, miny) as the lower left corner and (maxX, maxy) as the upper right corner. This rectangle is the bounding rectangle of the unit. For example, a cooperative perturbation response unit contains three window positions with center point coordinates of (100, 150), (120, 160), and (110, 180), respectively. Then, minX=100, maxX=120, miny=150, maxy=180, and the lower left corner of the bounding rectangle is (100, 150), and the upper right corner is (120, 180). For two different cooperative perturbation response units, their respective bounding rectangles are obtained, and the minimum Euclidean distance between the two rectangles is calculated.

[0074] The minimum Euclidean distance is the minimum straight-line distance between any two points on the boundaries of two rectangles. For example, rectangle A covers x from 100 to 120 and y from 150 to 180, and rectangle B covers x from 130 to 150 and y from 160 to 190. Then, the right boundary of rectangle A has x = 120, and the left boundary of rectangle B has x = 130. They are 10 units apart in the x-direction and overlap in the y-direction from 160 to 180. Therefore, the minimum Euclidean distance is 10. If rectangles A and B overlap in either the x or y direction, the minimum Euclidean distance may be 0. The sliding window width is set to 40 pixels, and one-quarter of that width is 10 pixels. If the minimum Euclidean distance between two circumscribed rectangles is less than 10 pixels, these two cooperative perturbation response units are marked as mergeable units.

[0075] Taking the distance of 10 as an example, if the distance is equal to 10, the condition is not met because it must be less than 10; if the distance is 8, the condition is met, and it is marked as a mergeable unit. After marking all mergeable units, obtain the coordinates of the center points of all windows within all mergeable units, and take the union of these center point coordinates to obtain a point set. For example, mergeable unit U1 contains center points (100, 150) and (120, 160), and mergeable unit U2 contains center points (130, 170) and (140, 165), with the union being {(100, 150), (120, 160), (130, 170), (140, 165)}. Calculate the convex hull polygon of this point set. The convex hull is the smallest convex polygon containing all points, and its vertices are some points in the point set, connected in counterclockwise order to form a closed polygon. For example, the convex hull vertices of the four points mentioned above might be (100, 150), (140, 165), and (130, 170), which, when connected, form a triangular region. The interior region of this convex hull polygon is used as the merged continuous perturbation structure. If there are no mergeable units, the interior region of the circumscribed rectangle of each cooperative perturbation response unit is directly used as the continuous perturbation structure. Repeating the above process yields one or more continuous perturbation structures on the image plane.

[0076] It is important to note that the disturbance to the flow field caused by a coating defect usually extends continuously within a certain spatial range, rather than being limited to the local area covered by a single cooperative disturbance response unit. Due to the overlapping step sizes of the sliding window as it traverses the image plane, the flow field response generated by the same disturbance source is often segmented into multiple adjacent cooperative disturbance response units. These units are spatially close to each other and their response characteristics are continuous. By extracting the bounding rectangle of each unit and calculating the minimum Euclidean distance between the rectangles, the degree of separation between two units on the image plane can be quickly determined. When the minimum Euclidean distance is less than one-quarter of the sliding window width, it indicates that the two units are spatially close enough that the gap between them is very small, and they are very likely different parts of the same continuous disturbance structure. Marking such units as mergeable units essentially involves reassembling the scattered response units into a larger whole based on spatial proximity. Taking the union of the coordinates of the center points of all the windows within the mergeable units and calculating its convex hull polygon yields a minimum convex region that tightly surrounds all these center points. This region can completely cover the entire area affected by the disturbance source, while excluding voids or depressions that do not belong to the disturbance structure. The convex hull polygon, serving as the boundary of the continuous perturbation structure, possesses simple, closed, and convex geometric characteristics, facilitating the subsequent extraction of trajectory lines and calculation of deflection initiation points. This continuous perturbation structure provides a spatially continuous and well-defined input region for perturbation source inversion, avoiding the omission of key trajectory lines during inversion due to small gaps between elements, and preventing unnecessary computational burden from using overly complex concave boundaries.

[0077] Extract the deflection start point and deflection direction vector from each trajectory line within the continuous disturbance structure, and determine the core area of ​​the disturbance source based on the deflection start point and deflection direction vector;

[0078] In a preferred embodiment of the present invention, the specific process for determining the core region of the disturbance source is as follows:

[0079] First, for each trajectory line within the continuous perturbation structure, calculate the angle difference between the tangent direction angle of each centroid coordinate and the local mainstream direction along its extension direction. The local mainstream direction has been determined in previous steps, for example, 44.5 degrees. If the tangent direction angles of the centroid coordinates on a certain trajectory line are 44 degrees, 46 degrees, 47 degrees, 49 degrees, and 52 degrees, then the corresponding angle differences are -0.5 degrees, +1.5 degrees, +2.5 degrees, +4.5 degrees, and +7.5 degrees, respectively.

[0080] Check if there are three or more consecutive centroid coordinates with angle differences of the same sign and whose absolute values ​​increase point by point. In the above sequence, the sign is positive starting from the second point: the absolute value of the second point is 1.5, the third point is 2.5, the fourth point is 4.5, and the fifth point is 7.5. Four consecutive points satisfy the condition of the same sign and increasing absolute value. Therefore, the first centroid coordinate in the continuous segment, i.e., the second point, is taken as the deflection starting point. If there are multiple continuous segments in a trajectory line that meet the conditions, the deflection starting point of each segment is extracted. Starting from the deflection starting point, the tangent direction angle values ​​of the subsequent five consecutive centroid coordinates are taken, and the arithmetic mean of these five angle values ​​is calculated as the deflection direction angle. The unit vector corresponding to this angle is taken as the deflection inflection.

[0081] After extracting the deflection start points and deflection vortices for all trajectory lines, a grid-like set of candidate points is generated within the boundary of the continuous perturbation structure. The boundary of the continuous perturbation structure is a convex hull polygon. The smallest bounding rectangle of this polygon is taken, and points are uniformly distributed within the rectangle with a grid spacing of 1 pixel. Points falling inside the convex hull polygon are retained as candidate points. For example, the interior of a convex hull polygon contains coordinates (100, 200), (101, 200), etc. For each candidate point, the Euclidean distance from the candidate point to the deflection start point on each trajectory line and the perpendicular distance from the candidate point to the line containing the corresponding deflection vortice of the trajectory are calculated. The Euclidean distance and the perpendicular distance are weighted and summed, for example, with weighting coefficients of 0.46 and 0.54, respectively. All candidate points are traversed, and the candidate point with the minimum deflection interpretation cost is selected as the perturbation source center point. A circle is drawn with this center point as the center and half the width of the sliding window as the radius. The circular region is taken as the core region of the perturbation source. For example, if the width of the sliding window is 40 pixels, then the radius is 20 pixels and the center is (105, 205). The resulting circular area is the core area of ​​the disturbance source.

[0082] It should be noted that when a particle's trajectory passes through a local defect on the coating surface, the particle's motion direction will deflect due to the change in the surrounding flow field caused by the defect. The deflection initiation point is precisely where the particle begins to be affected by the defect, while the deflection magnitude represents the dominant motion direction of the particle when leaving the defect area. By detecting angle differences with the same sign at three or more consecutive centroid coordinates and an increasing absolute value point by point, the starting position of the deflection behavior can be reliably identified. This monotonically increasing pattern indicates that the particle is subjected to a continuous and gradually increasing lateral force, rather than random fluctuation noise. Taking the arithmetic mean of the tangent angle values ​​of the next five centroid coordinates starting from the deflection initiation point as the deflection magnitude can smooth out local jitter and obtain a stable overall deflection direction. Each deflection initiation point and deflection magnitude actually points to the same potential disturbance source, which is located at a position that makes the deflection initiation points of each trajectory as close as possible and the deflection magnitude as close as possible to itself. Within the boundary of the continuous perturbation structure, a grid of candidate points is generated. The Euclidean distance from each candidate point to the starting point of each trajectory deflection and the perpendicular distance to the line containing each deflection vortex are calculated. The weighted sum of these two distances is used as the deflection interpretation cost, which physically assesses the extent to which the candidate point is close to all deflection starting points and located at the intersection of the paths indicated by all deflection vortices. The candidate point with the minimum cost is selected as the perturbation source center point because this point best conforms to the geometric relationship constrained by the common behavior of all trajectories; that is, it is the most likely location unanimously voted by the deflection information of multiple trajectories. A circle is drawn with this center point as the center and half the width of the sliding window as the radius. The resulting circular region is used as the core region of the perturbation source. This radius matches the window scale previously used to construct the cooperative perturbation, and can cover the defect body and its adjacent affected areas, thereby accurately converging the detection results from a large-scale flow field perturbation region to the local area where the defect body is located.

[0083] The boundary line of the core area of ​​the disturbance source is superimposed onto the corresponding position of the original image of the anti-corrosion coating surface, and the superimposed detection image is output.

[0084] Specifically, first, the boundary line of the core area of ​​the disturbance source is obtained. This boundary line is a circle, for example, with the center coordinates (105, 205) and a radius of 20 pixels. The image coordinates of all pixels on this circular boundary are extracted. Using the center of the circle as the center, angles from 0 to 359 degrees are traversed, with each angle corresponding to a boundary point coordinate. For example, 0 degrees corresponds to point (125, 205), and 90 degrees corresponds to point (105, 225). For each extracted boundary point coordinate, the pixel at the same coordinate position is found in the original image of the anti-corrosion coating surface. The red channel value of this pixel is set to 255, and the green and blue channel values ​​are both set to 0, i.e., replaced with red. For example, the pixel value at position (125, 205) in the original image is (80, 100, 120), which becomes (255, 0, 0) after superposition. After completing the pixel replacement of all boundary points, the modified image is output as the detection image. If other color markers exist in the original image, the red boundary line can distinguish them. The output format can be JPEG or PNG, keeping the image resolution consistent with the original image.

[0085] This invention first extracts the centroid coordinates of each suspended particulate matter from continuously acquired images and connects them to form trajectory lines. Then, it traverses the image plane using a sliding window, extracting multiple trajectory segments within each window and calculating the deviation of each trajectory segment relative to the local mainstream direction. Window positions with consistent deviation trends and spatial adjacency are grouped into cooperative disturbance response units. Further, neighboring response units are merged into a continuous disturbance structure, thereby identifying the flow field disturbance region affected by coating defects. Based on this, the deflection initiation point and deflection magnitude are extracted from each trajectory line within the continuous disturbance structure. By finding candidate positions that minimize the distance between all deflection initiation points and have the most consistent deflection magnitudes, the core area of ​​the disturbance source is deduced. This core area directly corresponds to the location of the coating defect itself. The entire scheme does not rely on manual observation or static image features, but utilizes the collective deflection effect caused by defects on the flow field to accurately converge the detection results from a large-scale flow field disturbance region to the location of the defect itself, thus solving the technical problems of large positioning deviations and the inability to identify small defects in the early stages in existing technologies.

[0086] The foregoing has provided a detailed description of one embodiment of the present invention, but this description is merely a preferred embodiment and should not be construed as limiting the scope of the invention. All equivalent variations and modifications made within the scope of the present invention should still fall within the scope of the present invention.

Claims

1. An image detection method for underwater anti-corrosion coatings on marine structures, characterized in that, Includes the following steps: To acquire images of the anti-corrosion coating on the surface of marine structures, continuously collected by an underwater camera device; Extract the centroid coordinates of suspended particulate matter from the image, and connect the centroid coordinates of the same suspended particulate matter in chronological order to form the trajectory line of the suspended particulate matter. The image plane is traversed by a sliding window. Multiple trajectory segments are extracted at each window position, and the deviation of the trajectory segments from the local mainstream direction is calculated. One or more window positions are marked as cooperative disturbance response units based on the deviation amount, and adjacent cooperative disturbance response units are merged into a continuous disturbance structure; Extract the deflection start point and deflection direction vector from each trajectory line within the continuous disturbance structure, and determine the core area of ​​the disturbance source based on the deflection start point and deflection direction vector; The boundary line of the core area of ​​the disturbance source is superimposed onto the corresponding position of the original image of the anti-corrosion coating surface, and the superimposed detection image is output.

2. The image detection method for underwater anti-corrosion coatings of marine structures according to claim 1, characterized in that, The process of acquiring an image is as follows: The underwater camera device is fixed to the end of the robotic arm of the remotely controlled underwater robot. The remotely controlled underwater robot adjusts the posture of the robotic arm by using the feedback signal from the sonar ranging sensor to keep the distance between the lens of the underwater camera device and the surface of the anti-corrosion coating at a fixed value. Multiple light-emitting diodes are installed around the lens of the underwater camera device. The light emission direction of each light-emitting diode is towards the outer area of ​​the intersection of the lens optical axis and the anti-corrosion coating surface. The remotely controlled underwater robot continuously captures images of the anti-corrosion coating surface during its movement.

3. The image detection method for underwater anti-corrosion coatings of marine structures according to claim 1, characterized in that, The process of extracting the centroid coordinates is as follows: Perform grayscale transformation on each frame of the image, and mark the pixels with grayscale values ​​lower than the background grayscale threshold as candidate points for suspended particulate matter; Connectivity labeling is performed on adjacent suspended particulate matter candidate points, and all suspended particulate matter candidate points belonging to the same connected component are grouped into a suspended particulate matter region; Calculate the arithmetic mean of the coordinates of all pixels within the suspended particulate area, and use the arithmetic mean as the centroid coordinates of the suspended particulate area in the current image.

4. The image detection method for underwater anti-corrosion coatings of marine structures according to claim 1, characterized in that, The process of extracting multiple trajectory segments is as follows: Set a sliding window of a predetermined size, and the movement compensation of the sliding window in the horizontal and vertical directions is half the width and half the height of the sliding window, respectively; At each window position, for a single trajectory line, all centroid coordinates located within the current window boundary are selected and arranged in chronological order to form a continuous centroid coordinate sequence. If the sequence contains more than three centroid coordinates, the sequence is considered as a trajectory segment.

5. The image detection method for underwater anti-corrosion coatings of marine structures according to claim 1, characterized in that, The process of calculating the deviation is as follows: Calculate the tangent direction angle value of each centroid coordinate on the trajectory segment, divide all tangent direction angle values ​​into multiple angle intervals according to the angle size, count the number of centroid coordinates contained in each angle interval, and take the median angle of the angle interval with the most centroid coordinates as the local mainstream direction. For a single trajectory segment, calculate the angle difference between the tangent direction of each centroid coordinate on the trajectory segment and the local mainstream direction. Use the arithmetic mean of the angle differences as the deviation, and record the positive or negative sign of the deviation as the deflection direction of the trajectory segment.

6. The image detection method for underwater anti-corrosion coatings of marine structures according to claim 1, characterized in that, The process of marking cooperative disturbance response units is as follows: Extract the deviation of all trajectory segments at each window position, calculate the correlation coefficient of the deviation sequence between adjacent window positions, and determine adjacent window positions with a correlation coefficient greater than a preset value as having the same deviation trend; Calculate the Euclidean distance between the center points of adjacent windows, and determine the positions of adjacent windows whose Euclidean distance is less than half the width of the sliding window as spatially adjacent; Multiple window positions that simultaneously satisfy the conditions of consistent deviation change trends and spatial adjacency are grouped into the same cooperative disturbance response unit, and each cooperative disturbance response unit contains at least one window position.

7. The image detection method for underwater anti-corrosion coatings of marine structures according to claim 1, characterized in that, The process of obtaining the continuous perturbation structure is as follows: Extract the bounding rectangle of the image plane region covered by each cooperative perturbation response unit, calculate the minimum Euclidean distance between two bounding rectangles, and if the minimum Euclidean distance is less than one-quarter of the sliding window width, mark the two cooperative perturbation response units as mergeable units, obtain the union of the center point coordinates of all window positions within the mergeable unit, calculate the convex hull polygon of the union, and take the region inside the convex hull polygon as the continuous perturbation structure after merging.

8. The image detection method for underwater anti-corrosion coatings of marine structures according to claim 1, characterized in that, The process of extracting the deflection initiation point and deflection directional amount is as follows: For each trajectory line within the continuous perturbation structure, calculate the angle value of the tangent direction of each centroid coordinate and the angle difference between the local mainstream direction along the extension direction of the trajectory line. When three or more consecutive centroid coordinates have the same sign for the angle difference and the absolute value of the angle difference increases point by point, the first centroid coordinate in the consecutive segment is taken as the deflection starting point. Starting from the deflection initiation point, the arithmetic mean of the tangent direction angles of the next five consecutive centroid coordinates is taken as the deflection direction angle, and the unit vector corresponding to the deflection direction angle is taken as the deflection velocity.

9. The image detection method for underwater anti-corrosion coatings of marine structures according to claim 1, characterized in that, The specific process for determining the core region of the disturbance source is as follows: A grid-like set of candidate points is generated within the boundary of a continuous perturbation structure, with the grid spacing equal to the width of one pixel. For each candidate point, calculate the Euclidean distance from the candidate point to the deflection start point on the trajectory line and the perpendicular distance from the candidate point to the line containing the corresponding deflection inflection on the trajectory line. The weighted sum of Euclidean distance and vertical distance is used as the deflection interpretation cost of candidate points. The candidate point with the minimum deflection interpretation cost is selected as the disturbance source center point. A circle is drawn with the disturbance source center point as the center and half the width of the sliding window as the radius. The circular area is used as the core area of ​​the disturbance source.