Corrosion detection method and device for petrochemical valve combined with industrial vision

CN122905927APending Publication Date: 2026-10-13SHANDONG CHENWANG CONSTRUCTION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610785105.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-02
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

[0004]本申请通过提供结合工业视觉的石油化工用阀门腐蚀检测方法及设备,解决了现有技术中石油化工用阀门腐蚀检测,存在检测准确率低,容易出现漏检和误判的技术问题

Benefits of technology

[0015]拟通过本申请提出的结合工业视觉的石油化工用阀门腐蚀检测方法,获取阀门的工业图像后,定位并提取阀门表面图像区域;对所述阀门表面图像区域进行像素亮度与饱和度联合阈值分割,提取高亮反光掩膜;以所述高亮反光掩膜的边界为约束,执行基于优先级的纹理合成修复,建立反光抑制图像;对所述反光抑制图像进行超像素分割,建立N个局部均匀的超像素区域;利用多维特征提取通道对每个超像素区域分别建立多维特征向量,所述多维特征向量包括纹理颗粒度特征、灰度随机波动特征和区域边缘连续性特征;将所述多维特征向量输入至污染-腐蚀分类器,标记伪装污染区域;将伪装污染区域从反光抑制图像中剔除后,建立腐蚀候选区域;对所述腐蚀候选区域提取表面纹理粗糙特征、氧化颜色扩散特征、边界破碎特征,生成腐蚀缺陷表征向量;根据腐蚀缺陷表征向量输出阀门腐蚀检测结果。解决了现有技术中石油化工用阀门腐蚀检测,存在检测准确率低,容易出现漏检和误判的技术问题。通过对阀门金属表面的高亮反光进行修复抑制,剔除伪装污染区域,实现了对腐蚀缺陷的精准识别,有效降低了漏检和误判概率,提升了石油化工场景下阀门腐蚀检测的准确率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122905927A_ABST
    Figure CN122905927A_ABST
Patent Text Reader

Abstract

The present application relates to the corrosion detection method and equipment of the valve used in petrochemical industry combined with industrial vision, relates to the field of image data processing, and the method comprises the following steps: acquiring the industrial image of the valve, and extracting the valve surface image area. The valve surface image area is segmented, and the highlight reflection mask is extracted. The texture synthesis repair of the highlight reflection mask is performed, and the reflection suppression image is established. The reflection suppression image is superpixel segmented, N local uniform superpixel areas are established, multi-dimensional feature extraction channels are used to extract multi-dimensional feature vectors. The multi-dimensional feature vectors are input into the pollution-corrosion classifier, the camouflage pollution area is marked and removed, and the corrosion candidate area is established. The corrosion candidate area is subjected to feature extraction, and a corrosion defect representation vector is generated. The valve corrosion detection result is output according to the corrosion defect representation vector. The technical problems of low detection accuracy, easy to miss detection and misjudgment in valve corrosion detection are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image data processing technology, and more specifically to a corrosion detection method and equipment for petrochemical valves that incorporates industrial vision. Background Technology

[0002] Valves in the petrochemical industry are exposed to corrosive media for extended periods, making their surfaces susceptible to corrosion defects due to oxidation and erosion. Failure to detect corrosion hazards in a timely manner can lead to safety incidents such as media leaks and valve failure. Traditional valve corrosion detection relies heavily on manual inspections, which are highly dependent on the experience of the inspectors. Conventional industrial visual inspection methods are also prone to interference from the high reflectivity of the valve's metal surface and can misidentify oil stains and scale as corrosion areas, resulting in low accuracy and failing to meet the precision requirements for valve corrosion detection in petrochemical settings.

[0003] Therefore, in the existing technology for corrosion detection of valves used in petrochemical industry, there are technical problems such as low detection accuracy and easy occurrence of missed detections and misjudgments. Summary of the Invention

[0004] This application provides a corrosion detection method and equipment for petrochemical valves that integrates industrial vision, solving the technical problems of low detection accuracy and susceptibility to missed detections and false positives in existing petrochemical valve corrosion detection technologies. By repairing and suppressing the high-brightness reflection on the valve's metal surface and eliminating disguised contamination areas, accurate identification of corrosion defects is achieved, effectively reducing the probability of missed detections and false positives, and improving the accuracy of valve corrosion detection in petrochemical scenarios.

[0005] This application provides a corrosion detection method for petrochemical valves that combines industrial vision. The method includes: acquiring an industrial image of the valve, locating and extracting the valve surface image region; performing joint thresholding of pixel brightness and saturation on the valve surface image region to extract a high-brightness reflective mask; using the boundary of the high-brightness reflective mask as a constraint, performing priority-based texture synthesis and restoration to establish a reflective suppression image; performing superpixel segmentation on the reflective suppression image to establish N locally uniform superpixel regions; using a multidimensional feature extraction channel to establish a multidimensional feature vector for each superpixel region, the multidimensional feature vector including texture granularity features, grayscale random fluctuation features, and region edge continuity features; inputting the multidimensional feature vector into a contamination-corrosion classifier to mark camouflaged contamination regions; removing camouflaged contamination regions from the reflective suppression image to establish corrosion candidate regions; extracting surface texture roughness features, oxidation color diffusion features, and boundary fragmentation features from the corrosion candidate regions to generate a corrosion defect characterization vector; and outputting the valve corrosion detection result based on the corrosion defect characterization vector.

[0006] In the implementation, a multi-dimensional feature vector is established for each superpixel region using a multi-dimensional feature extraction channel. This includes: the multi-dimensional feature extraction channel comprising a texture granularity extraction sub-channel, a grayscale random fluctuation extraction sub-channel, and a region edge analysis sub-channel. After inputting each superpixel region into the multi-dimensional feature extraction channel, the process includes: performing local texture gradient decomposition on the superpixel region using the texture granularity extraction sub-channel to divide the superpixel region into multiple sliding windows of a preset degree; calculating the gradient direction distribution histogram and gradient magnitude aggregation feature of pixels within each sliding window; calculating the discrete gradient direction change feature using the gradient direction distribution histogram for adjacent sliding windows, and calculating the high-frequency texture response density feature using the gradient magnitude aggregation feature; normalizing and fusing the discrete gradient direction change feature and the high-frequency texture response density feature to generate a texture granularity feature representing the degree of directional disorder and local texture density, and outputting the texture granularity feature as a multi-dimensional feature vector.

[0007] In the implementation, after inputting each superpixel region into the multidimensional feature extraction channel, the method further includes: using a gray-level random fluctuation extraction sub-channel, with each pixel in the superpixel region as the center, constructing a gray-level perturbation matrix representing local gray-level fluctuations based on the gray-level difference between the center and preset neighboring pixels; statistically analyzing the numerical distribution of all elements in the gray-level perturbation matrix to generate a perturbation distribution histogram; calculating the information entropy of the gray-level difference using the perturbation distribution histogram, and using the information entropy as the first feature component; performing threshold binarization on the gray-level perturbation matrix, marking elements exceeding a preset fluctuation threshold as valid perturbations, calculating the spatial distribution density of valid perturbation elements, and establishing a second feature component; concatenating the first feature component and the second feature component to establish a gray-level random fluctuation feature, and outputting the gray-level random fluctuation feature as a multidimensional feature vector.

