Intelligent Defect Judgment Method for Ship Inspection Image Recognition

By employing multi-scale structural analysis and topological constraint graph reconstruction methods, the problem of misjudgment caused by structural boundary uncertainties in ship inspection was solved, achieving accurate identification of defects and stable representation of normal structures.

CN123118541APending Publication Date: 2026-11-17济宁市港航事业发展中心
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611335981.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-31
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately distinguish normal structural textures from defects under conditions of structural boundary uncertainty during ship inspections. This leads to welds, plate seams, etc., being misidentified as defects or real defects being truncated. There is a lack of a two-way correction mechanism between component topological semantics and continuous evidence of defects.

Method used

By obtaining component regions, structural boundaries, and boundary confidence through multi-scale structural analysis, a local structural coordinate system is established, a topological constraint graph is constructed, normal structural responses are reconstructed, and low-confidence structural boundaries are corrected, forming a closed-loop process to separate normal structural responses from anomalous evidence.

Benefits of technology

It effectively reduces misjudgments of normal structures, preserves the true defect contours, ensures consistent expression of defect categories, locations, and contours, and can correct shooting tilt and local perspective changes within the component coordinate reference.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123118541A_ABST
    Figure CN123118541A_ABST
Patent Text Reader

Abstract

This invention belongs to the field of computer vision and ship inspection image processing technology, specifically a method for intelligent defect judgment in ship inspection images. This method performs multi-scale structural analysis on ship inspection images to obtain component regions, structural boundaries, and boundary confidence levels. A local structural coordinate system is established based on the structural orientation and intersection positions, and defect candidates are extracted. A topological constraint graph containing component region nodes, structural boundary nodes, and defect candidate nodes is constructed. Normal structural responses are reconstructed according to inclusion, adjacency, parallelism, intersection, and continuity relationships, and anomalous evidence is separated from the image recognition response. Anomalous evidence crossing low-confidence structural boundaries and satisfying continuity constraints undergoes boundary correction. The structural coordinates, defect candidates, and topological relationships are iteratively updated, and the defect category, location, and contour are output. This invention can distinguish between structural responses formed by welds and plate seams and true defect responses, while preserving defect contours extending across structural boundaries.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer vision and ship inspection image processing technology, specifically a method for intelligent judgment of defects in ship inspection images. Background Technology

[0002] Surface defect identification in ship inspection typically uses inspection images as the processing object. Existing technologies generally first perform image denoising, brightness equalization, contrast enhancement, and scale normalization. Then, edge detection, texture analysis, region segmentation, or convolutional feature extraction are used to obtain suspected defect areas. Category determination is then made based on the color, shape, grayscale gradient, and connectivity features of defects such as cracks, corrosion, and coating peeling. Some solutions add hull component region segmentation before defect identification, dividing plate surfaces, welds, plate seams, connection areas, and component edges into different semantic regions, and then performing defect detection within each semantic region. Other solutions utilize multi-scale feature fusion to expand the defect detection range, or perform morphological connectivity and contour correction on the identification results. The above processing flow usually treats component identification and defect identification as independent sequential steps. The component segmentation results are mainly used to limit the search range, and defect identification still relies primarily on local appearance responses as the main judgment criterion. The inclusion, adjacency, parallelism, intersection, and continuity relationships between component boundaries are not organized as structural constraints that can participate in the judgment, and the component boundary identification error lacks a processing path for reverse correction by defect evidence.

[0003] Normal weld edges, plate seam contours, and reinforced component edges on a ship's surface may exhibit similar linear morphologies to crack-like defects in local images. Coating texture variations and corrosion / peeling areas may also produce similar color and gradient responses. When inspection images are subject to shooting tilt, uneven local lighting, surface contamination, or defects covering structural boundaries, normal structural responses and actual defect responses can easily overlap in the same area. Existing technologies, lacking a bidirectional correction mechanism between component topological semantics and continuous defect evidence, typically rely on fixed component boundaries to retain or exclude defect candidates: with weak boundary constraints, normal welds and plate seams are easily identified as defects; with strong boundary constraints, actual cracks and continuous corrosion areas spanning welds, plate seams, or component connections are easily truncated or deleted. The core technical problem lies in the inability to interpret normal structural textures using hull component relationships while simultaneously correcting erroneous structural boundaries using the cross-boundary continuity of actual defects, given the inherent uncertainty of the structural boundaries themselves. Therefore, it is difficult to reliably distinguish between high structural responses and abnormal defect responses. Summary of the Invention

[0004] The purpose of this invention is to provide an intelligent method for determining defects in ship inspection images, which can solve the problems mentioned in the background art.

[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0006] A method for intelligently determining defects in ship inspection images includes: acquiring ship inspection images and performing multi-scale structural analysis to obtain component regions, structural boundaries, and boundary confidence levels;

[0007] Semantic anchor points are determined based on the structural orientation and intersection points, and a local structural coordinate system is established.

[0008] Defect candidates are extracted in the local structural coordinate system to obtain image recognition response. A topological constraint graph containing component region nodes, structural boundary nodes and defect candidate nodes is constructed to generate relation edges representing adjacency, adjacency, parallelism, intersection and continuity.

[0009] The normal structural response is reconstructed based on the topological constraint graph, and the normal structural response is separated from the image recognition response to obtain anomalous evidence.

[0010] For anomalous evidence that crosses a low-confidence structural boundary and satisfies the continuity constraint, structural boundary correction is performed, and the local structural coordinate system and the defect candidate are updated based on the corrected structural boundary. Normal structural response reconstruction, anomalous evidence separation and structural boundary correction are performed iteratively until the convergence condition is met, and the defect category, defect location and defect contour are output.

[0011] Preferably, the multi-scale structure analysis includes: extracting linear edge features, surface texture features, and structural intersection features at at least two resolution levels;

[0012] The component region prior obtained at the low-resolution level is mapped to the high-resolution level, and the candidate edges in the high-resolution level are constrained to the region affiliation.

[0013] Structural chains are formed based on the directional consistency, spacing continuity, and intersection relationships of adjacent candidate edges;

[0014] A first boundary confidence is assigned to structural chains that are simultaneously supported by area texture boundaries and the structural intersection features, and a second boundary confidence is assigned to structural chains that are supported only by a single resolution level or truncated by abnormal textures, which is lower than the first boundary confidence.

[0015] The structural chains with the first boundary confidence are identified as semantic anchor candidates, and semantic anchors are selected based on the directional differences, intersection stability and spatial coverage relationship between the structural chains.

[0016] Preferably, the construction of the topology constraint graph includes: recording the region category, main direction and boundary sequence for each component region node; recording the curvature, width and texture differences on both sides for each structural boundary node; and recording the morphological main axis, connected branches and local appearance encoding for each defect candidate node.

[0017] The relationship edges are generated based on the spatial inclusion, endpoint adjacency, directional parallelism, trajectory intersection, and cross-edge continuity relationships between nodes.

[0018] For each relation edge, a relation confidence level is set, which is jointly determined by the boundary confidence of the relevant nodes, the integrity of the structural chain formed by adjacent structural boundaries, and the consistency of the local structure.

[0019] The normal texture representation and structural edge representation of the component region nodes are propagated along the relation edge. A normal structural response consistent with the component category, boundary direction and adjacency relationship is generated at the corresponding position of the defect candidate node. Image recognition responses lacking the support of the relation credibility are marked as abnormal responses to be judged.

[0020] Preferably, the structural boundary correction includes: skeletonizing the abnormal evidence into candidate continuous paths, and extracting the endpoint directions, path widths, texture codes, and edge intensity sequences of the candidate continuous paths on both sides of the structural boundary;

[0021] The continuity constraints are determined based on the continuity relationship of the two endpoints, the smoothness of the path width change, the compatibility of the texture encoding, and the overlap with the normal structural response.

[0022] When a candidate continuous path crosses a low-confidence structural boundary and satisfies the continuity constraint, a conflict segment in the structural boundary is marked.

[0023] The structural orientation is extracted from the boundary segments on both sides of the conflict zone that are not covered by anomalous evidence. Candidate interpolation trajectories connecting the boundary segments on both sides are generated. The reconstructed boundary is determined according to the overlap interval between the candidate interpolation trajectory and the anomalous evidence, the difference in endpoint direction with the boundary segments on both sides, and the curvature continuity relationship. The boundary position and the boundary confidence are updated with the reconstructed boundary.

