Powder tank truck tank body weld defect image processing and analysis method and system
Patent Information
- Application Number
- CN202611417654.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-14
- Publication Date
- 2026-10-16
AI Technical Summary
[0003]传统粉罐车罐体焊缝缺陷图像化检测中,摄像装置在固定光源照明下对焊缝区域单次静态成像,罐体曲面焊缝背景灰度不均且缺陷对比度偏低,单帧图像难以呈现裂纹,气孔及夹渣等缺陷,灰度转换,滤波去噪,阈值分割与边缘提取按固定顺序处理,全局固定阈值易在背景灰度变化区段出现漏分割,缺陷类型依据单一特征比对区分,相近缺陷难以准确分类,图像采集与图像处理判断独立,成像条件无法依据判断结果调整
本发明中,通过在不同照明角度和曝光参数下分次采集同一焊缝区域多帧焊缝图像,依据焊缝边缘特征点配准融合得到焊缝重构图像,使罐体曲面焊缝低对比度缺陷得以呈现;沿焊缝走向将焊缝重构图像分区,按各区段灰度分布确定分割阈值与去噪强度,使分割与区段局部背景相适应,减少漏分割与误分割;对候选缺陷连通区域联合提取灰度对比、面积、轮廓曲率及纹理特征并判定缺陷类型,使相近缺陷得到区分;当区段特征置信度低于设定条件或对比度未达要求时,调整对应区段照明角度或曝光参数并重新采集,使低置信区段依据重新成像结果判定。
Smart Images

