Machine vision-based hull surface defect detection system

By acquiring multiple frames of images of the ship's hull surface, performing illumination equalization and geometric distortion correction, constructing brightness and texture models, and combining multi-frame projection matching comparison, the system can identify and distinguish real defects, solving the misjudgment problem caused by perspective distortion and uneven illumination in existing technologies, and improving detection accuracy and automation.

CN120807528BActive Publication Date: 2025-11-18福建博洋船舶工业有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511311015.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-15
Publication Date
2025-11-18
Estimated Expiration
2045-09-15

AI Technical Summary

Technical Problem

Existing machine vision-based ship hull surface defect detection systems are prone to misjudging normal gloss textures at weld edges as crack defects due to perspective distortion and uneven lighting under large-scale, irregular curved surface and moving shooting conditions, which reduces the accuracy and efficiency of automated detection.

Method used

By acquiring multiple frames of image data for illumination equalization and geometric distortion correction, a brightness and texture model is constructed. Combined with multi-frame projection matching and joint comparison, real defects are identified and false defect data is stored, generating detection results containing defect coordinates and interference prompts.

Benefits of technology

It effectively overcomes the problems of viewing angle distortion and uneven lighting, improves the accuracy and automation of defect detection, reduces the false judgment rate, and provides reliable detection results and support for the elimination of false defects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120807528B_ABST
    Figure CN120807528B_ABST
Patent Text Reader

Abstract

The application provides a hull surface defect detection system based on machine vision, and relates to the technical field of data processing.The system comprises an image acquisition module, an image correction module for performing illumination balancing and geometric distortion correction, a region construction module for identifying a stable region without defects, generating reference region data, including a brightness model and a texture model, a candidate generation module for detecting a region with local texture interruption or abnormal bright spots, forming candidate defect data, including pixel position and local contrast parameters, a stability determination module for performing projection matching in multiple images and simultaneously performing joint comparison with the brightness model and the texture model of the reference region data, forming real defect data and false defect data, and a result output module for generating a detection result containing defect coordinates, defect contours, image frame numbers and interference sample prompts.The application improves the accuracy of hull surface defect detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a machine vision-based system for detecting defects on ship hull surfaces. Background Technology

[0002] In existing technologies, machine vision is increasingly replacing manual inspection for detecting defects on ship hull surfaces. These methods typically involve deploying industrial cameras in docks or production lines to capture images of the hull surface, then combining these images with classification or segmentation models such as convolutional neural networks (CNNs) and support vector machines (SVMs) to automatically identify defects such as cracks, coating peeling, and corrosion pitting. For example, in the quality inspection stage before ship painting, researchers use deep learning semantic segmentation networks to perform pixel-level annotation on large-area hull surface images, thereby reducing manual inspection to some extent and improving the consistency and efficiency of the inspection.

[0003] However, in practical applications, existing machine vision-based inspection systems still have certain technical shortcomings. Taking the inspection of weld seams on ship hull plates as an example, due to the large size of the hull, cameras typically need to be moved and photographed using railcars or drones, resulting in significant scale variations and perspective distortion in the images. If the inspection model is trained only under conditions of small samples and fixed perspectives, its ability to recognize large areas and irregular curved surfaces will significantly decrease, easily misjudging normal glossy textures at weld edges as crack defects. Such misjudgments are not uncommon in batch inspections at shipyards, often requiring engineers to manually screen the inspection results, which reduces the level of automation and diminishes the advantages of machine vision inspection in large-scale applications. Summary of the Invention

[0004] The purpose of this invention is to provide a machine vision-based system for detecting defects on the surface of a ship's hull, in order to solve the problems mentioned in the background art.

[0005] To solve the above-mentioned technical problems, the technical solution of the present invention is as follows:

[0006] A machine vision-based hull surface defect detection system, the system comprising:

[0007] The image acquisition module is used to acquire multiple frames of raw image data based on the detection trajectory of the outer plating during the hull inspection process.

[0008] The image correction module is used to perform illumination equalization and geometric distortion correction based on multiple frames of original image data, forming standardized image data with uniform brightness distribution and consistent proportions.

[0009] The region construction module is used to identify defect-free stable regions based on standardized image data and generate reference region data, which includes a brightness model and a texture model.

[0010] The candidate generation module is used to detect regions with local texture interruptions or abnormal bright spots based on standardized image data and reference region data, and to form candidate defect data, which includes pixel positions and local contrast parameters.

[0011] The stability determination module is used to perform projection matching in multiple frames of images based on candidate defect data, and simultaneously compare it with the brightness model and texture model of the reference area data. When the candidate defect exists continuously in different frames and is inconsistent with the reference area in both brightness distribution and texture continuity dimensions, real defect data is formed. When the candidate defect appears only in a single frame or a few frames and is consistent with the reference area data, false defect data is formed, and the false defect data is stored as interference samples.

[0012] The results output module is used to generate detection results, including defect coordinates, defect contours, image frame numbers, and interference sample prompts, based on real defect data and corresponding fake defect data.

[0013] Preferably, the image correction module includes:

[0014] The illumination segment equalization unit is used to divide the entire image into multiple brightness intervals based on multiple frames of original image data, and to perform histogram equalization processing independently in each interval to eliminate uneven brightness caused by local light source differences and generate brightness-balanced image data.

[0015] The edge distortion analysis unit is used to perform geometric contour detection on the edge region of the image based on the brightness equalization image data, identify the stretching or compression region caused by camera tilt and lens distortion, and generate distortion region localization data.

[0016] The local geometric correction unit is used to perform pixel-by-pixel interpolation correction on the corresponding region based on the distortion region location data, so that the local proportion is consistent with the overall proportion, and to generate local corrected image data.

[0017] The global consistency fusion unit is used to perform weighted fusion of brightness-equalized image data and locally corrected image data to generate standardized image data with uniform brightness distribution and consistent geometric proportions.

[0018] Preferably, the region construction module includes:

[0019] The texture continuity detection unit is used to calculate the orientation consistency of textures in different detection blocks based on standardized image data. When the texture orientation remains stable and uninterrupted, the detection block is marked as a candidate stable region.

[0020] The brightness fluctuation analysis unit is used to extract the brightness variation range within the candidate stable region and generate a brightness model that can characterize the illumination distribution characteristics of the defect-free region.

[0021] The texture orientation modeling unit is used to extract the texture orientation distribution in the candidate stable region and fit the texture orientation to form a texture model that can characterize the structural characteristics of the defect-free region.

[0022] The reference region binding unit is used to bind and store the brightness model and texture model to form reference region data.

[0023] Preferably, the candidate generation module includes:

[0024] The local anomaly detection unit is used to analyze the gray-level continuity of local areas based on standardized image data. When a sudden change in gray level or an abnormally high brightness point occurs, the area is marked as an initial candidate area.

[0025] The first reference comparison unit is used to compare the initial candidate region with the reference region data. When the brightness range of the candidate region exceeds the brightness model of the reference region, or the texture direction of the candidate region is inconsistent with the texture model of the reference region, the candidate region is determined as a candidate defect region.

[0026] The feature parameter extraction unit is used to extract pixel position, texture interruption features and local contrast parameters in the candidate defect region to form candidate defect data containing multi-dimensional features.

[0027] Preferably, the stability determination module includes:

[0028] The cross-frame matching unit is used to perform projection matching in multiple frames of images based on candidate defect data, calculate the positional consistency of candidate defect regions in different frames, and generate cross-frame consistency data.

[0029] The second reference comparison unit is used to jointly compare the cross-frame consistency data with the brightness model and texture model of the reference area data. When the candidate defect area persists in different frames and is inconsistent with the reference area data in both brightness distribution and texture continuity dimensions, it is determined to be a real defect area.

[0030] The false identification unit is used to mark a candidate defect region as a false defect region and generate false defect data when the candidate defect region appears only in a single frame or a few frames and is consistent with the reference region data in terms of brightness distribution or texture continuity during the comparison process.

[0031] The defect confirmation unit is used to generate real defect data based on the location and shape of the real defect area, combined with the interference prompts provided by the false defect data, and output the real defect data and the false defect data together.

[0032] Preferably, the illumination segment equalization unit includes:

[0033] The brightness partition generation unit is used to calculate the brightness gradient based on the brightness distribution of multiple frames of original image data, divide the entire image into multiple brightness sub-regions, and generate brightness sub-region data.

[0034] The partitioned independent equalization unit is used to perform grayscale statistics and histogram stretching processing in each sub-region based on the brightness sub-region data to generate local equalization data.