[0024] Preferably, the selection of semantic anchor points includes: dividing the semantic anchor point candidates into multiple anchor point groups according to the extension direction and intersection relationship of the structural chain, and establishing a sequential index along the main structural direction and a spacing index along the structural normal in each anchor point group.

[0025] The anchor point stability is calculated based on the position residual, direction residual, and intersection residual of the structural chain at different resolution levels.

[0026] The structural chain whose anchor point stability satisfies the intra-group consistency relationship and covers the edge of the local inspection area is selected as the basic anchor point;

[0027] After fitting the local structural coordinate system with the base anchor points, the structural chains whose mapping residuals are concentrated within the coverage area of ​​the abnormal evidence are retained as anchor points to be corrected, and the structural chains whose mapping residuals extend to the non-abnormal areas are removed from the corresponding anchor point group, and the local structural coordinate system is refitted.

[0028] Preferably, the establishment of the local structural coordinate system includes: determining a first coordinate axis based on the main direction of the continuous structural chain, and determining a second coordinate axis based on structural chains that intersect with or maintain a stable distance from the continuous structural chain;

[0029] The ship inspection image is divided into overlapping local subdomains based on the changes in structural chain curvature and perspective scaling.

[0030] Within each local subdomain, segmented coordinate mapping is obtained based on the image coordinates, order index, and spacing index of the semantic anchor point;

[0031] Calculate the position difference and direction difference after mapping for the same component boundary in adjacent local subdomains, and adjust the mapping weight in the overlapping area based on the position difference and direction difference;

[0032] The segmented coordinate mappings of each local subdomain are continuously spliced ​​together according to the adjusted mapping weights to form a local structural coordinate system covering the component area and structural boundary.

[0033] Preferably, the generation of the normal structural response includes: selecting a reference image block from the corresponding component region that is not connected to the defect candidate node, based on the region category of the component region node;

[0034] Extract the edge response sequence and texture change sequence of the reference image block along a path consistent with the main direction of the structural boundary node;

[0035] Based on the relationship confidence of the relation edges, the edge response sequence is propagated to the target position that has a parallel, adjacent or continuous relationship with the reference image block, and the texture change sequence is conditionally reconstructed based on the texture encoding of the component region nodes on both sides of the target position;

[0036] When multiple reference image blocks correspond to the same target location, the response fusion order is determined according to the structural orientation consistency, region category consistency, and topological path length to generate the normal structural response, and the source node and propagation path corresponding to each response component are recorded.

[0037] Preferably, the processing of the candidate continuous path includes: extracting multiple candidate branches with a common endpoint neighborhood from the abnormal evidence, and establishing a branch continuation graph according to the main direction, width sequence and texture encoding of each candidate branch;

[0038] Candidate branches that cross the same low-confidence structure boundary are combined into multiple alternative continuous paths;

[0039] For each candidate continuous path, calculate the direction change before and after the boundary crossing, the abrupt change in width, the texture difference, and the overlapping interval with the normal structure response. Based on the branch continuation diagram, exclude candidate continuous paths that need to reuse the same candidate branch or generate self-intersections.

[0040] Establish path competition relationships among the remaining candidate continuous paths, and retain candidate continuous paths with continuous cross-boundary relationships and conflicting positions with the normal structural response as abnormal evidence input for the structural boundary correction.

[0041] Preferably, the refitting of the local structural coordinate system includes: dividing the base anchor points into inner anchor points and outer anchor points according to their distance from the anomaly evidence, and calculating the changes in the mapping residuals of the inner anchor points and the outer anchor points before and after refitting.

[0042] When the mapping residual of the inner anchor point decreases with the structural boundary correction and the mapping residual of the outer anchor point remains consistent within the group, the corresponding boundary correction result is retained;

[0043] When the mapping residual of the outer anchor point increases continuously in the same direction, the boundary correction that caused the increase in residual is cancelled, and the anchor point to be corrected associated with the boundary correction is removed from the anchor point group.

[0044] The coordinate axis direction, coordinate origin, and segmented coordinate mapping are redefined based on the sequential index and spacing index of the remaining basic anchor points.

[0045] Preferably, the continuous splicing of the segmented coordinate mapping includes: generating boundary trajectories from each segmented coordinate mapping for the boundary of the same component within the overlapping area of ​​each adjacent local subdomain;

[0046] Based on the overlap relationship of the boundary trajectory at the semantic anchor point, the curvature continuity relationship at the non-anchor point, and the directional continuity relationship on both sides of the abnormal evidence, the local credibility of each segment coordinate mapping is determined.

[0047] Instead of directly adjusting the local confidence level based on edge strength for the area covered by anomalous evidence, cross-interval interpolation is performed on the boundary trajectories of the uncovered areas on both sides of the anomalous evidence.

[0048] The boundary trajectories are fused according to the local confidence level, and the fused boundary trajectories are back-projected onto the ship inspection image to synchronously update the local subdomain division position and overlapping range.

[0049] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0050] 1. By performing multi-scale structural analysis on ship inspection images, component regions, structural boundaries, and boundary confidence are obtained. A local structural coordinate system is established based on stable structural chains, placing plate surfaces, welds, plate seams, and connection areas within a unified structural reference. After constructing a topological constraint graph containing component region nodes, structural boundary nodes, and defect candidate nodes, normal texture representations and structural edge representations are propagated using inclusion, adjacency, parallelism, intersection, and continuity relationships. This reconstructs normal structural responses consistent with component categories and boundary orientations, separating them from image recognition responses. This prevents high-response patterns such as weld edges and plate seam contours, which can be explained by hull structural relationships, from directly entering defect results. For anomalous evidence crossing low-confidence structural boundaries while maintaining direction, width, and texture continuity, conflict boundaries are corrected through candidate continuous paths. The coordinate mapping and defect candidates are then updated based on the correction results, forming a closed loop of structural semantics eliminating false defects and continuous defect evidence correcting erroneous boundaries. This reduces misjudgments of normal structures while preserving true defect contours extending across structural boundaries.

[0051] 2. Confidence grading, semantic anchor grouping, and local subdomain segmentation mapping of multi-scale structural chains enable the correction of camera tilt and local perspective changes within the component coordinate reference, allowing defect locations and contours to be expressed according to the same structural direction and spacing relationship. Normal structural responses are decomposed into structural edge components, regional texture components, and converging transition components based on source nodes and propagation paths, while anomalous evidence retains its corresponding structural interpretation source. After candidate continuous paths and low-confidence structural boundaries form a conflict map, the anomalous paths to be retained and the boundary segments to be reconstructed can be jointly selected based on path continuity integrity, structural direction constraints, spacing constraints, and repeated occupation relationships, avoiding repeated participation of adjacent candidate branches in boundary correction. By recording the addition and deletion status of relational edges, changes in boundary confidence, correspondence of anomalous branches, and coordinate mapping residuals to determine the loop termination condition, the disordered drift of structural boundaries in multiple updates can be limited, ensuring consistent image evidence and structural basis for defect categories, locations, contours, and associated component regions. Attached Figure Description

[0052] Figure 1 A flowchart for the overall process of intelligent defect determination in ship inspection image recognition;

[0053] Figure 2 Image comparison before and after ship inspection image processing, and thermal response results of defects;

[0054] Figure 3 A confidence index curve for the structural chain boundary;

[0055] Figure 4 The residual map is fused by segmenting coordinates of local subdomains.

[0056] Figure 5 This is a graph showing the distribution of the credibility of topological relationship edges.

[0057] Figure 6 This is a graph showing the frequency distribution and cumulative percentage of abnormal residual intensity. Detailed Implementation

[0058] In one embodiment, please refer to Figure 1 The intelligent defect determination method for ship inspection image recognition includes: acquiring ship inspection images and performing multi-scale structural analysis to obtain component regions, structural boundaries, and boundary confidence; determining semantic anchor points based on structural orientation and intersection positions; establishing a local structural coordinate system; extracting defect candidates within the local structural coordinate system to obtain image recognition responses; constructing a topological constraint graph containing component region nodes, structural boundary nodes, and defect candidate nodes; generating relational edges representing inclusion, adjacency, parallelism, intersection, and continuity relationships; reconstructing normal structural responses based on the topological constraint graph; separating normal structural responses from image recognition responses to obtain anomalous evidence; performing structural boundary correction on anomalous evidence that crosses low-confidence structural boundaries and satisfies continuity constraints; updating the local structural coordinate system and defect candidates based on the corrected structural boundaries; iteratively performing normal structural response reconstruction, anomalous evidence separation, and structural boundary correction until convergence conditions are met; and outputting the defect category, defect location, and defect contour.