[0008] In the implementation, after inputting each superpixel region into the multidimensional feature extraction channel, the method further includes: performing edge contour tracking on the superpixel region using the region edge analysis sub-channel to extract the region's outer contour curve; identifying continuous edge segments and edge breakpoints based on the extraction results; extracting the length features of each continuous edge segment and calculating the number of edge direction abrupt change points and the average rate of curvature change at each continuous edge end to establish erosion irregularity features; calculating the spatial density distribution formed by edge breakpoints to establish region edge fragmentation density; constructing a boundary fragmentation index using the erosion irregularity features and region edge fragmentation density; constructing a region edge continuity feature using the edge fragmentation index; and outputting the region edge continuity feature as a multidimensional feature vector.

[0009] In the implementation method, surface texture roughness features, oxidation color diffusion features, and boundary fragmentation features are extracted from the corrosion candidate region to generate a corrosion defect characterization vector. This includes: performing multi-scale texture decomposition processing on the corrosion candidate region, statistically analyzing the local grayscale fluctuation amplitude and texture direction dispersion in texture response maps at different scales, and establishing surface texture roughness features characterizing the particle erosion state of the corroded surface; mapping the corrosion candidate region to a preset color space, and constructing an oxidation response map based on the distribution characteristics of pixel colors in the oxidation color reference interval; calculating the color expansion gradient and color aggregation continuity along the oxidation response enhancement direction in the oxidation response map, and establishing oxidation color diffusion features characterizing the corrosion diffusion trend; performing boundary contour analysis on the corrosion candidate region to extract boundary depression points, edge break points, and local curvature abrupt change regions; establishing boundary fragmentation features characterizing the edge erosion degree based on the boundary depression points, edge break points, and local curvature abrupt change regions; performing spatial co-localization analysis on the surface texture roughness features, oxidation color diffusion features, and boundary fragmentation features to identify the degree of overlap between the texture roughness enhancement region, the oxidation color expansion region, and the boundary fragmentation region; establishing a corrosion significance response value based on the spatial continuity of the overlapping region; and constructing a corrosion defect characterization vector based on the corrosion significance response value.

[0010] In the implementation method, the valve corrosion detection result is output based on the corrosion defect characterization vector, including: performing corrosion consistency discrimination based on the corrosion defect characterization vector, locating the corrosion defect location using the corrosion consistency discrimination result, and establishing a corrosion status identifier for the corresponding corrosion defect location; and outputting the valve corrosion detection result using the corrosion defect location and corrosion status identifier.

[0011] In the implementation method, the valve corrosion detection results are output using the location of corrosion defects and the corrosion status identifier. It also includes: performing corrosion anomaly criticality analysis using the location of corrosion defects to establish a first early warning component; performing corrosion status analysis using the corrosion status identifier to establish a second early warning component; and performing early warning fusion on the first early warning component and the second early warning component to output an early warning signal.

[0012] The implementation method includes outputting valve corrosion detection results using corrosion defect location and corrosion status identifiers, and also includes: performing valve critical structural area mapping using corrosion defect location to map corrosion defect location to valve stem area, flange area or connection area; and correcting valve corrosion detection results based on critical structural area mapping results.

[0013] In the implementation method, the corrosion detection results of the valve are updated in a time sequence to establish a corrosion state change sequence. The corrosion expansion trend is analyzed using the corrosion state change sequence to establish a trend early warning signal.

[0014] This application also provides a corrosion detection device for petrochemical valves that combines industrial vision. The device includes: a surface image acquisition module for acquiring an industrial image of the valve, locating and extracting the valve surface image region; a high-brightness reflective mask extraction module for performing joint threshold segmentation of pixel brightness and saturation on the valve surface image region to extract a high-brightness reflective mask; a reflective suppression module for performing priority-based texture synthesis and restoration using the boundaries of the high-brightness reflective mask as constraints to establish a reflective suppression image; a superpixel segmentation module for performing superpixel segmentation on the reflective suppression image to establish N locally uniform superpixel regions; and a feature extraction module for utilizing multidimensional feature extraction... For each superpixel region, a multi-dimensional feature vector is established, including texture granularity features, grayscale random fluctuation features, and region edge continuity features. A camouflage contamination region acquisition module is used to input the multi-dimensional feature vector into a contamination-corrosion classifier to label camouflage contamination regions. A candidate region acquisition module is used to remove camouflage contamination regions from the reflection suppression image and establish corrosion candidate regions. A defect characterization vector acquisition module is used to extract surface texture roughness features, oxidation color diffusion features, and boundary fragmentation features from the corrosion candidate regions to generate a corrosion defect characterization vector. A detection result acquisition module is used to output the valve corrosion detection result based on the corrosion defect characterization vector.

[0015] This application proposes a corrosion detection method for petrochemical valves that combines industrial vision. The method involves acquiring an industrial image of the valve, locating and extracting the valve surface image region; performing joint thresholding of pixel brightness and saturation on the valve surface image region to extract a high-brightness reflective mask; using the boundary of the high-brightness reflective mask as a constraint, performing priority-based texture synthesis and restoration to establish a reflective suppression image; performing superpixel segmentation on the reflective suppression image to establish N locally uniform superpixel regions; using a multi-dimensional feature extraction channel to establish a multi-dimensional feature vector for each superpixel region, the multi-dimensional feature vector including texture granularity features, grayscale random fluctuation features, and region edge continuity features; inputting the multi-dimensional feature vector into a contamination-corrosion classifier to label camouflaged contamination regions; removing camouflaged contamination regions from the reflective suppression image to establish corrosion candidate regions; extracting surface texture roughness features, oxidation color diffusion features, and boundary fragmentation features from the corrosion candidate regions to generate a corrosion defect characterization vector; and outputting the valve corrosion detection result based on the corrosion defect characterization vector. This invention addresses the technical problems of low accuracy and high susceptibility to missed detections and false positives in existing corrosion detection technologies for valves used in the petrochemical industry. By repairing and suppressing the high-brightness reflectivity of the valve's metal surface and eliminating disguised contamination areas, it achieves accurate identification of corrosion defects, effectively reducing the probability of missed detections and false positives, and improving the accuracy of valve corrosion detection in petrochemical scenarios. Attached Figure Description

[0016] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the accompanying drawings of the embodiments of this disclosure will be briefly described below. Flowcharts are used in this application to illustrate the operations performed by the device according to the embodiments of this application. It should be understood that the preceding or following operations are not necessarily performed precisely in sequence. Instead, various steps can be processed in reverse order or simultaneously as needed. Furthermore, other operations can be added to these processes, or one or more steps can be removed from these processes.

[0017] Figure 1 This is a schematic diagram of a corrosion detection method for petrochemical valves that incorporates industrial vision, provided as an embodiment of this application.

[0018] Figure 2 A schematic diagram of a corrosion detection device for valves in the petrochemical industry that incorporates industrial vision, provided as an embodiment of this application.

[0019] Figure labeling: Surface image acquisition module 11, High-brightness reflective mask extraction module 12, Reflection suppression module 13, Superpixel segmentation module 14, Feature extraction module 15, Camouflage contamination area acquisition module 16, Candidate region acquisition module 17, Defect characterization vector acquisition module 18, Detection result acquisition module 19. Detailed Implementation

