An online pollution detection system for mining oil based on image processing

By calculating the minimum circumscribed square and gray value difference of the connected domain of the mining oil image, determining the contrast limit parameters, and performing histogram equalization, the problem of inaccurate image enhancement in the detection of mining oil pollution in the existing technology is solved. Improved detection accuracy and reliability.

CN118314126BActive Publication Date: 2024-09-03XIAN XIANGKUN ELECTRIC CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410721542.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-05
Publication Date
2024-09-03
Estimated Expiration
2044-06-05

AI Technical Summary

Technical Problem

In the existing technology, in the detection of mining oil contamination, the clipLimit parameter of the contrast adaptive histogram equalization algorithm selected during image enhancement is inappropriate or inaccurate, resulting in an insignificant enhancement effect in the area of ​​solid large particle impurities or non-solid large particle impurities. Excessive area enhancement affects detection accuracy.

Method used

By obtaining the minimum circumscribed square of the connected domain on the current target oil image, dividing the feature area, calculating the gray value difference between the pixel point and the neighboring pixel point, obtaining the feature value in the historical image, determining the target contrast limit parameter value, and performing histogram The graph is equalized to ensure that the solid large particle impurity areas are significantly enhanced and the non-solid large particle impurity areas are not overly enhanced.

Benefits of technology

It improves the accuracy and reliability of mining oil pollution detection and ensures that the detection effect of solid large particle impurities is significant and non-solid large particle impurities are not excessively enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118314126B
    Figure CN118314126B
Patent Text Reader

Abstract

The present invention relates to the field of image processing technology, and in particular to an online pollution detection system for mining oil based on image processing. The system includes a processor and a memory, and the processor executes a computer program stored in the memory to implement the following steps: obtaining first target feature values ​​corresponding to each first feature area on the current target oil image; obtaining target contrast limiting parameter values ​​corresponding to each first feature area according to the first target feature values ​​corresponding to each first feature area and the first target feature values ​​corresponding to all second feature areas with the same center point coordinates as the first feature area; obtaining an enhanced image corresponding to the current target oil image according to the target contrast limiting parameter values ​​corresponding to each first feature area, and performing online pollution detection on the mining oil according to the enhanced image. The present invention can improve the accuracy and reliability of detecting large solid particle impurities.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of image processing, and in particular to an online mining oil pollution detection system based on image processing. Background Art

[0002] Mining oil mainly refers to lubricating oil used in various equipment used in the mining process. It is usually used to lubricate and protect various equipment used in mining, such as drilling rigs, mining vehicles, conveyor belts, crushers, grinders and other equipment. That is, lubricating oil is needed in every link of mining to reduce friction, prevent wear and improve equipment efficiency; however, mining oil may be contaminated during operation, and mining oil contamination mainly refers to the entry of large solid particles such as metal debris and sand into the mining oil. When there are large solid particles such as metal debris and sand in the mining oil, the lubrication effect of the mining oil will be poor, and the mining equipment may malfunction, posing a serious safety risk. Therefore, it is very important to detect the pollution of mining oil during operation. It is very important to detect large solid particles of impurities in mining oil during operation.

[0003] In the prior art, visual detection algorithms are generally used to detect large solid particles of impurities in real-time collected images, such as using artificial intelligence CNN convolutional networks to identify large solid particles of impurities in captured images. However, as the use time of mining oil increases, the inside of the mining oil will become turbid. At this time, if the collected images are directly detected for large solid particles of impurities, it may lead to poor detection quality or effect. Therefore, in order to improve the detection quality or improve the detection effect, the real-time collected mining oil images are usually enhanced first, and then the enhanced images are detected for large solid particles using visual detection algorithms. Moreover, currently, the collected images are usually enhanced using a limited contrast adaptive histogram equalization algorithm. However, when performing image enhancement, if the value of the clipLimit parameter of the limited contrast adaptive histogram equalization algorithm is selected to be inappropriate or inaccurate, the mining oil may be damaged. The enhancement effect of the solid large particle impurity area on the oil image is not obvious or the non-solid large particle impurity area is over-enhanced, which will lead to low accuracy in the subsequent detection of solid large particle impurities in the enhanced image using the visual detection algorithm. For example, if the selected clipLimit parameter value is small, the enhancement effect of the solid large particle area may be weak. If the selected clipLimit parameter value is large, the non-solid large particle impurity area may be over-enhanced. The clipLimit parameter is a contrast limitation parameter, which indicates the maximum degree of contrast enhancement. That is, clipLimit refers to the maximum limit allowed for stretching the pixel value in each small block in the image. Therefore, when performing image enhancement on the collected mining oil images, how to make the enhancement effect of the solid large particle impurity area more obvious, but the non-solid large particle impurity area will not be over-enhanced is an urgent problem to be solved. Summary of the invention

[0004] In order to solve the above problems, the present invention provides an online mining oil pollution detection system based on image processing, and the technical solution adopted is as follows:

[0005] An embodiment of the present invention provides an online mining oil contamination detection system based on image processing, comprising a processor and a memory, wherein the processor executes a computer program stored in the memory to implement the following steps:

[0006] Get the current target oil image;

[0007] Obtaining the minimum circumscribed square of each connected domain on the current target oil image, and obtaining the segmentation area corresponding to the current target oil image according to the minimum circumscribed square of each connected domain; dividing the current target oil image according to the segmentation area to obtain each first characteristic area on the current target oil image;

[0008] Obtaining first target feature values ​​corresponding to each first feature region according to the grayscale value difference between each pixel point in each first feature region and its corresponding neighboring pixel point;

[0009] Acquire the first target feature value corresponding to each second feature area on each historical target oil image in the historical target oil image set, wherein the method for acquiring the second feature area is the same as that for acquiring the first feature area, and obtain the target contrast limit parameter value corresponding to each first feature area according to the first target feature value corresponding to each first feature area and the first target feature value corresponding to all second feature areas having the same center point coordinates as the first feature area;

[0010] According to the target contrast limit parameter value corresponding to each first feature area, histogram equalization is performed on the corresponding first feature area to obtain an enhanced image corresponding to the current target oil image; and online pollution detection of mining oil is performed based on the enhanced image.

[0011] Preferably, the method for obtaining the minimum circumscribed square of each connected domain on the current target oil image includes:

[0012] For any connected domain on the current target oil image:

[0013] A straight line passing through the center point of the minimum circumscribed rectangle of the connected domain and perpendicular to the length of the minimum circumscribed rectangle of the connected domain is recorded as a characteristic straight line;

[0014] For the two widths of the minimum circumscribed rectangle of the connected domain: the two widths of the minimum circumscribed rectangle of the connected domain are respectively recorded as b1 and b2, and both ends of b1 and b2 are simultaneously extended outward in a direction parallel to the characteristic straight line until the lengths of b1 and b2 are the same as the length of the minimum circumscribed rectangle of the connected domain, and the extension is stopped, and the extended b1 and b2 are recorded as B1 and B2 respectively;