[0059] In this embodiment, the ship inspection image is a visible light image acquired from the hull plating, bulkhead plating, deck plating, weld joint area, or adjacent area of ​​reinforcing member. The processing object is limited to surface defects in the image that can be characterized by grayscale, color, texture, edge, and connectivity. After the input image enters the processing flow, the original pixel matrix is ​​maintained, and a brightness normalization map, a local contrast map, and a multi-scale image pyramid are generated. Brightness normalization only corrects slowly changing illuminance components without changing the relative position of linear edges. The local contrast map uses the difference between the neighborhood median and the original pixel value to represent fine-grained anomalies. The multi-scale image pyramid is built in a way that adjacent levels share the same image coordinate origin, so that the member areas, structural boundaries, and defect candidates obtained at different scales can be directly associated through coordinate indexing, avoiding boundary misalignment caused by repeated scaling during subsequent topology construction.

[0060] Please refer to Figure 2 , Figure 2 The image on the left is of the hull, and the image on the right is the processed image. The left side retains the original hull plating, weld area, plating contamination, rust spots, and localized attachments in their true state; the right side is the result layer after the system has completed overall preprocessing, structural response enhancement, and defect thermal response superposition. Figure 2Instead of expressing the test results in a single selection method, the entire surface of the inspectable hull is converted into a black and white high-contrast test base map. Then, the abnormal response formed by local residuals, edge intensity, dark pit response and rust color difference is superimposed in a thermal color method, so that the difference before and after processing can be directly observed.

[0061] from Figure 2 As can be seen, the normal structural texture, weld orientation, and plate intersection areas of the hull surface in the processed image still retain their original spatial positions, indicating that brightness normalization and the black-and-white analysis base map did not destroy the boundary geometric relationships required for the subsequent local structural coordinate system. Corrosion spalling, pitting corrosion accumulation, coating abrasion, and linear anomalies are displayed with different thermal response intensities. The labels are only used to indicate the defect type and confidence level determined by the system; the actual abnormal areas are determined by the response distribution of the image texture itself. In the right image, large areas of background and dark areas are not highlighted as defects, reflecting the processing logic of this invention in distinguishing between inspectable hull surfaces and non-target background areas during the image preprocessing stage.

[0062] Specifically, multi-scale structural analysis and defect image recognition are not two unrelated sequential processes. The component categories, structural orientations, intersection locations, and boundary confidence levels generated by multi-scale structural analysis are written into the structural state table. The pixel responses, skeleton branches, texture encodings, and connected regions generated by defect image recognition are written into the abnormal state table. The topological constraint graph generates relational edges using the structural state table and the abnormal state table as data sources. The reconstruction results of normal structural responses are used to interpret the structural components in the image recognition response. The remaining responses form abnormal evidence. When abnormal evidence crosses the low-confidence structural boundary, boundary correction is triggered. The boundary correction results are then written back into the structural state table and the semantic anchor points, local structural coordinate system, and relational edges are updated. This constitutes a closed-loop processing process with image data as input, structural interpretation residuals as feedback, and structural boundaries and defect candidates as joint update objects.

[0063] In a preferred embodiment, the boundary confidence of the i-th structural chain is denoted as . Calculate according to the following formula:

[0064] ;

[0065] in, This indicates the degree of positional consistency of structural chains across adjacent scales. Indicates the directional continuity of the structural chain. Indicates the stability of the structural chain intersection relationship. This indicates the consistency of the texture boundaries on both sides of the structural chain. Furthermore, all weights are non-negative; when a structural chain is basically coincident in position at adjacent scales, its direction changes smoothly, and it forms a stable intersection with another structural chain, a weight can be taken as... , , , ,exist , , , When The numerical value is used to classify the structural chain into the high-confidence anchor candidate set rather than directly determining the defect.

[0066] Please refer to Figure 3 , Figure 3 The horizontal axis represents the sampling window number, ranging from 1 to 500, and the vertical axis represents the structural chain confidence index, with values ​​mainly distributed between 0.56 and 0.91. The solid black line represents the structural chain confidence index calculated according to the boundary confidence formula, the gray dashed line represents the first-level concern line (0.72), and the gray dotted line represents the second-level concern line (0.84). Figure 3 The calculation process for the structural chain boundary confidence in the corresponding text is obtained by weighting positional consistency, directional continuity, intersection stability, and texture boundary consistency.

[0067] from Figure 3 As can be seen, the structural chain confidence index is between 0.57 and 0.68 in the early part of the sampling window, indicating that although the structural chain has basic edge response at this stage, the consistency of adjacent scale positions, directional continuity, or texture boundary support is still unstable, and the system should not directly use it as a high-confidence semantic anchor. As the sampling window progresses, the curve gradually crosses the first-level concern line, indicating that the structural chain obtained by multi-scale structural analysis begins to form a relatively stable spatial correspondence at different resolution levels and can participate in the preliminary fitting of the local structural coordinate system.

[0068] The curve approaches or exceeds the secondary focus line multiple times in the latter part, reflecting that the outer plate intersection zone, weld neighborhood or edge of reinforcing member obtains sufficient structural support in the multi-scale image pyramid. Figure 3 The median index is not used to directly determine defects, but rather to determine whether a structural chain enters the semantic anchor candidate set and the propagation weight of boundary confidence in the topological constraint graph.

[0069] In one embodiment, multi-scale structural parsing includes: extracting linear edge features, surface texture features, and structural intersection features at at least two resolution levels; mapping the component region prior obtained at the low-resolution level to the high-resolution level, and constraining the region affiliation of candidate edges in the high-resolution level; forming structural chains based on the directional consistency, spacing continuity, and intersection relationship of adjacent candidate edges; assigning a first boundary confidence to structural chains simultaneously supported by surface texture boundaries and structural intersection features, and assigning a second boundary confidence lower than the first boundary confidence to structural chains supported only by a single resolution level or truncated by abnormal textures; determining structural chains with the first boundary confidence as semantic anchor candidates, and selecting semantic anchors based on the directional differences, intersection stability, and spatial coverage relationship between structural chains.

[0070] In this embodiment, the low-resolution layer is used to obtain a continuous component area with a large area, while the high-resolution layer is used to preserve the detailed positions of weld edges, plate seam contours, and reinforcing component edges. Linear edge features are formed by calculating the principal gradient direction in the neighborhood of each pixel. Area texture features are formed by encoding the grayscale dispersion, local texture direction distribution, and color component changes within the same candidate area. Structural intersection features are formed by searching the endpoint neighborhoods of two or more linear edges and determining their direction combinations. After the low-resolution component area is a priori mapped to the high-resolution layer, only candidate edges are allowed to participate in structural chain connections within the corresponding component area or edge band. Isolated edges located in irrelevant areas and lacking intersection support do not enter the structural chain set, thus avoiding random edges inside corrosion spots from being mistakenly organized as hull structure boundaries.

[0071] Furthermore, the structural chain connection uses the candidate edge endpoints as the connection objects. For any two endpoints, the tangential direction difference, normal spacing change, and extension line intersection position are calculated. When the direction difference conforms to collinear or regular intersection relationship, the spacing does not change abruptly in the continuous neighborhood, and the intersection position is within the allowable component adjacency range, the two candidate edges are merged into the same structural chain or an intersection association is established. Edges that are covered by abnormal textures and have short-distance interruptions are retained as segments to be connected and are not directly filled by straight lines. The system simultaneously checks whether there is normal texture evidence consistent with the edge direction in the interrupted area and whether there is defect continuity evidence inconsistent with the edge direction. The former supports structural chain completion, while the latter keeps the corresponding segment in a low-confidence state and enters the subsequent boundary reverse correction process.

[0072] In one embodiment, the selection of semantic anchor points includes: dividing the semantic anchor point candidates into multiple anchor point groups according to the extension direction and intersection relationship of the structural chain; establishing a sequential index along the main structural direction and a spacing index along the structural normal in each anchor point group; calculating the anchor point stability based on the position residual, direction residual, and intersection residual of the structural chain in different resolution levels; selecting structural chains whose anchor point stability satisfies the consistency relationship within the group and covers the edge of the local test area as basic anchor points; after fitting the local structural coordinate system with the basic anchor points, retaining the structural chains whose mapping residuals are concentrated within the coverage area of ​​anomalous evidence as anchor points to be corrected, and removing the structural chains whose mapping residuals extend to the non-anomalous area from the corresponding anchor point group, and refitting the local structural coordinate system.