[0035] The boundary smoothing processing unit is used to perform brightness transition smoothing on the boundary regions of adjacent sub-regions based on local equalization data, and generate smooth transition data.

[0036] The dynamic adaptive unit is used to monitor real-time changes in illumination conditions based on smooth transition data, dynamically adjust the sub-region division threshold, and regenerate the equalization result to obtain brightness-equalized image data.

[0037] Preferably, the edge distortion analysis unit includes:

[0038] The contour feature extraction unit is used to extract the direction, length, and curvature features of edge line segments based on the brightness equalization image data, and generate edge feature data;

[0039] The distortion detection unit is used to compare edge features with standard geometric proportions based on edge feature data, identify areas of abnormal stretching or compression, and generate distortion localization data.

[0040] The regional classification unit is used to divide the distorted region into a slightly distorted region and a severely distorted region based on the distortion localization data, and generate distortion classification data.

[0041] The distortion parameter generation unit is used to extract the orientation deviation and geometric proportional distortion rate from the distortion classification data and generate distortion parameter data.

[0042] Preferably, the local geometry correction unit includes:

[0043] The pixel interpolation correction unit is used to perform pixel-by-pixel interpolation on the distorted pixels in the distorted region based on the distortion parameter data, and generate preliminary correction data.

[0044] The local proportion adjustment unit is used to adjust the geometric proportions of local areas based on the preliminary correction data, so that the local aspect ratio is consistent with the overall image, and generate local consistency data.

[0045] The boundary transition balancing unit is used to balance the boundary between the corrected and uncorrected regions based on local consistency data, generating boundary smoothing data.

[0046] The iterative optimization unit is used to repeatedly perform interpolation correction and scaling adjustment based on the boundary smoothing data until the geometric error is less than the threshold, generating the final corrected image data.

[0047] Preferably, the reference comparison unit includes:

[0048] The brightness difference analysis unit is used to compare the brightness distribution of the initial candidate region data with the brightness model of the reference region to generate brightness anomaly data;

[0049] The texture orientation comparison unit is used to compare the texture orientation of the candidate region with the texture model of the reference region based on the brightness anomaly data, and generate texture anomaly data.

[0050] The structural contour verification unit is used to compare the edge morphology of the candidate region with the continuity of the reference region based on the texture anomaly data, and generate structural anomaly data.

[0051] The comprehensive judgment unit is used to perform cross-validation based on brightness anomaly data, texture anomaly data, and structural anomaly data to generate candidate defect data.

[0052] Preferably, the fake identification unit includes:

[0053] The intra-frame consistency analysis unit is used to detect the brightness and texture consistency of the defect region in a single frame image based on the candidate defect data, and generate intra-frame consistency data.

[0054] The cross-frame disappearance determination unit is used to track the trajectory of candidate defect regions in multi-frame images based on intra-frame consistency data. When the region only appears in a single frame or a few frames, cross-frame false data is generated.

[0055] The environmental interference identification unit is used to analyze cross-frame false data and combine it with the characteristics of on-site light reflection, water marks and attachments to generate false environmental data;

[0056] The spurious defect integration unit is used to generate spurious defect data based on intra-frame consistency data, cross-frame spurious data, and environmental spurious data, and output interference samples.

[0057] The above-described solution of the present invention has at least the following beneficial effects:

[0058] First, by acquiring multiple frames of original images during the hull inspection process and performing illumination equalization and geometric distortion correction in the image correction module, the consistency of the input image in terms of brightness distribution and geometric proportion is ensured, thereby effectively overcoming the problems of perspective distortion and uneven illumination caused by the large scale, irregular curved surface and moving shooting of the hull in the existing technology.

[0059] Secondly, by generating reference area data containing brightness and texture models through the region construction module, defect detection has a dual comparison benchmark, which can distinguish between normal gloss textures at the weld edge and real cracks, effectively reducing the misjudgment rate caused by reliance on a single feature in the existing technology.

[0060] Furthermore, through the hierarchical processing mechanism of the candidate generation module and the stability judgment module, potential anomalies are first screened, and then combined with multi-frame projection matching and brightness-texture joint comparison, it is possible to distinguish between real defects and false defects, and store false defects as interference samples, thereby avoiding manual secondary screening and improving the automation level of detection and the reliability of detection results.

[0061] Finally, the results output module generates detection results containing defect coordinates, defect contours, image frame numbers, and interference sample hints. This not only provides visualized defect information but also supports engineers in quickly locating and eliminating false defects in large-scale detection scenarios, significantly improving detection efficiency and application value. Attached Figure Description

[0062] Figure 1 This is an architecture diagram of a machine vision-based ship hull surface defect detection system provided in an embodiment of the present invention. Detailed Implementation

[0063] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.

[0064] like Figure 1 As shown, embodiments of the present invention propose a machine vision-based hull surface defect detection system, the system comprising:

[0065] The image acquisition module is used to acquire multiple frames of raw image data based on the detection trajectory of the outer plating during the hull inspection process.

[0066] The image correction module is used to perform illumination equalization and geometric distortion correction based on multiple frames of original image data, forming standardized image data with uniform brightness distribution and consistent proportions.

[0067] The region construction module is used to identify defect-free stable regions based on standardized image data and generate reference region data, which includes a brightness model and a texture model.

[0068] The candidate generation module is used to detect regions with local texture interruptions or abnormal bright spots based on standardized image data and reference region data, and to form candidate defect data, which includes pixel positions and local contrast parameters.

[0069] The stability determination module is used to perform projection matching in multiple frames of images based on candidate defect data, and simultaneously compare it with the brightness model and texture model of the reference area data. When the candidate defect exists continuously in different frames and is inconsistent with the reference area in both brightness distribution and texture continuity dimensions, real defect data is formed. When the candidate defect appears only in a single frame or a few frames and is consistent with the reference area data, false defect data is formed, and the false defect data is stored as interference samples.

[0070] The results output module is used to generate detection results, including defect coordinates, defect contours, image frame numbers, and interference sample prompts, based on real defect data and corresponding fake defect data.

[0071] In this embodiment of the invention, by setting up an image acquisition module, multiple frames of raw image data can be acquired along the inspection trajectory of the hull plating during the hull inspection process. Compared with the traditional single-frame acquisition method, this can cover a large area and retain detailed information from different perspectives, thereby ensuring sufficient input data for subsequent processing. For example, in the inspection of weld seams on large ship hulls, multi-frame acquisition can simultaneously record areas with strong lighting and shadow areas, providing comprehensive image conditions for subsequent processing.

[0072] By performing illumination equalization and geometric distortion correction on multiple frames of raw image data through the image correction module, standardized image data with uniform brightness distribution and consistent proportions can be generated, thereby solving the image distortion problem caused by uneven ambient lighting and camera shooting angle. For example, under strong direct sunlight in a dock, uncorrected images will show overexposure and stretching, while corrected images can ensure clear edge contours and overall brightness balance.

[0073] The region construction module can identify defect-free, stable regions in standardized image data and generate reference region data, including brightness and texture models. This provides a clear benchmark for subsequent detection, thus avoiding misjudgments caused by a lack of global reference. For example, in a ship hull area with a complete coating, a stable lighting and texture distribution model can be formed, providing a reference for the identification of abnormal regions.

[0074] The candidate generation module can detect areas with localized texture interruptions or abnormal bright spots based on standardized image data and reference area data, forming candidate defect data containing pixel positions and local contrast parameters. This enables automatic marking of potential cracks, corrosion spots, or coating peeling. For example, when a micro-crack appears in the weld edge area, this module can identify it as a candidate defect area through local contrast anomalies.

[0075] The stability assessment module can perform projection matching on candidate defect data across multiple frames and simultaneously compare it with the brightness and texture models of the reference region data, thereby improving the accuracy of defect identification under multi-dimensional conditions. When a candidate defect persists across different frames and differs from the reference region in both brightness distribution and texture continuity, it is considered genuine defect data. Conversely, when a candidate defect appears only in a single frame or a small number of frames and is consistent with the reference region data, it is considered false defect data and stored as interference samples, thus enabling the identification and utilization of false defects. For example, in the case of localized bright spots caused by seawater reflection, this module can identify it as a single-frame phenomenon and store it as a false defect to avoid repeated misjudgments.

[0076] The output module generates detection results based on real defect data and corresponding spurious defect data. These results include defect coordinates, defect outlines, image frame numbers, and interference sample alerts. This ensures the output reflects both the location and shape of real defects and provides alerts for spurious defects, offering more valuable detection information for ship maintenance personnel. For example, the output report can indicate the specific coordinates of crack defects and identify areas with spurious defects caused by light reflection, thus reducing the workload for maintenance personnel.