[0020] To further illustrate the technical means and effects of the present invention in achieving its intended purpose, the following detailed description of the specific implementation methods, structures, features, and effects of the present invention, in conjunction with the accompanying drawings and preferred embodiments, is provided below.

[0021] Example 1: This application provides a corrosion detection method for petrochemical valves that incorporates industrial vision, such as... Figure 1 As shown, the method includes: Step S100: After acquiring the industrial image of the valve, locate and extract the image area on the valve surface; Specifically, a fixed shooting angle and distance of an industrial camera are used to capture images of commonly used chemical valves such as pipe stop valves, flange ball valves, and gate valves. After acquiring the valve images, image target localization and recognition algorithms, such as pre-trained detection models like YOLO and Faster R-CNN, are used to identify and locate the valve target areas in the images. Independent valve surface image regions are extracted through cropping boxes, and interference from irrelevant areas such as background pipes is removed to obtain image regions that retain only the valve surface.

[0022] Step S200: Perform joint threshold segmentation of pixel brightness and saturation on the image area of ​​the valve surface, and extract the high-brightness reflective mask; Specifically, traditional single brightness threshold segmentation is prone to missegmentation, such as misclassifying light-colored corroded areas as reflective areas, resulting in poor segmentation accuracy. Therefore, this solution performs joint threshold segmentation of pixel brightness and saturation on the valve surface image area. The brightness and saturation values ​​of all pixels in the valve surface image are read in the HSV color space. Preset high brightness and low saturation thresholds are used, which can be set according to actual conditions. The high brightness threshold filters out bright pixels with strong light, while the low saturation threshold filters out colorless reflective pixels. The brightness and saturation values ​​of all pixels are traversed, and pixels with brightness values ​​greater than or equal to the preset high brightness threshold and saturation values ​​less than or equal to the preset low saturation threshold are marked as reflective pixels; the rest are normal pixels. After acquiring reflective pixels, the reflective pixels are clustered into regions to remove discrete and isolated noise reflective pixels. The clustering scheme is to merge reflective pixels with spatial locations of less than or equal to 2 pixels into the same connected region, remove discrete small regions with continuous reflective pixel areas smaller than a preset minimum area threshold, retain reflective connected regions with areas that meet the requirements, and finally convert all retained reflective regions into grayscale high-brightness reflective masks.

[0023] Step S300: Using the boundary of the high-brightness reflective mask as a constraint, perform priority-based texture synthesis and repair to establish a reflective suppression image; Step S400: Perform superpixel segmentation on the reflection suppression image to establish N locally uniform superpixel regions; Specifically, the boundary of the high-brightness reflective mask is obtained by acquiring the edge pixel positions of the mask. Using this boundary as a constraint, a priority texture synthesis strategy is initiated. The algorithm automatically traverses the normal valve body textures surrounding the reflective area, prioritizing them according to texture similarity, grayscale fluctuation, and proximity to the reflective area. The normal texture block with the highest matching degree is selected and sequentially filled into the high-brightness reflective area, gradually completing the texture restoration of the entire reflective area. During the filling process, the filling position is adjusted in real time based on the boundary range to prevent the texture from exceeding the reflective area and affecting the normal valve body surface information. After restoration, a reflection suppression image with no high-brightness spots, no reflective blind spots, complete details, and no interference is obtained.

[0024] Furthermore, for the restored reflection-suppressed image, an adaptive superpixel segmentation algorithm is employed. Based on the valve body image's resolution and surface texture complexity, N non-overlapping, locally uniform superpixel regions are automatically generated. During segmentation, it is crucial to ensure high consistency in texture, grayscale, and color features within the same superpixel, preventing different feature regions from being grouped into the same superpixel. Through superpixel segmentation, pixel-level image features are aggregated into superpixel region-level features, simplifying them into multiple superpixel units with unified features. This reduces the computational granularity of subsequent feature processing and avoids the impact of noise interference from individual pixels on the corrosion recognition results, ensuring recognition stability.

[0025] Step S500: Utilize the multi-dimensional feature extraction channel to establish a multi-dimensional feature vector for each superpixel region. The multi-dimensional feature vector includes texture granularity features, grayscale random fluctuation features, and region edge continuity features. Furthermore, step S500, which utilizes a multi-dimensional feature extraction channel to establish a multi-dimensional feature vector for each superpixel region, further includes: the multi-dimensional feature extraction channel includes a texture granularity extraction sub-channel, a grayscale random fluctuation extraction sub-channel, and a region edge analysis sub-channel. After inputting each superpixel region into the multi-dimensional feature extraction channel, the process includes: performing local texture gradient decomposition processing on the superpixel region using the texture granularity extraction sub-channel to divide the superpixel region into multiple sliding windows of a preset degree; calculating the gradient direction distribution histogram and gradient magnitude aggregation feature of pixels within each sliding window; calculating the gradient direction discrete change feature using the gradient direction distribution histogram for adjacent sliding windows, and calculating the high-frequency texture response density feature using the gradient magnitude aggregation feature; and normalizing and fusing the gradient direction discrete change feature and the high-frequency texture response density feature to generate a texture granularity feature representing the degree of directional disorder and local texture density, and outputting the texture granularity feature as a multi-dimensional feature vector.

[0026] Specifically, each superpixel region is processed using the texture granularity extraction sub-channel, gray-level random fluctuation extraction sub-channel, and region edge analysis sub-channel of the multi-dimensional feature extraction channel to obtain texture granularity features, gray-level random fluctuation features, and region edge continuity features, which are then combined to form a multi-dimensional feature vector. The multi-dimensional feature extraction channel includes the texture granularity extraction sub-channel, gray-level random fluctuation extraction sub-channel, and region edge analysis sub-channel. Each superpixel region is input to the texture granularity extraction sub-channel to analyze the gray-level change trend of pixels within the superpixel region. The gradient operator is used to solve for the gray-level change direction and intensity of each pixel, and the gradient direction and magnitude of each pixel are summarized in a sliding window. The sliding window is a pre-set 4×4 pixel fixed-size sliding window. Furthermore, the superpixel region is divided into multiple sliding windows of preset size based on the sliding window method. For example, for a valve body superpixel region with a size of 40×40 pixels, a preset sliding window size of 4×4 pixels is used. By sliding and traversing row by row and column by column, the superpixel is evenly divided into 100 local sliding windows, completely covering all texture regions within the superpixel. Independent feature calculations are performed on each window. Based on the grayscale change direction and intensity (amplitude) of the pixels within the sliding window, a gradient direction distribution histogram of pixels within each window is generated. The number and clustering positions of high-amplitude pixels with a value greater than a preset amplitude within the window are also obtained, forming the gradient amplitude clustering feature data for each window.

[0027] Furthermore, the discrete change feature of gradient direction is calculated for adjacent sliding windows using the gradient direction distribution histogram. Specifically, the cosine similarity of the gradient direction distribution histograms between adjacent sliding windows is calculated. A lower similarity indicates a greater difference in gradient directions between the two adjacent windows, resulting in a larger discrete change in gradient direction. The average of all adjacent similarities is calculated to obtain the discrete change in gradient direction between adjacent windows. Subsequently, the high-frequency texture response density feature is calculated using the gradient magnitude aggregation feature. The proportion of pixels with gradient magnitudes greater than a preset magnitude threshold within each sliding window is counted to represent the high-frequency texture response density corresponding to that sliding window. Finally, the discrete change feature of gradient direction and the high-frequency texture response density feature of all sliding windows are uniformly mapped to the [0,1] interval, and weighted summation is performed with equal weights to complete normalization fusion, obtaining the overall texture granularity feature of the superpixel region.