[0073] Specifically, anchor point groups are not divided separately by component name, but by direction families and intersection families that can form stable coordinate references. Weld edges with approximately consistent directions and stable normal spacing can be grouped into the same direction family. Plate seams or component edges that regularly intersect with direction families are grouped into the corresponding intersection families. Sequence index is used to record the sequential position of the structural chain along the main direction, and spacing index is used to record the relative distance of adjacent structural chains along the normal. When fitting local structural coordinates, the sequence index is used as the longitudinal constraint and the spacing index is used as the lateral constraint. If the residual of a candidate anchor point only appears in the corrosion, spalling or crack coverage area, then the residual cannot prove that the candidate anchor point is wrong on its own, and the candidate anchor point continues to participate in the set to be corrected. If the residual extends along the structural chain to the area without abnormal evidence, it indicates that it is incompatible with the structural relationship within the group and is removed.

[0074] In one embodiment, establishing a local structural coordinate system includes: determining a first coordinate axis based on the main direction of a continuous structural chain, and determining a second coordinate axis based on structural chains that intersect with or maintain a stable spacing from the continuous structural chain; dividing the ship inspection image into overlapping local subdomains according to the curvature changes and perspective scaling changes of the structural chains; within each local subdomain, obtaining a segmented coordinate mapping based on the image coordinates, sequence index, and spacing index of semantic anchor points; calculating the position difference and direction difference after mapping for the same component boundary in adjacent local subdomains, and adjusting the mapping weights in the overlapping area based on the position difference and direction difference; and continuously splicing the segmented coordinate mappings of each local subdomain according to the adjusted mapping weights to form a local structural coordinate system covering the component area and structural boundary.

[0075] In this embodiment, the first coordinate axis is set along the average tangent of the continuous weld or plate seam, and the second coordinate axis is set along a stable intersection structure that is approximately orthogonal to the first coordinate axis. When there is no clear intersection structure, the second coordinate axis is determined by the common normal of two parallel structural chains that maintain a stable spacing. The boundary of the local subdomain is set at a position where the curvature of the structural chain changes little and the semantic anchor points are continuously distributed. Adjacent local subdomains retain overlapping areas containing the same structural chain segment. The segmented coordinate mapping can use local affine mapping or low-order deformation mapping. The mapping parameters are obtained from the correspondence between the semantic anchor point image coordinates and the index coordinates. The abnormal evidence coverage area is not used as an independent mapping control point to avoid the crack or corrosion edge pulling the coordinate axis deflection. After the mapping is completed, each defect candidate simultaneously saves the original image coordinates and the local structure coordinates.

[0076] In one embodiment, refitting the local structural coordinate system includes: dividing the base anchor points into inner and outer anchor points according to their distance from anomaly evidence; calculating the changes in the mapping residuals of the inner and outer anchor points before and after refitting; retaining the corresponding boundary correction results when the mapping residuals of the inner anchor points decrease with structural boundary correction and the mapping residuals of the outer anchor points remain consistent within the group; canceling the boundary correction that caused the increase in residuals when the mapping residuals of the outer anchor points continuously increase in the same direction, and removing the anchor points to be corrected associated with the boundary correction from the anchor point group; and re-determining the coordinate axis direction, coordinate origin, and piecewise coordinate mapping based on the sequence index and spacing index of the remaining base anchor points.

[0077] Furthermore, the inner anchor points can be composed of structural chain segments that intersect with the boundary of anomalous evidence or are located within its adjacent band, while the outer anchor points are composed of structural chain segments outside the adjacent band of anomalous evidence and belonging to the same anchor point group as the inner anchor points. After each boundary correction, only the mapping parameters within the affected local subdomain are recalculated, and the entire image is not refitted. If the correction makes the inner anchor points more consistent with the order index and spacing index within the group, and the residual direction of the outer anchor points does not shift in the same direction, then the boundary correction can be written into the stable state table. If the outer anchor points show cumulative shift in the same direction, it indicates that the local correction has destroyed the original structural reference. At this time, the boundary state of the previous round is restored, and the anchor points to be corrected that cause mapping traction are removed from the anchor point group. Then, the coordinate axes are reconstructed using the remaining basic anchor points.

[0078] In one embodiment, the continuous stitching of segmented coordinate maps includes: generating boundary trajectories from each segmented coordinate map for the same structural boundary within the overlapping area of ​​adjacent local subdomains; determining the local credibility of each segmented coordinate map based on the coincidence relationship of the boundary trajectories at semantic anchor points, the curvature continuity relationship at non-anchor points, and the directional continuity relationship on both sides of the anomalous evidence; not directly adjusting the local credibility based on edge intensity for the anomalous evidence covered area, but using the boundary trajectories of the uncovered areas on both sides of the anomalous evidence for cross-interval interpolation; fusing each boundary trajectory according to the local credibility, and back-projecting the fused boundary trajectory onto the ship inspection image to synchronously update the local subdomain division position and overlapping range.

[0079] In a preferred embodiment, the local subdomain r corresponds to the image coordinate vector. The piecewise coordinate mapping is denoted as , Indicating transpose, the fused coordinates from multiple local subdomains in the overlapping region are calculated according to the following formula:

[0080] ;

[0081] in, Represents the set of local subfields covering the current pixel. Represents the local deformation matrix. Represents a local translation vector. This indicates the local credibility determined by the anchor point coincidence relationship, curvature continuity relationship, and the directional continuity relationship of anomalous evidence; for example, two subdomains give different values ​​for the same point. and ,correspond The values ​​are 0.7 and 0.5 respectively, and the fusion result is approximately... Maintain cross-subdomain coordinate continuity without directly using the edge strength of the anomaly region.

[0082] Please refer to Figure 4 , Figure 4 The horizontal axis represents the overlapping sampling sequence number, ranging from 1 to 180. The vertical axis represents the coordinate residuals of adjacent local subdomains in the overlapping region, with a value range of approximately 0.0035 to 0.0978. The black curve represents the residual sequence obtained after piecewise coordinate mapping fusion. The dashed line represents the low residual reference line of 0.045, and the dotted line represents the verification reference line of 0.085. Figure 4 This corresponds to the formula in the text for coordinate fusion of each local subdomain using local deformation matrix, translation vector, and local confidence weight.

[0083] from Figure 4As can be seen, the coordinate residuals of most overlapping sampling points are lower than the low residual reference line, indicating that adjacent local subdomains have good coordinate continuity in the rib neighborhood, plate boundary, and intersection area. Local fluctuations above the low residual reference line usually correspond to areas with large curvature changes, significant perspective scaling, or anomalous evidence covering the structural boundary. These points do not immediately cause coordinate mapping failure, but rather enter the verification logic, with stable boundary segments of the uncovered areas on both sides of the anomalous evidence providing the basis for cross-interval interpolation.

[0084] Figure 4 A small number of peaks are close to the verification reference line, indicating that the local coordinate stitching is affected by abnormal textures or low confidence boundaries at that point, and it is necessary to reduce the local confidence of the corresponding subdomain or re-estimate the anchor point group.

[0085] In one embodiment, the construction of the topological constraint graph includes: recording the region category, main direction, and boundary sequence for each component region node; recording the curvature, width, and texture differences on both sides for each structural boundary node; and recording the morphological principal axis, connected branches, and local appearance encoding for each defect candidate node; generating relation edges based on spatial inclusion, endpoint adjacency, directional parallelism, trajectory intersection, and cross-edge continuity relationships between nodes; setting a relation confidence level for each relation edge, determined jointly by the boundary confidence of related nodes, the structural chain integrity formed by adjacent structural boundaries, and the local structural consistency; propagating the normal texture representation and structural edge representation of the component region nodes along the relation edges; generating a normal structural response consistent with the component category, boundary direction, and adjacency relationship at the corresponding position of the defect candidate node; and marking image recognition responses lacking relation confidence support as unresolved abnormal responses.

