Corrosion inhibitor effectiveness detection method based on image processing

By adaptively obtaining the bandwidth of each pixel point in the experimental hanging image and combining the mean drift clustering algorithm, the experimental hanging image is clustered, solving the problem of the mean drift clustering algorithm being sensitive to bandwidth parameters, and achieving more accurate corrosion area segmentation and corrosion inhibitor performance detection.

CN119723097BActive Publication Date: 2025-04-25XIAN LANDAO ENVIRONMENTAL PROTECTION TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510229743.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-28
Publication Date
2025-04-25
Estimated Expiration
2045-02-28

AI Technical Summary

Technical Problem

The mean drift clustering algorithm is sensitive to bandwidth parameters. Too large bandwidth may mask detailed characteristics, resulting in the corrosion area being divided with the normal area, and too small bandwidth may divide one area into multiple small areas, affecting the accuracy of corrosion inhibitor performance detection.

Method used

By obtaining the local severity of changes in each pixel point in the experimental hanging image, the bandwidth of each pixel point is adaptively obtained, and the image is clustered with the mean drift clustering algorithm to achieve more accurate corrosion area segmentation.

Benefits of technology

The accuracy of corrosion inhibitor performance detection is improved, making it more reliable to evaluate the corrosion inhibitor performance based on the area of ​​the corrosion area.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119723097B_ABST
    Figure CN119723097B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of image processing, and more specifically, to a method for detecting the effectiveness of a corrosion inhibitor based on image processing. The method comprises the steps of collecting a standard hanging piece image and an experimental hanging piece image, obtaining the surface uniformity of the experimental hanging piece image, obtaining the local variation intensity of each pixel point in the experimental hanging piece image, obtaining the bandwidth of each pixel point in the experimental hanging piece image according to the local variation intensity of each pixel point in the experimental hanging piece image, clustering the experimental hanging piece image according to the bandwidth of each pixel point in the experimental hanging piece image to obtain a corrosion area, and evaluating the effectiveness of the corrosion inhibitor according to the area of ​​the corrosion area. The present invention improves the accuracy of the clustering result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and more specifically, to a method for detecting the effectiveness of a corrosion inhibitor based on image processing. Background Art

[0002] Corrosion inhibitors have good properties for a variety of materials such as carbon steel, stainless steel, copper alloy, aluminum alloy, etc. Therefore, corrosion inhibitors play an important role in industrial water treatment and metal processing. In order to give full play to the role of corrosion inhibitors and reduce the side effects on the environment or system, it is usually necessary to test the corrosion inhibitor effectiveness to optimize the concentration of corrosion inhibitors. Usually, the hanging plate method is used to put the hanging plate into the corrosive solution and add the corrosion inhibitor to the solution to obtain the hanging plate under the corrosion inhibitor condition, and collect the hanging plate image under the corrosion inhibitor condition, and extract the corrosion area in the image through the image segmentation algorithm to analyze the effect of the corrosion inhibitor and realize the performance test of the corrosion inhibitor.

[0003] The patent application document with the publication number CN116595864A currently proposes a multi-UAV task allocation method based on mean shift clustering algorithm optimization, including step 1: using the mean shift clustering algorithm to cluster all task targets and divide the battlefield area; step 2: constructing a formation of UAV clusters according to the battlefield division results; step 3: establishing a task allocation model of an improved genetic algorithm, including a task model, an evolutionary operator, and a fitness function; step 4: based on the principle of maximizing task benefits, determining the UAV task allocation results through a genetic algorithm.

[0004] The mean shift clustering algorithm is used to segment the experimental coupon image, and the corrosion area in the experimental coupon image is extracted to realize the performance detection of the corrosion inhibitor. However, the mean shift clustering algorithm is very sensitive to the bandwidth parameter. If the bandwidth is too large, some detailed features may be covered up, resulting in the corrosion area and the normal area being segmented together. If the bandwidth is too small, one area may be divided into multiple small areas, affecting the subsequent performance detection of the corrosion inhibitor. Summary of the invention