Figure CN122928877A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image detection technology, and in particular to a method and system for image processing and analysis of weld defects in powder tank truck bodies. Background Technology
[0002] Image detection technology typically revolves around acquiring, transmitting, preprocessing, extracting features, and identifying surface images of the object being measured. Generally, an industrial camera, in conjunction with a light source, images the target area. The image is then transmitted to an image processing device or host computer via a data interface or bus. Features such as grayscale value, edges, texture, and location are compared, segmented, and matched to identify and classify the target state, and the results are stored or displayed. Traditional image processing and analysis methods for defects in the weld seams of powder tank trucks aim to perform image-based detection of defects such as cracks, porosity, slag inclusions, and lack of fusion in the weld seams of powder tank trucks. Typically, a camera device acquires images of the weld area under illumination, and the image data is transmitted to a processing device via an interface. Grayscale conversion, filtering and noise reduction, threshold segmentation, and edge extraction are performed sequentially. Then, based on pixel grayscale, connected region area, contour size, and matching relationships with preset thresholds or templates, the presence and type of defects in the weld area are determined, and the results are output, stored, or displayed.
[0003] In traditional image-based inspection of weld defects in powder tank trucks, the camera device performs a single static image of the weld area under fixed lighting. The background grayscale of the weld on the curved surface of the tank is uneven and the defect contrast is low. A single frame image is difficult to show defects such as cracks, pores and slag inclusions. Grayscale conversion, filtering and noise reduction, threshold segmentation and edge extraction are processed in a fixed order. The globally fixed threshold is prone to missing segmentation in the background grayscale variation range. Defect types are distinguished based on single feature comparison, and similar defects are difficult to classify accurately. Image acquisition and image processing judgment are independent, and imaging conditions cannot be adjusted according to the judgment results. Summary of the Invention
[0004] The purpose of this invention is to provide a method and system for image processing and analysis of defects in the weld seams of powder tank trucks. By performing multi-condition phased imaging on the same weld seam area, registration and fusion based on weld seam edge feature points, adaptive partitioning processing along the weld seam direction, multi-dimensional defect feature determination, and feedback re-acquisition of low-confidence segments, the system can obtain image processing and analysis results adapted to defect identification for the curved surface weld seams of powder tank trucks under conditions of background grayscale variation, low defect contrast, and similar defect morphology.
[0005] To achieve the above objectives, the present invention provides a method for image processing and analysis of weld defects in powder tank truck bodies, comprising the following steps: The same powder tank truck's tank weld area was captured multiple times under different lighting angles and exposure parameters to obtain multiple weld images, and each weld image was associated with the corresponding lighting angle and exposure parameters; Based on the feature points of the weld seam edge, the weld seam images of multiple frames are registered and fused. After alignment, the grayscale differences at the same pixel position caused by the changes in illumination angle and exposure parameters in each frame are mapped to the pixel values in the reconstructed image pixel by pixel to obtain a weld seam reconstructed image with enhanced contrast. The reconstructed image of the weld is divided into several segments along the weld direction. The gray-level distribution of each segment is statistically analyzed, and the segmentation threshold and denoising intensity of each segment are determined according to the gray-level distribution of each segment. Each segment is segmented and denoised according to the segmentation threshold and the denoising intensity. The connected regions retained after processing are used as candidate defect connected regions. Gray-scale contrast, area, aspect ratio, contour curvature and texture features are jointly extracted from the candidate defect connected regions. The defect type and defect location are determined according to the feature combination and defect type mapping relationship. When the confidence level of the segment feature does not meet the set conditions or the segment contrast does not meet the set requirements, an acquisition parameter adjustment command is generated to adjust the illumination angle or exposure parameters of the corresponding segment and reacquire the data, and then return to perform registration and fusion to defect judgment; when the confidence level of the segment feature meets the set conditions and the segment contrast meets the set requirements, the defect type and defect location of the corresponding segment are output.
[0006] In the above method, the phased acquisition may include: the pose adjustment mechanism driving the image acquisition device to move along the weld seam to each acquisition station, and recording the position of the image acquisition device relative to the weld seam area at each acquisition station; at each acquisition station, the adjustable light source is sequentially switched to multiple preset illumination angles; at each illumination angle, the image acquisition device acquires one frame of weld seam image according to multiple preset exposure parameters, so that multiple frames of weld seam images corresponding to different combinations of illumination angle and exposure parameters are obtained at each acquisition station; the multiple frames of weld seam images acquired at each acquisition station are associated with the corresponding illumination angle, exposure parameters and position to obtain multiple frames of weld seam images with acquisition parameter identifiers.
[0007] In the aforementioned multi-frame weld seam images with acquisition parameter identifiers, edge feature points on the contour lines on both sides of the weld seam can be extracted respectively. Taking any frame of the weld seam image under the same acquisition station as the reference frame, the edge feature points of the remaining frames are matched with the edge feature points of the reference frame to obtain the position offset of each frame relative to the reference frame. The remaining frames are aligned to the reference frame according to the position offset of each frame. Then, the maximum deviation of the grayscale range or relative mean of each frame is calculated pixel by pixel for the aligned multi-frame weld seam images and fused. The grayscale differences caused by the changes in the illumination angle and exposure parameters used in each frame are mapped to the pixel values in the reconstructed image to obtain a weld seam reconstruction image with enhanced contrast.
[0008] In the above method, when dividing the reconstructed image of the weld seam into several segments along the weld seam direction, the reconstructed image of the weld seam can be divided into several sequentially arranged segments along the weld seam direction according to a set segment length, and each segment is numbered according to the positional order along the weld seam direction; the gray mean and gray standard deviation of the pixels in each segment are calculated; when the gray standard deviation of a certain segment is greater than a set discrete threshold, the segment is divided into two sub-segments along the weld seam direction and each sub-segment is treated as an independent segment for subsequent processing; when the gray standard deviation of a certain segment is not greater than the set discrete threshold, the segment is retained as an independent segment.
[0009] As a progressive limitation on segment division, a certain segment is further divided into two equal sub-segments along the weld seam direction. The mean gray value and standard deviation of the pixels in each sub-segment are then calculated. When the standard deviation of the gray value of any sub-segment is greater than the discrete threshold, the sub-segment is further divided into two equal sub-segments along the weld seam direction. The mean gray value and standard deviation of the sub-segments obtained by the second division are calculated again and compared until the standard deviation of the gray value of each sub-segment is not greater than the discrete threshold, or the segment length of the sub-segment reaches the set minimum segment length. The finally obtained sub-segments are renumbered according to their positional order along the weld seam direction and participate in subsequent processing as independent segments.
[0010] In the above defect type determination process, for each candidate defect connected region, the extracted grayscale contrast, area, aspect ratio, contour curvature and texture features are combined into a feature vector, and the geometric center coordinates of the candidate defect connected region in the weld reconstruction image are used as the defect position; the feature vector is compared with the defect type mapping relationship item by item to obtain the candidate defect type and the corresponding matching degree; when the matching degree is greater than the set matching threshold, the candidate defect type is determined as the defect type and output together with the defect position; when the matching degree is not greater than the set matching threshold, the candidate defect connected region is marked as a region to be reviewed.
[0011] The defect type mapping relationship may include feature intervals corresponding to cracks, porosity, inclusions, and lack of fusion, respectively. When comparing the feature vectors item by item to obtain candidate defect types, if the aspect ratio is greater than a set upper limit and the contour curvature is greater than a set curvature threshold, the candidate defect type is determined to be a crack; if the aspect ratio is not greater than the set upper limit and the texture uniformity of the texture feature is greater than a set uniformity threshold, the candidate defect type is determined to be a porosity; if the grayscale contrast is greater than a set grayscale contrast threshold and the texture uniformity is not greater than a set uniformity threshold, the candidate defect type is determined to be an inclusion; otherwise, the candidate defect type is determined to be lack of fusion.
[0012] As an additional constraint on the processing of the regions to be reviewed, after marking the candidate defect connected regions as regions to be reviewed, the number of regions to be reviewed within the same segment is counted; when the number of regions to be reviewed is greater than the set review quantity threshold, the matching threshold of the corresponding segment is reduced, and the comparison of the feature vector and the defect type mapping relationship is re-executed for the corresponding segment; when the number of regions to be reviewed is not greater than the set review quantity threshold, the defect position of the region to be reviewed is associated with the feature vector and stored as a record to be manually confirmed.
[0013] As an additional constraint on the re-acquisition process, a re-acquisition count is set for each segment; the re-acquisition count for the corresponding segment is incremented by one each time the acquisition parameter adjustment command is generated; when the re-acquisition count for a certain segment has not reached the set upper limit for the number of re-acquisitions, the illumination angle or exposure parameters of the corresponding segment are adjusted according to the acquisition parameter adjustment command and re-acquisition is performed, and then the process returns to perform registration and fusion to defect determination; when the re-acquisition count for a certain segment reaches the set upper limit for the number of re-acquisitions and the segment feature confidence level still does not meet the set conditions, the re-acquisition of the corresponding segment is stopped, and the corresponding segment is marked as a segment awaiting manual confirmation.
[0014] The present invention also provides an image processing and analysis system for weld defects in tank bodies of powder tank trucks. The system is used to implement the above method and includes an image acquisition device, an adjustable light source and a pose adjustment mechanism, an image processing device and a host computer. With the cooperation of an adjustable light source and a pose adjustment mechanism, the image acquisition device acquires multiple frames of weld seam images of the same powder tanker tank body weld seam area in multiple acquisitions. Different lighting angles are achieved by switching the adjustable light source, the acquisition station is adjusted by the pose adjustment mechanism, and different exposure parameters are automatically set by the image acquisition device according to multiple preset exposure parameters during multiple acquisitions and automatically adjusted according to the received acquisition parameter adjustment instructions during re-acquisition. The image processing device receives multiple frames of the weld seam image via a data interface or bus, registers and fuses the multiple frames of the weld seam image based on the weld seam edge feature points to obtain a reconstructed weld seam image, divides the reconstructed weld seam image into sections along the weld seam direction, and determines the segmentation threshold and denoising intensity of each section according to the grayscale distribution of each section, and jointly extracts grayscale contrast, area, aspect ratio, contour curvature and texture features from the candidate defect connected regions, and determines the defect type and defect location. The image processing equipment is connected to the adjustable light source and pose adjustment mechanism via a control link. When the confidence level of the segment feature does not meet the set conditions or the segment contrast does not meet the set requirements, the acquisition parameter adjustment command is sent back to trigger re-acquisition. The host computer stores and displays the association records of defect type, defect location and corresponding segment acquisition parameters.
[0015] Compared with the prior art, the advantages and positive effects of the present invention are as follows: In this invention, multiple frames of weld images of the same weld area are acquired in stages under different lighting angles and exposure parameters. The weld reconstructed image is obtained by registration and fusion based on the weld edge feature points, so that low-contrast defects of the curved weld of the tank can be presented. The weld reconstructed image is divided into sections along the weld direction, and the segmentation threshold and denoising intensity are determined according to the gray-level distribution of each section, so that the segmentation is adapted to the local background of the section and the omission and missegmentation are reduced. Gray-level contrast, area, contour curvature and texture features are jointly extracted from the connected regions of candidate defects and the defect type is determined, so that similar defects can be distinguished. When the feature confidence of a section is lower than the set condition or the contrast does not meet the requirements, the lighting angle or exposure parameters of the corresponding section are adjusted and re-acquired, so that the low-confidence section is determined based on the re-imaging results. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 This is the main flowchart of the image processing and analysis method for weld defects in powder tank trucks according to the present invention; Figure 2 This is a schematic diagram illustrating the multi-condition weld image acquisition relationship of the present invention; Figure 3 This is a schematic diagram of the weld seam image registration and fusion processing of the present invention; Figure 4 This is a schematic diagram of the adaptive image partitioning processing for weld seam reconstruction according to the present invention; Figure 5 This is a schematic diagram illustrating the collaborative and feedback-based re-acquisition of data in the system of this invention. Detailed Implementation
[0018] The technical solution of the present invention will now be described with reference to the accompanying drawings.
[0019] The following embodiments illustrate feasible implementation methods and systems for image processing and analysis of weld defects in powder tank truck bodies. The weld image referred to in these embodiments refers to image data acquired by an image acquisition device from the same powder tank truck body weld area under different lighting angles and exposure parameters; the reconstructed weld image refers to an image obtained by fusing multiple weld images after registration based on weld edge feature points; the segment refers to a local processing area formed after dividing the reconstructed weld image along the weld direction; the candidate defect connected region refers to a connected image region formed after the segment is processed with a segmentation threshold and noise reduction intensity, used for further feature determination; the feature vector refers to a data set composed of grayscale contrast, area, aspect ratio, contour curvature, and texture features, used for defect type mapping and comparison.
[0020] In subsequent embodiments, the names of the image acquisition device, adjustable light source, pose adjustment mechanism, image processing equipment, and host computer have the same meaning as the corresponding technical objects described above. Since the original disclosure did not assign numerical labels to the above components, no additional numerical labels will be added to the embodiments and accompanying drawings; if components need to be identified in the drawings, they will only be labeled by their names. The step and sub-step numbers in the embodiments are only used to identify the method flow or sub-flow and do not constitute a limitation on the execution time, quantity, parameter values, or protection scope. When dealing with thresholds, denoising intensity, confidence level, matching degree, upper limit of re-acquisition times, and segment length, they are all described using preset conditions, judgment logic, state relationships, and calling relationships, without limiting specific values in the embodiments.
[0021] Please see Figures 1 to 4 This embodiment provides a method for image processing and analysis of weld defects in the tank body of a powder tanker truck. This method performs image acquisition, image fusion, zoning, defect determination, and feedback re-acquisition processing on the weld area of the powder tanker truck body, forming a closed processing link between image acquisition conditions and image analysis results. The main processing object of this method is multiple frames of weld images of the same powder tanker truck body weld area, and the main output objects are the defect type and defect location of the corresponding segment.
[0022] S1. The same powder tanker's weld seam area is captured multiple times under different lighting angles and exposure parameters to obtain multiple weld seam images, and each weld seam image is associated with the corresponding lighting angle and exposure parameters.
[0023] In S1, the weld seam area of the same powder tanker truck is used as the data acquisition object. The image acquisition device does not complete the entire judgment process with a single fixed imaging condition, but rather images the weld seam area multiple times under different lighting angles and exposure parameters. The resulting multi-frame weld seam images share the same weld seam area origin, while also containing grayscale differences caused by variations in lighting angle and exposure parameters. These grayscale differences are not directly output as independent judgment results, but rather serve as the input basis for subsequent registration and fusion.
[0024] S101, the pose adjustment mechanism drives the image acquisition device to move along the weld seam to each acquisition station, and records the position of the image acquisition device relative to the weld seam area at each acquisition station.
[0025] In S101, the acquisition station is set along the weld seam direction. The pose adjustment mechanism is used to change the position of the image acquisition device relative to the weld seam area, enabling the image acquisition device to acquire images of different local areas along the weld seam direction. The position recorded at each acquisition station indicates the source of the weld seam area corresponding to that station, and is subsequently used together with the illumination angle and exposure parameters to form an acquisition parameter identifier. Image data entering subsequent processing should be able to form a correspondence with its acquisition station and acquisition conditions; image data that cannot form this correspondence will not be included as weld seam images with acquisition parameter identifiers in subsequent registration and fusion.
[0026] S102, at each acquisition station, the adjustable light source is sequentially switched to multiple preset illumination angles, and at each illumination angle, the image acquisition device acquires a frame of weld seam image according to multiple preset exposure parameters, so that multiple frames of weld seam images corresponding to different combinations of illumination angle and exposure parameters are obtained at each acquisition station.
[0027] In S102, the adjustable light source is used to change the illumination direction, so that the weld surface and defect area present different grayscale states under different illumination angles. When the image acquisition device acquires images at the same illumination angle with different exposure parameters, the weld defect and the background present different grayscale responses under different exposure conditions. Switching the illumination angle and adjusting the exposure parameters are used together to change the grayscale response relationship between the weld defect and the background. The acquired frames are not used as the final judgment basis alone in subsequent processing, but are used together with other frames from the same acquisition station for reconstruction.
[0028] S103, associate the multiple weld seam images acquired at each acquisition station with the corresponding lighting angle, exposure parameters and position to obtain multiple weld seam images with acquisition parameter identifiers.
[0029] In S103, the acquisition parameter identifier indicates the source conditions of each frame of weld seam image, including the corresponding acquisition station, illumination angle, exposure parameters, and the position of the image acquisition device relative to the weld seam area. Since multiple frames of weld seam images under each acquisition station correspond to different combinations of illumination angle and exposure parameters, these illumination angles and exposure parameters are associated with the corresponding weld seam images as part of the acquisition parameter identifier. This association ensures that subsequent registration and fusion can determine the correspondence between multiple frames of weld seam images under the same acquisition station and provides a retrospective basis for adjusting acquisition parameters when re-acquiring low-confidence sections.
[0030] S2, based on the weld edge feature points, register and fuse multiple weld images to obtain a weld reconstruction image with enhanced contrast.
[0031] In S2, the weld edge feature points are derived from the contour lines on both sides of the weld. Since the grayscale response of the same weld area changes when imaged under different illumination angles and exposure parameters, the weld edge contour can still serve as the basis for positional correspondence between multiple frames. Therefore, this embodiment does not use the grayscale consistency of the entire image as the registration basis, but rather uses the weld edge feature points as the reference object for aligning multiple frames.
[0032] S201, extract edge feature points on both sides of the weld contour line from multiple frames of weld seam images with acquisition parameter identifiers.
[0033] In S201, edge feature points are image features reflecting the position of the contours on both sides of the weld. For multiple frames of weld images from the same acquisition station, edge feature points on the contours on both sides of the weld are extracted, so that each frame of the weld image forms a set of feature points that can be used for position matching. This set of feature points is passed to the subsequent position matching process to determine the position offset state of the remaining frames relative to the reference frame.
[0034] S202, taking any frame of weld seam image under the same acquisition station as the reference frame, the edge feature points of the remaining frames are matched with the edge feature points of the reference frame to obtain the position offset of each frame relative to the reference frame.
[0035] In S202, the reference frame provides a unified spatial reference. When matching the edge feature points of other frames with those of the reference frame, the weld contour correspondence serves as a constraint, converting positional deviations between frames caused by differences in acquisition posture, local offset, or imaging conditions into positional offsets relative to the reference frame. These positional offsets are used as input for alignment processing and are not directly output as defect type determination results.
[0036] S203, align the remaining frames to the reference frame according to the position offset of each frame, and then calculate the maximum deviation of the gray range or relative mean of each frame pixel by pixel for the aligned multi-frame weld seam image and fuse them. Map the gray level difference caused by the changes in the illumination angle and exposure parameters used in each frame to the pixel value in the reconstructed image to obtain a weld seam reconstructed image with enhanced contrast.
[0037] In S203, the aligned multi-frame weld seam images have a corresponding relationship in pixel position. For the same pixel position, during fusion, the grayscale range of each frame can reflect the grayscale change of that pixel under different imaging conditions, or the maximum deviation from the relative mean can reflect the degree of deviation of that pixel from the average state of multiple frames. All of the above fusion methods use the grayscale differences between multiple frames as the basis for reconstruction, so that the defect response caused by changes in illumination angle and exposure parameters is mapped into the reconstructed weld seam image. The reconstructed weld seam image serves as the unified image input for subsequent partitioning, segmentation, and defect identification.
[0038] S3. The weld reconstruction image is divided into several segments along the weld direction. The gray-level distribution of each segment is statistically analyzed, and the segmentation threshold and denoising intensity of each segment are determined according to the gray-level distribution of each segment.
[0039] In S3, the weld reconstruction image is not directly segmented using a globally fixed threshold. Instead, it is first divided into segments along the weld direction. The grayscale distribution within each segment reflects the overall situation of background grayscale, defect response, and noise levels within that local area. The segmentation threshold is used to distinguish candidate defect areas from the local background, and the denoising intensity is used to control the degree of suppression of noise or small interference areas within a segment. Both the segmentation threshold and the denoising intensity are determined separately for each segment, and different processing states are formed depending on the grayscale distribution of each segment.
[0040] S301, along the weld seam direction, divide the weld seam reconstruction image into several sequentially arranged segments according to the set segment length, and number each segment according to its position along the weld seam direction.
[0041] In S301, the segment division direction is consistent with the weld direction. Sequential numbering is used to maintain the positional relationship between segments, ensuring that subsequent defect location output, re-acquisition command generation, storage of areas to be reviewed, and display on the host computer can all trace back to the corresponding weld position. The numbering is only used for segment identification and position sorting and does not represent a specific length value or a fixed quantity limit.
[0042] S302, calculate the mean gray value and standard deviation of pixels in each segment.
[0043] In S302, the gray-level mean is used to represent the overall gray-level level within a segment, and the gray-level standard deviation is used to represent the gray-level dispersion within the segment. The gray-level mean is calculated by dividing the sum of the gray-level values of all pixels in the segment by the total number of pixels in the segment; the gray-level standard deviation is calculated by taking the square root of the sum of the squares of the differences between the gray-level values of each pixel in the segment and the gray-level mean, divided by the total number of pixels. The gray-level mean and gray-level standard deviation together constitute a statistical description of the gray-level distribution of the segment and are passed on to subsequent processes such as whether to continue segmenting, determining the segmentation threshold, and determining the denoising intensity. When other statistical quantities are used as substitutes, the substitute statistics are limited to two types: those reflecting the central tendency of pixel gray-level within the segment and those reflecting the degree of dispersion of pixel gray-level within the segment. The former can be the gray-level median, and the latter can be the gray-level range or interquartile range. The usage of the substitute statistics in determining whether to continue segmenting, determining the segmentation threshold, and determining the denoising intensity is the same as that of the gray-level mean and gray-level standard deviation.
[0044] S303: When the grayscale standard deviation of a certain segment is greater than the set discrete threshold, the segment is divided into two sub-segments along the weld direction and each sub-segment is treated as an independent segment for subsequent processing; when the grayscale standard deviation of a certain segment is not greater than the set discrete threshold, the segment is retained as an independent segment.
[0045] In S303, a discrete threshold is set to determine whether the grayscale variation within a segment exceeds the limits of local processing. If the grayscale standard deviation is greater than the set discrete threshold, it indicates that the grayscale distribution within that segment is not concentrated enough. If a single segment threshold and a single segment denoising intensity are still used, local background changes may become mixed with candidate defect responses. Therefore, the segment is further divided into sub-segments along the weld direction, allowing each sub-segment to enter subsequent processing. If the grayscale standard deviation is not greater than the set discrete threshold, the segment is retained as an independent processing object.
[0046] S304: After dividing a certain section into sub-segments along the weld seam direction, the mean gray value and standard deviation of the pixels in each sub-segment are calculated.
[0047] In S304, the sub-segment is treated as a new local processing object and its grayscale distribution is re-statistically analyzed. This re-statistical process is used to determine whether the grayscale dispersion state within the sub-segment has met the requirements for independent segmentation. The grayscale mean and grayscale standard deviation of the sub-segment are then passed to subsequent segmentation judgment processes.
[0048] S305, when the gray standard deviation of any sub-segment is greater than the discrete threshold, the sub-segment is divided into sub-segments again along the weld direction, and the gray mean and gray standard deviation of the sub-segments obtained by the second division are recalculated and compared until the gray standard deviation of each sub-segment is not greater than the discrete threshold, or the segment length of the sub-segment reaches the set minimum segment length.
[0049] In S305, progressive segmentation uses the comparison between the grayscale standard deviation and the discrete threshold as the condition for continuing segmentation, and stops when the segment length of a sub-segment reaches a set minimum segment length. This process avoids unlimited subdivision due to the persistent existence of local grayscale discrete states, while allowing regions with significant background grayscale changes to obtain segmentation thresholds and denoising intensities more suited to their local states. Sub-segments that have reached the stopping condition are no longer further subdivided and are treated as independent segments in subsequent processing.
[0050] S306, the final sub-segments are renumbered according to their positional order along the weld direction and are treated as independent segments for subsequent processing.
[0051] In S306, renumbering is used to maintain the positional continuity of the subdivided sections along the weld direction. The renumbered independent sections have a positional continuity with the original sections and serve as traceable section objects in subsequent defect location outputs, low-confidence section feedback, records awaiting manual confirmation, and displays on the host computer.
[0052] S4. After processing each segment according to the segmentation threshold and the denoising intensity, the candidate defect connected regions are jointly extracted by gray-level contrast, area, aspect ratio, contour curvature and texture features. The defect type is determined and the defect location is determined according to the feature combination and the defect type mapping relationship.
[0053] In S4, each segment is processed according to its corresponding segmentation threshold and denoising intensity. The processed connected regions are not directly used as the final defect conclusion, but are instead used as candidate defect connected regions in the feature extraction and type comparison process. Gray-level contrast is used to reflect the gray-level difference between the candidate defect connected region and the local background; area is used to reflect the pixel coverage scale of the candidate defect connected region; aspect ratio is used to reflect the shape extension state of the connected region; contour curvature is used to reflect the bending change of the boundary of the connected region; and texture features are used to reflect the uniformity or non-uniformity of the gray-level texture inside the connected region.
[0054] S401, for each candidate defect connected region, the extracted grayscale contrast, area, aspect ratio, contour curvature and texture features are combined into a feature vector, and the geometric center coordinates of the candidate defect connected region in the weld reconstruction image are used as the defect position.
[0055] In S401, the feature vector is a multi-dimensional numerical vector arranged in the order of grayscale contrast, area, aspect ratio, contour curvature, and texture features. Each component corresponds to the quantized value of a feature and serves as the input for subsequent defect type mapping and comparison. The geometric center coordinates are the image coordinates of the candidate defect connected region in the weld reconstruction image. Since the weld reconstruction image is obtained by registering and fusing multiple frames of weld images at the corresponding acquisition station, the geometric center coordinates can be converted into the defect position along the weld direction through the following mapping: First, determine the corresponding acquisition station based on the segment number of the candidate defect connected region. Then, based on the position of the image acquisition device relative to the weld region recorded at the acquisition station, and the preset proportional relationship between the image coordinates and the weld direction position, the geometric center coordinates are converted into the position coordinates of the defect along the weld direction. Thus, the defect position simultaneously retains the image coordinates in the weld reconstruction image and is traced back to the corresponding region along the weld direction through the segment number and acquisition parameter identifier.
[0056] S402, compare the feature vector with the defect type mapping relationship item by item to obtain the candidate defect type and the corresponding matching degree.
[0057] In S402, the defect type mapping relationship includes feature intervals corresponding to cracks, porosity, inclusions, and lack of fusion, respectively. During item-by-item comparison, the grayscale contrast, area, aspect ratio, contour curvature, and texture features in the feature vector are compared with their corresponding feature intervals, and the candidate defect type and matching degree are obtained based on the combination relationship between the feature items. The matching degree is used to represent the degree of conformity between the connected region of the candidate defect and the corresponding defect type mapping relationship.
[0058] S403, when the matching degree is greater than the set matching threshold, the candidate defect type is determined as the defect type and output along with the defect location; when the matching degree is not greater than the set matching threshold, the connected region of the candidate defect is marked as the region to be reviewed.
[0059] In S403, a matching threshold is set to determine whether a candidate defect type can be used as an output defect type. When the matching degree is greater than the set matching threshold, the candidate defect type and defect location are output together as the determination result of the candidate defect connected region. When the matching degree is not greater than the set matching threshold, it means that the feature combination and defect type mapping relationship of the candidate defect connected region have not yet met the conditions for determining the output. Therefore, it is marked as a region to be reviewed, and its defect location and feature vector are retained for subsequent processing.
[0060] S404: When the aspect ratio is greater than the set upper limit of the aspect ratio and the contour curvature is greater than the set curvature threshold, the candidate defect type is determined to be a crack.
[0061] In S404, the aspect ratio reflects the elongation of the connected region of the candidate defect, and the contour curvature reflects the state of its edge variation. When both satisfy the corresponding judgment condition, the candidate defect type corresponding to the connected region of the candidate defect is determined to be a crack. This judgment belongs to a feature combination judgment in the defect type mapping relationship.
[0062] S405, when the aspect ratio is not greater than the set upper limit of the aspect ratio and the texture uniformity of the texture feature is greater than the set uniformity threshold, the candidate defect type is determined to be pore.
[0063] In S405, the morphological extension state and texture uniformity state of the candidate defect's connected region are jointly used for judgment. When the aspect ratio is not greater than the set upper limit of the aspect ratio, it indicates that its shape does not belong to the above-mentioned elongated state; when the texture uniformity is greater than the set uniformity threshold, it indicates that its internal texture is relatively uniform. When both conditions are met, the candidate defect type is determined to be a pore.
[0064] S406, when the grayscale contrast is greater than the set grayscale contrast threshold and the texture uniformity is not greater than the set uniformity threshold, the candidate defect type is determined to be slag inclusion; otherwise, the candidate defect type is determined to be non-fusion.
[0065] In S406, grayscale contrast is used to characterize the grayscale difference between the connected regions of a candidate defect and the local background, while texture uniformity is used to characterize its internal texture state. When the grayscale contrast meets the corresponding condition but the texture uniformity does not meet the uniformity judgment condition, the candidate defect type is determined to be slag inclusion. If the above judgment condition is not met, the candidate defect type is determined to be non-fusion. This judgment result still needs to be combined with the matching degree and the set matching threshold to determine whether it should be output as the final defect type or enter the pending review process.
[0066] S5: Perform quantity statistics within the area to be reviewed, and perform re-comparison or store the results as records to be manually confirmed based on the statistical results.
[0067] S501, after marking the candidate defect connected region as the region to be reviewed, count the number of regions to be reviewed within the same segment.
[0068] In S501, the number of regions awaiting review is counted on a segment-by-segment basis. This statistical result is used to determine whether candidate defect connected regions that fail to meet the matching threshold appear in a concentrated manner within that segment. The statistical object is limited to candidate defect connected regions already marked as regions awaiting review, and the statistical result is passed to the subsequent matching threshold adjustment judgment process.
[0069] S502, when the number of regions to be reviewed exceeds the set review quantity threshold, the matching threshold of the corresponding segment is reduced, and the comparison of the feature vector and defect type mapping relationship is re-executed for the corresponding segment.
[0070] In S502, a threshold for the number of regions to be reviewed is set to determine whether the regions to be reviewed within the same segment have reached a state where the matching threshold needs to be adjusted. When the number of regions to be reviewed exceeds the set threshold, the matching threshold of the corresponding segment is lowered, and the comparison of the feature vector and defect type mapping relationship is re-executed within that segment. Lowering the matching threshold only applies to the corresponding segment and does not change the matching judgment conditions of other segments.
[0071] S503, when the number of areas to be reviewed is not greater than the set review quantity threshold, the defect location of the area to be reviewed is associated with the feature vector and stored as a record to be manually confirmed.
[0072] In S503, the record awaiting manual confirmation includes the defect location and feature vector of the area to be reviewed. This associated storage is used to retain candidate areas where the defect type cannot be directly determined, allowing them to be located and viewed in subsequent manual confirmation or display stages. The record awaiting manual confirmation does not change the defect type and defect location that have already met the matching threshold conditions and been output.
[0073] S6. When the confidence level of the segment feature does not meet the set conditions or the segment contrast does not meet the set requirements, an acquisition parameter adjustment command is generated to adjust the illumination angle or exposure parameters of the corresponding segment and re-acquire, and then return to perform registration and fusion to defect judgment.
[0074] In S6, the segment feature confidence level indicates the reliability of the defect feature determination result within the segment, and the segment contrast level indicates whether the image content of the segment meets the requirements for subsequent recognition. When the segment feature confidence level does not meet the set conditions, or the segment contrast level does not meet the set requirements, it indicates that the existing imaging conditions or image processing results for the segment are insufficient to support stable output. At this time, an acquisition parameter adjustment command is generated, which applies to the illumination angle or exposure parameters of the corresponding segment.
[0075] S601 sets a re-collection count for each segment.
[0076] In S601, the reacquisition count is associated with each segment and is used to record the state of the corresponding segment that is triggered by reacquisition due to segment feature confidence or segment contrast. The reacquisition count is not used as a defect type judgment feature, but is used to limit the feedback reacquisition process and form segment-level anomaly boundaries.
[0077] S602 increments the re-acquisition count for the corresponding segment by one each time an acquisition parameter adjustment command is generated.
[0078] In S602, once the acquisition parameter adjustment command is generated for the corresponding segment, the re-acquisition count for that segment is updated accordingly. The updated count result is associated with the segment number and used to subsequently determine whether the set upper limit for the number of re-acquisitions has been reached. This process ensures that the re-acquisition process has a traceable segment-level status record.
[0079] S603: When the re-acquisition count of a certain segment does not reach the set upper limit of the number of re-acquisitions, adjust the illumination angle or exposure parameters of the corresponding segment according to the acquisition parameter adjustment command and re-acquire, and then return to perform registration and fusion to defect judgment.
[0080] In S603, if the re-acquisition count has not reached the set upper limit for re-acquisition times, the corresponding segment is still allowed to enter the feedback re-acquisition path. After the acquisition parameter adjustment command is transmitted to the adjustable light source or image acquisition device, the illumination angle or exposure parameters of the corresponding segment are changed, allowing the segment to re-acquire the weld image. The re-acquired weld image re-enters the registration fusion, segment processing, and defect judgment processes corresponding to S2 to S4. Therefore, re-acquisition does not form a new judgment path independently, but rather returns to the original image processing link for re-analysis.
[0081] S604: When the re-acquisition count of a certain segment reaches the set upper limit of the number of re-acquisitions and the segment feature confidence level still does not meet the set conditions, stop re-acquiring the corresponding segment and mark the corresponding segment as a segment to be manually confirmed.
[0082] In S604, setting an upper limit on the number of re-acquisitions limits the execution boundary of feedback re-acquisitions. When the re-acquisition count reaches this upper limit and the segment feature confidence level still does not meet the set conditions, re-acquisition for that segment will not be triggered again. This segment is marked as a segment awaiting manual confirmation and associated with its segment number, acquisition parameter identifier, and related judgment status so that its review entry can be retained when the host computer displays or stores it.
[0083] S7, when the confidence level of the segment feature meets the set conditions and the segment contrast meets the set requirements, output the defect type and defect location of the corresponding segment.
[0084] In S7, the output conditions include both the segment feature confidence level meeting the set conditions and the segment contrast meeting the set requirements. For segments that meet the output conditions, the defect type and defect location are output as the analysis results for that segment. The output results can be associated with the segment number and acquisition parameter identifier to form a complete record chain from acquisition conditions, image reconstruction, partitioning, feature determination to result display.
[0085] Please see Figure 1 and Figure 5This embodiment also provides a system for image processing and analysis of weld defects in powder tank truck bodies. This system is used to implement the aforementioned method for image processing and analysis of weld defects in powder tank truck bodies. The system includes an image acquisition device, an adjustable light source and pose adjustment mechanism, an image processing device and a host computer. The components work together to acquire multi-frame weld images, generate reconstructed weld images, determine segment-level defects, and perform feedback re-acquisition.
[0086] The image acquisition device, in conjunction with an adjustable light source and a pose adjustment mechanism, acquires multiple frames of weld seam images of the same powder tanker body weld seam area in stages. Different illumination angles are achieved by switching the adjustable light source, the acquisition position is adjusted by the pose adjustment mechanism, and different exposure parameters are automatically set by the image acquisition device during each acquisition based on multiple preset exposure parameters, and automatically adjusted according to received acquisition parameter adjustment instructions during re-acquisition. The weld seam images output by the image acquisition device should be associated with corresponding acquisition parameter identifiers, enabling the image processing equipment to identify the image source conditions.
[0087] The image processing equipment receives multiple frames of weld seam images via a data interface or bus. The data interface or bus is used to receive image data output by the image acquisition device, allowing the multiple frames of weld seam images to enter the image processing equipment. After receiving the multiple frames of weld seam images, the image processing equipment registers and fuses the multiple frames of weld seam images based on the weld seam edge feature points to obtain a reconstructed weld seam image; then, it partitions the reconstructed weld seam image along the weld seam direction, and determines the segmentation threshold and denoising intensity of each segment according to the grayscale distribution of each segment; subsequently, it jointly extracts grayscale contrast, area, aspect ratio, contour curvature, and texture features from the candidate defect connected regions, and determines the defect type and defect location.
[0088] The image processing equipment is connected to the adjustable light source and pose adjustment mechanism via a control link. When the image processing equipment determines that the confidence level of a segment's features does not meet the set conditions or that the segment's contrast does not meet the set requirements, the image processing equipment sends back an acquisition parameter adjustment command via the control link. This acquisition parameter adjustment command is used to trigger the adjustable light source to adjust its illumination angle, or to trigger the image acquisition device to adjust its exposure parameters, or to cause the pose adjustment mechanism to re-acquire the corresponding segment. The function of the control link is to enable the image processing judgment result to be fed back to the acquisition side, thereby allowing the low-confidence segment to re-enter the acquisition and analysis process.
[0089] The host computer stores and displays the associated records of defect types, defect locations, and corresponding segment acquisition parameters. These associated records include the output defect type, corresponding defect location, and the acquisition parameter identifier related to that segment. For records or segments requiring manual confirmation, the host computer can store their segment number, defect location, feature vector, or related judgment status. The content displayed on the host computer originates from the output of the image processing equipment and does not alter the image processing equipment's processing logic for registering, fusing, partitioning, and judging weld images.
[0090] The specific processes, field states, processing order, judgment conditions, parameter sources, component collaboration, and system integration relationships in this embodiment are all used to explain the feasible implementation methods and systems for image processing and analysis of weld defects in powder tank truck bodies, and should not limit the present invention to the above specific embodiments. Without departing from the scope of the claims and the original disclosure, any equivalent substitutions, modifications, combinations, order adjustments, module substitutions, equivalent transformations of field names, equivalent integration of the executing entity, or equivalent changes in the carrier form that can be conceived by those skilled in the art should fall within the scope of this patent protection; however, such changes should not extend to unclaimed topics, nor should they alter the substantive correspondence of the technical objects by changing component names or reference numerals in the drawings.
Claims
1. A method for image processing and analysis of weld defects in powder tank truck bodies, characterized in that, include: The same powder tank truck's tank weld area was captured multiple times under different lighting angles and exposure parameters to obtain multiple weld images, and each weld image was associated with the corresponding lighting angle and exposure parameters; Based on the feature points of the weld seam edge, the weld seam images of multiple frames are registered and fused. After alignment, the grayscale differences at the same pixel position caused by the changes in illumination angle and exposure parameters in each frame are mapped to the pixel values in the reconstructed image pixel by pixel to obtain a weld seam reconstructed image with enhanced contrast. The reconstructed image of the weld is divided into several segments along the weld direction. The gray-level distribution of each segment is statistically analyzed, and the segmentation threshold and denoising intensity of each segment are determined according to the gray-level distribution of each segment. Each segment is segmented and denoised according to the segmentation threshold and the denoising intensity. The connected regions retained after processing are used as candidate defect connected regions. Gray-scale contrast, area, aspect ratio, contour curvature and texture features are jointly extracted from the candidate defect connected regions. The defect type and defect location are determined according to the feature combination and defect type mapping relationship. When the confidence level of the segment feature does not meet the set conditions or the segment contrast does not meet the set requirements, an acquisition parameter adjustment command is generated to adjust the illumination angle or exposure parameters of the corresponding segment and reacquire the data, and then return to perform registration and fusion to defect judgment. When the confidence level of the segment feature meets the set conditions and the segment contrast meets the set requirements, the defect type and defect location of the corresponding segment are output.
2. The method for image processing and analysis of weld defects in powder tank truck bodies according to claim 1, characterized in that, The steps for collecting images of the weld seam area of the same powder tanker truck body in multiple sessions under different lighting angles and exposure parameters include: The pose adjustment mechanism drives the image acquisition device to move along the weld seam to each acquisition station, and records the position of the image acquisition device relative to the weld seam area at each acquisition station. At each acquisition station, the adjustable light source is sequentially switched to multiple preset illumination angles; At each illumination angle, the image acquisition device acquires one frame of weld seam image according to multiple preset exposure parameters, so that multiple frames of weld seam images corresponding to different combinations of illumination angle and exposure parameters are obtained at each acquisition station. By associating the multiple weld seam images acquired at each acquisition station with the corresponding lighting angle, exposure parameters, and position, a multi-frame weld seam image with acquisition parameter identifiers is obtained.
3. The method for image processing and analysis of weld defects in powder tank truck bodies according to claim 2, characterized in that, The steps for registering and fusing multiple weld seam images based on weld seam edge feature points include: Extract edge feature points on both sides of the weld contour lines from multiple frames of weld seam images with acquisition parameter identifiers; Using any frame of weld seam image under the same acquisition station as the reference frame, the edge feature points of the remaining frames are matched with the edge feature points of the reference frame to obtain the position offset of each frame relative to the reference frame. The remaining frames are aligned to the reference frame according to the position offset of each frame. Then, the maximum deviation of the gray range or relative mean of each frame is calculated pixel by pixel for the aligned multi-frame weld seam image and fused. The gray level difference caused by the changes in the illumination angle and exposure parameters of each frame is mapped to the pixel value in the reconstructed image to obtain a weld seam reconstruction image with enhanced contrast.
4. The method for image processing and analysis of weld defects in powder tank truck bodies according to claim 1, characterized in that, The steps of segmenting the reconstructed weld image into several segments along the weld direction include: The weld reconstruction image is divided into several sequentially arranged segments along the weld direction according to a set segment length, and each segment is numbered according to its position along the weld direction. Calculate the mean gray value and standard deviation of pixels within each segment; When the grayscale standard deviation of a certain segment is greater than the set discrete threshold, the segment is divided into two sub-segments along the weld direction and each sub-segment is treated as an independent segment for subsequent processing. When the grayscale standard deviation of a certain segment is not greater than the set discrete threshold, the segment is retained as an independent segment.
5. The method for image processing and analysis of weld defects in powder tank truck bodies according to claim 4, characterized in that, The process of dividing a certain section into two equal sub-sections along the weld direction includes: Calculate the mean gray value and standard deviation of the pixels in each sub-segment separately; When the gray standard deviation of any sub-segment is greater than the discrete threshold, the sub-segment is divided into two sub-segments again along the weld direction. The mean gray value and the gray standard deviation of the sub-segments are recalculated and compared again until the gray standard deviation of each sub-segment is not greater than the discrete threshold, or the segment length of the sub-segment reaches the set minimum segment length. The resulting sub-segments are renumbered according to their position along the weld direction and are then processed as independent segments.
6. The method for image processing and analysis of weld defects in powder tank truck bodies according to claim 1, characterized in that, The process of determining the defect type and location based on the mapping relationship between feature combinations and defect types includes: For each candidate defect connected region, the extracted grayscale contrast, area, aspect ratio, contour curvature and texture features are combined into a feature vector, and the geometric center coordinates of the candidate defect connected region in the weld reconstruction image are used as the defect location. The feature vectors are compared item by item with the mapping relationship of the defect types to obtain the candidate defect types and their corresponding matching degrees; When the matching degree is greater than the set matching threshold, the candidate defect type is determined as the defect type and output together with the defect location. When the matching degree is not greater than the set matching threshold, the connected region of the candidate defect is marked as the region to be reviewed.
7. The method for image processing and analysis of weld defects in powder tank truck bodies according to claim 6, characterized in that, The defect type mapping relationship includes feature intervals corresponding to cracks, porosity, inclusions, and lack of fusion, respectively. The process of comparing the feature vectors item by item to obtain candidate defect types includes: When the aspect ratio is greater than the set upper limit of the aspect ratio and the contour curvature is greater than the set curvature threshold, the candidate defect type is determined to be a crack; When the aspect ratio is not greater than the set upper limit of the aspect ratio and the texture uniformity of the texture feature is greater than the set uniformity threshold, the candidate defect type is determined to be pore. When the grayscale contrast is greater than the set grayscale contrast threshold and the texture uniformity is not greater than the set uniformity threshold, the candidate defect type is determined to be slag inclusion; otherwise, the candidate defect type is determined to be non-fusion.
8. The method for image processing and analysis of weld defects in powder tank truck bodies according to claim 6, characterized in that, The processing steps following marking the candidate defect connected regions as regions to be reviewed include: Count the number of areas awaiting review within the same segment; When the number of regions to be reviewed exceeds the set review quantity threshold, the matching threshold of the corresponding segment is reduced, and the comparison of the feature vector and the defect type mapping relationship is re-executed for the corresponding segment. When the number of regions to be reviewed is not greater than the set review quantity threshold, the defect location of the region to be reviewed is associated with the feature vector and stored as a record to be manually confirmed.
9. The method for image processing and analysis of weld defects in powder tank truck bodies according to claim 1, characterized in that, The process of generating acquisition parameter adjustment instructions and re-acquiring data includes: Set up a re-collection count for each segment; Each time the acquisition parameter adjustment command is generated, the re-acquisition count for the corresponding segment is incremented by one; When the re-acquisition count for a certain segment does not reach the set upper limit for the number of re-acquisitions, the illumination angle or exposure parameters of the corresponding segment are adjusted according to the acquisition parameter adjustment command and re-acquisition is performed, and then the process returns to perform registration and fusion to defect determination. When the re-collection count for a certain segment reaches the set upper limit for the number of re-collections and the segment feature confidence level still does not meet the set conditions, the re-collection of the corresponding segment is stopped, and the corresponding segment is marked as a segment awaiting manual confirmation.
10. A system for image processing and analysis of weld defects in powder tank truck bodies, characterized in that, The system is used to implement the image processing and analysis method for weld defects in the tank body of a powder tanker truck as described in any one of claims 1-9, including: Image acquisition device, adjustable light source and pose adjustment mechanism, image processing equipment and host computer; With the cooperation of an adjustable light source and a pose adjustment mechanism, the image acquisition device acquires multiple frames of weld seam images of the same powder tanker tank body weld seam area in multiple acquisitions. Different lighting angles are achieved by switching the adjustable light source, the acquisition station is adjusted by the pose adjustment mechanism, and different exposure parameters are automatically set by the image acquisition device according to multiple preset exposure parameters during multiple acquisitions and automatically adjusted according to the received acquisition parameter adjustment instructions during re-acquisition. The image processing device receives multiple frames of the weld seam image via a data interface or bus, registers and fuses the multiple frames of the weld seam image based on the weld seam edge feature points to obtain a reconstructed weld seam image, divides the reconstructed weld seam image into sections along the weld seam direction, and determines the segmentation threshold and denoising intensity of each section according to the grayscale distribution of each section, and jointly extracts grayscale contrast, area, aspect ratio, contour curvature and texture features from the candidate defect connected regions, and determines the defect type and defect location. The image processing equipment is connected to the adjustable light source and pose adjustment mechanism via a control link. When the confidence level of the segment feature does not meet the set conditions or the segment contrast does not meet the set requirements, the acquisition parameter adjustment command is sent back to trigger re-acquisition. The host computer stores and displays the associated records of defect types, defect locations, and corresponding segment acquisition parameters.