[0015] The square formed by connecting endpoints f1, endpoint f2, endpoint f3 and endpoint f4 in sequence is recorded as the minimum circumscribed square of the connected domain, the endpoints f1 and endpoint f2 are the two endpoints of B1, the endpoints f3 and endpoint f4 are the two endpoints of B2, the straight line determined by the endpoints f1 and endpoint f4 is perpendicular to the characteristic straight line, and the straight line determined by the endpoints f2 and endpoint f3 is also perpendicular to the characteristic straight line.

[0016] Preferably, the method for obtaining the segmented area corresponding to the current target oil image includes:

[0017] For any connected domain on the current target oil image:

[0018] On the current target oil image, all other connected domains except the connected domain are recorded as first connected domains; all first connected domains having the same area as the minimum circumscribed square of the connected domain are obtained and recorded as similar connected domains corresponding to the connected domain;

[0019] The set constructed by all similar connected domains corresponding to the connected domain is recorded as the similar connected domain set corresponding to the connected domain;

[0020] For any similar connected domain in the set of similar connected domains corresponding to the connected domain, the Euclidean distance between the centroid position of the connected domain and the centroid position of the similar connected domain is calculated and recorded as the first distance corresponding to the similar connected domain;

[0021] The set constructed by the first distances corresponding to the respective similar connected domains in the similar connected domain set corresponding to the connected domain is recorded as the first distance set corresponding to the connected domain;

[0022] Record the variance of the first distance set as the first characterization value corresponding to the connected domain; record the number of similar connected domains corresponding to the connected domain as the second characterization value corresponding to the connected domain; record the area of ​​the minimum circumscribed square of the connected domain as the third characterization value corresponding to the connected domain;

[0023] A value obtained by performing negative correlation mapping on the product of the first characterization value corresponding to the connected domain and the second characterization value corresponding to the connected domain is then multiplied by the third characterization value corresponding to the connected domain, and the value is recorded as the final characterization value corresponding to the connected domain;

[0024] The sum of the final characterization values ​​corresponding to all connected domains on the current target oil image is recorded as the segmentation area corresponding to the current target oil image.

[0025] Preferably, the method for obtaining each first characteristic region on the current target oil image includes:

[0026] Set the length and width to The window is recorded as the target window. For Round up, R is the segmentation area, and the sliding step length of the target window is ;

[0027] The target window is placed at the upper left corner of the current target oil image, and is slid in a sequence from top to bottom and from left to right until there are no pixels outside the window on the current target oil image, and the sliding is stopped, and each target window on the current target oil image is obtained;

[0028] For any target window on the current target oil image, a region in the target window belonging to the current target oil image is recorded as a first characteristic region.

[0029] Preferably, the method for obtaining the first target feature value corresponding to each first feature area includes:

[0030] For any pixel point in any first feature area on the current target oil image: all pixel points located in the first feature area and belonging to the eight neighborhoods of the pixel point are recorded as neighborhood pixel points corresponding to the pixel point, and all neighborhood pixel points corresponding to the pixel point are recorded as the neighborhood pixel point set corresponding to the pixel point; for any neighborhood pixel point in the neighborhood pixel point set corresponding to the pixel point, the absolute value of the difference between the grayscale value of the pixel point and the grayscale value of the neighborhood pixel point is recorded as the grayscale difference value corresponding to the neighborhood pixel point; the cumulative sum of the grayscale difference values ​​corresponding to all neighborhood pixel points in the neighborhood pixel point set corresponding to the pixel point is recorded as the grayscale comprehensive difference value corresponding to the pixel point;

[0031] The sum of the grayscale comprehensive difference values ​​corresponding to all the pixels in each first feature area is recorded as the first feature value corresponding to the first feature area;

[0032] The first target feature value corresponding to each first feature region is obtained according to the first feature value corresponding to each first feature region and the first feature value corresponding to the first feature region adjacent to each first feature region.

[0033] Preferably, the method for obtaining the first target feature value corresponding to each first feature region according to the first feature value corresponding to each first feature region and the first feature value corresponding to the first feature region adjacent to each first feature region includes:

[0034] For any first characteristic region on the current target oil image:

[0035] On the current target oil image, all first feature regions belonging to the four neighborhoods of the first feature region are recorded as adjacent first feature regions corresponding to the first feature region; a set constructed from all adjacent first feature regions corresponding to the first feature region is recorded as a set of adjacent first feature regions corresponding to the first feature region;

[0036] For any adjacent first feature region in the set of adjacent first feature regions corresponding to the first feature region, the absolute value of the difference between the first feature value corresponding to the first feature region and the first feature value corresponding to the adjacent first feature region is recorded as the first feature difference value corresponding to the adjacent first feature region;

[0037] A set of first feature difference values ​​corresponding to all adjacent first feature regions in the set of adjacent first feature regions corresponding to the first feature region is recorded as a first feature difference value set corresponding to the first feature region, and a variance of the first feature difference value set is recorded as a feature neighborhood difference index corresponding to the first feature region;

[0038] The reciprocal of the value obtained by adding the constant 1 to the first eigenvalue corresponding to the first feature area is recorded as the second eigenvalue corresponding to the first feature area; the sum of the second eigenvalue corresponding to the first feature area and the corresponding feature neighborhood difference index is recorded as the first target eigenvalue corresponding to the first feature area.

[0039] Preferably, the method for obtaining the target contrast limit parameter value corresponding to each first feature area includes:

[0040] For any first characteristic region on the current target oil image:

[0041] Acquire all second feature regions corresponding to all historical target oil images in the historical target oil image set that have the same center point coordinates as the first feature region, and record them as second feature regions corresponding to the first feature region;

[0042] Recording the first feature region and a set of all second feature regions corresponding to the first feature region as a target feature region set corresponding to the first feature region, and recording all feature regions in the target feature region set as target feature regions;

[0043] Obtaining, according to the first target feature value corresponding to each target feature region in the target feature region set, a second target feature value corresponding to the first feature region;

[0044] According to the second target characteristic value, a target contrast limiting parameter value corresponding to the first characteristic area is obtained.

[0045] Preferably, the method for obtaining the second target feature value corresponding to the first feature area includes:

[0046] The absolute value of the difference between the first target feature value corresponding to the t-1th target feature region in the target feature region set corresponding to the first feature region and the first target feature value corresponding to the tth target feature region is recorded as the first target feature difference value corresponding to the tth target feature region; the first target feature difference value corresponding to the first target feature region in the target feature region set is 0;

[0047] The sum of the first target feature difference values ​​corresponding to all target feature regions in the target feature region set corresponding to the first feature region is recorded as the second target feature value corresponding to the first feature region.