[0028] Furthermore, after inputting each superpixel region into the multidimensional feature extraction channel in step S500, the method further includes: using a gray-level random fluctuation extraction sub-channel, with each pixel in the superpixel region as the center, constructing a gray-level perturbation matrix representing local gray-level fluctuations based on the gray-level difference between the center and preset neighboring pixels; statistically analyzing the numerical distribution of all elements in the gray-level perturbation matrix to generate a perturbation distribution histogram; calculating the information entropy of the gray-level difference using the perturbation distribution histogram, and using the information entropy as the first feature component; performing threshold binarization on the gray-level perturbation matrix, marking elements exceeding a preset fluctuation threshold as valid perturbations, calculating the spatial distribution density of valid perturbation elements, and establishing a second feature component; concatenating the first feature component and the second feature component to establish a gray-level random fluctuation feature, and outputting the gray-level random fluctuation feature as a multidimensional feature vector.

[0029] Specifically, sub-channels are extracted using random grayscale fluctuations. For each pixel in the superpixel region, eight neighboring pixels are selected (top, bottom, left, right, and four diagonal pixels). This fixed neighborhood range ensures consistent calculation standards for all superpixels, avoiding feature errors caused by differences in neighborhood size. The grayscale difference between the center pixel and each neighboring pixel is calculated. All calculated grayscale differences are then filled sequentially from top to bottom and left to right according to the neighborhood spatial arrangement, generating a local grayscale perturbation matrix corresponding to the center pixel.

[0030] Furthermore, the numerical distribution of all elements in the gray-level perturbation matrix is ​​statistically analyzed to generate a perturbation distribution histogram, thereby obtaining the distribution characteristics of the overall gray-level fluctuations in the region. The information entropy of the gray-level difference is calculated using the perturbation distribution histogram to quantify the degree of random fluctuation in gray-level perturbation. A smaller entropy value indicates a concentrated distribution of gray-level differences and uniform and stable gray-level distribution in the region. A larger entropy value indicates a stronger degree of random gray-level fluctuation within the discrete superpixel region of the gray-level difference distribution. The calculated information entropy is used as the first feature component of the random gray-level fluctuation characteristics.

[0031] Subsequently, the grayscale perturbation matrix is ​​subjected to threshold binarization. A preset fluctuation threshold is set, preferably 1 / 10 of the grayscale mean. Elements with an absolute value of grayscale difference exceeding this threshold are marked as valid perturbations, and the rest are marked as invalid perturbations. The proportion of all valid perturbation elements in the entire superpixel region is calculated, and the spatial distribution density of the valid perturbation elements is used as the second feature component of the grayscale random fluctuation feature. Finally, the first and second feature components are concatenated and combined to establish a complete grayscale random fluctuation feature, which is output as a component of the multidimensional feature vector.

[0032] Furthermore, after inputting each superpixel region into the multidimensional feature extraction channel, step S500 further includes: performing edge contour tracking on the superpixel region using the region edge analysis sub-channel to extract the region's outer contour curve; identifying continuous edge segments and edge breakpoints based on the extraction results; extracting the length features of each continuous edge segment and calculating the number of edge direction abrupt change points and the average rate of curvature change at each continuous edge end to establish erosion irregularity features; calculating the spatial density distribution formed by edge breakpoints to establish region edge fragmentation density; constructing a boundary fragmentation index using the erosion irregularity features and region edge fragmentation density; constructing a region edge continuity feature using the edge fragmentation index; and outputting the region edge continuity feature as a multidimensional feature vector.

[0033] Specifically, the region edge analysis sub-channel is used to perform edge contour tracking on the input superpixel region. The Canny edge detection algorithm is used to extract all edge contour points of the superpixel region, and closed texture edges inside the superpixel are deleted, retaining only the outer contour portion adjacent to other superpixels, resulting in the region's outer contour curve. Based on the obtained region outer contour curve, continuous edge segments and edge breakpoints are obtained. A continuous edge segment is a continuous line segment with a distance of no more than one pixel between the midpoints of the contour curve. Gaps where the distance between the midpoints of the contour curve exceeds one pixel are marked as edge breakpoints. All marked continuous edge segments are counted, and the length value of each continuous edge segment is extracted. The number of edge direction abrupt change points and the average rate of curvature change at each continuous edge end are calculated to establish an erosion irregularity feature. The spatial density distribution formed by edge breakpoints is calculated to establish a region edge fragmentation density. A boundary fragmentation index is constructed using the erosion irregularity feature and the region edge fragmentation density. The region edge continuity feature is then constructed using the edge fragmentation index and output as a multi-dimensional feature vector. Simultaneously, the contour points on each continuous edge segment are traversed, and the directional change of adjacent contour points is calculated. Points with directional changes greater than a preset directional threshold are marked as edge directional abrupt change points. The preset directional threshold is a pre-set threshold parameter. The number of abrupt change points in each continuous edge segment is counted. The difference in curvature between adjacent contour points is calculated, and the average of all differences is taken to obtain the average curvature change rate of the continuous edge segment. The total length of the edge segment, the number of abrupt change points, and the average curvature change rate are normalized and then weighted and summed to obtain the erosion irregularity feature of the superpixel region.

[0034] Furthermore, the proportion of all edge breakpoints on the entire superpixel's outer contour perimeter is statistically analyzed to calculate the spatial density distribution of these breakpoints, thus obtaining the region's edge fragmentation density. Finally, the boundary fragmentation index is calculated by weighted multiplication of the erosion irregularity feature and the region's edge fragmentation density. A larger boundary fragmentation index indicates more irregular and fragmented superpixel region edges, resulting in poorer continuity. This boundary fragmentation index is used as the region's edge continuity feature and output as a component of the multidimensional feature vector. The texture granularity feature, grayscale random fluctuation feature, and region edge continuity feature are then sequentially concatenated to obtain the complete multidimensional feature vector for the superpixel region.

[0035] Step S600: Input the multidimensional feature vector into the contamination-corrosion classifier to mark the camouflaged contamination area; Step S700: After removing the camouflaged contamination areas from the reflection suppression image, establish corrosion candidate areas; Specifically, a contamination-corrosion classifier is constructed. This classifier is a pre-trained support vector machine (SVM) classification model. The training data includes multi-dimensional feature vectors of superpixel regions extracted in the same manner, as well as labeling data indicating whether the superpixel regions are masquerading as contamination or not. The SVM classification model is trained using the training data, adjusting the kernel function parameters and penalty factor to enable the model to accurately distinguish between masquerading and non-masquerading contamination based on the input multi-dimensional feature vectors. After training, the multi-dimensional feature vectors corresponding to all superpixel regions are sequentially input into the trained contamination-corrosion classifier. The classifier outputs the classification result for each superpixel region, directly labeling superpixel regions classified as masquerading as contamination as such. After labeling, the positions of all superpixel regions labeled as masquerading as contamination are output.