[0086] Specifically, the topology constraint graph adopts a data structure with type nodes and directional relationship edges. Component region nodes store the polygon boundaries of the component region mask in the local structural coordinate system, region texture statistics, and adjacent structural boundary indices. Structural boundary nodes store the boundary centerline, normal width sequence, tangential curvature sequence, and indexes of the region nodes on both sides. Defect candidate nodes store candidate masks, skeleton diagrams, principal axis directions, branch endpoints, and local appearance codes. Including relationship edges point from component region nodes to defect candidate nodes located inside them. Adjacent relationship edges connect region nodes sharing a local adjacency band with structural boundary nodes. Parallel relationship edges connect structural boundary nodes with stable directional differences. Intersecting relationship edges record the intersection positions of structural boundaries. Continuous relationship edges connect defect candidate branches on both sides of the boundary that can form the same abnormal trajectory.

[0087] In a preferred embodiment, the reliability of the relational edge between node u and node v is denoted as . Calculate according to the following formula:

[0088] ;

[0089] in, This represents the combined value of the relevant structural boundary confidence. This indicates the completeness of the structural chain that the connection depends on. This indicates the completeness of the relationship between node attributes and local structure coordinates. And each coefficient is expressed as follows: , and The corresponding non-negative number; for example, when there is a stable inclusion relationship between the component region and the structural boundary, it can be taken as... , , ,exist , , When If a defect candidate only forms a short-distance intersection with the low-confidence boundary and lacks other structural support, the confidence of the correspondence remains low and it enters the set of anomaly responses to be judged.

[0090] Please refer to Figure 5 , Figure 5 The horizontal axis represents the relation edge number, ranging from 1 to 96, and the vertical axis represents the relation confidence level, with a value of approximately 0.61 to 0.85. The black curve represents the calculation result of each topological relation edge according to the relation confidence level formula, and the gray dashed line represents the stability reference line of 0.82. Figure 5 This corresponds to the process described in the text where the reliability of the relationship between nodes is determined by boundary support, link integrity, and coordinate consistency.

[0091] from Figure 5 As can be seen, the reliability of some inclusion, adjacency, or regional subordination relationships is close to the stable reference line, indicating that there is a relatively stable spatial interpretation basis between the relevant component region nodes, structural boundary nodes, and defect candidate nodes, which can be used for the propagation of normal texture representation and structural edge representation. The troughs that appear in the middle indicate that although some relationship edges are geometrically close or intersecting, their boundary support is insufficient, the structural chain integrity is low, or the local coordinate consistency is reduced. The system will not directly use these relationships as high-reliability structural interpretations.

[0092] Figure 5 This highlights the key difference between topological constraint graphs and ordinary region segmentation: relation edges are not fixed but possess computable and updatable confidence levels. Relationship edges with high confidence levels are used to propagate normal structural responses, while those with low confidence levels retain the corresponding image recognition responses as unrecognized abnormal responses.

[0093] In one embodiment, the generation of a normal structural response includes: selecting reference image blocks not connected to defect candidate nodes from the corresponding component regions based on the region category of the component region nodes; extracting the edge response sequence and texture change sequence of the reference image blocks along a path consistent with the main direction of the structural boundary nodes; propagating the edge response sequence to a target location that has a parallel, adjacent, or continuous relationship with the reference image blocks based on the relationship confidence of the relational edges, and conditionally reconstructing the texture change sequence based on the texture encoding of the component region nodes on both sides of the target location; when multiple reference image blocks correspond to the same target location, determining the response fusion order according to the structural direction consistency, region category consistency, and topological path length, generating a normal structural response, and recording the source node and propagation path corresponding to each response component.

[0094] Furthermore, the reference image patch is selected from the region within the same component area that has no defect candidate coverage and has stable boundary confidence. The reference image patch and the target location have the same or similar normal distance index in the local structural coordinate system. The edge response sequence is sampled along the main direction of the structure at fixed coordinate intervals. The texture change sequence consists of the gray median value, gradient direction histogram distribution and local texture scale in the neighborhood of the sampling point. During propagation, normal translation is used for parallel relationships, tangential extension is used for continuous relationships, and texture condition transformation of both sides is used for adjacent relationships. Cross relationships are only propagated within the intersection transition range. If the propagation path passes through the low-confidence structural boundary or unassigned defect candidate, the response contribution of the path is reduced and the conflict position is recorded to avoid directly reconstructing the unstable structure into a high-intensity normal response.

[0095] In a preferred embodiment, the normal structural response at image position q is denoted as... Calculate according to the following formula:

[0096] ;

[0097] in, This represents the set of reference propagation paths that can propagate to image position q. This represents the combined value of the credibility of relation edges along the propagation path. The path weights are determined by structural orientation consistency, region category consistency, and path length. This represents the edge or texture response of the reference image patch mapped to image location q along the propagation path; for example, two propagation paths correspond to... The values ​​are 0.62 and 0.38 respectively, and the mapped responses are 0.74 and 0.51 respectively. The value is 0.6526, indicating that the normal structural response and the original image recognition response are separated at the same location.

[0098] In this embodiment, when multiple reference image blocks correspond to the same target location, they are not unconditionally averaged. Instead, they are sorted according to the degree of matching between the propagation path and the structural relationship of the target location. Responses with the same region category and propagating along the same structural direction are merged first. Responses that cross component intersection relationships are only used to reconstruct the intersection transition components. Responses from different component regions and lacking adjacency relationships do not participate in the reconstruction of the same target location. The source node and propagation path are appended to the normal structural response as an index sequence. If a normal structural response is continuously denied by abnormal evidence, the relationship edge and reference image block that caused the misinterpretation can be located along the index sequence, and the credibility of the corresponding relationship can be reduced or the reference image block can be replaced in the next round of topology update.

[0099] In one embodiment, the separation of normal structural response and image recognition response includes: splitting the normal structural response into structural edge components, regional texture components, and confluence transition components according to the source node and propagation path; performing sequential projection of the image recognition response on the structural boundary normal and tangential directions to obtain normal abrupt change sequences and tangential continuous sequences; incorporating normal abrupt change sequences that are simultaneously consistent with the structural edge components in position, direction, and width into the structural interpretation set, and incorporating responses that are consistent with the regional texture components in local frequency and grayscale changes into the texture interpretation set; for responses not incorporated into the structural interpretation set and texture interpretation set, performing residual decomposition in conjunction with the confluence transition components, and identifying residuals that span multiple propagation paths and maintain tangential continuity as anomalous evidence.

[0100] Specifically, structural edge components form response bands in the normal neighborhood based on the boundary centerline. Regional texture components are represented by the local texture scale and grayscale variation range within the component region. Intersecting transition components only cover the intersection or connection positions of structural boundaries. When the image recognition response is projected in the normal direction, the peak position, peak width, and attenuation pattern on both sides are recorded. When the response is projected in the tangential direction, the response duration, direction change, and interruption position are recorded. If the normal abrupt sequence coincides with the position of the structural edge component, but the tangential continuous sequence deviates from the normal structural orientation after crossing the intersection position, the overlapping part can be included in the structural interpretation set, and the deviated part is retained as an abnormal residual. If the regional texture response shows the same frequency change in multiple adjacent reference image blocks, it is included in the texture interpretation set. Responses that are isolated and have abnormal connectivity patterns are retained.

[0101] In a preferred embodiment, the abnormal residual at image position q is denoted as... Image recognition response Structural edge interpretation Region texture interpretation quantity and the amount of explanation for transitional intersections Determined according to the following formula:

[0102] ;

[0103] in, , and These represent the credibility coefficients of each explanatory component at the current position, ranging from 0 to 1, and are determined by the credibility of the relationship along the source propagation path; for example... , , , When the confidence coefficients are 0.8, 0.6, and 0.5, the results are as follows: The residuals continue to combine with tangential continuity to form evidence of anomalies rather than relying solely on single-point numerical values ​​to output defects.

[0104] Please refer to Figure 6 , Figure 6 The horizontal axis represents the residual intensity bins, ranging from approximately 0.0093 to 0.5107, while the vertical axis represents the frequency percentage and cumulative percentage. The bar chart represents the pixel or sampling point frequency in each residual intensity bin, the solid black line represents the cumulative percentage curve, and the dashed and dotted lines represent the primary focus line (15%) and the secondary focus line (35%), respectively. Figure 6 The corresponding abnormal residuals in the text are calculated by subtracting the structural edge interpretation, regional texture interpretation, and intersection transition interpretation from the image recognition response.