[0048] Preferably, the method for obtaining the target contrast limiting parameter value corresponding to the first feature area according to the second target feature value includes:

[0049] Get the initial contrast limit parameter value;

[0050] The average value obtained by adding the value after negative correlation mapping of the second target feature value corresponding to the first feature area and the value after normalization of the first target feature value corresponding to the first feature area is recorded as the adjustment degree corresponding to the first feature area;

[0051] The product of the adjustment degree and the initial contrast limit parameter value is recorded as the target contrast limit parameter value corresponding to the first feature area.

[0052] Beneficial effects: The present invention obtains the segmentation area corresponding to the current target oil image based on the minimum circumscribed square of each connected domain on the current target oil image; and divides the current target oil image according to the segmentation area to obtain each first feature area on the current target oil image; then, according to the gray value difference between each pixel point in each first feature area and its corresponding neighboring pixel point, obtains the first target feature value corresponding to each first feature area, and obtains the first target feature value corresponding to each second feature area on each historical target oil image in the historical target oil image set, and then obtains the target contrast limit parameter value corresponding to each first feature area according to the first target feature value corresponding to each first feature area and the first target feature value corresponding to all second feature areas with the same center point coordinates as the first feature area; finally, according to the target contrast limit parameter value corresponding to each first feature area, histogram equalization is performed on the corresponding first feature area to obtain an enhanced image corresponding to the current target oil image, and online pollution detection of mining oil is performed based on the enhanced image. The present invention obtains target contrast limiting parameter values ​​corresponding to each first feature area based on the first target feature values ​​corresponding to each first feature area and the first target feature values ​​corresponding to all second feature areas with the same center point coordinates as the first feature area, so that when histogram equalization is subsequently performed, the solid large particle impurity area enhancement effect is more obvious, but the non-solid large particle impurity area will not be excessively enhanced. That is, the present invention obtains target contrast limiting parameter values ​​corresponding to each first feature area based on the first target feature values ​​corresponding to each first feature area and the first target feature values ​​corresponding to all second feature areas with the same center point coordinates as the first feature area, so that when histogram equalization is subsequently performed, the enhancement effect is better, and then based on the enhanced image, the accuracy and reliability of solid large particle impurity detection can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0054] Figure 1 The present invention is a flow chart of an online mining oil contamination detection method based on image processing. DETAILED DESCRIPTION

[0055] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field belong to the scope of protection of the embodiments of the present invention.

[0056] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0057] This embodiment provides an online pollution detection system for mining oil based on image processing, including a processor and a memory, wherein the processor executes a computer program stored in the memory to implement an online pollution detection method for mining oil based on image processing, such as Figure 1 As shown, the online mining oil contamination detection method based on image processing comprises the following steps:

[0058] Step S001, obtaining the current target oil image.

[0059] The main purpose of this embodiment is to effectively enhance the oil image, that is, the main purpose of this embodiment is to make the enhancement effect of the solid large particle impurity area more obvious, but the non-solid large particle impurity area will not be over-enhanced, so that the subsequent mining oil pollution detection based on the enhanced image can be more accurate, and the mining oil pollution detection mainly refers to the detection of solid large particle impurities; in addition, the solid large particle impurities in this embodiment are mainly metal debris, sand, etc., and these solid large particle impurities may come from equipment wear or external environment, etc., and the non-solid large particle impurities in this embodiment mainly refer to small solid particles, and the small solid particles in this embodiment mainly come from dust, mud, etc. in the external environment.

[0060] This embodiment first uses an industrial camera to capture images of the mining oil delivery pipeline, and the captured image is a mining oil image; in addition, the mining oil image captured at the current moment is recorded as the current mining oil image corresponding to the current moment.

[0061] In this embodiment, the implementer can set the time interval for shooting of the industrial camera according to actual conditions. For example, the shooting time interval can be set to 0.1 seconds, and sufficient ambient light is ensured when acquiring images. In addition, the mining oil image collected in this embodiment will be wirelessly transmitted to the detection terminal, and the mining oil image will be grayscaled to obtain a grayscale image of the oil. In this embodiment, the image after the current mining oil image is grayscaled is recorded as the current mining oil grayscale image.

[0062] Then, the current mining oil grayscale image is binarized to obtain a binary image corresponding to the current mining oil grayscale image, and the binarization is to mark the pixel value of the oil area on the current mining oil grayscale image as 0, and mark the pixel value of the non-oil area as 255, the non-oil area includes a solid large particle area and a non-solid large particle area, and the non-solid large particle area refers to a solid small particle area; and usually, the number of solid small particles on the mining oil grayscale image is greater than the number of solid large particles, and the area of ​​the solid small particles is smaller than the area of ​​the solid large particles; in addition, in order to eliminate the interference of some extremely small solid particles to subsequent analysis, this embodiment performs a morphological opening operation on the binary image corresponding to the current mining oil grayscale image, and records the binary image subjected to the morphological opening operation as the target binary image, that is, performing a morphological opening operation on the binary image can eliminate some solid small particles that are too small.

[0063] Then, the current mining oil grayscale image is multiplied by its corresponding target binary image, and the multiplied image is recorded as the current target oil image; therefore, the current target oil image can be obtained through the above process in this embodiment.

[0064] Step S002, obtaining the minimum circumscribed square of each connected domain on the current target oil image, and obtaining the segmentation area corresponding to the current target oil image according to the minimum circumscribed square of each connected domain; dividing the current target oil image according to the target area corresponding to the current target oil image to obtain each first feature area on the current target oil image.

[0065] Since the internal environment of mining oil becomes turbid after a long period of use, errors may occur in the detection or identification of some large-particle solid impurities during visual inspection. Therefore, in order to increase the accuracy of detection, the captured image is generally enhanced first, and the image enhancement is usually performed using a limited contrast adaptive histogram equalization algorithm. When the limited contrast adaptive histogram equalization algorithm is used for image enhancement, the image is usually segmented, and then each segmented region is enhanced by histogram equalization. The contrast limitation parameter value corresponding to each segmented region is used for contrast limitation during histogram equalization. Therefore, the size of the region obtained by segmenting the image determines the enhancement effect of the limited contrast histogram equalization. Therefore, in order to make the enhancement effect of the solid large-particle impurities more obvious and the non-solid large-particle impurities not over-enhanced during subsequent image enhancement, the present embodiment expects that the region containing the solid large-particle impurities after image segmentation is as small as possible.

[0066] Therefore, this embodiment will then obtain the segmentation area corresponding to the current target oil image based on the minimum circumscribed square of each connected domain on the current target oil image, that is, the segmentation area is obtained based on the distribution characteristics of small solid particles and large solid particles, and then the current target oil image is divided according to the segmentation area to obtain each first characteristic region on the current target oil image, and then the target contrast limit parameter value corresponding to each first characteristic region will be determined based on the gray value of the pixel points in each first characteristic region on the current target oil image and the center point coordinates of each first characteristic region. Therefore, the specific process of obtaining the target area corresponding to the current target oil image and each first characteristic region on the current target oil image is:

[0067] First, a connected domain analysis is performed on the current target oil image to obtain each connected domain on the current target oil image, and the minimum circumscribed rectangle of each connected domain on the current target oil image is obtained; for any connected domain on the current target oil image: if the four sides of the minimum circumscribed rectangle of the connected domain are a1, b1, a2, and b2, respectively, where a1 and a2 are the lengths of the minimum circumscribed rectangle of the connected domain, b1 and b2 are the widths of the minimum circumscribed rectangle of the connected domain, and the lengths of a1 and a2 are both L1, and the lengths of b1 and b2 are both L2; the ratio of L1 to L2 after subtracting it and the constant 2 is recorded as the extension length L3, and the straight line passing through the center point of the minimum circumscribed rectangle of the connected domain and perpendicular to the length of the minimum circumscribed rectangle of the connected domain is recorded as the feature straight line; for the two widths b1 and b2 of the minimum circumscribed rectangle of the connected domain: extend the two ends of b1 and b2 simultaneously along the line that is parallel to the feature straight line. The line is extended outward in a direction parallel to the line until the length of b1 and b2 is the same as the length of the minimum circumscribed rectangle of the connected domain, and the extension is stopped. The extended b1 and b2 are respectively recorded as B1 and B2, and the lengths of the two ends of b1 and b2 extending outward are both extension lengths L3; then the two endpoints of B1 are recorded as f1 and f2, and the two endpoints of B2 are recorded as f3 and f4, wherein the straight line determined by the endpoints f1 and f4 is perpendicular to the feature straight line, and the straight line determined by the endpoints f2 and f3 is also perpendicular to the feature straight line. Then the square formed by connecting the endpoints f1, f2, f3 and f4 in sequence is recorded as the minimum circumscribed square of the connected domain, that is, the four endpoints of the minimum circumscribed square of the connected domain are f1, f2, f3 and f4, and the center position of the minimum circumscribed square of the connected domain is consistent with the center position of the minimum circumscribed rectangle of the connected domain.

[0068] Therefore, the minimum circumscribed square of each connected domain on the current target oil image can be obtained through the above process; next, the corresponding segmentation area is determined based on the minimum circumscribed square of each connected domain on the current target oil image, specifically:

[0069] For any connected domain on the current target oil image:

[0070] On the current target oil image, all other connected domains except the connected domain are recorded as first connected domains, and then all first connected domains with the same area as the minimum circumscribed square of the connected domain are obtained and recorded as similar connected domains corresponding to the connected domain, and the set constructed by all similar connected domains corresponding to the connected domain is recorded as the similar connected domain set corresponding to the connected domain; for any similar connected domain in the similar connected domain set corresponding to the connected domain, the Euclidean distance between the centroid position of the connected domain and the centroid position of the similar connected domain is calculated and recorded as the first distance corresponding to the similar connected domain; then the set constructed by the first distances corresponding to each similar connected domain in the similar connected domain set corresponding to the connected domain is recorded as the first distance set corresponding to the connected domain.

[0071] Then, the variance of the first distance set is calculated and recorded as the first characterization value corresponding to the connected domain, the number of similar connected domains corresponding to the connected domain is recorded as the second characterization value corresponding to the connected domain, and the area of ​​the minimum circumscribed square of the connected domain is recorded as the third characterization value corresponding to the connected domain; the value obtained by performing negative correlation mapping on the product of the first characterization value corresponding to the connected domain and the second characterization value corresponding to the connected domain is multiplied by the third characterization value corresponding to the connected domain, and the value is recorded as the final characterization value corresponding to the connected domain.

[0072] And the number of all similar connected domains corresponding to the connected domain and the first characterization value corresponding to the connected domain can reflect the possibility that the connected domain is a solid large particle connected domain. Because the number of small solid particles on the current target oil image is relatively large compared to the number of large solid particles, and the distribution is relatively random, so when the number of all similar connected domains corresponding to the connected domain is more and the variance of the first distance set is larger, that is, when the number of all similar connected domains corresponding to the connected domain is more and the corresponding first characterization value is larger, it indicates that the connected domain is more likely to be a solid small particle connected domain. Then, when the segmentation area is determined later, the contribution of the minimum circumscribed square of the connected domain is smaller, that is, the final characterization value corresponding to the connected domain is smaller; conversely, when the number of all similar connected domains corresponding to the connected domain is smaller and the variance of the first distance set is smaller, that is, when the number of all similar connected domains corresponding to the connected domain is smaller and the corresponding first characterization value is smaller, it indicates that the connected domain is more likely to be a solid large particle connected domain. Then, when the segmentation area is determined later, the contribution of the minimum circumscribed square of the connected domain is larger, that is, the final characterization value corresponding to the connected domain is larger.

[0073] Therefore, the final characterization values ​​corresponding to each connected domain on the current target oil image can be obtained through the above process; the sum of the final characterization values ​​corresponding to all connected domains on the current target oil image is recorded as the segmentation area corresponding to the current target oil image; that is, the segmentation area corresponding to the current target oil image is calculated according to the following formula:

[0074]

[0075] in, is the segmentation area corresponding to the current target oil image, is the number of connected domains on the current target oil image, is the number of similar connected domains in the set of similar connected domains corresponding to the ith connected domain on the current target oil image, and is also the second representation value corresponding to the ith connected domain. is the centroid coordinate of the minimum circumscribed square of the i-th connected domain on the current target oil image, is the centroid coordinate of the jth similar connected domain in the set of similar connected domains corresponding to the i-th connected domain on the current target oil image, for and The Euclidean distance between them is also the first distance, is the mean of the Euclidean distances between the barycentric coordinates of the minimum circumscribed square of the i-th connected domain on the current target oil image and the barycentric coordinates of all similar connected domains in its corresponding similar connected domain set, is the variance of the first distance set corresponding to the i-th connected domain on the current target oil image, and is also the first representation value corresponding to the i-th connected domain. is the area of ​​the minimum circumscribed square of the ith connected domain on the current target oil image, and is also the third characterization value corresponding to the ith connected domain. exp() is an exponential function with a constant e as the base.

[0076] And when The larger the value, the more likely the i-th connected domain is to be the connected domain where the solid particles are located. The smaller the contribution to R, the greater the The smaller it is, the more likely the i-th connected domain is the connected domain where the solid large particles are located. The greater the contribution to R; in addition, when The smaller, The bigger the The bigger, The bigger, The more hours, The smaller.