[0036] Furthermore, the superpixel locations of all regions marked as camouflaged contamination are obtained, and these regions are removed from the reflection suppression image and excluded from subsequent corrosion candidate region extraction. All remaining superpixel regions classified as non-camouflaged contamination are directly used as the initial corrosion candidate region set, completing the establishment of the corrosion candidate region and providing an accurate processing basis for subsequent corrosion determination. The pre-classification and removal by the contamination-corrosion classifier effectively eliminates the interference of camouflaged contamination regions on corrosion identification, avoids misclassifying non-corrosion contamination regions as valve body corrosion, improves the overall accuracy of corrosion identification, and reduces unnecessary subsequent computational overhead.

[0037] Step S800: Extract surface texture roughness features, oxidation color diffusion features, and boundary fragmentation features from the corrosion candidate region to generate a corrosion defect characterization vector; Further, step S800 generates a corrosion defect characterization vector, including: performing multi-scale texture decomposition processing on the corrosion candidate region, statistically analyzing the local grayscale fluctuation amplitude and texture direction dispersion in the texture response maps at different scales, and establishing surface texture roughness features characterizing the particle erosion state of the corroded surface; mapping the corrosion candidate region to a preset color space, and constructing an oxidation response map based on the distribution characteristics of pixel colors in the oxidation color reference interval; calculating the color expansion gradient and color aggregation continuity along the oxidation response enhancement direction in the oxidation response map, and establishing an oxidation color diffusion feature characterizing the corrosion diffusion trend; performing boundary contour analysis on the corrosion candidate region, extracting boundary depression points, edge break points, and local curvature abrupt change regions; establishing boundary fragmentation features characterizing the edge erosion degree based on the boundary depression points, edge break points, and local curvature abrupt change regions; performing spatial co-localization analysis on the surface texture roughness features, oxidation color diffusion features, and boundary fragmentation features, identifying the degree of overlap between the texture roughness enhancement region, the oxidation color expansion region, and the boundary fragmentation region; establishing a corrosion significance response value based on the spatial continuity of the overlapping region; and constructing a corrosion defect characterization vector based on the corrosion significance response value.

[0038] Specifically, after obtaining the candidate corrosion regions, multi-scale texture decomposition processing is performed on them. The grayscale images of the candidate regions are smoothed sequentially using Gaussian filter kernels of different sizes. The original image is then subtracted from the smoothed images at different scales to obtain high-frequency texture response maps at multiple scales. The mean and variance of pixel grayscale fluctuations in the high-frequency texture response maps at each scale are statistically analyzed to obtain the grayscale fluctuation amplitude and texture direction dispersion, thus obtaining surface texture roughness features characterizing the erosion state of the corroded surface particles. These surface texture roughness features record the mean and variance of amplitudes at different scales, fully reflecting the texture roughness at different grain sizes. The deeper the corrosion, the higher the surface roughness, and the larger the corresponding mean and variance values.

[0039] Subsequently, the erosion candidate region is mapped from the HSV color space to the RBG color space. For each pixel, the parameter values ​​of the R, G, and B channels are calculated, and the oxidation color reference intervals for the R, G, and B channels are obtained. It is determined whether the parameters of the three channels of a pixel simultaneously meet the requirements of the corresponding reference intervals. Pixels that simultaneously meet the requirements are marked as oxidation response pixels, and the remaining pixels are marked as non-oxidation response pixels. A binarized oxidation response map is generated according to the marking results, where oxidation response pixels are assigned a value of 1, and non-oxidation response pixels are assigned a value of 0. After obtaining the oxidation response map, all oxidation response pixels are located. Based on all oxidation response pixels, the spatial enhancement direction of the oxidation response from weak to strong is obtained, that is, the spatial enhancement direction from light to dark in the RBG color space of the oxidation response pixels. Specifically, the maximum value of the sum of the parameters of the R, G, and B channels of the oxidation response pixel is obtained as the center pixel. Starting from the center pixel, the color parameter difference between each pixel position and the center pixel is calculated as the expansion gradient value. The larger the gradient, the greater the color difference between that position and the central oxidation region, belonging to the outer region of oxidation diffusion. Connecting all pixels with dilation gradient values ​​from the outermost region with the largest gradient to the center pixel using the shortest path is considered a continuous diffusion gradient path. The average gradient of this continuous diffusion gradient path is calculated to obtain the color dilation gradient. Furthermore, the lengths of all continuous diffusion gradient paths are counted, and the proportion of paths exceeding a preset length threshold is calculated to obtain the color cluster continuity. A higher proportion indicates stronger oxidation diffusion continuity. The obtained color dilation gradient and color cluster continuity are used as the oxidation color diffusion features.

[0040] Subsequently, boundary contour parsing is performed on the candidate erosion regions, and the edge coordinate curves of the regions are completely extracted through edge detection. The contour curves are traversed pixel by pixel to extract boundary depression points, edge break points, and local curvature abrupt change regions. Boundary depression points are pixels where the erosion contour contracts inward. The curvature is calculated point by point on the contour, and pixels with curvature less than a preset curvature threshold are marked as boundary depression points. Gaps between adjacent contour points exceeding one pixel are marked as edge break points. Regions where the curvature difference between adjacent points exceeds a preset curvature change threshold are marked as local curvature abrupt change regions. These boundary depression points, edge break points, and local curvature abrupt change regions are then used as boundary fragmentation features to characterize the degree of edge erosion.

[0041] Finally, spatial co-localization analysis was performed on surface texture roughness features, oxidation color diffusion features, and boundary fragmentation features. Within the same spatial coordinate system of the corrosion candidate regions, regions conforming to these features were obtained, resulting in texture roughness enhancement regions, oxidation color diffusion regions, and boundary fragmentation regions. The overlapping areas of these regions were then identified, and the degree of overlap was determined. Based on the proportion of the total area of ​​the overlapping regions to the total area of ​​the corrosion candidate regions, the corrosion significance response value was calculated; a higher proportion indicates stronger spatial consistency of the corrosion features. Finally, the multi-scale surface texture roughness parameters, color diffusion gradient, color aggregation continuity, boundary fragmentation feature values, and corrosion significance response values ​​were sequentially combined to construct a complete corrosion defect characterization vector output.

[0042] Step S900: Output the valve corrosion detection results based on the corrosion defect characterization vector.

[0043] Furthermore, step S900 also includes: performing corrosion consistency discrimination based on the corrosion defect characterization vector, locating the corrosion defect location using the corrosion consistency discrimination result, and establishing a corrosion status identifier for the corresponding corrosion defect location; and outputting the valve corrosion detection result using the corrosion defect location and corrosion status identifier.

[0044] Specifically, corrosion consistency is determined based on multi-scale surface texture roughness parameters, color expansion gradient, color aggregation continuity, boundary fragmentation feature values, and corrosion significance response values ​​of the corrosion defect characterization vector. If the corrosion significance response value is lower than a preset significance threshold, it indicates poor corrosion consistency in the candidate region, and it is likely not a true corrosion area; therefore, the candidate region is directly classified as non-corroded. If the corrosion significance response value is not lower than the preset significance threshold, the candidate region is classified as having a corrosion defect. After completing the consistency determination for all candidate regions, all candidate regions classified as having corrosion are statistically analyzed, and the coordinate position corresponding to each corrosion region is obtained, which is the location of the corrosion defect.