[0105] from Figure 6 It can be seen that the frequency proportion of the low residual strength bin is relatively low. As the residual strength increases, the cumulative proportion curve rises rapidly and becomes the main contributor in the medium-to-high strength range. This indicates that after structural interpretation subtraction, some responses still cannot be explained by normal weld edges, regional textures, or transitional components. Their spatial distribution is more likely to correspond to corrosion spalling, pitting accumulation, or transboundary linear anomalies. The frequency proportion is significantly concentrated in several medium-strength bins, indicating that the anomaly evidence is not random noise, but rather forms a stable pixel cluster within a similar residual strength range.

[0106] Primary lines of interest are used to indicate that residual evidence is beginning to have value for further connectivity analysis, while secondary lines of interest are used to indicate that residual evidence is sufficient to enter candidate profile, skeleton, and continuous path analysis. Figure 6 This aligns with the technical approach described in the text, which combines residuals with tangential continuity to form anomalous evidence rather than relying solely on single-point numerical values ​​to output defects. In other words, a single high residual point will not directly lead to a defect conclusion; only when the residual intensity distribution, spatial connectivity, and structural boundary crossing relationships all meet certain conditions will the system convert it into anomalous evidence input.

[0107] In this embodiment, the abnormal evidence consists of abnormal residual pixels that satisfy spatial connectivity. Each connected region generates a candidate contour and skeleton. The skeleton endpoints, bifurcation points, and main directions are used for subsequent continuous path analysis. If a residual pixel is located within the high-confidence structural boundary response band and continues along the structural tangent, the structural interpretation mark is temporarily retained. If a residual pixel crosses the boundary and forms directional continuity on both sides of the boundary, the structural interpretation mark is removed and added to the cross-boundary anomaly set. If a residual pixel only appears in a single intersection transition region and cannot form a connected branch in a nearby location, it remains in a pending state. In subsequent loops, its abnormal residual is recalculated based on the intersection boundary correction result to avoid the separation result being solidified into a final defect.

[0108] In one embodiment, structural boundary correction includes: skeletonizing anomalous evidence into candidate continuous paths; extracting the endpoint directions, path widths, texture codes, and edge intensity sequences of the candidate continuous paths on both sides of the structural boundary; determining continuity constraints based on the continuity relationship of the endpoint directions on both sides, the smoothness relationship of the path width changes, the compatibility relationship of the texture codes, and the overlap relationship with the normal structural response; marking conflict segments in the structural boundary when the candidate continuous path crosses a low-confidence structural boundary and satisfies the continuity constraints; extracting structural orientations from the boundary segments on both sides of the conflict segments that are not covered by anomalous evidence, generating candidate interpolation trajectories connecting the boundary segments on both sides, determining the reconstructed boundary according to the overlap interval between the candidate interpolation trajectory and the anomalous evidence, the difference in endpoint directions with the boundary segments on both sides, and the curvature continuity relationship, and updating the boundary position and boundary confidence with the reconstructed boundary.

[0109] In this embodiment, the skeletonization process shrinks the region edge layer by layer while maintaining the connectivity topology of the anomalous evidence. The width sequence is obtained by the sum of the normal distances from the skeleton sampling point to both sides of the candidate contour. The texture encoding is extracted from the neighborhood on both sides of the skeleton and arranged according to the local structural coordinate direction. The edge intensity sequence records the original gradient change in the skeleton tangent direction. When the candidate continuous path crosses the low-confidence structural boundary, the path segment adjacent to the intersection point is intercepted on both sides of the boundary. The endpoint direction is determined by the fitted tangent of the path segment. If the directions of the path segments on both sides can be connected, the width change does not form a regular band response with the same width as the structural boundary, and the texture encoding belongs to the same anomalous type and the overlap with the normal structural response is only concentrated in the conflict section, then the path is used as the basis for boundary correction.

[0110] In a preferred embodiment, the continuity constraint score of the candidate continuous path p is denoted as... Calculate according to the following formula:

[0111] ;

[0112] in, This represents the angle between the directions of the two endpoints of the structural boundary. This represents the change in normalized width. Indicates differences in texture encoding. This represents the normalized overlap between the candidate continuous path and the normal structural response. And each coefficient is expressed as follows: , , and The corresponding non-negative number; for example , , , When all coefficients are set to 0.25, a higher continuous constraint score can be obtained. The score is only used to select candidate continuous paths to participate in boundary correction.

[0113] Furthermore, the conflict zone extends to the stable boundary segment on both sides, centered on the spatial overlap between the candidate continuous path and the low-confidence structural boundary. The stable boundary segment must have the same orientation in at least two resolution levels and not be covered by anomalous evidence. The candidate interpolation trajectory is generated by the endpoint positions, endpoint tangents, and local curvature of the stable boundary segments on both sides. Piecewise curves can be used for connection instead of being limited to straight lines. The system calculates the overlap length between the candidate interpolation trajectory and the anomalous evidence, the tangential difference with the stable boundary segment, and the curvature jump variable, respectively. Trajectories with concentrated overlap and smooth tangential continuity are used to reconstruct the structural boundary. If all candidate interpolation trajectories need to be extended along the main axis of the anomalous evidence to be connected, the original low-confidence boundary is retained and the conflict is handled by path competition.

[0114] In one embodiment, the processing of candidate continuous paths includes: extracting multiple candidate branches with common endpoint neighborhoods from anomalous evidence; establishing a branch continuity graph according to the main direction, width sequence, and texture encoding of each candidate branch; combining candidate branches that cross the same low-confidence structural boundary into multiple candidate continuous paths; for each candidate continuous path, calculating the direction inflection before and after the boundary crossing, the width abrupt change, the texture difference, and the overlap interval with the normal structural response, and excluding candidate continuous paths that need to reuse the same candidate branch or generate self-intersections based on the branch continuity graph; establishing path competition relationships among the remaining candidate continuous paths, and retaining candidate continuous paths with continuous cross-boundary continuity relationships and concentrated conflict positions with the normal structural response as anomalous evidence input for structural boundary correction.

[0115] Specifically, the branch continuation graph uses the skeleton bifurcation point and endpoint neighborhood as the connection position, and the candidate branch is the path node in the graph. When the endpoints of two candidate branches are in the same neighborhood and the tangential direction can form a continuous extension, a continuation edge is established. The continuation edge also saves the direction turning point, width change and texture difference. The candidate continuous path is formed by traversing the continuation edge that crosses the same low confidence structure boundary. During the traversal, the used branch is marked as occupied. When the same branch is used repeatedly or the path returns to the visited bifurcation point, the current combination is terminated. The concentration of conflict positions in the normal structure response means that the overlap between the candidate path and the normal structure response is mainly located near the low confidence boundary rather than distributed along the entire path. If the overlap exists stably along the entire path, the corresponding path is more likely to belong to the normal structure and is excluded from the correction input.

[0116] In one embodiment, structural boundary correction further includes: constructing a conflict graph for the intersection relationships between multiple candidate continuous paths and multiple low-confidence structural boundaries, using candidate continuous paths and low-confidence structural boundaries as two types of conflict nodes, and using path crossings, boundary overlaps, and shared image regions as conflict edges; recording branch continuity relationships and anomalous evidence continuity determined by directional continuity, width continuity, and texture compatibility relationships for candidate continuous path nodes, and recording directional constraints and spacing constraints of adjacent high-confidence boundary segments for low-confidence structural boundary nodes; dividing the conflict graph into conflict subgraphs according to the spatial connectivity relationships of conflict edges, jointly selecting the candidate continuous paths to be retained and the structural boundary segments to be reconstructed for each conflict subgraph according to branch continuity integrity, directional constraints, spacing constraints, and repeated occupancy relationships, and mapping the selection results to the topological constraint graph to update the corresponding nodes and relationship edges.

[0117] In this embodiment, the conflict graph is used to handle the situation where an abnormal branch simultaneously crosses multiple structural boundaries or multiple abnormal paths compete for the same low-confidence boundary. The path crossing conflict edge records the intersection point and intersection angle between the abnormal path and the structural boundary. The boundary overlapping conflict edge records the overlapping interval between the two within a certain length. The shared area conflict edge records the situation where different paths or different boundaries compete for the same pixel area. The joint selection in the conflict subgraph adopts discrete state search. Each candidate continuous path node has a state of retention or rejection. Each low-confidence structural boundary node has a state of retaining the original boundary, using the candidate reconstruction boundary, or being reduced to a boundary to be corrected. The state combination must satisfy the following conditions: the same candidate branch is not reused by two retained paths, the same boundary segment is not occupied by two discontinuous reconstruction trajectories at the same time, and the direction constraint of the high-confidence boundary segment is not violated.