[0077] The image acquisition module is used to acquire multiple frames of raw image data based on the detection trajectory of the hull plating during the hull inspection process. Specifically, it includes:

[0078] The camera deployment steps are used to install industrial cameras on mobile vehicles on a dock or production line. The mobile vehicle can be a track inspection vehicle or a drone. The shooting path is preset according to the curved contour of the ship's outer plate to ensure that the shooting trajectory covers the entire surface of the area to be inspected.

[0079] The image acquisition step is used to continuously acquire images at a fixed frame rate during the operation of the mobile vehicle, forming multiple frames of raw image data. Each frame of the image corresponds to a different angle and local area on the surface of the hull, thus forming a continuous record in space and time.

[0080] The parameter adjustment step is used to dynamically adjust the camera's focal length, exposure time, and aperture during image acquisition, so that the acquired images maintain consistent sharpness under different lighting and distance conditions, and the shooting parameters are recorded by the controller for subsequent correction processing.

[0081] The position information binding step is used to bind multiple frames of original image data with the vehicle's motion position and angle information to form an image sequence with spatial coordinates, thereby ensuring that the subsequent defect location can be accurately located on the hull surface.

[0082] The result output module is used to generate detection results based on real defect data and corresponding spurious defect data, including defect coordinates, defect contours, image frame numbers, and interference sample prompts. Specifically, it includes:

[0083] The result integration step is used to receive real defect data and false defect data output by the stability determination module, and match the two with the image frame number according to the detection time order to form a defect result set to be output.

[0084] The defect annotation step is used to generate detection annotation information for each real defect data in the result set. The detection annotation information includes the coordinate point set, contour shape and the number of the image frame in which the defect area is located, so as to ensure that each defect is traceable.

[0085] The false defect alert step is used to generate interference alerts for false defect data in the result set. The interference alerts include the image frame number where the false defect is located and its corresponding interference type (such as light reflection, water marks or attachments, etc.), so that the inspectors can quickly identify the source of the non-real defect.

[0086] The report generation step is used to generate a test result report based on defect annotation information and interference prompts. The report can be in the form of image overlay annotation or text list, thus providing a direct reference for subsequent hull maintenance and repair.

[0087] In a preferred embodiment of the present invention, the image correction module includes:

[0088] The illumination segment equalization unit is used to divide the entire image into multiple brightness intervals based on multiple frames of original image data, and to perform histogram equalization processing independently in each interval to eliminate uneven brightness caused by local light source differences and generate brightness-balanced image data.

[0089] The edge distortion analysis unit is used to perform geometric contour detection on the edge region of the image based on the brightness equalization image data, identify the stretching or compression region caused by camera tilt and lens distortion, and generate distortion region localization data.

[0090] The local geometric correction unit is used to perform pixel-by-pixel interpolation correction on the corresponding region based on the distortion region location data, so that the local proportion is consistent with the overall proportion, and to generate local corrected image data.

[0091] The global consistency fusion unit is used to perform weighted fusion of brightness-equalized image data and locally corrected image data to generate standardized image data with uniform brightness distribution and consistent geometric proportions.

[0092] In this embodiment of the invention, the illumination segmentation equalization unit can divide the entire image into multiple brightness intervals based on multiple frames of original image data, and independently perform histogram equalization processing within each interval. This effectively eliminates uneven brightness caused by differences in local light sources, enhancing details in dark areas and suppressing overly bright areas, resulting in brightness-balanced image data. For example, in a dock environment, there may be strong lighting near the deck while the bottom of the ship is poorly lit. After processing by this unit, the brightness transition of the entire image is smoother, facilitating subsequent defect analysis.

[0093] The edge distortion analysis unit can perform geometric contour detection on the edge regions of an image based on brightness-evented image data. It identifies stretching and compression caused by camera tilt or lens distortion, and generates distortion region location data, thereby ensuring the accurate reproduction of the ship's edge structure. For example, when photographing the curved surface of a ship, bending deformation is prone to appear at the image edges. This unit can identify the deformed areas, providing a basis for correction processing.

[0094] The local geometric correction unit can perform pixel-by-pixel interpolation correction on the corresponding area based on the distortion area location data, restoring the local proportions to be consistent with the overall proportions, thereby ensuring the accuracy of local detection. For example, at the location of the weld on the curved surface of the ship hull, after correction, the weld width is no longer stretched or compressed, making it easier to accurately identify cracks.

[0095] The globally consistent fusion unit can perform weighted fusion of brightness-equalized image data and locally corrected image data to generate standardized image data with uniform brightness distribution and consistent geometric proportions, providing a clear and stable image foundation for subsequent region construction modules. For example, if an image contains both strongly lit areas and distorted areas, after fusion processing, the entire image maintains a consistent visual effect, improving detection reliability.

[0096] The globally consistent fusion unit is used to perform weighted fusion of brightness-equalized image data and locally corrected image data to generate standardized image data with uniform brightness distribution and consistent geometric proportions. Specifically, it includes:

[0097] The image alignment step is used to register the corresponding feature points in the local correction image data and the brightness equalization image data, aligning the two types of images in spatial position to ensure that pixels at the same position have a corresponding relationship during subsequent fusion.

[0098] The weighting step is used to assign different fusion weights to the brightness equalization image data and the local correction image data according to the importance and confidence of the image region. Specifically, for regions with significant illumination differences, the weight of the brightness equalization image data is increased, and for regions with severe geometric distortion, the weight of the local correction image data is increased.

[0099] The pixel fusion step is used to weight and fuse the data of the two types of images at each pixel according to the assigned weights, so as to generate the fused pixel value, thereby maintaining the overall brightness consistency and correcting local distortion.

[0100] The consistency detection step is used to perform global consistency detection on the fused image, analyze whether the brightness distribution and geometric proportions meet the requirements of balance and consistency. When the detection result does not meet the requirements, the weight allocation is automatically adjusted and the fusion is repeated until standardized image data is obtained.

[0101] In a preferred embodiment of the present invention, the region construction module includes:

[0102] The texture continuity detection unit is used to calculate the orientation consistency of textures in different detection blocks based on standardized image data. When the texture orientation remains stable and uninterrupted, the detection block is marked as a candidate stable region.

[0103] The brightness fluctuation analysis unit is used to extract the brightness variation range within the candidate stable region and generate a brightness model that can characterize the illumination distribution characteristics of the defect-free region.

[0104] The texture orientation modeling unit is used to extract the texture orientation distribution in the candidate stable region and fit the texture orientation to form a texture model that can characterize the structural characteristics of the defect-free region.

[0105] The reference region binding unit is used to bind and store the brightness model and texture model to form reference region data.

[0106] In this embodiment of the invention, the texture continuity detection unit can perform consistency calculations on the texture direction of different detection blocks based on standardized image data, thereby identifying regions where the texture direction remains stable and uninterrupted, and marking them as candidate stable regions, ensuring the reliability of the selection of reference regions. For example, in areas where the coating on the hull surface is intact, the texture is continuous and regular, and this unit can identify this region as a candidate stable region.

[0107] The brightness fluctuation analysis unit can extract the brightness variation range within candidate stable regions and generate a brightness model that characterizes the illumination distribution characteristics of defect-free areas, thus providing a reference for subsequent comparisons based on illumination levels. For example, in the hull plating area with uniform paint coverage, the brightness distribution is relatively smooth, and the brightness model generated by this unit can reflect the normal illumination range of this area.

[0108] The texture orientation modeling unit can extract the texture orientation distribution within candidate stable regions and fit the texture orientation to form a texture model that can characterize the structural properties of defect-free regions, thus providing a benchmark for defect comparison in the structural dimension. For example, in regular weld seams, the texture exhibits a consistent linear distribution, and this unit can establish a texture orientation model to provide a reference for crack detection.

[0109] The reference region binding unit allows for the binding and storage of brightness and texture models, forming complete reference region data. This ensures that subsequent detection modules have comparison standards across multiple dimensions. For example, during detection, the reference region data can simultaneously provide comparison benchmarks for both brightness and texture dimensions, making anomaly detection more accurate.

[0110] The texture continuity detection unit is used to calculate the orientation consistency of textures in different detection blocks based on standardized image data. When the texture orientation remains stable and uninterrupted, the detection block is marked as a candidate stable region. Specifically, it includes:

[0111] The image segmentation step is used to divide standardized image data into several detection blocks, each containing a certain number of pixel regions, so as to perform texture feature analysis in a local area.

[0112] The texture feature extraction step is used to extract the direction and intensity of pixel grayscale changes within each detection block to form directional feature data, which is used to characterize the local orientation of the texture.