[0005] In order to solve the problem that a large bandwidth of the mean shift clustering algorithm may cover up some detailed features, resulting in the segmentation of the corrosion area and the normal area, and a small bandwidth may divide an area into multiple small areas, affecting the subsequent corrosion inhibitor performance detection, the present invention proposes a corrosion inhibitor performance detection method based on image processing, which includes the following steps:

[0006] Collect the experimental hanging image; obtain the characteristic value of each pixel in the experimental hanging image; obtain the intensity of local changes of each pixel in the experimental hanging image , Represents the severity of the local change of the i-th pixel; Represents the surface uniformity of the experimental coupon image; Represents the gradient mean of all pixels in the local range of the i-th pixel; Represents the variance of the number of pixels corresponding to each type of eigenvalue in the local range of the i-th pixel; exp() represents an exponential function with a natural constant as the base; Get the bandwidth of each pixel in the experimental hanging image:

[0007] , Represents the bandwidth of the i-th pixel; Represents the pixel value variance of all pixels on the kth channel image corresponding to the local range of the i-th pixel; represents the pixel value variance of all pixels on the k-th channel image; || represents the absolute value symbol; R represents the radius of the threading hole of the hanging piece;

[0008] The experimental coupon images are clustered according to the bandwidth of each pixel point in the experimental coupon images to obtain the corrosion area; the corrosion inhibitor efficiency is evaluated according to the area of ​​the corrosion area.

[0009] The innovation of the present invention lies in that an experimental coupon image is obtained after the coupon is placed in a corrosion solution with a corrosion inhibitor for experiment, and the corrosion area in the experimental coupon image is obtained to detect the effectiveness of the corrosion inhibitor. First, the local change intensity of each pixel in the experimental coupon image is obtained according to the grayscale value and gradient of each pixel in the experimental coupon image, and then the bandwidth of each pixel is adaptively obtained. According to the mean shift clustering algorithm and the bandwidth of each pixel, more accurate corrosion area segmentation can be achieved. Finally, the corrosion inhibitor effectiveness is evaluated according to the area of ​​the corrosion area, so that the effectiveness detection of the corrosion inhibitor is more accurate.

[0010] Preferably, the acquisition of the surface uniformity of the experimental hanging image includes:

[0011] Photograph the hanging piece that has not been tested to obtain the hanging piece RGB image, and grayscale the hanging piece RGB image to obtain the standard hanging piece image;

[0012] ;

[0013] In the formula, represents the surface uniformity of the experimental hanging image; m represents the mean gray value of all pixels in the experimental hanging image; v represents the mean gray value of all pixels in the standard hanging image; o represents the variance of the gray value of all pixels in the experimental hanging image; p represents the variance of the gray value of all pixels in the standard hanging image; exp() represents an exponential function with a natural constant as the base; || represents the absolute value symbol.

[0014] According to the difference in grayscale values ​​between the standard coupon image and the experimental coupon image, the surface uniformity of the experimental coupon image can be obtained more accurately.

[0015] Preferably, acquiring the local range of the pixel point includes:

[0016] The threading holes of the hanging pieces in the experimental hanging piece image are detected by using the Hough circle detection algorithm to obtain the threading holes of the hanging pieces in the experimental hanging piece image, and then the radius of the threading holes of the hanging pieces in the experimental hanging piece image is obtained;

[0017] With each pixel in the experimental hanging image as the center and the radius of the hanging threading hole as the radius of each pixel, a circle is drawn for each pixel in each experimental hanging image, and the circle corresponding to each pixel is used as the local range of each pixel in the experimental hanging image.

[0018] This facilitates the subsequent acquisition of the severity of local changes of each pixel point in the experimental hanging film image according to the local range of each pixel point in the experimental hanging film image.

