Hull surface defect detection system based on machine vision
By collecting multiple frames of images of the hull surface for illumination balance and geometric distortion correction, combined with multi-dimensional comparison of brightness and texture models, the problem of misjudgment caused by perspective distortion and uneven illumination in machine vision inspection is solved, achieving efficient and accurate hull defect detection.
Patent Information
- Application Number
- CN202511311015.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-15
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2045-09-15
AI Technical Summary
The existing machine vision-based ship surface defect detection system is prone to misjudging the normal gloss texture of the weld edge as a crack defect due to perspective distortion and uneven lighting under large-scale, irregular surface and moving shooting conditions, reducing the accuracy and efficiency of automated detection.
By collecting multi-frame image data, performing illumination balancing and geometric distortion correction, building brightness and texture models, and combining 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.
It effectively overcomes the problems of viewing angle distortion and uneven lighting, improves the accuracy and automation of defect detection, reduces the misjudgment rate, and provides reliable inspection report support.
Smart Images

Figure CN120807528A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, in particular to a hull surface defect detection system based on machine vision. BACKGROUND
[0002] In the prior art, the detection of hull surface defects has gradually adopted machine vision methods to replace manual detection. Such methods usually involve laying industrial cameras on the dock or production line to capture hull surface images, and then combining classification or segmentation models such as convolutional neural networks (CNN) and support vector machines (SVM) to achieve automatic recognition of defects such as cracks, paint peeling, and corrosion pits. For example, in the quality detection stage before painting the hull, researchers use semantic segmentation networks based on deep learning to perform pixel-level labeling on large-area hull surface images, thereby reducing manual inspection to some extent and improving the consistency and efficiency of detection.
[0003] However, in actual application scenarios, the existing detection system based on machine vision still has certain technical defects. Taking hull plate weld detection as an example, due to the large size of the hull, the camera usually needs to be moved by a track car or a drone for shooting, resulting in obvious scale changes and perspective distortions in the images. If the detection model is only trained under small sample and fixed perspective conditions, its recognition ability for large-area irregular curved surfaces will significantly decrease, and it is easy to misjudge the normal luster texture of the weld edge as a crack defect. Such misjudgment is not uncommon in batch detection at shipyards, and engineering personnel often need to perform manual secondary screening of the detection results, which not only reduces the degree of automation but also makes the advantages of machine vision detection less effective in large-scale applications. SUMMARY
[0004] The purpose of the present application is to provide a hull surface defect detection system based on machine vision, which aims to solve the problems mentioned in the background.
[0005] To solve the above technical problems, the technical solution of the present application is as follows: The hull surface defect detection system based on machine vision comprises: An image acquisition module for acquiring multiple frames of original image data according to the detection trajectory of the hull plate during hull detection; An image correction module for performing illumination equalization processing and geometric distortion correction on the multiple frames of original image data to form standardized image data with uniform brightness distribution and consistent proportions; A region construction module for identifying stable regions without defects from the standardized image data and generating reference region data, wherein the reference region data includes a brightness model and a texture model; a candidate generation module configured to detect a region with local texture interruption or abnormal bright spot from the standardized image data and the reference region data, and form candidate defect data including pixel position and local contrast parameter; a stability determination module configured to perform projection matching in multiple frames of images according to the candidate defect data, and simultaneously perform joint comparison with a brightness model and a texture model of the reference region data, form real defect data when the candidate defect continuously exists in different frames and is inconsistent with the reference region in both brightness distribution and texture continuity dimensions, form false defect data when the candidate defect only appears in a single frame or a small number of frames and is consistent with the reference region data, and store the false defect data as interference samples; a result output module configured to generate a detection result including defect coordinates, defect contour, image frame number, and interference sample prompt according to the real defect data and corresponding false defect data.
[0006] Preferably, the image correction module comprises: an illumination segmentation and equalization unit configured to divide the entire image into multiple brightness intervals according to the multiple frames of original image data, and perform histogram equalization processing independently in each interval to eliminate uneven brightness caused by local light source difference, and generate brightness equalized image data; an edge distortion analysis unit configured to perform geometric contour detection on the image edge region according to the brightness equalized image data, identify stretched or compressed regions caused by camera tilt and lens distortion, and generate distortion region positioning data; a local geometric correction unit configured to perform pixel-by-pixel interpolation correction on the corresponding region according to the distortion region positioning data, so that the local scale is consistent with the overall scale, and generate local corrected image data; a global consistent fusion unit configured to perform weight fusion on the brightness equalized image data and the local corrected image data, and generate standardized image data with uniform brightness distribution and consistent geometric scale.
[0007] Preferably, the region construction module comprises: a texture continuity detection unit configured to perform direction consistency calculation on the texture of different detection blocks according to the standardized image data, and mark the detection block as a candidate stable region when the texture direction remains stable and uninterrupted; a brightness fluctuation analysis unit configured to extract the brightness variation range in the candidate stable region, and generate a brightness model capable of representing the illumination distribution characteristics of the defect-free region; a texture direction modeling unit configured to extract the texture direction distribution in the candidate stable region, and fit the texture direction to form a texture model capable of representing the structure characteristics of the defect-free region; The reference region binding unit is configured to bind and store the brightness model and the texture model to form reference region data.
[0008] Preferably, the candidate generation module comprises: The local anomaly detection unit is configured to analyze the gray level continuity of the local region according to the normalized image data, and mark the region as an initial candidate region when a gray level mutation or an abnormally high brightness point occurs. The first reference comparison unit is configured to compare the initial candidate region with the reference region data, and determine the candidate region as a candidate defect region 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 feature parameter extraction unit is configured to extract a pixel position, a texture interruption feature and a local contrast parameter in the candidate defect region to form candidate defect data containing multi-dimensional features.
[0009] Preferably, the stability determination module comprises: The cross-frame matching unit is configured to perform projection matching in multiple frames of image according to the candidate defect data, calculate the position consistency of the candidate defect region in different frames, and generate cross-frame consistency data. The second reference comparison unit is configured to jointly compare the cross-frame consistency data with the brightness model and the texture model of the reference region data respectively, and determine the candidate defect region as a real defect region when the candidate defect region continuously exists in different frames and is inconsistent with the reference region data in both the brightness distribution and the texture continuity dimensions. The false identification unit is configured to mark the candidate defect region as a false defect region and generate false defect data when the candidate defect region only appears in a single frame or a small number of frames and is consistent with the reference region data in the brightness distribution or the texture continuity during the comparison process. The defect confirmation unit is configured to generate real defect data according to the position and shape of the real defect region and the interference prompt provided by the false defect data, and output the real defect data together with the false defect data.
[0010] Preferably, the light illumination segmentation and equalization unit comprises: The brightness partition generation unit is configured to perform brightness gradient calculation according to the brightness distribution of the multiple frames of original image data, divide the whole image into multiple brightness sub-regions, and generate brightness sub-region data. The partition independent equalization unit is configured to perform gray level statistics and histogram stretching processing in each sub-region according to the brightness sub-region data to generate local equalization data. The boundary smoothing processing unit is configured to perform brightness transition smoothing on the boundary region of adjacent sub-regions according to the local equalization data to generate smooth transition data. A dynamic self-adaptive unit is configured to monitor real-time changes in the lighting condition according to the smooth transition data, dynamically adjust the sub-region division threshold, and regenerate the equalization result to obtain the brightness equalization image data.
[0011] Preferably, the edge distortion analysis unit comprises: A contour feature extraction unit is configured to extract the direction, length, and curvature features of the edge line segment according to the brightness equalization image data, and generate edge feature data. A distortion detection unit is configured to compare the edge features with the standard geometric proportion according to the edge feature data, identify the areas of abnormal stretching or compression, and generate distortion positioning data. A region level division unit is configured to divide the distortion area into a mild distortion area and a severe distortion area according to the distortion positioning data, and generate distortion classification data. A distortion parameter generation unit is configured to extract the direction deviation and geometric distortion rate according to the distortion classification data, and generate distortion parameter data.
[0012] Preferably, the local geometric correction unit comprises: A pixel interpolation correction unit is configured to perform pixel-by-pixel interpolation processing on the distorted pixels in the distortion area according to the distortion parameter data, and generate preliminary correction data. A local proportion adjustment unit is configured to adjust the geometric proportion of the local area according to the preliminary correction data, so that the local width-height proportion is consistent with the overall image, and generate local consistency data. A boundary transition balancing unit is configured to balance the boundary between the corrected area and the uncorrected area according to the local consistency data, and generate boundary smoothing data. An iterative optimization unit is configured to repeatedly perform interpolation correction and proportion adjustment according to the boundary smoothing data until the geometric error is less than a threshold, and generate final correction image data.
[0013] Preferably, the reference comparison unit comprises: A brightness difference analysis unit is configured to compare the brightness distribution of the initial candidate area data with the brightness model of the reference area, and generate brightness anomaly data. A texture direction comparison unit is configured to compare the texture direction of the candidate area with the texture model of the reference area according to the brightness anomaly data, and generate texture anomaly data. A structure contour verification unit is configured to compare the edge morphology of the candidate area with the continuity of the reference area according to the texture anomaly data, and generate structure anomaly data. A comprehensive judgment unit is configured to cross-verify the brightness anomaly data, the texture anomaly data, and the structure anomaly data, and generate candidate defect data.
[0014] Preferably, the false recognition unit comprises: an intra-frame consistency analysis unit configured to detect the brightness and texture consistency of the defect region in a single frame image according to the candidate defect data, and generate intra-frame consistency data; a cross-frame disappearance determination unit configured to track the trajectory of the candidate defect region in multiple frames of images according to the intra-frame consistency data, and generate cross-frame false data when the region only appears in a single frame or a small number of frames; an environmental interference recognition unit configured to analyze the characteristics of on-site light reflection, water marks and attachments according to the cross-frame false data, and generate environmental false data; a false defect integration unit configured to generate false defect data according to the intra-frame consistency data, the cross-frame false data and the environmental false data, and output interference samples.
[0015] The above scheme of the present application at least includes the following beneficial effects: Firstly, by collecting multiple frames of original images during the hull detection process and performing light equalization and geometric distortion correction in the image correction module, the consistency of the input images in brightness distribution and geometric proportion is ensured, thereby effectively overcoming the problems of perspective distortion and uneven light caused by large-scale, irregular curved surfaces and mobile shooting in the prior art.
[0016] Secondly, the reference region data containing the brightness model and the texture model is generated by the region construction module, so that the defect detection has dual control criteria, can distinguish the normal luster texture of the weld edge from the real crack, and effectively reduces the misjudgment rate caused by single feature dependence in the prior art.
[0017] Thirdly, through the hierarchical processing mechanism of the candidate generation module and the stability determination module, potential abnormalities are first screened, and then combined with multi-frame projection matching and brightness-texture joint comparison, the real defects and false defects can be distinguished, and the false defects are stored as interference samples, thereby avoiding artificial secondary screening, improving the degree of automation of detection and the credibility of the detection results.
[0018] Finally, the detection results containing defect coordinates, defect contours, image frame numbers and interference sample prompts are generated by the result output module, not only providing visual defect information, but also providing support for engineers to quickly locate and exclude false defects in large-scale detection scenarios, significantly improving the detection efficiency and application value. BRIEF DESCRIPTION OF DRAWINGS
[0019] Figure 1 is the architecture diagram of the ship surface defect detection system based on machine vision provided by the embodiment of the present application. DETAILED DESCRIPTION
[0020] Exemplary embodiments of the present disclosure will be described in greater detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it is understood that the present disclosure can be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided so that the present disclosure can be thoroughly understood, and so that the scope of the present disclosure can be completely conveyed to those skilled in the art.
[0021] As shown in Figure 1 An embodiment of the present application proposes a ship hull surface defect detection system based on machine vision, which comprises: An image acquisition module is configured to acquire a plurality of original image data along a detection trajectory of the ship hull plating during the detection of the ship hull; An image correction module is configured to perform illumination equalization processing and geometric distortion correction based on the plurality of original image data to form standardized image data with uniform brightness distribution and consistent proportions; A region construction module is configured to identify a stable region without defects based on the standardized image data, and generate reference region data, wherein the reference region data comprises a brightness model and a texture model; A candidate generation module is configured to detect a region with local texture interruption or abnormal bright spots based on the standardized image data and the reference region data, and form candidate defect data, wherein the candidate defect data comprises a pixel position and a local contrast parameter; A stability determination module is configured to perform projection matching in multiple images based on the candidate defect data, and simultaneously perform joint comparison with the brightness model and the texture model of the reference region data, when the candidate defect continuously exists in different frames and is inconsistent with the reference region in both brightness distribution and texture continuity dimensions, form real defect data, when the candidate defect only appears in a single frame or a small number of frames and is consistent with the reference region data, form false defect data, and store the false defect data as interference samples; A result output module is configured to generate a detection result comprising defect coordinates, defect contours, image frame numbers, and interference sample prompts based on the real defect data and the corresponding false defect data.
[0022] In an embodiment of the present application, the image acquisition module is configured to acquire a plurality of original image data along a detection trajectory of the ship hull plating during the detection of the ship hull. Compared with the traditional single-frame acquisition method, a large area can be covered and detailed information under different angles can be retained, thereby ensuring that the subsequent processing has sufficient input data. For example, in large-scale ship hull weld detection, multi-frame acquisition can record both bright and shadow areas, providing comprehensive image conditions for subsequent processing.
[0023] The image correction module can perform light balance processing and geometric distortion correction on the multi-frame original image data, so that the standardized image data with uniform brightness distribution and consistent proportion is formed, thereby solving the picture distortion problem caused by uneven field illumination and camera shooting angle. For example, under the condition of strong light direct reflection in the dock, the uncorrected image will appear overexposure and stretching phenomenon, while the corrected image can ensure clear edge profile and overall brightness balance.
[0024] The region construction module can identify the stable region without defects in the standardized image data, and generate reference region data including brightness model and texture model, so that the subsequent detection has a clear reference standard, thereby avoiding misjudgment caused by global without reference. For example, in the ship body region with complete coating, stable light and texture distribution model can be formed to provide reference for abnormal region determination.
[0025] The candidate generation module can detect the region with local texture interruption or abnormal bright spot according to the standardized image data and the reference region data, form the candidate defect data containing pixel position and local contrast parameter, and realize the automatic marking of potential cracks, corrosion spots or coating peeling. For example, when a small crack appears in the weld edge region, the module can identify it as a candidate defect region through local contrast anomaly.
[0026] The stability determination module can project and match the candidate defect data in multiple frames of images, and simultaneously compare with the brightness model and texture model of the reference region data, so as to improve the accuracy of defect recognition in multiple dimensions. When the candidate defect continuously exists in different frames and is inconsistent with the reference region in both brightness distribution and texture continuity dimensions, it forms real defect data; when the candidate defect only appears in a single frame or a small number of frames and is consistent with the reference region data, it forms false defect data and is stored as interference sample, thereby realizing the identification and utilization of false defects. For example, in the local bright spot caused by seawater reflection, the module can identify that it is only a single frame phenomenon, and store it as a false defect to avoid repeated misjudgment.
[0027] The result output module can generate detection results containing defect coordinates, defect contour, image frame number and interference sample prompt according to the real defect data and the corresponding false defect data, so that the output results can reflect the position and shape of the real defect, and also provide the interference prompt of the false defect, thereby providing more valuable detection information for ship maintenance personnel. For example, in the output report, the specific coordinates of the crack defect can be marked, and it can be prompted which regions are false defects caused by light reflection, thereby reducing the review workload of maintenance personnel.
[0028] The image acquisition module is configured to acquire a plurality of original image data according to a detection track of the hull plate during hull detection, and specifically includes: The camera arrangement step is configured to install an industrial camera on a mobile carrier, which can be a track detection vehicle or a drone, on a dock or a production line, and preset a shooting path according to a curved surface profile of the hull plate, so as to ensure that the shooting track covers the full surface of the to-be-detected area. The image acquisition step is configured to continuously acquire images at a fixed frame rate during the operation of the mobile carrier, to form a plurality of original image data, each frame of image corresponding to a different angle and a local area of the hull surface, thereby forming a continuous record in space and time. The parameter adjustment step is configured to dynamically adjust the focal length, exposure time and aperture size of the camera during the image acquisition process, so that the acquired images maintain consistent sharpness under different lighting and different distance conditions, and the shooting parameters are recorded by the controller for subsequent correction processing. The position information binding step is configured to bind the plurality of original image data with the motion position and angle information of the carrier, to form an image sequence with spatial coordinates, thereby ensuring that the subsequent defect position can be accurately positioned on the hull surface.
[0029] The result output module is configured to generate a detection result containing defect coordinates, defect contours, image frame numbers and interference sample prompts according to the real defect data and the corresponding false defect data, and specifically includes: The result integration step is configured to receive the real defect data and the false defect data output by the stability determination module, and correspond the two according to the detection time sequence and the image frame number, to form a defect result set to be output; The defect labeling step is configured to generate detection labeling information for each real defect data in the result set, the detection labeling information including a coordinate point set of the defect area, a contour shape and a number of the image frame in which the defect area is located, thereby ensuring that each defect has traceability; The false defect prompting step is configured to generate an interference prompt for the false defect data in the result set, the interference prompt including an image frame number in which the false defect is located and a corresponding interference type (such as light reflection, water mark or attachment, etc.), so that the detection personnel can quickly identify the source of the non-real defect; The report generation step is configured to generate a detection result report according to the defect labeling information and the interference prompt, the report can be in the form of image superimposed labeling or in the form of a word list, thereby providing direct reference for subsequent hull maintenance and repair.
[0030] In a preferred embodiment of the present application, the image correction module includes: The illumination segmentation and equalization unit is configured to divide the whole image into multiple luminance intervals according to the multi-frame original image data, and perform histogram equalization processing independently in each interval to eliminate uneven brightness caused by local light source differences, and generate luminance equalization image data. The edge distortion analysis unit is configured to perform geometric contour detection on the image edge region according to the luminance equalization image data, identify stretching or compression regions caused by camera tilt and lens distortion, and generate distortion region positioning data. The local geometric correction unit is configured to perform pixel-by-pixel interpolation correction on the corresponding region according to the distortion region positioning data, so that the local scale is consistent with the overall scale, and generate local correction image data. The global consistent fusion unit is configured to perform weight fusion on the luminance equalization image data and the local correction image data, and generate standardized image data with uniform luminance distribution and consistent geometric scale.
[0031] In the embodiment of the present application, the illumination segmentation and equalization unit can divide the whole image into multiple luminance intervals according to the multi-frame original image data, and perform histogram equalization processing independently in each interval, thereby effectively eliminating uneven brightness caused by local light source differences, enhancing dark details, and suppressing overly bright regions, to obtain luminance equalization image data. For example, in a dock environment, there may be strong light irradiation near the deck, while the bottom of the ship is insufficiently illuminated. After processing by the unit, the luminance transition of the whole image is smoother, facilitating subsequent defect analysis.
[0032] The edge distortion analysis unit can perform geometric contour detection on the image edge region based on the luminance equalization image data, identify stretching and compression caused by camera tilt or lens distortion, and generate distortion region positioning data, thereby ensuring the true restoration of the hull edge structure. For example, when photographing a curved surface of a ship, bending deformation may occur at the image edge. The unit can identify the deformation region to provide a basis for correction processing.
[0033] The local geometric correction unit can perform pixel-by-pixel interpolation correction on the corresponding region according to the distortion region positioning data, so that the local scale is consistent with the overall scale, thereby ensuring the accuracy of local detection. For example, in the position of a curved surface weld of a ship, the weld width is no longer stretched or compressed after correction, facilitating accurate identification of cracks.
[0034] The global consistent fusion unit can perform weight fusion on the luminance equalization image data and the local correction image data, thereby generating standardized image data with uniform luminance distribution and consistent geometric scale, providing a clear and stable image basis for subsequent region construction modules. For example, in an image that has both strong light regions and distortion regions, the whole image maintains consistent visual effects after fusion processing, improving detection reliability.
[0035] The global consistency fusion unit is configured to perform weighted fusion of the brightness equalization image data and the local correction image data to generate standardized image data with uniform brightness distribution and consistent geometric proportion, and specifically includes: The image alignment step is configured to perform registration according to corresponding feature points in the local correction image data and the brightness equalization image data, and align the two types of images in spatial position to ensure that the same position pixels have a corresponding relationship in subsequent fusion. The weight distribution step is configured to distribute 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, wherein the weight of the brightness equalization image data is increased for regions with significant illumination difference, and the weight of the local correction image data is increased for regions with severe geometric distortion. The pixel fusion step is configured to perform weighted fusion of the data of the two types of images at each pixel point according to the distributed weights to generate fused pixel values, thereby maintaining overall brightness consistency and correcting local distortion. The consistency detection step is configured to perform global consistency detection on the fused image to analyze whether the brightness distribution and geometric proportion meet the requirements of equalization and consistency, and when the detection result does not meet the requirements, automatically adjust the weight distribution and repeat the fusion until the standardized image data is obtained.
[0036] In a preferred embodiment of the present application, the region construction module includes: The texture continuity detection unit is configured to perform consistency calculation on the texture direction of different detection blocks according to the standardized image data, and mark the detection block as a candidate stable region when the texture direction remains stable and uninterrupted. The brightness fluctuation analysis unit is configured to extract a brightness change range in the candidate stable region to generate a brightness model capable of representing the illumination distribution characteristics of the defect-free region. The texture direction modeling unit is configured to extract the texture direction distribution in the candidate stable region and fit the texture direction to form a texture model capable of representing the structure characteristics of the defect-free region. The reference region binding unit is configured to bind and store the brightness model and the texture model to form reference region data.
[0037] In the embodiment of the present application, the texture continuity detection unit can perform consistency calculation on the texture direction of different detection blocks according to the standardized image data, thereby identifying regions with stable and uninterrupted texture direction and marking them as candidate stable regions to ensure the reliability of the selection of the reference region. For example, in a region with complete ship body surface coating, the texture is continuous and regular, and the unit can identify this region as a candidate stable region.
[0038] The luminance fluctuation analysis unit can extract the luminance variation range in the candidate stable region, generate a luminance model capable of representing the illumination distribution characteristics of the defect-free region, and thus provide a reference for subsequent comparison in the illumination dimension. For example, in a region of a ship's outer plate uniformly covered with paint, the luminance distribution is relatively smooth, and the luminance model generated by the unit can reflect the normal illumination range of the region.
[0039] The texture direction modeling unit can extract the texture direction distribution in the candidate stable region, and fit the texture direction to form a texture model capable of representing the structure characteristics of the defect-free region, thereby providing a reference for defect comparison in the structure dimension. For example, in a regular weld region, the texture presents a consistent linear distribution, and the unit can establish a texture direction model to provide a reference for detecting cracks.
[0040] The reference region binding unit can bind and store the luminance model and the texture model to form complete reference region data, thereby ensuring that the subsequent detection module has a reference standard in multiple dimensions. For example, in the detection process, the reference region data can provide a reference for comparison in both the luminance and texture dimensions, making the abnormality determination more accurate.
[0041] The texture continuity detection unit is configured to perform direction consistency calculation on the texture of different detection blocks according to the standardized image data, and mark the detection block as a candidate stable region when the texture direction remains stable and uninterrupted. Specifically, the texture continuity detection unit comprises: The image blocking step is configured to divide the standardized image data into a plurality of detection blocks, each detection block containing a certain number of pixel regions, so as to analyze the texture features in a local range; The texture feature extraction step is configured to extract the direction and intensity of the pixel gray scale variation in each detection block to form direction feature data, which is used to represent the local trend of the texture; The consistency analysis step is configured to statistically analyze the concentration of the pixel direction in the detection block according to the direction feature data, and determine that the texture continuity is high when the pixel direction is concentrated and no obvious mutation occurs; The interruption detection step is configured to further detect whether there is a direction mutation or a gray scale mutation on the basis of the consistency analysis, and determine that the texture continuity of the detection block is interrupted when there is a large amplitude of direction inconsistency or a significant break; The candidate region marking step is configured to mark the detection block as a candidate stable region and output it to the subsequent luminance fluctuation analysis unit when the direction of the detection block is consistent and no mutation occurs according to the consistency analysis and interruption detection results.
[0042] The luminance fluctuation analysis unit is configured to extract the luminance variation range in the candidate stable region, and generate a luminance model capable of representing the illumination distribution characteristics of the defect-free region. Specifically, the luminance fluctuation analysis unit comprises: A candidate region decomposition step is used to divide the candidate stable region into several sub-regions so as to statistically analyze and study the brightness variation in a local range; A brightness feature collection step is used to read the pixel gray value in each sub-region and obtain the average brightness, maximum brightness and minimum brightness of the sub-region by statistical method, so as to reflect the local brightness distribution; A fluctuation range calculation step is used to calculate the brightness variation amplitude according to the brightness feature of the sub-region, that is, to use the difference between the maximum value and the minimum value to represent the fluctuation of the sub-region, and to obtain the brightness fluctuation range of the whole candidate stable region by integrating the fluctuation of all sub-regions; A model generation step is used to bind the brightness fluctuation range and the brightness distribution feature to generate a brightness model, which can be used to describe the normal brightness variation range of the defect-free region under different illumination conditions and serve as reference data for subsequent defect comparison.
[0043] The texture direction modeling unit is used to extract the texture direction distribution in the candidate stable region and fit the texture direction to form a texture model capable of representing the structural characteristics of the defect-free region, and specifically includes: A direction feature extraction step is used to extract the direction feature of the pixel gray value variation in the candidate stable region and take the local gradient direction as the description basis of the texture direction; A direction aggregation step is used to statistically aggregate the direction features of all pixels in the region to obtain the main texture direction distribution of the region and eliminate the scattered noise direction features; A direction fitting step is used to fit a dominant direction according to the aggregated direction distribution and quantitatively represent the stability of the texture direction, and when the directions of most pixels are concentrated in the same dominant direction, it indicates that the texture continuity of the region is good; A model generation step is used to combine the fitted dominant direction and the stability index of the direction distribution to generate a texture model, which is used to describe the direction feature of the defect-free region and provide a structural reference for subsequent defect comparison.
[0044] In a preferred embodiment of the present application, the candidate generation module includes: A local anomaly detection unit is used to analyze the gray continuity of the local region according to the normalized image data, and when a gray mutation or a brightness anomaly high point occurs, the region is marked as an initial candidate region; A first reference comparison unit is used to compare the initial candidate region with the reference region data, and 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 configured to extract pixel position, texture interruption feature and local contrast parameter in the candidate defect region to form candidate defect data containing multi-dimensional features.
[0045] In the embodiment, the local anomaly detection unit is configured to analyze the gray level continuity of the local region according to the standardized image data, and mark the region as an initial candidate region when a gray level mutation or a brightness anomaly high point occurs, so that the potential defect position can be quickly screened out. For example, when the paint peeling occurs on the surface of the ship body, the local brightness will suddenly increase, and the unit can mark it as an initial candidate region.
[0046] The first reference comparison unit is configured to compare the initial candidate region with the reference region data, and determine the candidate region as a candidate defect region 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, so that the normal region is effectively avoided from being marked as a defect. For example, in the strong light reflection region, although the brightness is high, the texture direction is consistent with the reference region, and the unit will exclude the possibility of defect.
[0047] The feature parameter extraction unit is configured to extract pixel position, texture interruption feature and local contrast parameter in the candidate defect region to form candidate defect data containing multi-dimensional features, so as to provide rich information for subsequent stability judgment. For example, in the small crack region of the weld, the unit can not only record the crack position, but also extract the contrast difference and texture interruption feature on both sides of the crack to provide data support for accurate judgment.
[0048] The local anomaly detection unit is configured to analyze the gray level continuity of the local region according to the standardized image data, and mark the region as an initial candidate region when a gray level mutation or a brightness anomaly high point occurs, and specifically includes: The image blocking step is configured to divide the standardized image data into a plurality of local detection blocks according to a preset size, so as to ensure independent analysis of brightness and gray level change in a local scale; The gray level feature extraction step is configured to read the gray level values of all pixel points in each local detection block, and obtain the average gray level value and the gray level difference of adjacent pixels by statistical method, which is used to reflect the gray level distribution of the region; The continuity analysis step is configured to judge whether the gray level difference between pixels is within a normal range according to the gray level feature, and determine that the gray level change is flat when the gray level change is flat, and determine that the gray level change is a gray level mutation region when a large amplitude gray level jump occurs; The anomaly recognition step is configured to further detect whether there is a point with brightness value much higher than the surrounding pixels on the basis of the continuity analysis, and identify it as a brightness anomaly high point when the phenomenon occurs; An initial candidate generation step is used to mark the gray scale mutation region or the brightness abnormally high point region as an initial candidate region, and use it as input data for subsequent reference comparison.
[0049] The feature parameter extraction unit is configured to extract pixel positions, texture interruption features, and local contrast parameters in the candidate defect region to form candidate defect data containing multi-dimensional features. A pixel position extraction step is used to determine the coordinate information of all boundary pixels in the candidate defect region and generate a coordinate point set for subsequent positioning and contour marking of the defect morphology. A texture interruption detection step is used to analyze the continuity and direction consistency of pixel gray scale in the candidate defect region, and when there is an obvious direction interruption or local gray scale distribution discontinuity, the interruption feature is recorded and texture abnormality description data is formed. A contrast calculation step is used to respectively calculate the average brightness values between the candidate defect region and its surrounding normal region, and the local contrast level is represented by the difference between the two, thereby reflecting the difference degree between the defect region and the background. A feature integration step is used to integrate the pixel position, texture abnormality description data, and local contrast level to form candidate defect data, which is used as input for the stability determination module for subsequent cross-frame verification and real defect confirmation.
[0050] In a preferred embodiment of the present application, the stability determination module comprises: A cross-frame matching unit is used to perform projection matching in multiple frames according to the candidate defect data, calculate the position consistency of the candidate defect region in different frames, and generate cross-frame consistency data. A second reference comparison unit is used to jointly compare the cross-frame consistency data with the brightness model and texture model of the reference region data, and when the candidate defect region continuously exists in different frames and is inconsistent with the reference region data in both brightness distribution and texture continuity dimensions, it is determined as a real defect region. A false identification unit is used to mark the candidate defect region as a false defect region when it only appears in a single frame or a small number of frames and is consistent with the reference region data in brightness distribution or texture continuity during the comparison process, and generate false defect data. A defect confirmation unit is used to generate real defect data according to the position and morphology of the real defect region, combined with the interference prompt provided by the false defect data, and output the real defect data together with the false defect data.
[0051] In the embodiment of the present application, the cross-frame matching unit can perform projection matching in multiple frames of images according to the candidate defect data, and calculate the position consistency of the candidate defect region in different frames, so as to identify the stability of the defect in the time sequence. For example, when a UAV moves along the hull for detection, if a certain weld crack appears at the same position in multiple consecutive frames, the unit can confirm that it is a real defect sign.
[0052] The second reference comparison unit can jointly compare the cross-frame consistency data with the brightness model and the texture model of the reference region data, so as to verify the defect region in both brightness and texture dimensions, and improve the accuracy of the determination. For example, when a bright spot appears on the surface of the ship due to light reflection, it may not be consistent with the reference model in brightness, but it still maintains continuity in texture. At this time, the unit can avoid mistakenly determining it as a defect.
[0053] The false identification unit can mark the 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 small number of frames and is consistent with the reference region data in terms of brightness distribution or texture continuity during the comparison process, so as to effectively reduce the misjudgment caused by incidental light changes or sea surface wave light. For example, the unit can identify and store a temporary water mark reflection appearing in a certain frame of image as a false defect.
[0054] The defect confirmation unit can generate real defect data and output it together with false defect data to form a complete defect determination result while confirming the real defect region in combination with the interference prompt provided by the false defect data. For example, in the final detection report, not only the coordinates and outline of the crack will be marked, but also the regions belonging to false defects will be prompted, which helps maintenance personnel quickly filter out interference information.
[0055] The cross-frame matching unit specifically includes: The candidate region positioning step is configured to determine the pixel coordinates and boundary range of the candidate defect region in a single frame of image, and use the same as the initial position for projection matching; The inter-frame projection step is configured to project the coordinate range of the candidate defect region to an adjacent frame of image, and perform pixel similarity comparison in the vicinity of the projection position, so as to determine the corresponding position of the defect region in the adjacent frame; The position consistency analysis step is configured to statistically analyze the position of the candidate region in multiple frames of images, and determine that the position is stable when the region can find a corresponding position in multiple consecutive frames, and generate cross-frame consistency data; The trajectory generation step is configured to generate cross-frame trajectory information of the defect region according to the position consistency data, so as to facilitate the real-time determination of the reference comparison unit.
[0056] The second reference comparison unit specifically comprises: The brightness comparison step is used for comparing the brightness value of the candidate region in the cross-frame consistency data with the brightness model of the reference region, and when the brightness level of the candidate region exceeds the normal fluctuation range of the reference model, the brightness abnormality is recorded; The texture comparison step is used for comparing the texture direction of the candidate region in the cross-frame consistency data with the texture model of the reference region, and when the texture direction of the candidate region appears to be deviated, interrupted or disordered, the texture abnormality is recorded; The double-dimension joint analysis step is used for jointly analyzing the results of the brightness abnormality and the texture abnormality, and only when both are determined to be abnormal, the candidate region is marked as a real defect region, so as to avoid the misjudgment caused by a single dimension.
[0057] The defect confirmation unit specifically comprises: The morphological feature extraction step is used for extracting morphological features such as boundary shape, area size and aspect ratio in the real defect region, so as to generate more accurate defect description information; The interference comparison step is used for comparing the position of the real defect region with the false defect data, and when the real defect region is adjacent to the false defect region, the interference prompt is recorded, so as to remind the detection personnel that there may be light or environmental influence at the position when outputting; The data generation step is used for integrating the coordinates, contour morphology, image frame number of the real defect region and the interference prompt information, generating complete real defect data, and outputting the real defect data and the false defect data to the result output module together, so as to ensure that the detection report contains the comparison information of the real defect and the false defect at the same time.
[0058] In a preferred embodiment of the present application, the light segmentation equalization unit comprises: The brightness partition generation unit is used for performing brightness gradient calculation according to the brightness distribution of the multi-frame original image data, dividing the whole image into multiple brightness sub-regions, and generating brightness sub-region data; The partition independent equalization unit is used for performing gray scale statistics and histogram stretching processing in each sub-region according to the brightness sub-region data, and generating local equalization data; The boundary smoothing processing unit is used for performing brightness transition smoothing on the boundary region of adjacent sub-regions according to the local equalization data, and generating smooth transition data; The dynamic self-adaptive unit is used for monitoring the real-time change of the light condition according to the smooth transition data, dynamically adjusting the sub-region division threshold and regenerating the equalization result, and obtaining the brightness equalization image data.
[0059] In the embodiment of the present application, the luminance partition generation unit can perform luminance gradient calculation according to the luminance distribution of the multi-frame original image data, divide the whole image into multiple luminance sub-zones, and generate luminance sub-zone data, so as to ensure that the image under different illumination conditions can be processed in sub-zones. For example, when the upper part of the ship body is directly irradiated by strong light and the lower part is in the shadow, the unit can divide it into independent sub-zones.
[0060] The partition independent equalization unit can perform gray scale statistics and histogram stretching in each sub-zone based on the luminance sub-zone data, to generate local equalization data, so as to respectively enhance dark details and suppress overly bright areas. For example, the unit can highlight the details of the cracks near the weld in the shadow area.
[0061] The boundary smoothing processing unit can perform luminance transition smoothing on the boundary between adjacent sub-zones according to the local equalization data, to generate smooth transition data, so as to avoid boundary abrupt changes caused by independent processing in sub-zones. For example, the unit can make the luminance smoothly transition at the junction of the strong light area and the dark area, to ensure the naturalness of the image.
[0062] The dynamic adaptive unit can monitor real-time changes in the illumination conditions according to the smooth transition data, dynamically adjust the sub-zone division threshold, and regenerate the equalization result, to obtain luminance equalization image data, so as to adapt to changes in different shooting periods and environments. For example, when the illumination conditions change rapidly during sunset, the unit can adjust the sub-zones in real time, so that the equalization image remains stable and consistent.
[0063] The luminance partition generation unit specifically includes: The image scanning step is used to read the luminance values of the whole image pixel by pixel, and form a luminance distribution curve to reflect the global illumination distribution; The gradient change analysis step is used to detect the rate of change of the luminance value on the luminance distribution curve, and determine the position of the partition boundary when the luminance change rate exceeds the preset threshold; The partition generation step is used to divide the whole image into several luminance sub-zones according to the detected partition boundary, and each sub-zone has relatively stable luminance; The sub-zone data output step is used to save the partition result as luminance sub-zone data, and provide it for the subsequent partition independent equalization unit.
[0064] The partition independent equalization unit specifically includes: The gray scale statistics step is used to analyze the local illumination conditions by counting the luminance distribution characteristics of the pixels in each luminance sub-zone, including the average value, the maximum value and the minimum value; The histogram calculation step is used to generate a histogram according to the luminance distribution characteristics, and identify the gray scale concentrated area and the sparse area, to reflect the local luminance dynamic range; a gray scale stretching step for enhancing the sparse areas in the histogram to make the gray scale value distribution more uniform, thereby improving the dark area details and reducing the saturation of the overly bright areas; a local balance generation step for recombining the processed pixel data into a local balance image and outputting local balance data.
[0065] The boundary smoothing processing unit specifically comprises: a boundary area extraction step for determining the overlapping boundary area between adjacent sub-areas and extracting the pixel values within the boundary; a brightness transition analysis step for calculating the difference in brightness of the pixels on both sides of the boundary, and determining that the area needs to be smoothed when the difference exceeds the allowed range; a gradual fusion step for gradually adjusting the brightness of the pixels in the boundary area to smoothly transition from one sub-area to another, thereby eliminating the abrupt change; a smoothed data output step for recombining the smoothed boundary area with the local balance data to generate smoothed transition data.
[0066] The dynamic adaptive unit specifically comprises: a light monitoring step for extracting the average brightness level in a plurality of consecutive images and analyzing the trend of the change over time to reflect the dynamic change of the light condition; a threshold adjustment step for automatically updating the threshold for dividing the brightness sub-areas according to the trend of the light change, and adjusting the partition boundary accordingly when the overall brightness increases or decreases; a re-balancing processing step for re-executing the partition-independent balancing and boundary smoothing steps under the new partition result to generate a new balanced image; a result updating step for outputting the new balanced image as the brightness balance image data of the current frame and calling it by the subsequent modules.
[0067] In a preferred embodiment of the present application, the edge distortion analysis unit comprises: a contour feature extraction unit for extracting the direction, length and curvature features of the edge line segments from the brightness balance image data to generate edge feature data; a distortion detection unit for comparing the edge features with the standard geometric proportions according to the edge feature data to identify the areas of abnormal stretching or compression and generate distortion positioning data; a region level division unit for dividing the distortion regions into mild distortion regions and severe distortion regions according to the distortion positioning data to generate distortion classification data; a distortion parameter generation unit for extracting the direction deviation and the geometric proportion distortion rate according to the distortion classification data to generate distortion parameter data.
[0068] In the embodiment of the present application, the profile feature extraction unit can extract the direction, length and curvature features of the edge line segment according to the brightness equalization image data, and generate edge feature data, so as to accurately reflect the geometric shape of the hull edge. For example, when the hull curved surface is photographed, the unit can extract the natural arc as the basic data.
[0069] The distortion detection unit can compare the edge feature data with the standard geometric proportion, identify the abnormal stretching or compression area, generate distortion positioning data, and determine the deformation position caused by the lens or angle. For example, when the camera is tilted to take a picture, the straight edge of the hull appears to be curved, and the unit can identify it.
[0070] The area level division unit can divide the distortion area into a mild distortion area and a serious distortion area according to the distortion positioning data, and generate distortion classification data, so as to provide targeted processing for different levels of correction. For example, the mild distortion area only needs local fine-tuning, while the serious distortion area needs large-scale correction.
[0071] The distortion parameter generation unit can extract the direction deviation and the geometric proportion distortion rate according to the distortion classification data, and generate distortion parameter data, so as to provide quantitative basis for subsequent local geometric correction. For example, in the area with large bending degree, the unit can generate large correction parameters to guide accurate correction.
[0072] The profile feature extraction unit specifically includes: The image preprocessing step is used for edge enhancement operation on the brightness equalization image data, so that the hull outer plate edge, weld boundary and other high-contrast areas are highlighted; The edge detection step is used for extracting continuous edge points through pixel gradient direction analysis, and connecting adjacent edge points to form complete edge line segments; The geometric feature calculation step is used for calculating the running angle, pixel span length and edge bending degree of the edge line segment, which is described as "direction, scale and bending degree" features; The feature data output step is used for integrating the above-mentioned geometric features to generate edge feature data, which is used as the input of the subsequent distortion detection unit.
[0073] The distortion detection unit specifically includes: The reference proportion establishing step is used for establishing the standard direction and standard proportion of the ideal edge as the comparison reference according to the design drawing or the known structural features of the hull; The feature comparison step is used for comparing the direction, length and curvature information in the edge feature data with the standard proportion one by one, and determining as abnormal when the direction deviation is too large or the line segment is excessively stretched or compressed; An abnormal region positioning step is configured to locate the abnormal region in the image and generate distortion positioning data containing edge position and abnormal type; A data output step is configured to transmit the distortion positioning data to the region level division unit for subsequent analysis.
[0074] The region level division unit specifically includes: A distortion amplitude evaluation step is configured to quantitatively describe the offset, curvature and proportional distortion degree recorded in the distortion positioning data, and mark as slight distortion when the offset or curvature degree is small and does not affect the overall structure, and mark as severe distortion when the distortion degree significantly affects the structure straightness or proportional relationship; A region classification step is configured to label the distortion region in the image according to the evaluation result, according to the slight or severe category, and generate distortion classification data; A data storage step is configured to save the classification result together with the original distortion positioning data for calling by the distortion parameter generation unit.
[0075] The distortion parameter generation unit specifically includes: A deviation amount calculation step is configured to calculate the difference value between the edge direction and the standard direction in the slight or severe distortion region, and describe as "angle deviation" in words; A proportional distortion evaluation step is configured to calculate the difference proportion of the edge length and the standard length of the distortion region, and describe as "distortion rate of length or width" in words; A parameter integration step is configured to integrate the angle deviation and the distortion rate to generate distortion parameter data, which can accurately reflect the severity and correction demand of the distortion region; An output step is configured to transmit the distortion parameter data to the local geometric correction unit as an input basis for subsequent correction interpolation and geometric proportion adjustment.
[0076] In a preferred embodiment of the present application, the local geometric correction unit includes: A pixel interpolation correction unit is configured to perform pixel-by-pixel interpolation processing on the distorted pixels in the distortion region according to the distortion parameter data to generate preliminary correction data; A local proportion adjustment unit is configured to adjust the geometric proportion of the local region according to the preliminary correction data, so that the local width-height proportion is consistent with the overall image, and generate local consistency data; A boundary transition balancing unit is configured to balance the boundary between the corrected region and the uncorrected region according to the local consistency data, and generate boundary smoothing data; An iterative optimization unit is configured to repeatedly perform interpolation correction and proportion adjustment according to the boundary smoothing data until the geometric error is less than a threshold value, and generate final correction image data.
[0077] In the embodiment of the present application, the pixel interpolation correction unit can perform pixel-by-pixel interpolation processing on the distorted pixels in the distortion area according to the distortion parameter data to generate preliminary correction data, thereby recovering image details. For example, when the weld line is bent due to lens distortion on the ship body side, the unit can repair point by point to ensure that the weld form is close to the true state.
[0078] The local scale adjustment unit can adjust the geometric scale of the local area according to the preliminary correction data to make the local width-height ratio consistent with the overall image, generate local consistency data, and thereby ensure the consistency of the image scale in a large range and a small range. For example, when the ship body curve is photographed, the unit can make the local enlarged crack proportional to the overall size to avoid misjudgment of the defect size.
[0079] The boundary transition balancing unit can balance the boundary between the corrected area and the uncorrected area according to the local consistency data to generate boundary smoothing data, thereby avoiding the abrupt splicing marks caused by local correction. For example, after the weld edge is corrected, the unit can make the boundary naturally blend with the original image to ensure the integrity of the detection picture.
[0080] The iterative optimization unit can repeatedly perform interpolation correction and scale adjustment according to the boundary smoothing data until the geometric error is less than a preset threshold to generate final correction image data, thereby ensuring that the correction effect reaches a stable state. For example, when the shooting angle is severely skewed, the unit can make the final output ship body plate image maintain geometric reality through multiple rounds of iterative correction.
[0081] The pixel interpolation correction unit specifically includes: The distortion area positioning step is configured to receive the distortion area range marked in the distortion parameter data and accurately position the location of the distorted pixels in the image; The neighborhood pixel extraction step is configured to extract the neighborhood pixel values within a certain range around each distorted pixel to obtain reliable reference information; The interpolation calculation step is configured to estimate the ideal value of the distorted pixel by weighted average according to the gray value and direction distribution of the neighborhood pixels, which is described in words as "smooth compensation according to the gray trend of the neighborhood"; The preliminary correction generation step is configured to replace the original distorted pixels with the corrected pixels to generate image data containing a preliminary repair area.
[0082] The local scale adjustment unit specifically includes: The scale deviation analysis step is configured to calculate the width and height of the local area in the preliminary correction data and compare them with the overall standard scale to obtain the scale deviation amount; a geometric correction step for scaling or expanding the local area by a proportional deviation amount to keep the local size consistent with the whole, described in words as "proportional correction by pixel-by-pixel stretching or compression"; a consistency verification step for detecting whether the geometric size of the local area matches the whole image after correction, and generating local consistency data when the difference is reduced to an acceptable range.
[0083] The boundary transition balancing unit specifically includes: a boundary area identification step for detecting the boundary position between the modified area and the original unmodified area in the local consistency data; a brightness and texture contrast step for extracting brightness values and texture directions on both sides of the boundary, and marking the transition zone as needing balancing when a significant difference between the two sides of the boundary is detected; a smooth transition processing step for gradually adjusting the brightness and texture direction of the boundary pixels in the transition zone to make the transition between the modified area and the unmodified area natural, that is, "gradually smoothing the transition from the difference state to the continuous distribution of brightness and texture"; a smooth data output step for re-integrating the image after balancing processing to generate boundary smooth data.
[0084] The iterative optimization unit specifically includes: an error detection step for detecting geometric errors in the boundary smooth data, which is described in words as the difference between the area form and the standard geometric model; a correction feedback step for re-inputting the boundary smooth data to the pixel interpolation correction unit and the local proportional adjustment unit when the geometric error exceeds the threshold value to perform a new round of correction; a cycle iteration step for repeatedly correcting and feeding back, and updating the geometric error value after each round of correction; a termination output step for terminating iteration and outputting the final corrected image data when the geometric error is reduced to within the threshold range.
[0085] In a preferred embodiment of the present application, the reference comparison unit includes: a brightness difference analysis unit for comparing the brightness distribution of the initial candidate area data with the brightness model of the reference area to generate brightness anomaly data; a texture direction comparison unit for comparing the texture direction of the candidate area with the texture model of the reference area according to the brightness anomaly data to generate texture anomaly data; a structure contour verification unit for comparing the edge form of the candidate area with the continuity of the reference area according to the texture anomaly data to generate structure anomaly data; The comprehensive judgment unit is configured to cross-verify the brightness abnormal data, the texture abnormal data and the structure abnormal data to generate candidate defect data.
[0086] In the embodiment of the present application, the brightness difference analysis unit is configured to compare the brightness distribution of the initial candidate region data with the brightness model of the reference region to generate brightness abnormal data, so as to identify the light abnormal region. For example, after the local peeling of the ship body coating, the reflected light of the underlying metal is obviously enhanced, and the unit can detect the brightness difference in time.
[0087] The texture direction comparison unit is configured to compare the texture direction of the candidate region with the texture model of the reference region according to the brightness abnormal data to generate texture abnormal data, so as to identify the texture direction abnormality. For example, when a crack appears in the weld, the crack direction is often inconsistent with the original texture of the weld, and the unit can accurately mark the abnormal region.
[0088] The structure contour verification unit is configured to compare the edge shape of the candidate region with the continuity of the reference region according to the texture abnormal data to generate structure abnormal data, so as to further verify the authenticity of the defect through the geometric contour feature. For example, in the corrosion pit region, the edge shape will show irregular interruption, and the unit can identify it as a structure abnormality.
[0089] The comprehensive judgment unit is configured to cross-verify the brightness abnormal data, the texture abnormal data and the structure abnormal data to generate candidate defect data, so as to reduce the single dimension misjudgment. For example, when a certain region only has high brightness but the texture is continuous, the unit can exclude the defect possibility to ensure that the candidate defect identification is more accurate.
[0090] The brightness difference analysis unit specifically includes: The candidate region sampling step is configured to extract the brightness value of all pixels in the initial candidate region and calculate the average brightness and the brightness range to represent the illumination characteristics of the region; The reference model calling step is configured to read the pre-stored brightness model in the reference region, and the model includes the brightness variation range and the normal distribution characteristics of the defect-free region; The difference comparison step is configured to compare the average brightness and the range of the candidate region with the brightness model of the reference region, and when the difference exceeds the normal fluctuation range, it is determined that the brightness is abnormal; The abnormal data generation step is configured to record the judgment result as brightness abnormal data and use it as the input of the subsequent texture direction comparison unit.
[0091] The texture direction comparison unit specifically includes: The texture direction extraction step is configured to extract the local texture direction information in the candidate region through the pixel gray level change trend and form the direction distribution data. A reference direction calling step is used to read the texture model of the reference area to obtain the standard texture direction distribution of the defect-free area; A direction consistency analysis step is used to compare the direction distribution of the candidate area with the reference area, and mark as a texture abnormality when the direction of the candidate area is obviously offset or local fracture occurs; An abnormal result output step is used to record the direction abnormality result as texture abnormality data and deliver to the structure contour verification unit.
[0092] The structure contour verification unit specifically comprises: An edge extraction step is used to detect the boundary pixel points in the candidate area and form an edge contour line; A continuity analysis step is used to compare the edge line of the candidate area with the edge shape of the reference area, and determine as a structure abnormality when irregular bending, fracture or loss of the edge is found; An abnormality marking step is used to mark the detected edge abnormal position and generate structure abnormality data; A result delivery step is used to provide the structure abnormality data to the comprehensive judgment unit for multi-dimensional verification.
[0093] The comprehensive judgment unit specifically comprises: A data integration step is used to collect the three types of data of brightness abnormality, texture abnormality and structure abnormality, and uniformly store and sort them; A multi-dimensional verification step is used to analyze the spatial position relationship of the three types of abnormality data, and determine as a candidate defect area when the brightness abnormality, texture abnormality and structure abnormality exist in the same area at the same time; A weight comparison step is used to assign weights according to the importance of different abnormality types in the case of insufficient partial abnormality conditions, for example, the texture abnormality weight is higher than the brightness abnormality, to ensure the rationality of the judgment; A result output step is used to record the finally confirmed candidate defect area as candidate defect data and output to the subsequent stability judgment module for cross-frame verification.
[0094] In a preferred embodiment of the present application, the false identification unit comprises: An intra-frame consistency analysis unit is used to detect the brightness and texture consistency of the defect area in a single frame image according to the candidate defect data, and generate intra-frame consistency data; A cross-frame disappearance judgment unit is used to track the trajectory of the candidate defect area in multiple frames of images according to the intra-frame consistency data, and generate cross-frame false data when the area only appears in a single frame or a small number of frames; An environmental interference identification unit is configured to analyze the cross-frame false data in combination with the features of light reflection, water marks and attachments in the field, and generate environmental false data; A false defect integration unit is configured to generate false defect data according to the intra-frame consistency data, the cross-frame false data and the environmental false data, and output interference samples.
[0095] In the embodiment, the intra-frame consistency analysis unit can detect the brightness and texture consistency of the defect region in a single frame image according to the candidate defect data, and generate intra-frame consistency data, so as to quickly identify false defects consistent with the reference region inside the image. For example, a light spot appearing in a single frame image has consistent brightness and texture with the reference region, and the unit can identify it as a false defect.
[0096] The cross-frame disappearance determination unit can track the trajectory of the candidate defect region in multiple frames of images according to the intra-frame consistency data, and generate cross-frame false data when the region appears in only one frame or a small number of frames, so as to exclude incidental interference. For example, a transient bright spot formed by water surface reflection during unmanned aerial vehicle shooting appears in only one frame, and the unit can mark it as a cross-frame false defect.
[0097] The environmental interference identification unit can analyze the cross-frame false data in combination with the features of light reflection, water marks and temporary attachments in the detection field, and generate environmental false data, so as to identify false defects caused by external environmental factors. For example, seaweed or oil stains attached to the surface of a ship body during detection may be mistaken for defects, and the unit can identify them as environmental false defects.
[0098] The false defect integration unit can generate false defect data according to the intra-frame consistency data, the cross-frame false data and the environmental false data, and output interference samples, so that the false defects are no longer excluded, but provided as interference reference to the result output module. For example, in the final report, in addition to displaying the coordinates of the real cracks, it will also prompt which regions belong to false defects, helping the detection personnel to quickly judge the possible environmental interference and improve the reference value of the report.
[0099] The intra-frame consistency analysis unit specifically includes: A candidate region extraction step is configured to read the pixel range of the candidate defect region in a single frame image, and obtain the brightness distribution and texture direction information thereof; A consistency calculation step is configured to statistically analyze the brightness change of the pixels in the candidate region, and judge whether the brightness change maintains smooth transition, and whether the texture direction is concentrated in a dominant direction; An abnormality determination step is configured to mark as false defect tendency when the brightness and texture inside the candidate region are consistent with the surrounding reference region; A data output step is configured to integrate the analysis result into frame consistency data and deliver the frame consistency data to the cross-frame disappearance determination unit.
[0100] The cross-frame disappearance determination unit specifically includes: A trajectory tracking step is configured to detect the position of a candidate defect region in consecutive image frames and record the disappearance of the region when the region fails to be matched in adjacent frames; A frequency statistics step is configured to count the number of times a candidate defect region appears in the entire image sequence and consider the candidate defect region as unstable when the number of times is lower than a preset threshold; A false determination step is configured to mark a region appearing in only one frame or a small number of frames as a cross-frame false defect; A result generation step is configured to integrate the determination result into cross-frame false data and deliver the cross-frame false data to the environmental interference identification unit.
[0101] The environmental interference identification unit specifically includes: An environmental feature collection step is configured to record the surface light intensity, reflection condition and external environmental feature information of the ship under the shooting site condition; A false feature comparison step is configured to compare the cross-frame false data with the environmental features, and confirm that the false defect region is derived from environmental interference when the brightness distribution of the false defect region is consistent with the reflected light spot or the texture feature is consistent with the characteristics of water marks or attachments; An interference classification step is configured to mark the false defect as light false, water mark false or attachment false according to the source of the false defect; A result output step is configured to record the classified false defect information as environmental false data and deliver the environmental false data to the false defect integration unit.
[0102] The false defect integration unit specifically includes: A data integration step is configured to collect false defect information from the three units and uniformly store and classify the false defect information; An interference sample generation step is configured to generate reference interference samples according to the position, frame number and interference type of the false defect, as auxiliary information for real defect determination; A result integration step is configured to maintain a corresponding relationship between the false defect data and the real defect data, so that the output result contains both the confirmation information of the real defect and the interference prompt of the false defect; A data output step is configured to output the false defect data to the result output module to ensure that complete defect comparison information can be provided in the detection report.
[0103] The above is the preferred embodiment of the present application, it should be noted that for those skilled in the art, without departing from the principles described in the present application, can also be made several improvements and refinements, these improvements and refinements should also be considered the scope of protection of the present application.
Claims
1. The ship surface defect detection system based on machine vision is characterized by: The system comprises: The image acquisition module is used to acquire multiple frames of original image data according to the detection trajectory of the hull outer plate during the hull detection process; The image correction module is used to perform illumination balancing and geometric distortion correction based on multiple frames of original image data to form standardized image data with uniform brightness distribution and consistent proportions; A region construction module is used to identify a stable region without defects based on the standardized image data and generate reference region data, wherein the reference region data includes a brightness model and a texture model; A candidate generation module is used to detect areas with local texture discontinuities or abnormal bright spots based on the standardized image data and the reference area data, and generate candidate defect data, wherein the candidate defect data includes pixel positions and local contrast parameters; A stability determination module is used to perform projection matching in multiple frames of images based on candidate defect data, and simultaneously perform joint comparison with the brightness model and texture model of the reference area data. When the candidate defect persists in different frames and is inconsistent with the reference area in both brightness distribution and texture continuity, true defect data is generated. When the candidate defect only appears in a single frame or a small number of frames and is consistent with the reference area data, false defect data is generated and stored as an interference sample. The result output module is used to generate a detection result including defect coordinates, defect outline, image frame number and interference sample prompt based on the real defect data and the corresponding false defect data.
2. The ship surface defect detection system based on machine vision according to claim 1 is characterized in that: The image correction module includes: The illumination segmentation 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; An edge distortion analysis unit is used to perform geometric contour detection on the edge area of the image based on the brightness balanced image data, identify the stretching or compression area caused by camera tilt and lens distortion, and generate distortion area positioning data; A local geometry correction unit is used to perform pixel-by-pixel interpolation correction on the corresponding area based on the distorted area positioning data, so as to keep the local proportion consistent with the overall proportion and generate local corrected image data; The global consistent fusion unit is used to perform weighted fusion of the brightness balanced image data and the local corrected image data to generate standardized image data with uniform brightness distribution and consistent geometric proportions.
3. The ship surface defect detection system based on machine vision according to claim 1, characterized in that: The regional building blocks include: A texture continuity detection unit is used to calculate the direction consistency of the textures of different detection blocks based on the standardized image data, and when the texture direction remains stable and uninterrupted, the detection block is marked as a candidate stable area; A 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; A texture direction modeling unit is used to extract the distribution of texture directions in the candidate stable region and fit the texture directions to form a texture model that can characterize the structural characteristics of the defect-free region; The reference area binding unit is used to bind and store the brightness model and the texture model to form reference area data.
4. The ship surface defect detection system based on machine vision according to claim 1, characterized in that: The candidate generation module includes: The local anomaly detection unit is used to analyze the grayscale continuity of the local area based on the standardized image data. When a grayscale mutation or an abnormally high brightness point occurs, the area is marked as an initial candidate area. A first reference comparison unit is configured to compare the initial candidate region with the reference region data, and determine the candidate region as a candidate defect region 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 feature parameter extraction unit is used to extract pixel positions, texture discontinuity features and local contrast parameters in the candidate defect area to form candidate defect data containing multi-dimensional features.
5. The ship surface defect detection system based on machine vision according to claim 1, characterized in that: The stability determination module includes: A cross-frame matching unit is used to perform projection matching in multiple frames of images based on the candidate defect data, calculate the position consistency of the candidate defect area in different frames, and generate cross-frame consistency data; 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. If the candidate defect area persists in different frames and is inconsistent with the reference area data in both brightness distribution and texture continuity, it is determined to be a real defect area; a false identification unit, configured to, during the comparison process, 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 small number of frames 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 position 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.
6. The ship surface defect detection system based on machine vision according to claim 2, characterized in that: The illumination segmented equalization unit includes: A brightness partition generation unit is used to calculate brightness gradients 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 partition-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; A boundary smoothing processing unit, configured to perform brightness transition smoothing on boundary areas of adjacent sub-areas based on the local equalization data to generate smooth transition data; The dynamic adaptive unit is used to monitor the real-time changes of the lighting conditions according to the smooth transition data, dynamically adjust the sub-area division threshold and regenerate the equalization result to obtain brightness balanced image data.
7. The ship surface defect detection system based on machine vision according to claim 2, characterized in that: The edge distortion analysis unit includes: A contour feature extraction unit is used to extract the direction, length and curvature features of the edge segment based on the brightness balanced image data to generate edge feature data; A 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 positioning data; The area classification unit is used to classify the distortion area into a slightly distorted area and a severely distorted area according to the distortion positioning data, and generate distortion classification data; The distortion parameter generating unit is used to extract the direction deviation and the geometric proportion distortion rate according to the distortion classification data to generate distortion parameter data.
8. The ship surface defect detection system based on machine vision according to claim 2, characterized in that: The local geometry correction unit includes: A pixel interpolation correction unit is used to perform pixel-by-pixel interpolation processing on distorted pixels in the distortion area according to the distortion parameter data to generate preliminary correction data; A local proportion adjustment unit is used to adjust the geometric proportions of the local area according to the preliminary correction data so that the local width-to-height ratio is consistent with the overall image and generate local consistency data; A boundary transition balancing unit is used to balance the boundary between the corrected area and the uncorrected area according to the local consistency data to generate boundary smoothing data; The iterative optimization unit is used to repeatedly perform interpolation correction and scale adjustment according to the boundary smoothing data until the geometric error is less than a threshold value, thereby generating the final corrected image data.
9. The ship surface defect detection system based on machine vision according to claim 4, characterized in that: The reference comparison unit comprises: A brightness difference analysis unit is used to compare the brightness distribution of the initial candidate area data with the brightness model of the reference area to generate brightness anomaly data; a texture direction comparison unit, configured to compare the texture direction of the candidate region with the texture model of the reference region based on the brightness anomaly data to generate texture anomaly data; A 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 to generate structural anomaly data; The comprehensive judgment unit is used to perform cross-validation based on brightness abnormality data, texture abnormality data and structure abnormality data to generate candidate defect data.
10. The ship surface defect detection system based on machine vision according to claim 5, characterized in that: The false identification unit includes: An intra-frame consistency analysis unit, configured to detect brightness and texture consistency of a defective area in a single frame image based on candidate defect data, and generate intra-frame consistency data; A cross-frame disappearance determination unit is used to track the trajectory of the candidate defect area in multiple frames of images based on the intra-frame consistency data, and generate cross-frame false data when the area only appears in a single frame or a small number of frames; The environmental interference recognition unit is used to generate environmental false data based on cross-frame false data and the analysis of scene light reflection, water marks and attachment features; The false defect integration unit is used to generate false defect data according to the intra-frame consistency data, cross-frame false data and environmental false data, and output interference samples.
Citation Information
Patent Citations
Mobile phone appearance detection system and method based on visual identification
CN119672449A
Abnormal region screening method, device and equipment, medium and program product
CN120088446A
Square power battery shell visual defect rapid detection method and system
CN120318234A
Deep learning target detection-based hull defect detection method and device
CN120431075A
KR20240049958A
Cited By
Power transmission line fault detection method and system based on RKM-YOLO algorithm
CN121304673A
Injection molding part defect detection method based on collaborative operation of double mechanical arms
CN121540727A
Macular region retina layered structure automatic segmentation system based on OCT image
CN121600264A
Watch movement accessory traceability management system and method
CN121684965A
System and method for managing the provenance of components of a watch movement
CN121684965B