[0045] Furthermore, a mapping relationship between corrosion defect characterization vectors and corrosion state levels is pre-constructed. Different parameter ranges in the corrosion defect characterization vectors correspond to different corrosion state levels, resulting in corrosion state identifiers. These corrosion state levels are divided into three categories: mild corrosion, moderate corrosion, and severe corrosion. After traversing all candidate corrosion regions for identification and identification, the corrosion state identifiers corresponding to the location coordinates of all regions determined to be true corrosion defects are compiled and integrated to obtain the valve corrosion detection results. This method, through multi-dimensional feature extraction and hierarchical classification filtering, effectively eliminates interference factors such as reflection and camouflage contamination, enabling precise location of corrosion areas in the valve body and accurate determination of the degree of corrosion, significantly improving the accuracy and reliability of valve corrosion detection.

[0046] Furthermore, step S900 also includes: performing corrosion anomaly criticality analysis using the location of corrosion defects to establish a first early warning component; performing corrosion state analysis using corrosion state identifiers to establish a second early warning component; and performing early warning fusion on the first and second early warning components to output an early warning signal.

[0047] Specifically, a corrosion anomaly criticality analysis is performed using the location of corrosion defects to obtain the corresponding structural parts of the valve body in the image. Importance coefficients for key structural parts of the valve body are preset, and the corresponding importance coefficients are determined based on the structural parts of the valve body corresponding to the corrosion defects in the image. A first warning component is obtained based on these importance coefficients. If the corrosion defect is located in critical structural parts such as flanges, valve stem sealing surfaces, or pressure-bearing welds, the corresponding importance coefficient is higher. A higher first warning component indicates that the corrosion location is in a more critical valve body part, and the anomaly risk is higher. Further, corrosion state identification is used to perform corrosion state analysis to determine the specific level of corrosion state. A second warning component is determined based on the level. A higher second warning component indicates a more severe overall corrosion degree, and a higher warning level.

[0048] Finally, the first and second warning components are multiplied to obtain the fused warning value. Different fused warning value ranges are set for different warning levels: when the fused warning value is less than or equal to the first warning threshold, a normal no warning signal is output. When the fused warning value is greater than the first warning threshold but less than or equal to the second warning threshold, a mild warning signal is output, indicating that the valve has a mild risk and requires an upcoming inspection and review. When the fused warning value is greater than the second warning threshold but less than or equal to the third warning threshold, a moderate warning signal is output, indicating that the valve has a moderate corrosion risk and requires planned shutdown for maintenance. When the fused warning value is greater than the third warning threshold, a severe warning signal is output, indicating that the valve has a serious corrosion risk and requires immediate shutdown for replacement or repair. This completes the entire process of valve corrosion detection and risk warning.

[0049] Furthermore, step S900 also includes: performing valve critical structural area mapping using the location of corrosion defects, mapping the location of corrosion defects to the valve stem area, flange area, or connection area; and correcting the valve corrosion detection results based on the critical structural area mapping results.

[0050] Specifically, different structural regions have varying tolerance requirements for corrosion levels. The previously determined corrosion status is adjusted based on the mapped region. If a corrosion defect is mapped to the valve stem area, which has higher requirements for surface integrity, the original assessment of mild corrosion is upgraded by one level to moderate corrosion, and moderate corrosion to severe corrosion, ensuring that the corrosion risk in this area is not underestimated. If a corrosion defect is mapped to the connection area, which has a higher tolerance for mild corrosion, the original assessment of moderate corrosion is downgraded by one level to mild corrosion, avoiding over-warning. The final adjusted corrosion status is incorporated into the valve corrosion detection results as the final corrosion status determination, making the detection results more closely reflect the actual risk requirements of different valve body structures.

[0051] Furthermore, step S900 also includes: performing time-series detection and updating of valve corrosion detection results, establishing a corrosion state change sequence, analyzing the corrosion expansion trend using the corrosion state change sequence, and establishing a trend early warning signal.

[0052] Specifically, the corrosion location and corresponding corrosion candidate area's corrosion status level are integrated with the corresponding detection data from the historical detection records of the same valve, and arranged sequentially according to detection time to establish a corrosion status change sequence. The growth rate of corrosion area and the change amplitude of corrosion level are calculated for adjacent detection cycles. If the corrosion area continues to grow within three consecutive detection cycles, and the average growth rate exceeds the preset rate threshold, or the corrosion level jumps consecutively within two detection cycles, it indicates a rapid corrosion expansion trend, suggesting a risk of rapid deterioration at the corresponding corrosion location. An additional early warning signal for accelerated corrosion trend needs to be issued to remind maintenance personnel to pay attention to the corrosion progress of the valve and adjust the maintenance plan accordingly. If the parameters in the corrosion status change sequence show no significant fluctuations for several consecutive cycles, it indicates that the corrosion expansion is in a stable state, and the original early warning level can be maintained without issuing an additional trend warning.

[0053] Example 2, based on the same inventive concept as the corrosion detection method for petrochemical valves combined with industrial vision in the previous examples, such as... Figure 2 As shown, this application provides a corrosion detection device for valves used in the petrochemical industry that combines industrial vision. The device and method embodiments in this application are based on the same inventive concept.

[0054] The petrochemical valve corrosion detection equipment combining industrial vision according to embodiments of the present invention solves the technical problems of low detection accuracy and easy omissions and false positives in the existing petrochemical valve corrosion detection technology. By repairing and suppressing the high-brightness reflection on the valve metal surface and eliminating disguised contamination areas, accurate identification of corrosion defects is achieved, effectively reducing the probability of omissions and false positives, and improving the accuracy of valve corrosion detection in petrochemical scenarios. The petrochemical valve corrosion detection equipment combining industrial vision includes: a surface image acquisition module 11, a high-brightness reflection mask extraction module 12, a reflection suppression module 13, a superpixel segmentation module 14, a feature extraction module 15, a disguised contamination area acquisition module 16, a candidate region acquisition module 17, a defect characterization vector acquisition module 18, and a detection result acquisition module 19.

[0055] The surface image acquisition module 11 is used to acquire an industrial image of the valve, locate and extract the surface image region of the valve; the high-brightness reflective mask extraction module 12 is used to perform joint threshold segmentation of pixel brightness and saturation on the surface image region of the valve to extract the high-brightness reflective mask; the reflective suppression module 13 is used to perform priority-based texture synthesis and repair with the boundary of the high-brightness reflective mask as a constraint to establish a reflective suppression image; the superpixel segmentation module 14 is used to perform superpixel segmentation on the reflective suppression image to establish N locally uniform superpixel regions; the feature extraction module 15 is used to establish multidimensional features for each superpixel region using a multidimensional feature extraction channel. The multidimensional feature vector includes texture granularity features, grayscale random fluctuation features, and region edge continuity features; the camouflage contamination area acquisition module 16 is used to input the multidimensional feature vector into the contamination-corrosion classifier to mark the camouflage contamination area; the candidate region acquisition module 17 is used to remove the camouflage contamination area from the reflection suppression image and establish corrosion candidate regions; the defect characterization vector acquisition module 18 is used to extract surface texture roughness features, oxidation color diffusion features, and boundary fragmentation features from the corrosion candidate regions to generate corrosion defect characterization vectors; the detection result acquisition module 19 is used to output valve corrosion detection results based on the corrosion defect characterization vectors.