[0019] Preferably, the step of obtaining the characteristic value of each pixel in the experimental hanging image includes:

[0020] According to the local binary pattern, the LBP value of each pixel in the experimental hanging image is obtained, and the LBP value of each pixel in the experimental hanging image is converted into a decimal number and recorded as the feature value of each pixel in the experimental hanging image.

[0021] Preferably, the collecting of the experimental hanging film images includes:

[0022] A corrosion inhibitor of the required detection concentration is added to the corrosion solution, and an untested coupon is placed therein. After the standard experimental time T, the coupon is taken out, and the corroded coupon is photographed to obtain an RGB image of the corroded coupon. The RGB image of the corroded coupon is gray-scaled to obtain an experimental coupon image.

[0023] Preferably, clustering the experimental coupon image according to the bandwidth of each pixel point in the experimental coupon image to obtain the corrosion area includes:

[0024] According to the bandwidth of each pixel in the experimental hanging image, the mean shift clustering algorithm is used to cluster the pixels in the experimental hanging image to obtain each cluster, and the pixels in each cluster constitute each region, and the grayscale mean of the pixels in each region is obtained, and the grayscale threshold T2 is preset; the mean of all pixels in the standard hanging image is obtained and recorded as the reference mean. If the absolute value of the difference between the grayscale mean of the pixels in any region and the reference mean is greater than or equal to the grayscale threshold, the region is a corrosion region, and the corrosion region in the experimental hanging image is obtained.

[0025] The corrosion area obtained based on the adaptive bandwidth is more accurate.

[0026] Preferably, the evaluating the corrosion inhibitor effectiveness according to the area of ​​the corrosion region comprises:

[0027] The efficiency threshold T3 is preset, and the ratio of the number of pixels in the corrosion area of ​​the experimental coupon image to the number of pixels in the experimental coupon image is recorded as the first ratio. If the first ratio is greater than the efficiency threshold T3, the corrosion inhibitor efficiency is worse, otherwise, the corrosion inhibitor efficiency is better.

[0028] The accuracy of corrosion inhibitor effectiveness detection is improved.

[0029] Preferably, the acquisition of the channel image includes:

[0030] The color channel decomposition of the corrosion coupon RGB image is performed through the image processing library to obtain three channel images of the corrosion coupon RGB image.

[0031] The present invention has the following beneficial effects: the purpose of the present invention is to obtain an experimental hanging piece image after placing a hanging piece in a corrosion solution with a corrosion inhibitor for experiment, and obtain the corrosion area in the experimental hanging piece image to detect the corrosion inhibitor effectiveness. First, according to the gray value and gradient of each pixel point in the experimental hanging piece image, the local change intensity of each pixel point in the experimental hanging piece image is obtained, and then the bandwidth of each pixel point is adaptively obtained. According to the mean shift clustering algorithm and the bandwidth of each pixel point, more accurate corrosion area segmentation can be achieved. Finally, the corrosion inhibitor effectiveness is evaluated according to the area of ​​the corrosion area, so that the effectiveness detection of the corrosion inhibitor is more accurate. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] By reading the following detailed description with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:

[0033] Figure 1 It is a flowchart of the steps of the corrosion inhibitor effectiveness detection method based on image processing in an embodiment of the present invention. DETAILED DESCRIPTION

[0034] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0035] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0036] See also Figure 1 , which shows a flowchart of a method for detecting the effectiveness of a corrosion inhibitor based on image processing according to an embodiment of the present invention, the method comprising the following steps:

[0037] S001. Collect standard hanging film images and experimental hanging film images.

[0038] In the embodiment of the present invention, a hanging piece that has not been tested is photographed to obtain a hanging piece RGB image, and the hanging piece RGB image is grayed to obtain a standard hanging piece image;

[0039] The preset standard experimental time T=72 hours. In other embodiments, the implementer may preset the value of the standard experimental time T according to the specific implementation method;