[0077] Therefore, this embodiment can obtain the segmentation area corresponding to the current target oil image through the above process; and set the length and width to The window is recorded as the target window, where is the rounding sign, and then the target window is placed at the upper left corner of the current target oil image, and then the target window is moved from top to bottom and from left to right until there are no pixels outside the window on the current target oil image, and the sliding stops, and each target window on the current target oil image is obtained, and then the area belonging to the current target oil image in each target window is recorded as the first feature area, and the center point coordinates of each first feature area are obtained. In addition, the step size of the window sliding is Therefore, through the above process, each first characteristic region on the current target oil image and the center point coordinates of each first characteristic region can be obtained.

[0078] Step S003, obtaining the first target feature value corresponding to each first feature area according to the gray value difference between each pixel point in each first feature area and its corresponding neighboring pixel point.

[0079] After the current target oil image is divided, each first feature region obtained by the division will be histogram equalized, and the clipLimit parameter will be used to limit the contrast. Since the purpose of this embodiment is to make the solid large particle impurity part enhancement effect more obvious, but the non-solid large particle impurity part will not be over-enhanced, the present embodiment will then obtain the first target feature value corresponding to each first feature region based on the pixel value difference between each pixel point in each first feature region and its corresponding neighboring pixel point. The first target feature value can reflect the possibility that the corresponding first feature region belongs to solid large particle impurities. Therefore, the specific process of obtaining the first target feature value corresponding to each first feature region in this embodiment is as follows:

[0080] For the first characteristic region with large solid impurities, the distribution of pixels with similar grayscale values ​​in the first characteristic region is usually more concentrated. For example, large solid impurities pixels with low grayscale values ​​are clustered together, while oil background pixels with high grayscale values ​​are clustered together. That is, for the first characteristic region with large solid impurities, the probability of the presence of neighboring pixels with grayscale values ​​similar to the corresponding pixel in the neighborhood of each pixel is high. For the first characteristic region with no large solid impurities but only small solid particles, the distribution of pixels with similar grayscale values ​​in the first characteristic region is usually more discrete. Then, the probability of the presence of neighboring pixels with grayscale values ​​similar to the corresponding pixel in the neighborhood of each pixel is higher. Therefore, for any pixel point in any first feature area on the current target oil image: all pixel points located in the first feature area and belonging to the eight neighborhoods of the pixel point are recorded as neighborhood pixel points corresponding to the pixel point, and all neighborhood pixel points corresponding to the pixel point are recorded as the neighborhood pixel point set corresponding to the pixel point; for any neighborhood pixel point in the neighborhood pixel point set corresponding to the pixel point, the absolute value of the difference between the grayscale value of the pixel point and the grayscale value of the neighborhood pixel point is recorded as the grayscale difference corresponding to the neighborhood pixel point; the cumulative sum of the grayscale difference values ​​corresponding to all neighborhood pixel points in the neighborhood pixel point set corresponding to the pixel point is recorded as the grayscale comprehensive difference corresponding to the pixel point.

[0081] Therefore, through the above process, the grayscale comprehensive difference corresponding to each pixel point in each first feature area on the current target oil image can be obtained; then the sum of the grayscale comprehensive difference values ​​corresponding to all pixel points in each first feature area is recorded as the first eigenvalue corresponding to the corresponding first feature area, and the smaller the first eigenvalue corresponding to the first feature area, the more concentrated the distribution of pixels with similar grayscale values ​​in the first feature area is, that is, the more the first feature area conforms to the distribution characteristics of large solid particles, and conversely, the larger the first eigenvalue corresponding to the first feature area is, the more discrete the distribution of pixels with similar grayscale values ​​in the first feature area is, that is, the more the first feature area conforms to the distribution characteristics of small solid particles; the first eigenvalue corresponding to each first feature area on the current target oil image is calculated according to the following formula:

[0082]

[0083] in, is the first eigenvalue corresponding to the qth first feature area on the current target oil image, is the number of pixels in the qth first feature area on the current target oil image, is the number of neighboring pixels corresponding to the k-th pixel in the q-th first feature area on the current target oil image, is the gray value of the kth pixel in the qth first feature area on the current target oil image, is the gray value of the rth neighboring pixel corresponding to the kth pixel in the qth first feature area on the current target oil image, for and The absolute value of the difference.

[0084] in, The more hours, The smaller, The smaller it is, the more the first characteristic region conforms to the distribution characteristics of large solid impurities; otherwise, The bigger it is, The bigger, The larger the value is, the more the first characteristic region conforms to the distribution characteristics of small solid particles.

[0085] Since there are more small solid particles in the entire image and their area is smaller than that of large solid particles, the distribution distance between adjacent large solid particle impurities in the image is farther than the distribution distance between adjacent small solid particle impurities. Therefore, for the first feature region that meets the distribution characteristics of large solid particle impurities, the probability that there is also a first feature region that meets the characteristics of large solid particle impurities in the adjacent first feature region of the first feature region is small. Conversely, for the first feature region that meets the distribution characteristics of small solid particles, the probability that there is also a first feature region that meets the distribution characteristics of small solid particles in the adjacent first feature region of the first feature region is large. Therefore, this embodiment will then obtain the first target feature value corresponding to each first feature region by analyzing the difference in the first feature value between each first feature region and its adjacent first feature region on the basis of obtaining the first feature value, specifically:

[0086] For the qth first feature region on the current target oil image: on the current target oil image, all first feature regions in the four neighborhoods of the first feature region are recorded as adjacent first feature regions corresponding to the first feature region; the set constructed by all adjacent first feature regions corresponding to the first feature region is recorded as the set of adjacent first feature regions corresponding to the first feature region; for any adjacent first feature region in the set of adjacent first feature regions corresponding to the first feature region, the absolute value of the difference between the first eigenvalue corresponding to the first feature region and the first eigenvalue corresponding to the adjacent first feature region is recorded as the first feature difference value corresponding to the adjacent first feature region; then the set constructed by all first feature difference values ​​corresponding to the adjacent first feature regions in the set of adjacent first feature regions corresponding to the first feature region is recorded as the set of first feature difference values ​​corresponding to the first feature region, and the variance of the set of first feature difference values ​​is recorded as the feature neighborhood difference index corresponding to the first feature region, and the larger the feature neighborhood difference index corresponding to the first feature region, the less similar the first eigenvalues ​​between the first feature region and its corresponding adjacent first feature region are, and vice versa, the smaller the feature neighborhood difference index corresponding to the first feature region is, the more similar the first feature region is. The more similar the first eigenvalues ​​between the domain and its corresponding adjacent first feature region are; the reciprocal of the value obtained by adding the constant 1 to the first eigenvalue corresponding to the first feature region is recorded as the second eigenvalue corresponding to the first feature region; the sum of the second eigenvalue corresponding to the first feature region and the characteristic neighborhood difference index corresponding to the first feature region is recorded as the first target eigenvalue corresponding to the first feature region; and the larger the second eigenvalue corresponding to the first feature region, that is, the smaller the first eigenvalue corresponding to the first feature region, and the larger the characteristic neighborhood difference index corresponding to the first feature region, the larger the first target eigenvalue corresponding to the first feature region The larger the first target characteristic value is, the more likely it is that there are large solid particles of impurities in the first characteristic area, that is, the more obvious the characteristics of large solid particles of impurities presented in the first characteristic area are; conversely, the smaller the second characteristic value corresponding to the first characteristic area is, that is, the larger the first characteristic value corresponding to the first characteristic area is, and the smaller the characteristic neighborhood difference index corresponding to the first characteristic area is, the smaller the first target characteristic value corresponding to the first characteristic area is, and the smaller the first target characteristic value is, the greater the probability that there are no large solid particles of impurities in the first characteristic area but there are small solid particles, that is, the more obvious the characteristics of small solid particles presented in the first characteristic area are.