[0118] In a preferred embodiment, the state combination c of the conflict subgraph is determined according to cost. Make a selection:

[0119] ;

[0120] in, This indicates the amount of discontinuity in the branch continuation of the preserved path. Indicates the range of image areas that are repeatedly occupied. This indicates the directional and spacing deviation between the reconstructed boundary and adjacent high-confidence boundary segments. This indicates the amount of overlap between the preserved abnormal path and the normal structural response within the non-conflict region. , , and They are respectively represented as , , and The corresponding nonnegative coefficients; the system selects from combinations that satisfy the state constraints. Smaller combinations, such as those that retain more paths but produce duplicate occupancy and boundary direction mutations, are more costly than combinations that only retain continuation of complete paths and reconstruct a single conflict boundary.

[0121] Furthermore, when mapping the conflict subgraph selection results back to the topological constraint graph, the candidate continuous paths corresponding to defect candidate nodes are added with cross-edge continuous relationships, the candidate paths to be discarded are de-connected but the original anomaly residual index is retained, the boundary segments that need to be reconstructed replace the centerline and width sequences in the structural boundary nodes and recalculate the texture differences on both sides, and the boundary segments that are reduced to the boundary segments to be corrected have their related edge confidence reduced but are not deleted from the graph. If the boundary reconstruction changes the inclusion relationship of the component region, the boundary sequence of the adjacent component region nodes and the segmented inclusion relationship of the defect candidate nodes are updated synchronously. Then, the normal structural response propagation is re-executed to check whether the new structural interpretation still generates cross-boundary anomaly evidence in the same location.

[0122] In one embodiment, determining the convergence condition includes: after each round of structural boundary correction, recording the addition and deletion status of relation edges in the topological constraint graph, the change sequence of boundary confidence, the change of connected branches of anomalous evidence, and the mapping residual of the local structural coordinate system; establishing response correspondences for normal structural responses that maintain corresponding spatial positions, structural directions, and component affiliations in two consecutive rounds, and establishing branch correspondences for anomalous evidence that maintain corresponding skeleton endpoints, main directions, and cross-boundary positions in two consecutive rounds; terminating the loop when the addition and deletion status of relation edges no longer changes, the boundary confidence ranking of corresponding structural boundaries remains consistent, the difference between adjacent rounds no longer increases, the branch correspondence remains stable, and the mapping residual does not produce cross-regional diffusion, and mapping the final defect candidate to the local structural coordinate system to form an output record of defect category, defect location, defect contour, and associated component region.

[0123] In this embodiment, a version identifier is established for each round of the loop. The status of adding or deleting relation edges is recorded using a ternary index composed of edge type, start node, and end node. The boundary confidence change sequence is arranged according to a unified boundary identifier. The correspondence of abnormal branches is established by comparing the distance, main direction difference, and cross-boundary position of the skeleton endpoints in the local structural coordinate system. The mapping residual is recorded according to the local subdomain and anomaly evidence coverage mark is attached. If a boundary alternately uses two candidate reconstruction trajectories in consecutive rounds, it is determined that its state is unstable and the propagation path with low relation confidence is frozen. If an abnormal branch only has a small number of pixel changes at the contour edge while the skeleton endpoints, main direction, and cross-boundary relationship remain corresponding, it is regarded as the same branch to avoid local contour jitter causing the loop to continue.

[0124] In a preferred embodiment, the joint change between round t and round (t-1) is denoted as... Calculate according to the following formula:

[0125] ;

[0126] in, Indicates the ratio of additions and deletions to the relation edges. This represents the change in the confidence ranking of the corresponding structural boundaries. This indicates the proportion of abnormal branches for which no branch correspondence has been established. This represents the normalized range of the local subdomain mapping residual diffused into the non-anomaly region. And each coefficient is expressed as follows: , , and The corresponding non-negative numbers; for example, when there are no more additions or deletions of relation edges in two consecutive rounds, the boundary sorting remains consistent, all abnormal branches establish corresponding relations and the mapping residuals do not spread, the values ​​of each item are 0, resulting in If the preset stability conditions for consecutive rounds are met simultaneously, the loop terminates and the result is output.

[0127] Specifically, the defect category is determined jointly based on the contour morphology, skeleton topology, texture encoding, and the component region of the final anomaly evidence. Candidates with linear continuity and limited width variation can be classified as cracks, candidates with sheet-like connectivity and non-uniform peeling edges in internal texture can be classified as coating peeling, and candidates with multiple branch edges and regional texture attenuation can be classified as corrosion. The category determination only uses the anomaly evidence after the structural response separation is completed, and the response already classified into the structural interpretation set is not repeatedly input. The defect location is represented by the component region identifier in the local structural coordinates, the position along the first coordinate axis, and the position along the second coordinate axis. The defect contour simultaneously saves the local structural coordinate point column and the original image pixel column. The associated component region is determined by the inclusion relationship and cross-edge continuity relationship in the final topological constraint diagram.

[0128] In a preferred embodiment, when crack-like anomaly evidence crosses a low-confidence weld boundary along the weld normal, the system estimates the weld orientation from stable segments not covered by the anomaly evidence on both sides of the weld boundary. If the candidate continuous path remains continuous in the direction before and after the boundary crossing and the width sequence does not present a regular band width of the weld body, the candidate continuous path is retained and the covered weld boundary is reconstructed. The reconstructed weld boundary is used to recover the local structural coordinates without truncating the crack profile. If the anomaly evidence coincides with the normal structural response along the weld direction for a long time and lacks branches deviating from the weld, its response mainly enters the structural interpretation set. Only local fractures, extensions, or side branches that cannot be explained by the propagation results of the reference image block enter the anomaly evidence, thereby allowing the high response of the normal weld and the cross-weld crack to be processed separately in the same closed loop.

[0129] In another preferred embodiment, when corrosion or coating peeling forms sheet-like anomalous regions that cover the intersection of plate seams, low-resolution component regions are used to maintain the plate surface partitioning, high-resolution edges are used to extract the contours of the anomalous regions, and the intersection positions form low-confidence structural boundaries due to being occluded by anomalous textures. The system represents the multi-branch structure in the anomalous region skeleton separately from the topology of the plate seam intersection. The candidate interpolation trajectory of the plate seam intersection is generated based on the stable anchor points outside the anomalous region. The internal texture encoding of the sheet-like anomalous evidence does not participate in the fitting of the plate seam boundary. The reconstructed plate seams are only used to update the segmentation and inclusion relationships of component regions. The anomalous regions are still retained as continuous candidates spanning multiple component regions. The output records store the contour segments within each component region and the cross-edge continuity relationships connecting each contour segment.

[0130] In one embodiment, all processing logic can be executed collaboratively by an image analysis program, a topology graph processing program, a response reconstruction program, a boundary correction program, and a result generation program. The image analysis program outputs a pixel feature table and a structural state table under a unified coordinate index. The topology graph processing program generates an updatable graph structure based on the node and relation edge definitions. The response reconstruction program calculates the normal structural response according to the propagation path and saves the source index. The boundary correction program reads the abnormal evidence skeleton, low-confidence structural boundary, and conflict graph state combination to complete the boundary update. The result generation program outputs defect records based on the stabilized topology constraint graph and abnormal evidence. Data is passed between the programs through component region identifiers, structural boundary identifiers, defect candidate identifiers, and cyclic version identifiers. Any boundary update retains the coordinates, confidence level, and correlation of the previous version to support undoing and refitting.

Claims

1. A method for intelligently determining defects in ship inspection images, characterized in that, include: Ship inspection images were acquired and multi-scale structural analysis was performed to obtain component regions, structural boundaries, and boundary confidence levels. Semantic anchor points are determined based on the structural orientation and intersection points, and a local structural coordinate system is established. Defect candidates are extracted in the local structural coordinate system to obtain image recognition response. A topological constraint graph containing component region nodes, structural boundary nodes and defect candidate nodes is constructed to generate relation edges representing adjacency, adjacency, parallelism, intersection and continuity. The normal structural response is reconstructed based on the topological constraint graph, and the normal structural response is separated from the image recognition response to obtain anomalous evidence. For anomalous evidence that crosses a low-confidence structural boundary and satisfies the continuity constraint, structural boundary correction is performed, and the local structural coordinate system and the defect candidate are updated based on the corrected structural boundary. Normal structural response reconstruction, anomalous evidence separation and structural boundary correction are performed iteratively until the convergence condition is met, and the defect category, defect location and defect contour are output.