[0040] Add the corrosion inhibitor of the required detection concentration into the corrosion solution, and put the untested coupons into it. After the standard experimental time T, take out the coupons and take pictures of the corroded coupons to obtain the RGB image of the corroded coupons. The RGB image of the corroded coupons is gray-scaled to obtain the experimental coupon image. The color channel of the RGB image of the corroded coupons is decomposed through the image processing library to obtain three channel images of the RGB image of the corroded coupons.

[0041] It should be noted that the color channel decomposition of the RGB image of the corrosion hanging piece by using the image processing library is a prior art, and will not be described in detail in the embodiment of the present invention.

[0042] S002. Obtain the surface uniformity of the experimental hanging piece image.

[0043] It should be noted that the present invention uses the mean shift clustering algorithm to segment the experimental coupon image, and extracts the corrosion area in the experimental coupon image to realize the performance detection of the corrosion inhibitor. However, the mean shift clustering algorithm is very sensitive to the bandwidth parameter. If the bandwidth is too large, some detailed features may be masked, resulting in the corrosion area and the normal area being segmented together. If the bandwidth is too small, one area may be divided into multiple small areas, affecting the subsequent performance detection of the corrosion inhibitor. Therefore, the present invention needs to adaptively obtain the bandwidth of each pixel point and then cluster the experimental coupon image.

[0044] It should be noted that it is known that there will be certain corrosion marks on the surface of the coupon after the experiment, so the grayscale distribution in the experimental coupon image will be uneven. Since the corresponding coupon is not corroded when the standard coupon image is collected, the grayscale distribution in the standard coupon image is relatively uniform. Therefore, there is a difference in grayscale between the standard coupon image and the experimental coupon image. Therefore, according to the grayscale difference between the standard coupon image and the experimental coupon image, the surface uniformity of the experimental coupon image is obtained. If the grayscale difference between the experimental coupon image and the standard coupon image is greater, the surface uniformity of the experimental coupon image is smaller. At the same time, the grayscale value variance of all pixels in the experimental coupon image also reflects whether the surface grayscale distribution of the coupon in the experimental coupon image is uniform. Due to the corrosion of the coupon surface, the grayscale value variance of all pixels in the experimental coupon image must be greater than the grayscale value variance of all pixels in the standard coupon image.

[0045] In an embodiment of the present invention, the surface uniformity of the experimental coupon image is obtained:

[0046] ;

[0047] In the formula, Represents the surface uniformity of the experimental hanging image; m represents the mean gray value of all pixels in the experimental hanging image; v represents the mean gray value of all pixels in the standard hanging image; o represents the variance of the gray value of all pixels in the experimental hanging image; p represents the variance of the gray value of all pixels in the standard hanging image; exp() represents an exponential function with a natural constant as the base; || represents the absolute value symbol; The larger the value is, the greater the grayscale difference between the experimental coupon image and the standard coupon image is, and the smaller the surface uniformity of the experimental coupon image is; The larger the value of , the greater the variance of all pixels in the experimental coupon image is, and the greater the surface grayscale difference of the coupon in the experimental coupon image is, the smaller the surface uniformity of the experimental coupon image is.

[0048] S003. Obtain the severity of local changes of each pixel in the experimental hanging image, and obtain the bandwidth of each pixel in the experimental hanging image according to the severity of local changes of each pixel in the experimental hanging image.

[0049] It should be noted that when the coupon is subjected to different degrees of corrosion, different areas on the obtained experimental coupon image will show different degrees of corrosion. Therefore, different areas in the experimental coupon image should be clustered using bandwidths of different sizes. Therefore, the present invention first needs to obtain the local range of each pixel in the experimental coupon image, and obtain the local change severity of each pixel in the experimental coupon image based on the grayscale distribution of the pixel in the local range of each pixel, so as to facilitate the subsequent adaptive acquisition of the bandwidth of each pixel in the experimental coupon image based on the local change severity.