[0087] Therefore, this embodiment can obtain the first target feature value corresponding to each first feature area on the current target oil image through the above process.

[0088] Step S004, obtaining the first target feature value corresponding to each second feature area on each historical target oil image in the historical target oil image set, the method for obtaining the second feature area is the same as the method for obtaining the first feature area, and the target contrast limit parameter value corresponding to each first feature area is obtained according to the first target feature value corresponding to each first feature area and the first target feature value corresponding to all second feature areas with the same center point coordinates as the first feature area.

[0089] Since the above process in this embodiment only analyzes the current target oil image, that is, the first target feature value reflecting the characteristics of the solid large particle area obtained in this embodiment is only obtained through a static image, and in order to more accurately analyze the characteristics presented by each first feature area, this embodiment will then determine the second target feature value corresponding to each first feature area on the current target oil image based on the first target feature value corresponding to each second feature area on each historical target oil image in the historical target oil image set and the first target feature value corresponding to each first feature area on the current target oil image, and then obtain the target contrast limit parameter value corresponding to each first feature area on the current target oil image, and the target contrast limit parameter value is the target clip-Limit parameter value. Therefore, the specific process of obtaining the target contrast limit parameter value corresponding to each first feature area on the current target oil image in this embodiment is:

[0090] In step S001 of the present embodiment, when an industrial camera is used to photograph and collect images of the mining oil delivery pipeline, historical mining oil images corresponding to all historical moments before the current moment can also be collected, and then the historical target oil images corresponding to all historical moments can also be obtained according to the process of obtaining the current target oil image; the present embodiment records the set of historical target oil images corresponding to T consecutive historical moments before and adjacent to the current moment as a historical target oil image set; and in specific applications, it is necessary to set the value of T according to actual conditions, for example, the present embodiment sets the value of T to 5.

[0091] Then, each second feature area on each historical target oil image in the historical target oil image set is obtained, and the first target feature value corresponding to each second feature area on each historical target oil image in the historical target oil image set is obtained; and the method for obtaining each second feature area on the historical target oil image in this embodiment is the same as the method for obtaining each first feature area on the current target oil image in step S002, and the method for obtaining the first target feature value corresponding to each second feature area on the historical target oil image is the same as the method for obtaining the first target feature value corresponding to each first feature area on the current target oil image in the above-mentioned step S003, so this embodiment will not be described in detail.

[0092] Since the flow speed of large solid particles is relatively slower and that of small solid particles is faster in the transportation pipeline of mining oil, if a certain area on a certain frame image is the area where large solid particles are located, then some large solid particles may also exist in the same area on multiple frames of images continuously acquired before the frame image. That is, if the large solid particles present in a certain area on a certain frame image have obvious characteristics, then the large solid particles present in the same area on multiple frames of images continuously acquired before the frame image are also relatively obvious. Therefore, for the current target oil image and all historical target oil images in the historical target oil image set, if the center point coordinate is the first feature area corresponding to all feature areas of P, The smaller the difference between the target feature values, the more obvious the features of the solid large particle impurities presented in the first feature area whose center point coordinates are P on the current target oil image, that is, the first feature area whose center point coordinates are P on the current target oil image is more likely to be the area where the solid large particle impurities belong. Conversely, for the current target oil image and all historical target oil images in the historical target oil image set, if the difference between the first target feature values ​​corresponding to all feature areas whose center point coordinates are P is larger, it indicates that the solid small particles presented in the first feature area whose center point coordinates are P on the current target oil image are more obvious, that is, the first feature area whose center point coordinates are P on the current target oil image is less likely to be the area where the solid large particle impurities belong.

[0093] Therefore, for the qth first feature area on the current target oil image:

[0094] Among all the second feature areas corresponding to all the historical target oil images in the historical target oil image set, all the second feature areas with the same center point coordinates as the first feature area are obtained, and recorded as the second feature areas corresponding to the first feature area; the set constructed by the first feature area and all the second feature areas corresponding to the first feature area is recorded as the target feature area set corresponding to the first feature area, all the feature areas in the target feature area set are recorded as target feature areas, and the feature areas in the target feature area set are arranged in the order of acquisition of the images to which the feature areas belong, that is, the last feature area in the target feature area set is the qth first feature area, if the d1th feature area in the target feature area set is not the qth first feature area, then the d1th feature area belongs to the d1th historical target oil image in the historical target oil image set.

[0095] Then, the absolute value of the difference between the first target feature value corresponding to the t-1th target feature region in the target feature region set corresponding to the first feature region and the first target feature value corresponding to the tth target feature region is calculated and recorded as the first target feature difference value corresponding to the tth target feature region; and the first target feature difference value corresponding to the 1st target feature region in the target feature region set is 0; the sum of the first target feature difference values ​​corresponding to all target feature regions in the target feature region set corresponding to the first feature region is recorded as the second target feature value corresponding to the first feature region. The second target feature value corresponding to the qth first feature region on the current target oil image is calculated according to the following formula:

[0096]

[0097] in, is the second target feature value corresponding to the qth first feature area on the current target oil image, is the number of target feature regions in the target feature region set corresponding to the first feature region, is the first target feature value corresponding to the t-1th target feature region in the target feature region set corresponding to the first feature region, is the first target feature value corresponding to the t-th target feature region in the target feature region set corresponding to the first feature region, for and The absolute value of the difference between .

[0098] and The more hours, The smaller, The smaller it is, the more obvious the characteristics of the solid large particle impurities presented by the qth first characteristic area on the current target oil image are, that is, the qth first characteristic area on the current target oil image is more likely to be the area where the solid large particle impurities belong, and vice versa. The bigger it is, The bigger, The larger the value is, the more obvious the small solid particles presented in the qth first characteristic area on the current target oil image are, that is, the qth first characteristic area on the current target oil image is less likely to be the area where large solid particles impurities belong.