[0113] The consistency analysis step is used to statistically analyze the concentration of pixel orientations within the detection block based on orientation feature data. When pixel orientations are concentrated and there are no obvious abrupt changes, the texture continuity is considered to be high.

[0114] The interruption detection step is used to further detect whether there are abrupt changes in direction or grayscale based on the consistency analysis. When there is a large inconsistency in direction or obvious break, it is determined that the texture continuity of the detection block is interrupted.

[0115] The candidate region marking step is used to mark the detection blocks as candidate stable regions when the detection blocks are oriented in the same direction and there are no abrupt changes, based on the consistency analysis and interruption detection results, and output them to the subsequent brightness fluctuation analysis unit.

[0116] The brightness fluctuation analysis unit is used to extract the brightness variation range within the candidate stable region and generate a brightness model that can characterize the illumination distribution characteristics of the defect-free region. Specifically, it includes:

[0117] The candidate region decomposition step is used to divide the candidate stable region into several sub-regions so as to perform statistical analysis of brightness changes in a local area;

[0118] The brightness feature acquisition step is used to read the pixel grayscale value in each sub-region and obtain the average brightness, maximum brightness and minimum brightness of the sub-region through statistical methods, thereby reflecting the local brightness distribution.

[0119] The fluctuation range calculation step is used to calculate the brightness change amplitude based on the brightness characteristics of the sub-region, that is, to use the difference between the maximum and minimum values ​​to represent the fluctuation of the sub-region, and to obtain the overall brightness fluctuation range of the candidate stable region by integrating the fluctuation of all sub-regions.

[0120] The model generation step is used to bind the brightness fluctuation range with the brightness distribution characteristics to generate a brightness model. The brightness model can be used to describe the normal brightness variation range of a defect-free area under different lighting conditions and serve as reference data for subsequent defect comparison.

[0121] The texture orientation modeling unit is used to extract the texture orientation distribution within the candidate stable region and fit the texture orientation to form a texture model that can characterize the structural properties of the defect-free region. Specifically, it includes:

[0122] The directional feature extraction step is used to extract the directional features of pixel grayscale changes in the candidate stable region, and uses the local gradient direction as the basis for describing the texture direction.

[0123] The orientation aggregation step is used to statistically aggregate the orientation features of all pixels in the region to obtain the main texture orientation distribution of the region and remove scattered noise orientation features.

[0124] The orientation fitting step is used to fit a dominant orientation based on the aggregated orientation distribution and to quantify the stability of the texture orientation. When the orientation of most pixels is concentrated in the same dominant orientation, it indicates that the texture continuity in the region is good.

[0125] The model generation step combines the fitted dominant direction with the stability index of the direction distribution to generate a texture model. The texture model is used to describe the directional features of defect-free areas and to provide a structural reference for subsequent defect comparison.

[0126] In a preferred embodiment of the present invention, the candidate generation module includes:

[0127] The local anomaly detection unit is used to analyze the gray-level continuity of local areas based on standardized image data. When a sudden change in gray level or an abnormally high brightness point occurs, the area is marked as an initial candidate area.

[0128] The first reference comparison unit is used to compare the initial candidate region with the reference region data. When the brightness range of the candidate region exceeds the brightness model of the reference region, or the texture direction of the candidate region is inconsistent with the texture model of the reference region, the candidate region is determined as a candidate defect region.

[0129] The feature parameter extraction unit is used to extract pixel position, texture interruption features and local contrast parameters in the candidate defect region to form candidate defect data containing multi-dimensional features.

[0130] In this embodiment of the invention, the local anomaly detection unit can analyze the grayscale continuity of local areas based on standardized image data. When a sudden change in grayscale or an abnormally high brightness point occurs, the area is marked as an initial candidate area, thereby enabling rapid screening of potential defect locations. For example, when paint peeling occurs on the surface of a ship's hull, the local brightness will suddenly increase, and this unit can mark it as an initial candidate area.

[0131] The first reference comparison unit compares the initial candidate region with the reference region data. When the brightness range of the candidate region exceeds the brightness model of the reference region, or when the texture direction of the candidate region is inconsistent with the texture model of the reference region, the candidate region is identified as a candidate defect region, thus effectively avoiding the mistaken labeling of normal regions as defects. For example, in a strong light reflection region, although the brightness is high, its texture direction is consistent with the reference region, and this unit will exclude its possibility of being a defect.

[0132] The feature parameter extraction unit can extract pixel positions, texture interruption features, and local contrast parameters within the candidate defect region, forming candidate defect data containing multi-dimensional features, thus providing rich information for subsequent stability determination. For example, in the region of small cracks in a weld, this unit can not only record the crack location but also extract the contrast difference and texture interruption features on both sides of the crack, providing data support for accurate determination.

[0133] The local anomaly detection unit is used to analyze the grayscale continuity of local regions based on standardized image data. When a sudden change in grayscale or an abnormally high brightness point occurs, the region is marked as an initial candidate region. Specifically, it includes:

[0134] The image segmentation step is used to divide standardized image data into multiple local detection blocks according to a preset size, so as to ensure independent analysis of brightness and grayscale changes at the local scale.

[0135] The grayscale feature extraction step is used to read the grayscale values ​​of all pixels in each local detection block and obtain the average grayscale value and the grayscale difference between adjacent pixels through statistical methods, which is used to reflect the grayscale distribution of the region.

[0136] The continuity analysis step is used to determine whether the grayscale difference between pixels is within the normal range based on grayscale characteristics. When the grayscale change is gradual, it is considered normal, and when there is a large grayscale jump, it is identified as a grayscale change region.

[0137] The anomaly detection step is used to further detect, based on the continuous analysis, whether there are points with brightness values ​​much higher than those of the surrounding pixels. When such a phenomenon occurs, it is identified as a point with abnormally high brightness.

[0138] The initial candidate generation step is used to mark grayscale abrupt change regions or abnormally high brightness regions as initial candidate regions and use them as input data for subsequent reference comparisons.

[0139] The feature parameter extraction unit is used to extract pixel positions, texture interruption features, and local contrast parameters within the candidate defect region, forming candidate defect data containing multi-dimensional features, specifically including:

[0140] The pixel location extraction step is used to determine the coordinate information of all boundary pixels within the candidate defect region and generate a set of coordinate points for subsequent defect morphology localization and contour marking.

[0141] The texture interruption detection step is used to analyze the continuity and directional consistency of pixel gray levels within the candidate defect region. When obvious directional interruptions or local gray level discontinuities occur, interruption features are recorded and texture anomaly description data is formed.

[0142] The contrast calculation step is used to calculate the average brightness value between the candidate defect area and its surrounding normal area, and to represent the local contrast level by the difference between the two, thereby reflecting the degree of difference between the defect area and the background.

[0143] The feature integration step is used to integrate pixel location, texture anomaly description data and local contrast level to form candidate defect data, which is then used as input to the stability determination module for subsequent cross-frame verification and confirmation of actual defects.

[0144] In a preferred embodiment of the present invention, the stability determination module includes:

[0145] The cross-frame matching unit is used to perform projection matching in multiple frames of images based on candidate defect data, calculate the positional consistency of candidate defect regions in different frames, and generate cross-frame consistency data.

[0146] The second reference comparison unit is used to jointly compare the cross-frame consistency data with the brightness model and texture model of the reference area data. When the candidate defect area persists in different frames and is inconsistent with the reference area data in both brightness distribution and texture continuity dimensions, it is determined to be a real defect area.

[0147] The false identification unit is used to mark a candidate defect region as a false defect region and generate false defect data when the candidate defect region appears only in a single frame or a few frames and is consistent with the reference region data in terms of brightness distribution or texture continuity during the comparison process.

[0148] The defect confirmation unit is used to generate real defect data based on the location and shape of the real defect area, combined with the interference prompts provided by the false defect data, and output the real defect data and the false defect data together.

[0149] In this embodiment of the invention, the cross-frame matching unit can perform projection matching on multiple frames of images based on candidate defect data, calculate the positional consistency of candidate defect regions in different frames, and thus identify the stability of defects over time. For example, when a UAV moves along a ship's hull for inspection, if a weld crack appears in the same position in multiple consecutive frames, the unit can confirm that it is a real defect.

[0150] The second reference comparison unit can jointly compare the cross-frame consistency data with the brightness model and texture model of the reference area data, thereby verifying defect areas simultaneously in both brightness and texture dimensions and improving the accuracy of the judgment. For example, when bright spots appear on the hull surface due to light reflection, their brightness may be inconsistent with the reference model, but their texture remains continuous. In this case, the unit can avoid misjudging them as defects.