[0050] It should be further explained that there are threading holes on the hanging piece. Therefore, when obtaining the local range of each pixel point, the present invention first obtains the radius of the threading hole of the hanging piece in the experimental hanging piece image, and then obtains the local range of each pixel point based on the radius of the threading hole of the hanging piece in the experimental hanging piece image.

[0051] In an embodiment of the present invention, the LBP value of each pixel in the experimental hanging image is obtained according to the local binary pattern, and the LBP value of each pixel in the experimental hanging image is converted into a decimal number and recorded as the characteristic value of each pixel in the experimental hanging image; it should be noted that the local binary pattern is used to obtain the LBP value, which is a well-known technology and will not be described in detail in the embodiment of the present invention.

[0052] The threading holes of the hanging pieces in the experimental hanging piece image are detected by using the Hough circle detection algorithm to obtain the threading holes of the hanging pieces in the experimental hanging piece image; and then the radius of the threading holes of the hanging pieces in the experimental hanging piece image is obtained;

[0053] With each pixel in the experimental hanging image as the center and the radius of the hanging threading hole as the radius of each pixel, a circle is drawn for each pixel in each experimental hanging image, and the circle corresponding to each pixel is used as the local range of each pixel in the experimental hanging image. It should be noted that the implementers can obtain the local range of each pixel in the experimental hanging image according to the specific implementation situation.

[0054] Get the severity of local changes of each pixel in the experimental hanging image:

[0055] ;

[0056] In the formula, Represents the severity of the local change of the i-th pixel in the experimental hanging image; Represents the surface uniformity of the experimental coupon image; Represents the gradient mean of all pixels in the local range of the i-th pixel in the experimental hanging image; Represents the variance of the number of pixels corresponding to each type of eigenvalue in the local range of the i-th pixel in the experimental hanging image; exp() represents an exponential function with a natural constant as the base; The larger the value of U is, the more uniform the grayscale distribution in the experimental coupon image is, and the smaller the local change of each pixel in the experimental coupon image is. The smaller the value of U is, the more uniform the grayscale distribution in the experimental coupon image is, and the larger the local change of each pixel in the image is. The larger the value of , the greater the grayscale value change of the pixels in the local range of the i-th pixel point, and the more drastic the local change of the i-th pixel point; Represents the variance of the number of pixels corresponding to each type of eigenvalue in the local range of the i-th pixel. The smaller the value, the more concentrated the distribution of eigenvalues ​​in the local range of the pixel, the less changes in the local range of the pixel, and the less drastic the local changes of the pixel.

[0057] It should be noted that since the mean shift clustering algorithm is very sensitive to bandwidth parameters and the segmentation effect of the experimental hanging image is seriously dependent on the selection of bandwidth, it is known that different areas in the experimental hanging image may be corroded to different degrees. In order to better segment out areas with different degrees of corrosion, the present invention calculates the bandwidth of each pixel according to the severity of the local change of each pixel. If the severity of the local change of any pixel is smaller, it means that the probability of there being an obvious edge or transition area in the local range of the pixel is smaller, and the pixel is more likely to be inside each area of ​​the experimental hanging image. At this time, a larger bandwidth is needed to avoid excessive segmentation; if the severity of the local change of any pixel is greater, it means that the probability of there being an obvious edge or transition area in the local range of the pixel is greater, and the pixel is more likely to be at the boundary of different areas of the experimental hanging image. At this time, a smaller bandwidth is needed to better segment out the corroded area.

[0058] In this embodiment of the present invention, the bandwidth of each pixel in the experimental hanging image is obtained:

[0059] ;