[0099] Therefore, this embodiment can obtain the second target feature value corresponding to each first feature area on the current target oil image through the above process. Next, this embodiment will obtain the adjustment degree corresponding to each first feature area on the current target oil image based on the second target feature value corresponding to each first feature area on the current target oil image and the first target feature value corresponding to each first feature area on the current target oil image, and obtain the target contrast limit parameter value corresponding to each first feature area on the current target oil image based on the initial contrast limit parameter value and the adjustment degree corresponding to each first feature area on the current target oil image, specifically:

[0100] For the qth first feature area on the current target oil image: the average value obtained by adding the value after negative correlation mapping of the second target feature value corresponding to the qth first feature area on the current target oil image and the normalized value of the first target feature value corresponding to the qth first feature area on the current target oil image is recorded as the adjustment degree corresponding to the qth first feature area on the current target oil image.

[0101] Therefore, through the above process, the adjustment degree corresponding to each first feature area on the current target oil image can be obtained; then the initial contrast limit parameter value is obtained, and the product of the adjustment degree corresponding to each first feature area on the current target oil image and the initial contrast limit parameter value is recorded as the target contrast limit parameter value corresponding to the corresponding first feature area on the current target oil image.

[0102] In this embodiment, the implementer needs to set the initial contrast limit parameter value according to the actual situation, and usually the initial contrast limit parameter value is an empirical value. For example, the initial contrast limit parameter value can be set to 20 or 10 in this embodiment.

[0103] Therefore, through the above process, the target contrast limit parameter value corresponding to each first characteristic area on the current target oil image can be obtained.

[0104] Step S005, performing histogram equalization on the corresponding first feature regions according to the target contrast limit parameter values ​​corresponding to the first feature regions to obtain an enhanced image corresponding to the current target oil image; and performing online contamination detection on the mining oil according to the enhanced image.

[0105] Next, this embodiment performs histogram equalization on the corresponding first feature area based on the target contrast limit parameter value corresponding to each first feature area to obtain an enhanced image corresponding to the current target oil image, and performs online pollution detection on the mining oil in each first feature area according to the enhanced image, specifically:

[0106] This embodiment then performs histogram equalization on each first feature area on the current target oil image, and uses the target contrast limit parameter value corresponding to each first feature area to control the degree of contrast enhancement of the corresponding first feature area, that is, the target contrast limit parameter value corresponding to each first feature area is the maximum parameter for contrast enhancement of the corresponding first feature area; therefore, this embodiment performs histogram equalization on the corresponding first feature area according to the target contrast limit parameter value corresponding to each first feature area, and can obtain an enhanced image corresponding to the current target oil image, and subsequently uses the trained CNN convolutional network to perform solid large particle detection on the enhanced image, and when it is detected that there are solid large particle impurities in the mineral oil at the current moment, it is determined that the mineral oil at the current moment is seriously polluted, and at this time the staff needs to take corresponding measures to treat the mineral oil, such as changing the oil; conversely, when it is detected that there are no solid large particle impurities in the mineral oil at the current moment, it is determined that the mineral oil at the current moment can be used normally.

[0107] In summary, this embodiment obtains the segmentation area corresponding to the current target oil image based on the minimum circumscribed square of each connected domain on the current target oil image; and divides the current target oil image according to the segmentation area to obtain each first feature area on the current target oil image; then, according to the gray value difference between each pixel point in each first feature area and its corresponding neighboring pixel point, the first target feature value corresponding to each first feature area is obtained, and the first target feature value corresponding to each second feature area on each historical target oil image in the historical target oil image set is obtained, and then, according to the first target feature value corresponding to each first feature area and the first target feature value corresponding to all second feature areas with the same center point coordinates as the first feature area, the target contrast limit parameter value corresponding to each first feature area is obtained; finally, according to the target contrast limit parameter value corresponding to each first feature area, the corresponding first feature area is histogram equalized to obtain an enhanced image corresponding to the current target oil image, and online pollution detection of mining oil is performed based on the enhanced image. In this embodiment, the target contrast limiting parameter values ​​corresponding to each first feature area are obtained based on the first target feature values ​​corresponding to each first feature area and the first target feature values ​​corresponding to all second feature areas with the same center point coordinates as the first feature area. When histogram equalization is subsequently performed, the solid large particle impurity area enhancement effect can be more obvious, but the non-solid large particle impurity area will not be excessively enhanced. That is, in this embodiment, the target contrast limiting parameter values ​​corresponding to each first feature area are obtained based on the first target feature values ​​corresponding to each first feature area and the first target feature values ​​corresponding to all second feature areas with the same center point coordinates as the first feature area. When histogram equalization is subsequently performed, the enhancement effect is better, and then based on the enhanced image, the accuracy and reliability of solid large particle impurity detection can be improved.

[0108] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. An online mining oil contamination detection system based on image processing, comprising a processor and a memory, characterized in that: The processor executes the computer program stored in the memory to implement the following steps: Get the current target oil image; Obtaining the minimum circumscribed square of each connected domain on the current target oil image, and obtaining the segmentation area corresponding to the current target oil image according to the minimum circumscribed square of each connected domain; dividing the current target oil image according to the segmentation area to obtain each first characteristic area on the current target oil image; Obtaining first target feature values ​​corresponding to each first feature region according to the grayscale value difference between each pixel point in each first feature region and its corresponding neighboring pixel point; Acquire the first target feature value corresponding to each second feature area on each historical target oil image in the historical target oil image set, wherein the method for acquiring the second feature area is the same as that for acquiring the first feature area, and obtain the target contrast limit parameter value corresponding to each first feature area according to the first target feature value corresponding to each first feature area and the first target feature value corresponding to all second feature areas having the same center point coordinates as the first feature area; According to the target contrast limiting parameter value corresponding to each first feature region, histogram equalization is performed on the corresponding first feature region to obtain an enhanced image corresponding to the current target oil image; Performing online pollution detection on the mining oil according to the enhanced image; The method for obtaining the target contrast limit parameter value corresponding to each first feature area includes: For any first characteristic region on the current target oil image: Acquire all second feature regions corresponding to all historical target oil images in the historical target oil image set that have the same center point coordinates as the first feature region, and record them as second feature regions corresponding to the first feature region; Recording the first feature region and a set of all second feature regions corresponding to the first feature region as a target feature region set corresponding to the first feature region, and recording all feature regions in the target feature region set as target feature regions; Obtaining, according to the first target feature value corresponding to each target feature region in the target feature region set, a second target feature value corresponding to the first feature region; According to the second target characteristic value, obtaining a target contrast limit parameter value corresponding to the first characteristic area; The method for obtaining the second target feature value corresponding to the first feature area includes: The absolute value of the difference between the first target feature value corresponding to the t-1th target feature region in the target feature region set corresponding to the first feature region and the first target feature value corresponding to the tth target feature region is recorded as the first target feature difference value corresponding to the tth target feature region; the first target feature difference value corresponding to the first target feature region in the target feature region set is 0; The sum of the first target feature difference values ​​corresponding to all target feature regions in the target feature region set corresponding to the first feature region is recorded as the second target feature value corresponding to the first feature region; The method for obtaining a target contrast limiting parameter value corresponding to the first feature area according to the second target feature value includes: Get the initial contrast limit parameter value; The average value obtained by adding the value after negative correlation mapping of the second target feature value corresponding to the first feature area and the value after normalization of the first target feature value corresponding to the first feature area is recorded as the adjustment degree corresponding to the first feature area; The product of the adjustment degree and the initial contrast limit parameter value is recorded as the target contrast limit parameter value corresponding to the first feature area.