[0151] The false defect identification unit can mark candidate defect areas as false defect areas and generate false defect data when they appear only in a single frame or a few frames during the comparison process and maintain consistency with the reference area data in terms of brightness distribution or texture continuity. This effectively reduces misjudgments caused by occasional lighting changes or sea surface glare. For example, the unit can identify and store a brief water reflection appearing in a frame as a false defect.

[0152] The defect confirmation unit can simultaneously identify real defect areas and, by incorporating the interference alerts provided by spurious defect data, generate real defect data and output it along with the spurious defect data, thus forming a complete defect judgment result. For example, the final inspection report will not only mark the coordinates and outline of the crack but also indicate which areas are spurious defects, helping maintenance personnel quickly filter out interfering information.

[0153] The cross-frame matching unit specifically includes:

[0154] The candidate region localization step is used to determine the pixel coordinates and boundary range of the candidate defect region in a single frame image, and use it as the initial position for projection matching;

[0155] The inter-frame projection step is used to project the coordinate range of the candidate defect region onto the adjacent frame image and perform pixel similarity comparison in the region near the projection position, thereby determining the corresponding position of the defect region in the adjacent frame.

[0156] The location consistency analysis step is used to statistically analyze the locations of candidate regions in multiple frames of images. When a region can be found in multiple consecutive frames, it is determined to be location-stable, and cross-frame consistency data is generated.

[0157] The trajectory generation step is used to generate cross-frame trajectory information of the defect area based on the location consistency data, so that the subsequent reference comparison unit can make a authenticity judgment.

[0158] The second reference comparison unit specifically includes:

[0159] The brightness comparison step is used to compare the brightness value of the candidate region in the cross-frame consistency data with the brightness model of the reference region. When the brightness level of the candidate region exceeds the normal fluctuation range of the reference model, it is recorded as a brightness anomaly.

[0160] The texture comparison step is used to compare the texture direction of candidate regions in cross-frame consistency data with the texture model of the reference region. When the texture direction of the candidate region is offset, interrupted or disordered, it is recorded as a texture anomaly.

[0161] The dual-dimensional joint analysis step is used to jointly analyze the results of brightness anomalies and texture anomalies. Only when both are judged as anomalies is the candidate region marked as a real defect region, thereby avoiding misjudgment caused by a single dimension.

[0162] The defect confirmation unit specifically includes:

[0163] The morphological feature extraction step is used to extract morphological features such as boundary shape, area size, and aspect ratio from the real defect area to generate more accurate defect description information.

[0164] The interference comparison step is used to compare the location of the real defect area with the false defect data. When the real defect area is close to the false defect area, the interference prompt is recorded so as to remind the inspection personnel that there may be light or environmental influence at this location when outputting.

[0165] The data generation step integrates the coordinates, contour shape, image frame number, and interference prompt information of the real defect area to generate complete real defect data, which is then output to the result output module along with the false defect data to ensure that the inspection report contains comparison information of real and false defects.

[0166] In a preferred embodiment of the present invention, the illumination segmentation equalization unit includes:

[0167] The brightness partition generation unit is used to calculate the brightness gradient based on the brightness distribution of multiple frames of original image data, divide the entire image into multiple brightness sub-regions, and generate brightness sub-region data.

[0168] The partitioned independent equalization unit is used to perform grayscale statistics and histogram stretching processing in each sub-region based on the brightness sub-region data to generate local equalization data.

[0169] The boundary smoothing processing unit is used to perform brightness transition smoothing on the boundary regions of adjacent sub-regions based on local equalization data, and generate smooth transition data.

[0170] The dynamic adaptive unit is used to monitor real-time changes in illumination conditions based on smooth transition data, dynamically adjust the sub-region division threshold, and regenerate the equalization result to obtain brightness-equalized image data.

[0171] In this embodiment of the invention, the brightness partitioning generation unit can perform brightness gradient calculation based on the brightness distribution of multiple frames of original image data, divide the entire image into multiple brightness sub-regions, and generate brightness sub-region data, thereby ensuring that images under different lighting conditions can be processed in partitions. For example, when the upper part of the hull is exposed to strong direct light while the lower part is in shadow, this unit can divide it into independent sub-regions.

[0172] By using a zone-independent equalization unit, grayscale statistics and histogram stretching can be performed within each sub-region based on the brightness sub-region data to generate local equalization data, thereby enhancing shadow details and suppressing overly bright areas. For example, this unit can highlight the details of cracks near welds in shadow areas.

[0173] The boundary smoothing unit can smooth the brightness transition of adjacent sub-region boundaries based on local equalization data, generating smooth transition data and thus avoiding abrupt boundary changes caused by independent processing of each region. For example, at the boundary between bright and dark areas, this unit can ensure a smooth brightness transition, guaranteeing the naturalness of the image.

[0174] The dynamic adaptive unit can monitor real-time changes in lighting conditions based on smooth transition data, dynamically adjust the sub-region division thresholds, and regenerate the equalization result to obtain brightness-balanced image data, thus adapting to changes in different shooting times and environments. For example, when lighting conditions change rapidly during sunset, this unit can adjust the partitions in real time to keep the equalized image stable and consistent.

[0175] The brightness partition generation unit specifically includes:

[0176] The image scanning step is used to read the brightness values ​​of the entire image pixel by pixel and form a brightness distribution curve to reflect the global illumination distribution.

[0177] The gradient change analysis step is used to detect the rate of change of brightness values ​​on the brightness distribution curve. When the rate of change of brightness exceeds a preset threshold, it is determined as the boundary position of the partition.

[0178] The partition generation step is used to divide the entire image into several brightness sub-regions based on the detected partition boundaries, with the brightness in each sub-region being relatively stable.

[0179] The sub-area data output step is used to save the partitioning results as luminance sub-area data and provide it to the subsequent partitioned independent equalization unit.

[0180] The partition-independent load balancing unit specifically includes:

[0181] The grayscale statistics step is used to statistically analyze the brightness distribution characteristics of pixels in each brightness sub-region, including the average, maximum, and minimum values, in order to analyze local lighting conditions.

[0182] The histogram calculation step is used to generate a histogram based on the brightness distribution characteristics and to identify gray-level concentrated and sparse regions to reflect the local brightness dynamic range.

[0183] The grayscale stretching step is used to enhance sparse areas in the histogram, making their grayscale values ​​more evenly distributed, thereby improving details in dark areas and reducing saturation in overly bright areas.

[0184] The local equalization generation step is used to recombine the processed pixel data into a locally equalized image and output the local equalization data.

[0185] The boundary smoothing unit specifically includes:

[0186] The boundary region extraction step is used to determine the overlapping boundary region between adjacent sub-regions and extract the pixel values ​​within the boundary.

[0187] The brightness transition analysis step is used to calculate the difference in brightness between pixels on both sides of the boundary. When the difference exceeds the allowable range, it is determined that the area needs to be smoothed.

[0188] The progressive blending step is used to gradually adjust pixel brightness within the boundary region, allowing it to smoothly transition from one sub-region to another, thereby eliminating abrupt changes;

[0189] The smoothing data output step is used to recombine the smoothed boundary region with the locally balanced data to generate smooth transition data.

[0190] The dynamic adaptive unit specifically includes:

[0191] The illumination monitoring step is used to extract the average brightness level from multiple consecutive frames of images and analyze its trend over time to reflect the dynamic changes in illumination conditions.

[0192] The threshold adjustment step is used to automatically update the threshold of the brightness sub-region division according to the trend of light change. When the overall brightness increases or decreases, the partition boundary is adjusted accordingly.

[0193] The rebalancing process is used to re-execute the partition-independent equalization and boundary smoothing steps under the new partitioning results, thereby generating a new equalized image;

[0194] The result update step is used to output the new equalization image as the brightness equalization image data of the current frame, and make it available for subsequent modules to call.

[0195] In a preferred embodiment of the present invention, the edge distortion analysis unit includes:

[0196] The contour feature extraction unit is used to extract the direction, length, and curvature features of edge line segments based on the brightness equalization image data, and generate edge feature data;

[0197] The distortion detection unit is used to compare edge features with standard geometric proportions based on edge feature data, identify areas of abnormal stretching or compression, and generate distortion localization data.

[0198] The regional classification unit is used to divide the distorted region into a slightly distorted region and a severely distorted region based on the distortion localization data, and generate distortion classification data.

[0199] The distortion parameter generation unit is used to extract the orientation deviation and geometric proportional distortion rate from the distortion classification data and generate distortion parameter data.