[0060] In the formula, Represents the bandwidth of the i-th pixel in the experimental hanging image; Represents the severity of the local change of the i-th pixel in the experimental hanging image; Represents the pixel value variance of all pixels on the kth channel image corresponding to the local range of the i-th pixel in the experimental hanging image; represents the pixel value variance of all pixels on the k-th channel image; exp() represents an exponential function with a natural constant as the base; || represents the absolute value symbol; R represents the radius of the threading hole of the hanging piece; it should be noted that the radius of the threading hole of the hanging piece is the initial bandwidth of each pixel;

[0061] The larger the value of , the greater the probability that there is an obvious edge or transition area in the local range of the i-th pixel point, and the i-th pixel point is more likely to be at the boundary of different areas of the experimental coupon image. In this case, a smaller bandwidth is needed to better segment the corrosion area. The smaller the value of is, the smaller the probability that there is an obvious edge or transition area in the local range of the i-th pixel point is, and the i-th pixel point is more likely to be inside each area of ​​the experimental hanging image. At this time, a larger bandwidth is needed to avoid excessive segmentation; The larger the value of , the more likely it is that there is an edge feature in the local range of the i-th pixel, and the i-th pixel should use a smaller bandwidth; conversely, the i-th pixel should use a larger bandwidth;

[0062] S004. Clustering the experimental coupon image according to the bandwidth of each pixel point in the experimental coupon image to obtain the corrosion area, and evaluating the corrosion inhibitor efficiency according to the area of ​​the corrosion area.

[0063] It should be noted that the experimental coupon images are clustered according to the bandwidth of each pixel in the experimental coupon images to obtain the corrosion area, and the corrosion inhibitor efficiency is evaluated according to the area ratio of the corrosion area to the experimental coupon image.

[0064] In the embodiment of the present invention, according to the bandwidth of each pixel in the experimental hanging image, the mean shift clustering algorithm is used to cluster the pixels in the experimental hanging image to obtain each cluster, and the pixels in each cluster constitute each region, and the grayscale mean of the pixels in each region is obtained.

[0065] The preset grayscale threshold T2=30. In the embodiment of the present invention, the implementer can set the value of the grayscale threshold according to the specific implementation situation; obtain the mean of all pixels in the standard hanging film image, which is recorded as the reference mean. If the absolute value of the difference between the grayscale mean of the pixels in any area and the reference mean is less than the grayscale threshold T2, the area is a normal area, otherwise the area is a corroded area, and the corroded area in the experimental hanging film image is obtained.

[0066] The preset efficiency threshold T3=0.3. In other embodiments, the implementer may preset the value of the efficiency threshold T3 according to the specific implementation situation, and record the ratio of the number of pixels in the corrosion area of ​​the experimental hanging piece image to the number of pixels in the experimental hanging piece image as the first ratio. If the first ratio is greater than the efficiency threshold T3, the corrosion inhibitor efficiency is worse, otherwise, the corrosion inhibitor efficiency is better.

[0067] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A corrosion inhibitor effectiveness detection method based on image processing, characterized in that: include: Collecting experimental hanging film images; obtaining characteristic values ​​of each pixel point in the experimental hanging film images; Obtain the severity of local changes in each pixel in the experimental hanging image , Represents the severity of the local change of the i-th pixel; Represents the surface uniformity of the experimental coupon image; Represents the gradient mean of all pixels in the local range of the i-th pixel; Represents the variance of the number of pixels corresponding to each type of eigenvalue in the local range of the i-th pixel; exp() represents an exponential function with a natural constant as the base; Get the bandwidth of each pixel in the experimental hanging image: , Represents the bandwidth of the i-th pixel; Represents the pixel value variance of all pixels on the kth channel image corresponding to the local range of the i-th pixel; represents the pixel value variance of all pixels on the k-th channel image; || represents the absolute value symbol; R represents the radius of the threading hole of the hanging piece; Cluster the experimental coupon images according to the bandwidth of each pixel point in the experimental coupon images to obtain the corrosion area; evaluate the corrosion inhibitor efficiency according to the area of ​​the corrosion area; The acquisition of the surface uniformity of the experimental hanging piece image includes: photographing the hanging piece that has not been tested to obtain the hanging piece RGB image, and graying the hanging piece RGB image to obtain the standard hanging piece image; ; In the formula, m represents the mean gray value of all pixels in the experimental hanging image; v represents the mean gray value of all pixels in the standard hanging image; o represents the variance of the gray value of all pixels in the experimental hanging image; p represents the variance of the gray value of all pixels in the standard hanging image.