2. The online mining oil pollution detection system based on image processing as claimed in claim 1 is characterized in that: The method for obtaining the minimum circumscribed square of each connected domain on the current target oil image includes: For any connected domain on the current target oil image: A straight line passing through the center point of the minimum circumscribed rectangle of the connected domain and perpendicular to the length of the minimum circumscribed rectangle of the connected domain is recorded as a characteristic straight line; For the two widths of the minimum circumscribed rectangle of the connected domain: the two widths of the minimum circumscribed rectangle of the connected domain are respectively recorded as b1 and b2, and both ends of b1 and b2 are simultaneously extended outward in a direction parallel to the characteristic straight line until the lengths of b1 and b2 are the same as the length of the minimum circumscribed rectangle of the connected domain, and the extension is stopped, and the extended b1 and b2 are recorded as B1 and B2 respectively; The square formed by connecting endpoints f1, endpoint f2, endpoint f3 and endpoint f4 in sequence is recorded as the minimum circumscribed square of the connected domain, the endpoints f1 and endpoint f2 are the two endpoints of B1, the endpoints f3 and endpoint f4 are the two endpoints of B2, the straight line determined by the endpoints f1 and endpoint f4 is perpendicular to the characteristic straight line, and the straight line determined by the endpoints f2 and endpoint f3 is also perpendicular to the characteristic straight line.

3. The online mining oil pollution detection system based on image processing as claimed in claim 1 is characterized in that: The method for obtaining the segmentation area corresponding to the current target oil image includes: For any connected domain on the current target oil image: On the current target oil image, all other connected domains except the connected domain are recorded as first connected domains; all first connected domains having the same area as the minimum circumscribed square of the connected domain are obtained and recorded as similar connected domains corresponding to the connected domain; The set constructed by all similar connected domains corresponding to the connected domain is recorded as the similar connected domain set corresponding to the connected domain; For any similar connected domain in the set of similar connected domains corresponding to the connected domain, the Euclidean distance between the centroid position of the connected domain and the centroid position of the similar connected domain is calculated and recorded as the first distance corresponding to the similar connected domain; The set constructed by the first distances corresponding to the respective similar connected domains in the similar connected domain set corresponding to the connected domain is recorded as the first distance set corresponding to the connected domain; Record the variance of the first distance set as the first characterization value corresponding to the connected domain; record the number of similar connected domains corresponding to the connected domain as the second characterization value corresponding to the connected domain; record the area of ​​the minimum circumscribed square of the connected domain as the third characterization value corresponding to the connected domain; A value obtained by performing negative correlation mapping on the product of the first characterization value corresponding to the connected domain and the second characterization value corresponding to the connected domain is then multiplied by the third characterization value corresponding to the connected domain, and the value is recorded as the final characterization value corresponding to the connected domain; The sum of the final characterization values ​​corresponding to all connected domains on the current target oil image is recorded as the segmentation area corresponding to the current target oil image.

4. The online mining oil pollution detection system based on image processing as claimed in claim 1 is characterized in that: The method for obtaining each first characteristic region on the current target oil image comprises: Set the length and width to The window is recorded as the target window. For Round up, R is the segmentation area, and the sliding step length of the target window is ; The target window is placed at the upper left corner of the current target oil image, and is slid in a sequence from top to bottom and from left to right until there are no pixels outside the window on the current target oil image, and the sliding is stopped, and each target window on the current target oil image is obtained; For any target window on the current target oil image, a region in the target window belonging to the current target oil image is recorded as a first characteristic region.

5. The online mining oil pollution detection system based on image processing as claimed in claim 1 is characterized in that: The method for obtaining the first target feature value corresponding to each first feature area includes: For any pixel point in any first feature area on the current target oil image: all pixel points located in the first feature area and belonging to the eight neighborhoods of the pixel point are recorded as neighborhood pixel points corresponding to the pixel point, and all neighborhood pixel points corresponding to the pixel point are recorded as the neighborhood pixel point set corresponding to the pixel point; for any neighborhood pixel point in the neighborhood pixel point set corresponding to the pixel point, the absolute value of the difference between the grayscale value of the pixel point and the grayscale value of the neighborhood pixel point is recorded as the grayscale difference value corresponding to the neighborhood pixel point; the cumulative sum of the grayscale difference values ​​corresponding to all neighborhood pixel points in the neighborhood pixel point set corresponding to the pixel point is recorded as the grayscale comprehensive difference value corresponding to the pixel point; The sum of the grayscale comprehensive difference values ​​corresponding to all the pixels in each first feature area is recorded as the first feature value corresponding to the first feature area; The first target feature value corresponding to each first feature region is obtained according to the first feature value corresponding to each first feature region and the first feature value corresponding to the first feature region adjacent to each first feature region.

6. The online mining oil pollution detection system based on image processing as claimed in claim 5 is characterized in that: The method of obtaining the first target feature value corresponding to each first feature region according to the first feature value corresponding to each first feature region and the first feature value corresponding to the first feature region adjacent to each first feature region includes: For any first characteristic region on the current target oil image: On the current target oil image, all first feature regions belonging to the four neighborhoods of the first feature region are recorded as adjacent first feature regions corresponding to the first feature region; a set constructed from all adjacent first feature regions corresponding to the first feature region is recorded as a set of adjacent first feature regions corresponding to the first feature region; For any adjacent first feature region in the set of adjacent first feature regions corresponding to the first feature region, the absolute value of the difference between the first feature value corresponding to the first feature region and the first feature value corresponding to the adjacent first feature region is recorded as the first feature difference value corresponding to the adjacent first feature region; A set of first feature difference values ​​corresponding to all adjacent first feature regions in the set of adjacent first feature regions corresponding to the first feature region is recorded as a first feature difference value set corresponding to the first feature region, and a variance of the first feature difference value set is recorded as a feature neighborhood difference index corresponding to the first feature region; The reciprocal of the value obtained by adding the constant 1 to the first eigenvalue corresponding to the first feature area is recorded as the second eigenvalue corresponding to the first feature area; the sum of the second eigenvalue corresponding to the first feature area and the corresponding feature neighborhood difference index is recorded as the first target eigenvalue corresponding to the first feature area.