[0200] In this embodiment of the invention, the contour feature extraction unit can extract the direction, length, and curvature features of edge line segments based on brightness-balanced image data, generating edge feature data that accurately reflects the geometric shape of the ship's hull edge. For example, when photographing the curved surface of the ship's hull, this unit can extract its natural curvature as basic data.

[0201] The distortion detection unit can compare edge feature data with standard geometric proportions to identify abnormally stretched or compressed areas, generate distortion localization data, and thus determine the location of deformation caused by the lens or angle. For example, when the camera is tilted during shooting, the straight edges of the hull may appear bent, and this unit can identify this.

[0202] By using regional hierarchical division units, distorted regions can be divided into mildly distorted and severely distorted regions based on distortion localization data, generating distortion classification data. This allows for targeted processing for different levels of correction. For example, mildly distorted regions only require localized fine-tuning, while severely distorted regions require extensive correction.

[0203] The distortion parameter generation unit can extract directional deviation and geometric proportional distortion rate from distortion classification data to generate distortion parameter data, thus providing a quantitative basis for subsequent local geometric correction. For example, in areas with significant curvature, this unit can generate larger correction parameters to guide precise correction.

[0204] The contour feature extraction unit specifically includes:

[0205] The image preprocessing step is used to perform edge enhancement on the brightness-equalized image data, so that high-contrast areas such as the edges of the hull plate and weld boundaries are highlighted.

[0206] The edge detection step is used to extract continuous edge points through pixel gradient direction analysis and connect adjacent edge points to form complete edge segments;

[0207] The geometric feature calculation step is used to calculate the direction angle, pixel span length, and edge curvature of the edge line segment, which can be described in words as "direction, scale, and curvature" features.

[0208] The feature data output step is used to integrate the above geometric features to generate edge feature data, which is then used as input for the subsequent distortion detection unit.

[0209] The distortion detection unit specifically includes:

[0210] The reference scale establishment step is used to establish the standard direction and standard scale of the ideal edge as a comparison benchmark based on the design drawings or known structural features of the hull.

[0211] The feature comparison step is used to compare the direction, length and curvature information in the edge feature data with the standard ratio one by one. When an excessive directional deviation or excessive stretching or compression of the line segment is detected, it is judged as an anomaly.

[0212] The abnormal region localization step is used to locate the aforementioned abnormal regions in the image and generate distortion localization data containing edge positions and abnormality types.

[0213] The data output step is used to transfer the distortion location data to the regional level division unit for subsequent analysis.

[0214] The regional hierarchical division units specifically include:

[0215] The distortion amplitude assessment step is used to quantify the offset, curvature, and proportional distortion recorded in the distortion location data. When the offset or curvature is small and does not affect the overall structure, it is marked as mild distortion; when the distortion significantly affects the straightness or proportional relationship of the structure, it is marked as severe distortion.

[0216] The region classification step is used to label distorted regions in the image according to the mild or severe category based on the evaluation results, and generate distortion classification data;

[0217] The data storage step is used to save the classification results together with the original distortion localization data for use by the distortion parameter generation unit.

[0218] The distortion parameter generation unit specifically includes:

[0219] The deviation calculation step is used to calculate the difference between the edge direction and the standard direction in areas of slight or severe distortion, described in words as "angular deviation".

[0220] The proportional distortion assessment step is used to calculate the proportion of the difference between the edge length of the distorted region and the standard length, described in words as "the distortion rate of length or width";

[0221] The parameter integration step is used to integrate angular deviation and distortion rate to generate distortion parameter data, which can accurately reflect the severity of the distortion area and the need for correction.

[0222] The output step is used to pass the distortion parameter data to the local geometric correction unit as the input basis for subsequent correction interpolation and geometric scale adjustment.

[0223] In a preferred embodiment of the present invention, the local geometry correction unit includes:

[0224] The pixel interpolation correction unit is used to perform pixel-by-pixel interpolation on the distorted pixels in the distorted region based on the distortion parameter data, and generate preliminary correction data.

[0225] The local proportion adjustment unit is used to adjust the geometric proportions of local areas based on the preliminary correction data, so that the local aspect ratio is consistent with the overall image, and generate local consistency data.

[0226] The boundary transition balancing unit is used to balance the boundary between the corrected and uncorrected regions based on local consistency data, generating boundary smoothing data.

[0227] The iterative optimization unit is used to repeatedly perform interpolation correction and scaling adjustment based on the boundary smoothing data until the geometric error is less than the threshold, generating the final corrected image data.

[0228] In this embodiment of the invention, the pixel interpolation correction unit can perform pixel-by-pixel interpolation processing on distorted pixels within the distorted region based on distortion parameter data, generating preliminary correction data to restore image details. For example, when the weld lines on the hull side are bent due to lens distortion, this unit can repair them point by point, ensuring that the weld shape is close to the real state.

[0229] The local scaling unit can adjust the geometric proportions of local areas based on preliminary correction data, ensuring that the local aspect ratio is consistent with the overall image and generating local consistency data. This guarantees the consistency of image proportions across large and small areas. For example, when photographing the curved surface of a ship's hull, this unit can make the magnified crack in a localized area proportional to the overall size, avoiding misjudgment of defect size.

[0230] The boundary transition balancing unit can balance the boundary between the corrected and uncorrected areas based on local consistency data, generating smooth boundary data and thus avoiding abrupt splicing marks caused by local corrections. For example, after weld edge correction, this unit can make the boundary blend naturally with the original image, ensuring the integrity of the inspection image.

[0231] The iterative optimization unit can repeatedly perform interpolation correction and scaling adjustment based on boundary smoothing data until the geometric error is less than a preset threshold, generating the final corrected image data and ensuring that the correction effect reaches a stable state. For example, when the shooting angle is severely skewed, this unit can maintain geometric accuracy in the final output image of the hull hull through multiple rounds of iterative correction.

[0232] The pixel interpolation correction unit specifically includes:

[0233] The distortion region localization step is used to receive the distortion region range marked in the distortion parameter data and accurately locate the position of the distorted pixels in the image;

[0234] The neighbor pixel extraction step is used to extract the neighbor pixel values ​​within a certain range around each distorted pixel in order to obtain reliable reference information;

[0235] The interpolation calculation step is used to estimate the ideal value of the distorted pixel by weighted averaging based on the gray values ​​and orientation distribution of the neighboring pixels. It can be described in words as "smoothing compensation based on the gray trend of the neighborhood".

[0236] The preliminary correction generation step is used to replace the original distorted pixels with the corrected pixels to generate image data containing the preliminary repaired area.

[0237] The local scaling unit specifically includes:

[0238] The proportional deviation analysis step is used to calculate the width and height of local areas in the preliminary correction data and compare them with the overall standard scale to obtain the proportional deviation amount.

[0239] The geometric correction step is used to scale or expand a local area according to the proportional deviation so that the local size is consistent with the whole. It is described in words as "achieving proportional correction by stretching or compressing pixel by pixel".

[0240] The consistency verification step is used to detect whether the geometry of a local region matches the overall image after correction. When the difference is reduced to an acceptable range, local consistency data is generated.

[0241] Specifically, the boundary transition equilibrium unit includes:

[0242] The boundary region identification step is used to detect the boundary location between the corrected region and the original uncorrected region in the locally consistent data;

[0243] The brightness and texture comparison step is used to extract brightness values ​​and texture direction on both sides of the boundary. When a significant difference is detected on both sides of the boundary, it is marked as a transition area that needs to be balanced.

[0244] The smooth transition processing step is used to gradually adjust the brightness and texture direction of the boundary pixels in the transition area, so that the transition between the corrected area and the uncorrected area is natural, that is, "to make the brightness and texture gradually and smoothly transition from a state of difference to a continuous distribution".

[0245] The smoothing data output step is used to reintegrate the balanced image to generate boundary-smoothed data.

[0246] The iterative optimization unit specifically includes:

[0247] An error detection step is used to detect geometric errors in boundary-smoothed data, which are described in words as differences between the region morphology and the standard geometric model.

[0248] The correction feedback step is used to re-input the boundary smoothing data to the pixel interpolation correction unit and the local scaling unit when the geometric error exceeds the threshold, and to perform a new round of correction.

[0249] The iterative steps are used to continuously repeat the correction and feedback process, and update the geometric error value after each round of correction;

[0250] The termination output step is used to terminate the iteration and output the final corrected image data when the geometric error decreases to within a threshold range.

[0251] In a preferred embodiment of the present invention, the reference comparison unit includes:

[0252] The brightness difference analysis unit is used to compare the brightness distribution of the initial candidate region data with the brightness model of the reference region to generate brightness anomaly data;