2. The method for detecting the corrosion inhibitor effectiveness based on image processing according to claim 1, characterized in that: The acquisition of the local range of the pixel point includes: The threading holes of the hanging pieces in the experimental hanging piece image are detected by using the Hough circle detection algorithm to obtain the threading holes of the hanging pieces in the experimental hanging piece image, and then the radius of the threading holes of the hanging pieces in the experimental hanging piece image is obtained; With each pixel in the experimental hanging image as the center and the radius of the hanging threading hole as the radius of each pixel, a circle is drawn for each pixel in each experimental hanging image, and the circle corresponding to each pixel is used as the local range of each pixel in the experimental hanging image.

3. The method for detecting the corrosion inhibitor effectiveness based on image processing according to claim 1, characterized in that: The step of obtaining the characteristic value of each pixel in the experimental hanging image includes: According to the local binary pattern, the LBP value of each pixel in the experimental hanging image is obtained, and the LBP value of each pixel in the experimental hanging image is converted into a decimal number and recorded as the feature value of each pixel in the experimental hanging image.

4. The method for detecting the corrosion inhibitor effectiveness based on image processing according to claim 1, characterized in that: The collecting of the experimental hanging film images includes: A corrosion inhibitor of the required detection concentration is added to the corrosion solution, and an untested coupon is placed therein. After the standard experimental time T, the coupon is taken out, and the corroded coupon is photographed to obtain an RGB image of the corroded coupon. The RGB image of the corroded coupon is gray-scaled to obtain an experimental coupon image.

5. The method for detecting the corrosion inhibitor effectiveness based on image processing according to claim 1, characterized in that: The experimental hanging image is clustered according to the bandwidth of each pixel point in the experimental hanging image to obtain the corrosion area, including: According to the bandwidth of each pixel in the experimental hanging image, the mean shift clustering algorithm is used to cluster the pixels in the experimental hanging image to obtain each cluster, and the pixels in each cluster constitute each region, and the grayscale mean of the pixels in each region is obtained, and the grayscale threshold T2 is preset; the mean of all pixels in the standard hanging image is obtained and recorded as the reference mean. If the absolute value of the difference between the grayscale mean of the pixels in any region and the reference mean is greater than or equal to the grayscale threshold, the region is a corrosion region, and the corrosion region in the experimental hanging image is obtained.

6. The method for detecting the corrosion inhibitor effectiveness based on image processing according to claim 1, characterized in that: The evaluation of the corrosion inhibitor effectiveness according to the area of ​​the corrosion zone includes: The efficiency threshold T3 is preset, and the ratio of the number of pixels in the corrosion area of ​​the experimental coupon image to the number of pixels in the experimental coupon image is recorded as the first ratio. If the first ratio is greater than the efficiency threshold T3, the corrosion inhibitor efficiency is worse, otherwise, the corrosion inhibitor efficiency is better.

7. The method for detecting the corrosion inhibitor effectiveness based on image processing according to claim 1 or 4, characterized in that: The acquisition of the channel image includes: The color channel decomposition of the corrosion coupon RGB image is performed through the image processing library to obtain three channel images of the corrosion coupon RGB image.

Citation Information

Patent Citations

  • Multi-unmanned aerial vehicle task allocation method based on mean shift clustering algorithm optimization

    CN116595864A

  • Feature extraction device, feature extraction program, and image processing device

    CN103733224A

  • Method and system for detecting defects of semiconductor etching lead frame mold

    CN112014409A