[0056] The specific configuration of the feature extraction module 15 will be described in detail below. The feature extraction module 15 may further include: the multi-dimensional feature extraction channel includes a texture granularity extraction sub-channel, a grayscale random fluctuation extraction sub-channel, and a region edge analysis sub-channel. After inputting each superpixel region into the multi-dimensional feature extraction channel, the process includes: performing local texture gradient decomposition processing on the superpixel region using the texture granularity extraction sub-channel, dividing the superpixel region into multiple sliding windows of a preset degree; calculating the gradient direction distribution histogram and gradient magnitude aggregation feature of pixels within each sliding window; calculating the gradient direction discrete change feature using the gradient direction distribution histogram for adjacent sliding windows, and calculating the high-frequency texture response density feature using the gradient magnitude aggregation feature; normalizing and fusing the gradient direction discrete change feature and the high-frequency texture response density feature to generate a texture granularity feature representing the degree of directional disorder and local texture density, and outputting the texture granularity feature as a multi-dimensional feature vector.

[0057] The specific configuration of the feature extraction module 15 will be described in detail below. The feature extraction module 15 may further include: extracting sub-channels using random gray-level fluctuations, centering on each pixel in the superpixel region, and constructing a gray-level perturbation matrix representing local gray-level fluctuations based on the gray-level difference between the center and preset neighboring pixels; statistically analyzing the numerical distribution of all elements in the gray-level perturbation matrix to generate a perturbation distribution histogram; calculating the information entropy of the gray-level difference using the perturbation distribution histogram, and using the information entropy as a first feature component; performing threshold binarization on the gray-level perturbation matrix, marking elements exceeding a preset fluctuation threshold as valid perturbations, calculating the spatial distribution density of valid perturbation elements, and establishing a second feature component; concatenating the first and second feature components to establish a random gray-level fluctuation feature, and outputting the random gray-level fluctuation feature as a multi-dimensional feature vector.

[0058] The specific configuration of the feature extraction module 15 will be described in detail below. The feature extraction module 15 may further include: performing edge contour tracking on the superpixel region using the region edge analysis sub-channel to extract the region's outer contour curve; identifying continuous edge segments and edge breakpoints based on the extraction results; extracting the length feature of each continuous edge segment and calculating the number of edge direction abrupt change points and the average rate of curvature change at each continuous edge end to establish erosion irregularity features; calculating the spatial density distribution formed by edge breakpoints to establish region edge fragmentation density; constructing a boundary fragmentation index using the erosion irregularity features and region edge fragmentation density; constructing a region edge continuity feature using the edge fragmentation index; and outputting the region edge continuity feature as a multi-dimensional feature vector.

[0059] The specific configuration of the defect characterization vector acquisition module 18 will be described in detail below. The defect characterization vector acquisition module 18 may further include: performing multi-scale texture decomposition processing on the corrosion candidate region, statistically analyzing the local grayscale fluctuation amplitude and texture direction dispersion in texture response maps at different scales, and establishing surface texture roughness features characterizing the particle erosion state of the corroded surface; mapping the corrosion candidate region to a preset color space, and constructing an oxidation response map based on the distribution characteristics of pixel colors in the oxidation color reference interval; calculating the color expansion gradient and color aggregation continuity along the oxidation response enhancement direction in the oxidation response map, and establishing oxidation color diffusion features characterizing the corrosion diffusion trend; performing boundary contour analysis on the corrosion candidate region, extracting boundary depression points, edge break points, and local curvature abrupt change regions; establishing boundary fragmentation features characterizing the edge erosion degree based on boundary depression points, edge break points, and local curvature abrupt change regions; performing spatial co-localization analysis on the surface texture roughness features, oxidation color diffusion features, and boundary fragmentation features, identifying the degree of overlap between the texture roughness enhancement region, the oxidation color expansion region, and the boundary fragmentation region; establishing a corrosion significance response value based on the spatial continuity of the overlapping region; and constructing a corrosion defect characterization vector based on the corrosion significance response value.

[0060] The specific configuration of the detection result acquisition module 19 will be described in detail below. The detection result acquisition module 19 may further include: performing corrosion consistency discrimination based on the corrosion defect characterization vector, locating the corrosion defect location using the corrosion consistency discrimination result, and establishing a corrosion status identifier corresponding to the corrosion defect location; and outputting the valve corrosion detection result using the corrosion defect location and corrosion status identifier.

[0061] The specific configuration of the detection result acquisition module 19 will be described in detail below. The detection result acquisition module 19 may further include: performing corrosion anomaly criticality analysis using the location of corrosion defects to establish a first early warning component; performing corrosion state analysis using corrosion state identifiers to establish a second early warning component; and performing early warning fusion on the first early warning component and the second early warning component to output an early warning signal.

[0062] The specific configuration of the detection result acquisition module 19 will be described in detail below. The detection result acquisition module 19 may further include: performing valve critical structural area mapping using the location of corrosion defects, mapping the location of corrosion defects to the valve stem area, flange area, or connection area; and correcting the valve corrosion detection result based on the critical structural area mapping result.

[0063] The specific configuration of the detection result acquisition module 19 will be described in detail below. The detection result acquisition module 19 may further include: performing time-series detection and updating of valve corrosion detection results, establishing a corrosion state change sequence, analyzing the corrosion expansion trend using the corrosion state change sequence, and establishing a trend early warning signal.

[0064] The corrosion detection equipment for petrochemical valves combined with industrial vision provided in this embodiment of the invention can execute the corrosion detection method for petrochemical valves combined with industrial vision provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the method.

[0065] Although this application makes various references to certain modules in the device according to the embodiments of this application, any number of different modules can be used and run on the user terminal and / or server. The various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each functional unit are only for easy distinction between each other and are not used to limit the scope of protection of this invention.

[0066] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any modifications, equivalent changes, and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.

Claims

1. A corrosion detection method for petrochemical valves combining industrial vision, characterized in that, The method includes: After acquiring the industrial image of the valve, locate and extract the image area on the valve surface; The image area on the valve surface is segmented using a combined thresholding method based on pixel brightness and saturation to extract a high-brightness reflective mask. Using the boundaries of the high-brightness reflective mask as constraints, priority-based texture synthesis and repair are performed to establish a reflective suppression image; The reflection suppression image is segmented into N locally uniform superpixel regions. A multidimensional feature vector is established for each superpixel region using a multidimensional feature extraction channel. The multidimensional feature vector includes texture granularity features, grayscale random fluctuation features, and region edge continuity features. The multidimensional feature vector is input into the contamination-corrosion classifier to mark the camouflaged contamination areas; After removing the camouflaged contamination areas from the reflection suppression image, erosion candidate areas are established; Surface texture roughness features, oxidation color diffusion features, and boundary fragmentation features are extracted from the corrosion candidate regions to generate corrosion defect characterization vectors. The valve corrosion detection results are output based on the corrosion defect characterization vector.