[0253] The texture orientation comparison unit is used to compare the texture orientation of the candidate region with the texture model of the reference region based on the brightness anomaly data, and generate texture anomaly data.

[0254] The structural contour verification unit is used to compare the edge morphology of the candidate region with the continuity of the reference region based on the texture anomaly data, and generate structural anomaly data.

[0255] The comprehensive judgment unit is used to perform cross-validation based on brightness anomaly data, texture anomaly data, and structural anomaly data to generate candidate defect data.

[0256] In this embodiment of the invention, the brightness difference analysis unit can compare the brightness distribution of an initial candidate region with the brightness model of a reference region to generate brightness anomaly data, thereby identifying areas of abnormal illumination. For example, after localized peeling of the hull coating, the reflected light from the underlying metal is significantly enhanced, and this unit can detect the brightness difference in a timely manner.

[0257] The texture orientation comparison unit can compare the texture orientation of candidate regions with the texture model of reference regions based on brightness anomaly data, generating texture anomaly data and thus identifying texture orientation anomalies. For example, when cracks appear in a weld, the crack orientation is often inconsistent with the original texture of the weld, and this unit can accurately mark it as an abnormal area.

[0258] The structural contour verification unit can compare the edge morphology of candidate regions with the continuity of reference regions based on texture anomaly data, generating structural anomaly data, and further verifying the authenticity of defects through geometric contour features. For example, in corrosion pit regions, the edge morphology will show irregular interruptions, which this unit can identify as structural anomalies.

[0259] The comprehensive judgment unit can perform cross-validation based on brightness anomaly data, texture anomaly data, and structural anomaly data to generate candidate defect data, thereby reducing misjudgments based on a single dimension. For example, if a region only has high brightness but continuous texture, this unit can rule out its possibility of being a defect, ensuring more accurate identification of candidate defects.

[0260] The brightness difference analysis unit specifically includes:

[0261] The candidate region sampling step is used to extract the brightness values ​​of all pixels in the initial candidate region and calculate the average brightness and brightness range to characterize the illumination characteristics of the region.

[0262] The reference model call step is used to read the pre-stored brightness model in the reference area, which contains the brightness variation range and normal distribution characteristics of the defect-free area;

[0263] The difference comparison step is used to compare the average brightness and range of the candidate region with the brightness model of the reference region. When the difference exceeds the normal fluctuation range, it is judged as a brightness abnormality.

[0264] The abnormal data generation step is used to record the judgment result as brightness abnormal data and use it as input for subsequent texture direction comparison units.

[0265] The texture orientation comparison unit specifically includes:

[0266] The texture orientation extraction step is used to extract local texture orientation information in the candidate region by the pixel grayscale change trend and form orientation distribution data;

[0267] The reference direction call step is used to read the texture model of the reference area and obtain the standard texture direction distribution of the defect-free area.

[0268] The orientation consistency analysis step is used to compare the orientation distribution of the candidate region with that of the reference region. When the orientation of the candidate region is significantly deviated or local breaks occur, it is marked as a texture anomaly.

[0269] The abnormal result output step is used to record the orientation abnormal results as texture abnormal data and pass them to the structure contour verification unit.

[0270] The structural contour verification unit specifically includes:

[0271] The edge extraction step is used to detect boundary pixels within the candidate region and form edge contour lines;

[0272] The continuity analysis step is used to compare the edge lines of the candidate region with the edge shape of the reference region. When irregular bending, breakage or missing parts of the edge are found, it is judged as a structural anomaly.

[0273] The anomaly marking step is used to mark the detected edge anomaly locations and generate structural anomaly data;

[0274] The result transmission step is used to provide structural anomaly data to the comprehensive judgment unit for multi-dimensional verification.

[0275] The comprehensive judgment unit specifically includes:

[0276] The data integration step is used to collect three types of data: brightness anomalies, texture anomalies, and structural anomalies, and to store and sort them uniformly.

[0277] The multidimensional verification step is used to analyze the spatial relationship of three types of abnormal data. When brightness abnormality, texture abnormality and structural abnormality exist in the same area at the same time, it is identified as a candidate defect area.

[0278] The weight comparison step is used to assign weights based on the importance of different anomaly types when some anomaly conditions are insufficient. For example, texture anomalies have a higher weight than brightness anomalies, ensuring the rationality of the judgment.

[0279] The result output step is used to record the finally confirmed candidate defect areas as candidate defect data and output them to the subsequent stability determination module for cross-frame verification.

[0280] In a preferred embodiment of the present invention, the fake identification unit includes:

[0281] The intra-frame consistency analysis unit is used to detect the brightness and texture consistency of the defect region in a single frame image based on the candidate defect data, and generate intra-frame consistency data.

[0282] The cross-frame disappearance determination unit is used to track the trajectory of candidate defect regions in multi-frame images based on intra-frame consistency data. When the region only appears in a single frame or a few frames, cross-frame false data is generated.

[0283] The environmental interference identification unit is used to analyze cross-frame false data and combine it with the characteristics of on-site light reflection, water marks and attachments to generate false environmental data;

[0284] The spurious defect integration unit is used to generate spurious defect data based on intra-frame consistency data, cross-frame spurious data, and environmental spurious data, and output interference samples.

[0285] In this embodiment of the invention, the intra-frame consistency analysis unit can detect the brightness and texture consistency of the defect region in a single-frame image based on candidate defect data, and generate intra-frame consistency data, thereby quickly identifying false defects within the image that match the reference region. For example, a light spot appearing in a single-frame image, whose brightness and texture are consistent with the reference region, can be identified by this unit as a false defect.

[0286] The cross-frame disappearance detection unit can track the trajectory of candidate defect regions across multiple frames of images based on intra-frame consistency data. When a region appears only in a single frame or a few frames, it generates cross-frame false data, thereby eliminating sporadic interference. For example, during drone photography, a momentary bright spot formed by water reflection may only appear in one frame, and this unit can mark it as a cross-frame false defect.

[0287] The environmental interference identification unit can analyze cross-frame false data, combined with the characteristics of light reflection, water stains, and temporary attachments at the inspection site, to generate false environmental data, thereby identifying false defects caused by external environmental factors. For example, seaweed or oil stains adhering to the hull surface during the inspection process may be mistakenly identified as defects, and this unit can identify them as false environmental defects.

[0288] The spurious defect integration unit can generate spurious defect data based on intra-frame consistency data, cross-frame spurious data, and environmental spurious data, and output interference samples. This means that spurious defects are no longer simply excluded, but are provided as interference references to the results output module. For example, in the final report, in addition to displaying the coordinates of the actual cracks, it will also indicate which areas belong to spurious defects, helping inspectors quickly identify possible environmental interference and improving the report's reference value.

[0289] The intra-frame consistency analysis unit specifically includes:

[0290] The candidate region extraction step is used to read the pixel range of the candidate defect region in a single frame image and obtain its brightness distribution and texture direction information;

[0291] The consistency calculation step is used to statistically analyze the pixel brightness changes in the candidate region to determine whether the transition remains smooth, and at the same time detect whether the texture direction is concentrated in a certain dominant direction.

[0292] An anomaly detection step is used to mark a candidate region as having a tendency to produce false defects when the brightness and texture of the candidate region are consistent with the surrounding reference region.

[0293] The data output step is used to integrate the above analysis results into intra-frame consistency data and pass it to the cross-frame disappearance determination unit.

[0294] The cross-frame disappearance determination unit specifically includes:

[0295] The trajectory tracking step is used to detect the location of candidate defect regions in consecutive image frames, and to record the disappearance of a region when it fails to be matched in an adjacent frame.

[0296] The frequency of occurrence statistics step is used to count the number of times the candidate defect region appears in the entire image sequence. When the number of occurrences is lower than a preset threshold, its stability is considered insufficient.

[0297] The false detection step is used to mark regions that appear only in a single frame or a small number of frames as cross-frame false defects;

[0298] The result generation step is used to integrate the above judgment results into cross-frame spoof data and transmit it to the environmental interference identification unit.

[0299] The environmental interference identification unit specifically includes:

[0300] The environmental feature acquisition step is used to record the light intensity, reflection, and external environmental features of the ship's surface under the conditions of the shooting location.

[0301] The false feature comparison step is used to compare cross-frame false data with environmental features. When the brightness distribution of the false defect area matches the reflected light spot, or the texture features are consistent with the characteristics of watermarks and attachments, it is confirmed that it originates from environmental interference.

[0302] Interference classification steps are used to label false defects as false lighting, false watermarks, or false attachments based on their source;

[0303] The result output step is used to record the classified false defect information as environmental false data and transmit it to the false defect integration unit.

[0304] The fake defect integration unit specifically includes:

[0305] The data integration step is used to collect false defect information from the three units and store and classify it uniformly.

[0306] The interference sample generation step is used to generate interference samples for reference based on the location, frame number, and interference type of false defects, as auxiliary information for determining real defects.

[0307] The result integration step is used to maintain the correspondence between false defect data and real defect data, so that the output results include both confirmation information of real defects and interference prompts of false defects.

[0308] The data output step is used to output false defect data to the result output module, ensuring that the test report can provide complete defect comparison information.

[0309] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A machine vision-based hull surface defect detection system, characterized in that, The system includes: The image acquisition module is used to acquire multiple frames of raw image data based on the detection trajectory of the outer plating during the hull inspection process. The image correction module is used to perform illumination equalization and geometric distortion correction based on multiple frames of original image data, forming standardized image data with uniform brightness distribution and consistent proportions. The region construction module is used to identify defect-free stable regions based on standardized image data and generate reference region data, which includes a brightness model and a texture model. The candidate generation module is used to detect regions with local texture interruptions or abnormal bright spots based on standardized image data and reference region data, and to form candidate defect data, which includes pixel positions and local contrast parameters. The stability determination module includes: The cross-frame matching unit is used to perform projection matching on multiple frames of images based on candidate defect data, calculate the positional consistency of candidate defect regions in different frames, and generate cross-frame consistency data, specifically including: In a single frame image, determine the pixel coordinates and boundary range of the candidate defect region, and use them as the initial position for projection matching; The initial position of the candidate defect region is projected onto the adjacent frame image, and pixel similarity is compared in the region near the projected position to determine the corresponding position of the defect region in the adjacent frame. The system statistically analyzes the location of regions in multiple frames of images. When a defective region can be found in multiple consecutive frames, it is determined to be in a stable position, and cross-frame consistency data is generated. The second reference comparison unit is used to jointly compare the cross-frame consistency data with the brightness model and texture model of the reference area data. When the candidate defect area persists in different frames and is inconsistent with the reference area data in both brightness distribution and texture continuity dimensions, it is determined to be a real defect area. The false identification unit is used to mark a candidate defect region as a false defect region and generate false defect data when the candidate defect region appears only in a single frame or a few frames during the comparison process and is consistent with the reference region data in terms of brightness distribution or texture continuity. The defect confirmation unit is used to generate real defect data based on the location and shape of the real defect area and the interference prompts provided by the false defect data, and output the real defect data and the false defect data together. The results output module is used to generate detection results, including defect coordinates, defect contours, image frame numbers, and interference sample prompts, based on real defect data and corresponding fake defect data.

2. The machine vision-based hull surface defect detection system according to claim 1, characterized in that, The image correction module includes: The illumination segment equalization unit is used to divide the entire image into multiple brightness intervals based on multiple frames of original image data, and independently perform histogram equalization processing in each interval to eliminate uneven brightness caused by local light source differences and generate brightness-balanced image data. The edge distortion analysis unit is used to perform geometric contour detection on the edge region of the image based on the brightness equalization image data, identify the stretching or compression region caused by camera tilt and lens distortion, and generate distortion region localization data. The local geometric correction unit is used to perform pixel-by-pixel interpolation correction on the corresponding region based on the distortion region location data, so that the local proportion is consistent with the overall proportion, and to generate local corrected image data. The global consistency fusion unit is used to perform weighted fusion of brightness-equalized image data and locally corrected image data to generate standardized image data with uniform brightness distribution and consistent geometric proportions.

3. The machine vision-based hull surface defect detection system according to claim 1, characterized in that, The region construction module includes: The texture continuity detection unit is used to calculate the orientation consistency of textures in different detection blocks based on standardized image data. When the texture orientation remains stable and uninterrupted, the detection block is marked as a candidate stable region. The brightness fluctuation analysis unit is used to extract the brightness variation range within the candidate stable region and generate a brightness model that can characterize the illumination distribution characteristics of the defect-free region. The texture orientation modeling unit is used to extract the texture orientation distribution in the candidate stable region and fit the texture orientation to form a texture model that can characterize the structural characteristics of the defect-free region. The reference region binding unit is used to bind and store the brightness model and texture model to form reference region data.

4. The machine vision-based hull surface defect detection system according to claim 1, characterized in that, The candidate generation module includes: The local anomaly detection unit is used to analyze the gray-level continuity of local areas based on standardized image data. When a sudden change in gray level or an abnormally high brightness point occurs, the area is marked as an initial candidate area. The first reference comparison unit is used to compare the initial candidate region with the reference region data. When the brightness range of the candidate region exceeds the brightness model of the reference region, or the texture direction of the candidate region is inconsistent with the texture model of the reference region, the candidate region is determined as a candidate defect region. The feature parameter extraction unit is used to extract pixel position, texture interruption features and local contrast parameters in the candidate defect region to form candidate defect data containing multi-dimensional features.

5. The machine vision-based hull surface defect detection system according to claim 2, characterized in that, The illumination segment equalization unit includes: The brightness partition generation unit is used to calculate the brightness gradient based on the brightness distribution of multiple frames of original image data, divide the entire image into multiple brightness sub-regions, and generate brightness sub-region data. The partitioned independent equalization unit is used to perform grayscale statistics and histogram stretching processing in each sub-region based on the brightness sub-region data to generate local equalization data. The boundary smoothing processing unit is used to perform brightness transition smoothing on the boundary regions of adjacent sub-regions based on local equalization data, and generate smooth transition data. The dynamic adaptive unit is used to monitor real-time changes in illumination conditions based on smooth transition data, dynamically adjust the sub-region division threshold, and regenerate the equalization result to obtain brightness-equalized image data.

6. The machine vision-based hull surface defect detection system according to claim 2, characterized in that, The edge distortion analysis unit includes: The contour feature extraction unit is used to extract the direction, length, and curvature features of edge line segments based on the brightness equalization image data, and generate edge feature data; The distortion detection unit is used to compare edge features with standard geometric proportions based on edge feature data, identify areas of abnormal stretching or compression, and generate distortion localization data. The regional classification unit is used to divide the distorted region into a slightly distorted region and a severely distorted region based on the distortion localization data, and generate distortion classification data. The distortion parameter generation unit is used to extract the orientation deviation and geometric proportional distortion rate from the distortion classification data and generate distortion parameter data.

7. The machine vision-based hull surface defect detection system according to claim 2, characterized in that, The local geometry correction unit includes: The pixel interpolation correction unit is used to perform pixel-by-pixel interpolation on the distorted pixels in the distorted region based on the distortion parameter data, and generate preliminary correction data. The local proportion adjustment unit is used to adjust the geometric proportions of local areas based on the preliminary correction data, so that the local aspect ratio is consistent with the overall image, and generate local consistency data. The boundary transition balancing unit is used to balance the boundary between the corrected and uncorrected regions based on local consistency data, generating boundary smoothing data. The iterative optimization unit is used to repeatedly perform interpolation correction and scaling adjustment based on the boundary smoothing data until the geometric error is less than the threshold, generating the final corrected image data.

8. The machine vision-based hull surface defect detection system according to claim 4, characterized in that, The reference comparison unit includes: The brightness difference analysis unit is used to compare the brightness distribution of the initial candidate region data with the brightness model of the reference region to generate brightness anomaly data; The texture orientation comparison unit is used to compare the texture orientation of the candidate region with the texture model of the reference region based on the brightness anomaly data, and generate texture anomaly data. The structural contour verification unit is used to compare the edge morphology of the candidate region with the continuity of the reference region based on the texture anomaly data, and generate structural anomaly data. The comprehensive judgment unit is used to perform cross-validation based on brightness anomaly data, texture anomaly data, and structural anomaly data to generate candidate defect data.

9. The machine vision-based hull surface defect detection system according to claim 1, characterized in that, The fake identification unit includes: The intra-frame consistency analysis unit is used to detect the brightness and texture consistency of the defect region in a single frame image based on the candidate defect data, and generate intra-frame consistency data. The cross-frame disappearance determination unit is used to track the trajectory of candidate defect regions in multi-frame images based on intra-frame consistency data. When the region only appears in a single frame or a few frames, cross-frame false data is generated. The environmental interference identification unit is used to analyze cross-frame false data and combine it with the characteristics of on-site light reflection, water marks and attachments to generate false environmental data; The spurious defect integration unit is used to generate spurious defect data based on intra-frame consistency data, cross-frame spurious data, and environmental spurious data, and output interference samples.

Citation Information

Patent Citations

  • Mobile phone appearance detection system and method based on visual identification

    CN119672449A

  • KR20240049958A