2. The intelligent defect determination method for ship inspection image recognition according to claim 1, characterized in that, The multi-scale structural analysis includes: extracting linear edge features, surface texture features, and structural intersection features at at least two resolution levels; The component region prior obtained at the low-resolution level is mapped to the high-resolution level, and the candidate edges in the high-resolution level are constrained to the region affiliation. Structural chains are formed based on the directional consistency, spacing continuity, and intersection relationships of adjacent candidate edges; A first boundary confidence is assigned to structural chains that are simultaneously supported by area texture boundaries and the structural intersection features, and a second boundary confidence is assigned to structural chains that are supported only by a single resolution level or truncated by abnormal textures, which is lower than the first boundary confidence. The structural chains with the first boundary confidence are identified as semantic anchor candidates, and semantic anchors are selected based on the directional differences, intersection stability and spatial coverage relationship between the structural chains.

3. The intelligent defect determination method for ship inspection image recognition according to claim 2, characterized in that, The construction of the topological constraint graph includes: recording the region category, main direction and boundary sequence for each component region node; recording the curvature, width and texture differences on both sides for each structural boundary node; and recording the morphological main axis, connected branches and local appearance encoding for each defect candidate node. The relationship edges are generated based on the spatial inclusion, endpoint adjacency, directional parallelism, trajectory intersection, and cross-edge continuity relationships between nodes. For each relation edge, a relation confidence level is set, which is jointly determined by the boundary confidence of the relevant nodes, the integrity of the structural chain formed by adjacent structural boundaries, and the consistency of the local structure. The normal texture representation and structural edge representation of the component region nodes are propagated along the relation edge. A normal structural response consistent with the component category, boundary direction and adjacency relationship is generated at the corresponding position of the defect candidate node. Image recognition responses lacking the support of the relation credibility are marked as abnormal responses to be judged.

4. The intelligent defect determination method for ship inspection image recognition according to claim 1, characterized in that, The structural boundary correction includes: skeletonizing the abnormal evidence into candidate continuous paths, and extracting the endpoint direction, path width, texture encoding and edge intensity sequence of the candidate continuous paths on both sides of the structural boundary; The continuity constraints are determined based on the continuity relationship of the two endpoints, the smoothness of the path width change, the compatibility of the texture encoding, and the overlap with the normal structural response. When a candidate continuous path crosses a low-confidence structural boundary and satisfies the continuity constraint, a conflict segment in the structural boundary is marked. The structural orientation is extracted from the boundary segments on both sides of the conflict zone that are not covered by anomalous evidence. Candidate interpolation trajectories connecting the boundary segments on both sides are generated. The reconstructed boundary is determined according to the overlap interval between the candidate interpolation trajectory and the anomalous evidence, the difference in endpoint direction with the boundary segments on both sides, and the curvature continuity relationship. The boundary position and the boundary confidence are updated with the reconstructed boundary.

5. The intelligent defect determination method for ship inspection image recognition according to claim 2, characterized in that, The selection of semantic anchor points includes: dividing the semantic anchor point candidates into multiple anchor point groups according to the extension direction and intersection relationship of the structural chain, and establishing a sequential index along the main structural direction and a spacing index along the structural normal in each anchor point group. The anchor point stability is calculated based on the position residual, direction residual, and intersection residual of the structural chain at different resolution levels. The structural chain whose anchor point stability satisfies the intra-group consistency relationship and covers the edge of the local inspection area is selected as the basic anchor point; After fitting the local structural coordinate system with the base anchor points, the structural chains whose mapping residuals are concentrated within the coverage area of ​​the abnormal evidence are retained as anchor points to be corrected, and the structural chains whose mapping residuals extend to the non-abnormal areas are removed from the corresponding anchor point group, and the local structural coordinate system is refitted.

6. The intelligent defect determination method for ship inspection image recognition according to claim 5, characterized in that, The establishment of the local structural coordinate system includes: determining the first coordinate axis with the main direction of the continuous structural chain, and determining the second coordinate axis with the structural chains that intersect with the continuous structural chain or maintain a stable distance; The ship inspection image is divided into overlapping local subdomains based on the changes in structural chain curvature and perspective scaling. Within each local subdomain, segmented coordinate mapping is obtained based on the image coordinates, order index, and spacing index of the semantic anchor point; Calculate the position difference and direction difference after mapping for the same component boundary in adjacent local subdomains, and adjust the mapping weight in the overlapping area based on the position difference and direction difference; The segmented coordinate mappings of each local subdomain are continuously spliced ​​together according to the adjusted mapping weights to form a local structural coordinate system covering the component area and structural boundary.

7. The intelligent defect determination method for ship inspection image recognition according to claim 3, characterized in that, The generation of the normal structural response includes: selecting a reference image block from the corresponding component region that is not connected to the defect candidate node, based on the region category of the component region node; Extract the edge response sequence and texture change sequence of the reference image block along a path consistent with the main direction of the structural boundary node; Based on the relationship confidence of the relation edges, the edge response sequence is propagated to the target position that has a parallel, adjacent or continuous relationship with the reference image block, and the texture change sequence is conditionally reconstructed based on the texture encoding of the component region nodes on both sides of the target position; When multiple reference image blocks correspond to the same target location, the response fusion order is determined according to the structural orientation consistency, region category consistency, and topological path length to generate the normal structural response, and the source node and propagation path corresponding to each response component are recorded.

8. The intelligent defect determination method for ship inspection image recognition according to claim 4, characterized in that, The processing of the candidate continuous path includes: extracting multiple candidate branches with a common endpoint neighborhood from the abnormal evidence, and establishing a branch continuation graph according to the main direction, width sequence and texture encoding of each candidate branch; Candidate branches that cross the same low-confidence structure boundary are combined into multiple alternative continuous paths; For each candidate continuous path, calculate the direction change before and after the boundary crossing, the abrupt change in width, the texture difference, and the overlapping interval with the normal structure response. Based on the branch continuation diagram, exclude candidate continuous paths that need to reuse the same candidate branch or generate self-intersections. Establish path competition relationships among the remaining candidate continuous paths, and retain candidate continuous paths with continuous cross-boundary relationships and conflicting positions with the normal structural response as abnormal evidence input for the structural boundary correction.

9. The intelligent defect determination method for ship inspection image recognition according to claim 5, characterized in that, The refitting of the local structural coordinate system includes: dividing the base anchor points into inner anchor points and outer anchor points according to their distance from the abnormal evidence, and calculating the changes in the mapping residuals of the inner anchor points and the outer anchor points before and after refitting. When the mapping residual of the inner anchor point decreases with the structural boundary correction and the mapping residual of the outer anchor point remains consistent within the group, the corresponding boundary correction result is retained; When the mapping residual of the outer anchor point increases continuously in the same direction, the boundary correction that caused the increase in residual is cancelled, and the anchor point to be corrected associated with the boundary correction is removed from the anchor point group. The coordinate axis direction, coordinate origin, and segmented coordinate mapping are redefined based on the sequential index and spacing index of the remaining basic anchor points.

10. The intelligent defect determination method for ship inspection image recognition according to claim 6, characterized in that, The continuous splicing of the segmented coordinate mapping includes: generating boundary trajectories from each segmented coordinate mapping for the boundary of the same component within the overlapping area of ​​each adjacent local subdomain; Based on the overlap relationship of the boundary trajectory at the semantic anchor point, the curvature continuity relationship at the non-anchor point, and the directional continuity relationship on both sides of the abnormal evidence, the local credibility of each segment coordinate mapping is determined. Instead of directly adjusting the local confidence level based on edge strength for the area covered by anomalous evidence, cross-interval interpolation is performed on the boundary trajectories of the uncovered areas on both sides of the anomalous evidence. The boundary trajectories are fused according to the local confidence level, and the fused boundary trajectories are back-projected onto the ship inspection image to synchronously update the local subdomain division position and overlapping range.