2. The corrosion detection method for petrochemical valves combining industrial vision as described in claim 1, characterized in that, Multidimensional feature vectors are constructed for each superpixel region using multidimensional feature extraction channels, including: The multidimensional feature extraction channel includes a texture granularity extraction sub-channel, a grayscale random fluctuation extraction sub-channel, and a region edge analysis sub-channel. After inputting each superpixel region into the multidimensional feature extraction channel, it includes: By extracting sub-channels using texture granularity, local texture gradient decomposition is performed on the superpixel region, dividing the superpixel region into multiple sliding windows of preset degree. Calculate the gradient direction distribution histogram and gradient magnitude clustering features of pixels within each sliding window; For adjacent sliding windows, the gradient direction distribution histogram is used to calculate the discrete change feature of the gradient direction, and the gradient magnitude clustering feature is used to calculate the high-frequency texture response density feature. After normalizing and fusing the discrete variation features of the gradient direction and the high-frequency texture response density features, a texture granularity feature representing the degree of directional disorder and local texture density is generated, and the texture granularity feature is output as a multi-dimensional feature vector.

3. The corrosion detection method for petrochemical valves combining industrial vision as described in claim 2, characterized in that, After inputting each superpixel region into the multidimensional feature extraction channel, the process also includes: Sub-channels are extracted using random gray-level fluctuations. Centered on each pixel in the superpixel region, a gray-level perturbation matrix representing local gray-level fluctuations is constructed based on the gray-level difference between the center and preset neighboring pixels. The numerical distribution of all elements in the gray-level perturbation matrix is ​​statistically analyzed to generate a perturbation distribution histogram. The information entropy of the gray-level difference is calculated using the perturbation distribution histogram, and the information entropy is used as the first feature component. The gray-scale perturbation matrix is ​​subjected to threshold binarization, and elements exceeding the preset fluctuation threshold are marked as valid perturbations. The spatial distribution density of the valid perturbation elements is calculated, and a second feature component is established. The first feature component and the second feature component are concatenated to establish a gray-level random fluctuation feature, and the gray-level random fluctuation feature is output as a multi-dimensional feature vector.

4. The corrosion detection method for petrochemical valves combining industrial vision as described in claim 2, characterized in that, After inputting each superpixel region into the multidimensional feature extraction channel, the process also includes: The edge contour tracking of the superpixel region is performed using the region edge analysis sub-channel to extract the region's outer contour curve; Identify continuous edge segments and edge break points based on the extraction results; Extract the length features of each continuous edge segment, and calculate the number of abrupt changes in edge direction and the average rate of curvature change at each continuous edge end to establish erosion irregularity features; Calculate the spatial density distribution formed by edge breakpoints and establish the region edge fragmentation density; A boundary fragmentation index is constructed using erosion irregularity features and regional edge fragmentation density. The edge fragmentation index is then used to construct regional edge continuity features, which are output as a multi-dimensional feature vector.

5. The corrosion detection method for petrochemical valves combining industrial vision as described in claim 1, characterized in that, Surface texture roughness features, oxidation color diffusion features, and boundary fragmentation features are extracted from the corrosion candidate regions to generate a corrosion defect characterization vector, including: Multi-scale texture decomposition processing is performed on the corrosion candidate region, and the local gray-level fluctuation amplitude and texture direction dispersion of the texture response map at different scales are statistically analyzed to establish surface texture roughness features that characterize the particle erosion state of the corroded surface. The corrosion candidate region is mapped to a preset color space, and an oxidation response map is constructed based on the distribution characteristics of pixel color in the oxidation color reference range. The color expansion gradient and color aggregation continuity are calculated along the direction of oxidation response enhancement in the oxidation response diagram to establish the oxidation color diffusion characteristics that characterize the corrosion diffusion trend. Boundary contour analysis is performed on the corrosion candidate region to extract boundary depressions, edge fracture points, and local curvature abrupt change regions. Establish boundary fragmentation features that characterize the degree of edge erosion based on boundary depressions, edge fracture points, and local curvature abrupt change regions; Spatial colocalization analysis was performed on surface texture roughness features, oxidation color diffusion features, and boundary fragmentation features to identify the degree of overlap between texture roughness enhancement regions, oxidation color expansion regions, and boundary fragmentation regions. Corrosion significance response values ​​are established based on the spatial continuity of overlapping areas; A corrosion defect characterization vector is constructed based on the corrosion significance response value.

6. The corrosion detection method for petrochemical valves combining industrial vision as described in claim 1, characterized in that, The valve corrosion detection results are output based on the corrosion defect characterization vector, including: Corrosion consistency discrimination is performed based on the corrosion defect characterization vector, the corrosion defect location is located using the corrosion consistency discrimination result, and a corrosion state label is established for the corresponding corrosion defect location. The corrosion detection results of valves are output by identifying the location and state of corrosion defects.

7. The corrosion detection method for petrochemical valves combining industrial vision as described in claim 6, characterized in that, The output of valve corrosion detection results, which utilizes the location and state of corrosion defects, also includes: Utilize the location of corrosion defects to perform corrosion anomaly criticality analysis and establish a first early warning component; Corrosion status analysis is performed using corrosion status indicators to establish a second early warning component; The first and second early warning components are fused together to output an early warning signal.

8. The corrosion detection method for petrochemical valves combining industrial vision as described in claim 6, characterized in that, The output of valve corrosion detection results, which utilizes the location and state of corrosion defects, also includes: The location of corrosion defects is used to perform critical structural area mapping of the valve, mapping the location of corrosion defects to the valve stem area, flange area or connection area; The valve corrosion detection results were corrected based on the mapping results of key structural regions.

9. The corrosion detection method for petrochemical valves combining industrial vision as described in claim 1, characterized in that, The corrosion detection results of valves are updated over time to establish a corrosion state change sequence. The corrosion expansion trend is analyzed using the corrosion state change sequence to establish a trend early warning signal.

10. A corrosion detection device for petrochemical valves that combines industrial vision, characterized in that, The device is used to perform the corrosion detection method for petrochemical valves combining industrial vision as described in any one of claims 1-9, including: The surface image acquisition module is used to locate and extract the surface image area of ​​the valve after acquiring an industrial image of the valve. A high-brightness reflective mask extraction module is used to perform joint threshold segmentation of pixel brightness and saturation on the image area of ​​the valve surface to extract the high-brightness reflective mask; The reflection suppression module is used to perform priority-based texture synthesis and repair to establish a reflection suppression image, constrained by the boundary of the high-brightness reflective mask. The superpixel segmentation module is used to perform superpixel segmentation on the reflection suppression image and establish N locally uniform superpixel regions. The feature extraction module is used to establish a multi-dimensional feature vector for each superpixel region using a multi-dimensional feature extraction channel. The multi-dimensional feature vector includes texture granularity features, grayscale random fluctuation features, and region edge continuity features. The camouflage contamination area acquisition module is used to input the multidimensional feature vector into the contamination-corrosion classifier to mark the camouflage contamination area; The candidate region acquisition module is used to remove camouflaged and contaminated areas from the reflection suppression image and then establish corrosion candidate regions. The defect characterization vector acquisition module is used to extract surface texture roughness features, oxidation color diffusion features, and boundary fragmentation features from the corrosion candidate region to generate a corrosion defect characterization vector. The detection result acquisition module is used to output valve corrosion detection results based on the corrosion defect characterization vector.