CN117934350A - Image processing method for intelligent inspection robot of chemical plant - Google Patents
Image processing method for intelligent inspection robot of chemical plant Download PDFInfo
- Publication number
- CN117934350A CN117934350A CN202410085364.8A CN202410085364A CN117934350A CN 117934350 A CN117934350 A CN 117934350A CN 202410085364 A CN202410085364 A CN 202410085364A CN 117934350 A CN117934350 A CN 117934350A
- Authority
- CN
- China
- Prior art keywords
- gray
- value
- background
- chemical
- infrared
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 239000000126 substance Substances 0.000 title claims abstract description 272
- 238000007689 inspection Methods 0.000 title claims abstract description 30
- 238000003672 processing method Methods 0.000 title claims abstract description 22
- 238000009826 distribution Methods 0.000 claims abstract description 71
- 238000012937 correction Methods 0.000 claims abstract description 33
- 230000002708 enhancing effect Effects 0.000 claims abstract description 9
- 238000000034 method Methods 0.000 claims description 28
- 230000003044 adaptive effect Effects 0.000 claims description 7
- 238000010606 normalization Methods 0.000 claims description 3
- 230000000694 effects Effects 0.000 abstract description 13
- 238000012545 processing Methods 0.000 abstract description 4
- 238000010586 diagram Methods 0.000 description 12
- 230000009977 dual effect Effects 0.000 description 3
- 238000006243 chemical reaction Methods 0.000 description 2
- 238000001514 detection method Methods 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000006386 neutralization reaction Methods 0.000 description 1
- 238000011897 real-time detection Methods 0.000 description 1
- 238000003860 storage Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/40—Image enhancement or restoration using histogram techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/11—Region-based segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/136—Segmentation; Edge detection involving thresholding
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10048—Infrared image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20004—Adaptive image processing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30248—Vehicle exterior or interior
- G06T2207/30252—Vehicle exterior; Vicinity of vehicle
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Analysis (AREA)
Abstract
The invention relates to the technical field of image processing, in particular to an image processing method for an intelligent inspection robot in a chemical plant, which comprises the following steps: collecting a chemical tank infrared gray image of a chemical tank; according to the gray distribution condition of pixel points in the infrared gray image of the chemical tank, obtaining an initialization chemical background pixel point and an initialization chemical foreground pixel point; obtaining pixel distribution difference degree according to the initialized background pixel points and the initialized foreground pixel points; obtaining a chemical tank self-adaptive gray threshold according to the pixel distribution difference; obtaining an infrared sub-image of the chemical tank and a target gray value according to the self-adaptive gray threshold of the chemical tank; obtaining correction weight according to the chemical tank infrared sub-image and the chemical tank self-adaptive gray threshold; and enhancing the infrared gray level image of the chemical tank according to the correction weight. The invention improves the enhancement effect of the final infrared image and the inspection efficiency of the intelligent inspection robot.
Description
Technical Field
The invention relates to the technical field of image processing, in particular to an image processing method for an intelligent inspection robot in a chemical plant.
Background
In the daily work of chemical plants, chemical storage tanks, chemical reaction tanks, chemical neutralization tanks, etc. all need to detect the external temperature of the tank body to ensure that the production and reaction of chemicals are carried out at the proper temperature. In order to timely detect the external temperature of the tank body, the existing mode generally uses an intelligent inspection robot to collect infrared images of the tank body for enhancement, and then temperature detection is completed.
The traditional method generally utilizes double histogram equalization to enhance the infrared image, but as the acquired infrared image has different degrees of distribution of detail content in the infrared image due to the influence of external temperature of a chemical plant, the traditional double histogram equalization directly takes the average value of pixel values in the infrared image as a threshold value, and the infrared image is subjected to equalization enhancement according to the threshold value, so that the threshold value cannot be reasonably adjusted according to the distribution of the detail content in the infrared image, and the enhancement effect of the infrared image is reduced.
Disclosure of Invention
The invention provides an image processing method for an intelligent inspection robot in a chemical plant, which aims to solve the existing problems: the traditional double-histogram equalization directly takes the average value of pixel values in the infrared image as a threshold value, and the infrared image is equalized and enhanced according to the threshold value, so that the threshold value can not be reasonably adjusted according to the distribution condition of detail content in the infrared image, and the enhancement effect of the infrared image is reduced.
The invention discloses an image processing method for an intelligent inspection robot in a chemical plant, which adopts the following technical scheme:
the method comprises the following steps:
Collecting chemical tank infrared gray images of a plurality of chemical tanks;
Dividing the pixel points in the infrared gray level image of the chemical tank into a plurality of initialized chemical background pixel points and a plurality of initialized chemical foreground pixel points according to the gray level distribution condition of the pixel points in the infrared gray level image of the chemical tank; obtaining an initialization background histogram and an initialization foreground histogram according to the number of gray values of all the initialization background pixel points and all the initialization foreground pixel points; obtaining the pixel distribution difference degree of an initialization background histogram and the pixel distribution difference degree of the initialization foreground histogram according to the gray distribution rule of the initialization background pixel points and the initialization foreground pixel points in the infrared gray image of the chemical tank; obtaining a chemical tank self-adaptive gray threshold of each chemical tank infrared gray image according to the variation difference of pixel distribution difference degree between the initialized chemical background histogram and the initialized chemical foreground histogram;
Dividing the infrared gray level image of the chemical tank according to the self-adaptive gray level threshold value of the chemical tank to obtain a plurality of infrared sub-images of the chemical tank and corresponding infrared sub-image histograms; marking a gray value with the occurrence frequency not being 0 in the infrared subgraph histogram as a target gray value; according to the change relation between the gray value of the pixel point in the chemical tank infrared sub-image and the chemical tank self-adaptive gray threshold, obtaining the correction weight of each target gray value; adjusting the target gray level value according to the correction weight adjustment to obtain a plurality of final optimized gray level values; and enhancing the infrared gray level image of the chemical tank according to the final optimized gray level value.
Preferably, the dividing the pixel points in the infrared gray level image of the chemical tank into a plurality of initialized background pixel points and a plurality of initialized foreground pixel points according to the gray level distribution condition of the pixel points in the infrared gray level image of the chemical tank comprises the following specific steps:
For any chemical tank infrared gray level image, acquiring an oxford threshold value of gray level values of all pixel points in the chemical tank infrared gray level image, and marking the oxford threshold value as an initial gray level threshold value of the chemical tank; in the chemical tank infrared gray level image, the pixel point with the gray level value smaller than the chemical tank initial gray level threshold value is marked as an initial chemical background pixel point, and the pixel point with the gray level value larger than or equal to the chemical tank initial gray level threshold value is marked as an initial chemical foreground pixel point.
Preferably, the method for obtaining the pixel distribution difference of the initialized chemical background histogram and the pixel distribution difference of the initialized chemical foreground histogram according to the gray distribution rule of the initialized chemical background pixel point and the initialized chemical foreground pixel point in the chemical tank infrared gray image comprises the following specific steps:
Acquiring a background target gray value, an initial background reference gray value and a background reference gray value to be judged of an initial chemical background histogram;
For any background reference gray value to be judged, the absolute value of the difference value between the background reference gray value to be judged and the background target gray value is recorded as the difference value between the background reference gray value to be judged and the background target gray value;
According to the difference values of all the background reference gray values to be judged and the background target gray values, obtaining all the first background reference gray values in the initialized chemical background histogram;
Each first background reference gray value and each initial background reference gray value are marked as a background reference gray value, and each rest background reference gray value to be judged is marked as a background contrast gray value;
Wherein, alpha represents the pixel distribution difference degree of the initialization background histogram; i represents the number of all background reference gray values in the initialized background histogram; f i represents the frequency of occurrence of the ith background reference gray value in the initialized background histogram; j represents the number of all background contrast gray values in the initialized background histogram; beta represents a preset super parameter; f j represents the occurrence frequency of the jth background contrast gray value in the initialized background histogram;
And referring to an acquisition method of the pixel distribution difference of the initialized background histogram, and acquiring the pixel distribution difference of the initialized foreground histogram.
Preferably, the method for obtaining the background target gray value, the initial background reference gray value and the background reference gray value to be determined of the initial chemical background histogram includes the following specific steps:
In the initialization background histogram, a gray value with the occurrence frequency not being 0 is marked as a background reference gray value, a background reference gray value with the largest occurrence frequency is marked as a background target gray value, each background reference gray value on the right side of the background target gray value is marked as an initial background reference gray value of the initialization background histogram, and each background reference gray value on the left side of the background target gray value is marked as a background reference gray value to be judged of the initialization background histogram.
Preferably, the method for obtaining all the first background reference gray values in the initialized chemical background histogram according to the difference values of all the background reference gray values to be determined and the background target gray values includes the following specific steps:
Arranging all the background reference gray values to be judged according to the sequence from small to large of the difference value between the background reference gray values and the background target gray values, and marking the arranged sequence as a background reference gray value sequence to be judged; in the background reference gray value sequence to be judged, if the absolute value of the difference value of the occurrence frequency between the first background reference gray value to be judged and the second background reference gray value to be judged is larger than the value of half of the occurrence frequency of the first background reference gray value to be judged, the second background reference gray value to be judged is marked as a first background reference gray value; if the absolute value of the difference value of the occurrence frequency between the second background reference gray value to be judged and the third background reference gray value to be judged is larger than the numerical value of half of the occurrence frequency of the second background reference gray value to be judged, marking the third background reference gray value to be judged as a first background reference gray value; and so on until all the background reference gray values to be determined in the background reference gray value sequence to be determined are traversed.
Preferably, the method for obtaining the chemical tank self-adaptive gray threshold of each chemical tank infrared gray level image according to the variation difference of the pixel distribution difference degree between the initialized chemical background histogram and the initialized chemical foreground histogram comprises the following specific steps:
Wherein T represents a chemical tank self-adaptive gray threshold of any chemical tank infrared gray image; t1 represents an initial gray threshold of the chemical tank infrared gray image; h1 represents a background target gray value of the initialized background histogram; h2 represents the background target gray value of the initialized foreground histogram; alpha represents the pixel distribution difference degree of the initialization background histogram; α1 represents the pixel distribution difference degree of the initialization foreground histogram; gamma represents a preset super parameter; the absolute value is taken.
Preferably, the method for dividing the infrared gray level image of the chemical tank according to the adaptive gray level threshold of the chemical tank to obtain a plurality of infrared sub-images of the chemical tank and corresponding infrared sub-image histograms includes the following specific steps:
For any chemical tank infrared gray level image, dividing the chemical tank infrared gray level image by using a double-histogram equalization algorithm according to a chemical tank self-adaptive gray level threshold value of the chemical tank infrared gray level image to obtain a plurality of divided sub-images; and recording each divided sub-image as an infrared sub-image of the chemical tank;
And (3) acquiring a gray level histogram of the chemical tank infrared sub-image for any chemical tank infrared sub-image, and recording the gray level histogram as an infrared sub-image histogram.
Preferably, the method for obtaining the correction weight of each target gray value according to the change relation between the gray value of the pixel point in the chemical tank infrared sub-image and the chemical tank self-adaptive gray threshold value comprises the following specific steps:
Obtaining the pixel distribution difference of the infrared sub-picture histogram by referring to an obtaining method of the pixel distribution difference of the initialized background histogram;
Where τ v represents the initial correction weight of the v-th target gradation value; α2 represents the pixel distribution variability of the infrared sub-graph histogram; delta represents a preset super parameter; f1 v denotes the frequency of occurrence of the v-th target gradation value; Representing the average value of the occurrence frequencies of all the target gray values; the absolute value is taken; obtaining initial correction weights of all target gray values, carrying out linear normalization on all the initial correction weights, and marking each normalized initial correction weight as a correction weight.
Preferably, the adjusting the target gray value according to the correction weight adjustment to obtain a plurality of final optimized gray values includes the following specific steps:
Wherein HL w represents a corrected gradation value of the w-th target gradation value; h w denotes a w-th target gradation value; τ1 w represents the corrective weight of the w-th target gradation value; representing the average value of all target gray values; the absolute value is taken;
And adjusting the w-th target gray level value to be the same as the corrected gray level value of the w-th target gray level value, and recording the adjusted w-th target gray level value as the w-th final optimized gray level value.
Preferably, the method for enhancing the infrared gray level image of the chemical tank according to the final optimized gray level value comprises the following specific steps:
Marking all the chemical tank infrared sub-images formed by the final optimized gray values as chemical tank infrared sub-images to be processed; acquiring all infrared sub-images of the chemical tank to be processed of the infrared gray level image of the chemical tank; and according to all chemical tank infrared sub-images of the chemical tank infrared gray images, enhancing the chemical tank infrared gray images by using a double histogram equalization algorithm to obtain enhanced chemical tank infrared gray images.
The technical scheme of the invention has the beneficial effects that: obtaining pixel distribution difference degree according to the gray level distribution rule of pixel points in the chemical tank infrared gray level image, obtaining a chemical tank self-adaptive gray level threshold according to the change difference of the pixel distribution difference degree between an initialized chemical background histogram and an initialized chemical foreground histogram, dividing the chemical tank infrared gray level image by using the chemical tank self-adaptive gray level threshold to obtain a chemical tank infrared sub-image, obtaining correction weight according to the change connection condition between the gray level value of the pixel points in the chemical tank infrared sub-image and the chemical tank self-adaptive gray level threshold, adjusting a target gray level value according to the correction weight, and enhancing the chemical tank infrared gray level image; the pixel distribution difference reflects the richness of image details displayed by the pixel points, the adaptive gray threshold of the chemical tank is based on the difference condition of exposure degree in the infrared gray image of the chemical tank, and the distribution condition of the detail characteristics of the chemical tank contained among different pixel points is combined, so that the sub-image segmented by the adaptive gray threshold of the chemical tank is more reasonable and accurate; the invention makes the threshold value of the double histogram equalization algorithm more reasonable, improves the enhancement effect of the final infrared image, and improves the inspection efficiency of the intelligent inspection robot.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of steps of an image processing method for an intelligent inspection robot in a chemical plant;
FIG. 2 is a schematic diagram of an infrared gray scale image of a chemical tank of the present invention;
FIG. 3 is a schematic diagram of a gray level histogram of an infrared gray level image of a chemical tank according to the present invention;
fig. 4 is a chemical infrared gray scale image contrast schematic diagram of the present invention.
Detailed Description
In order to further describe the technical means and effects adopted by the invention to achieve the preset aim, the following is a detailed description of specific implementation, structure, characteristics and effects of an image processing method for an intelligent inspection robot for a chemical plant according to the invention, which is provided by the invention, with reference to the accompanying drawings and the preferred embodiment. In the following description, different "one embodiment" or "another embodiment" means that the embodiments are not necessarily the same. Furthermore, the particular features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
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 belongs.
The invention provides a specific scheme of an image processing method for an intelligent inspection robot in a chemical plant, which is specifically described below with reference to the accompanying drawings.
Referring to fig. 1, a flowchart of steps of an image processing method for an intelligent inspection robot in a chemical plant according to an embodiment of the invention is shown, where the method includes the following steps:
step S001: and collecting chemical tank infrared gray images of a plurality of chemical tanks.
It should be noted that, in the conventional method, the infrared image is usually enhanced by using dual histogram equalization, but because the acquired infrared image has distribution conditions of different degrees of detail content in the infrared image due to the influence of external temperature of a chemical plant, the conventional dual histogram equalization directly uses the average value of pixel values in the infrared image as a threshold value, and the infrared image is enhanced by using the average value as the threshold value, so that the threshold value cannot be reasonably adjusted according to the distribution conditions of the detail content in the infrared image, and the enhancement effect of the infrared image is reduced. Therefore, the embodiment provides an image processing method for an intelligent inspection robot in a chemical plant.
Specifically, in order to implement the image processing method for the intelligent inspection robot in the chemical plant provided in this embodiment, firstly, an infrared gray level image of a chemical tank needs to be collected, and the specific process is as follows: shooting infrared images of 30 chemical tanks by using an intelligent inspection robot provided with an infrared camera, and carrying out gray processing on each infrared image to obtain a plurality of gray images; and marking each gray level image as an infrared gray level image of the chemical tank, and obtaining all the infrared gray level images of the chemical tank. Referring to fig. 2, a schematic diagram of an infrared gray scale image of a chemical tank is shown. The graying process is a known technique, and the description of this embodiment is omitted. It should be noted that, in this embodiment, the model of the infrared camera and the number of the infrared grayscale images of the chemical tank are not specifically limited, where the model of the infrared camera and the number of the infrared grayscale images of the chemical tank may be determined according to specific implementation conditions.
So far, all chemical tank infrared gray level images are obtained through the method.
Step S002: dividing the pixel points in the infrared gray level image of the chemical tank into a plurality of initialized chemical background pixel points and a plurality of initialized chemical foreground pixel points according to the gray level distribution condition of the pixel points in the infrared gray level image of the chemical tank; obtaining an initialization background histogram and an initialization foreground histogram according to the number of gray values of all the initialization background pixel points and all the initialization foreground pixel points; obtaining the pixel distribution difference degree of an initialization background histogram and the pixel distribution difference degree of the initialization foreground histogram according to the gray distribution rule of the initialization background pixel points and the initialization foreground pixel points in the infrared gray image of the chemical tank; and obtaining the chemical tank self-adaptive gray threshold of each chemical tank infrared gray image according to the variation difference of the pixel distribution difference degree between the initialized chemical background histogram and the initialized chemical foreground histogram.
It should be noted that, in the conventional dual histogram equalization, an image is divided into two sub-images by the average value of pixel values in the image, and the contrast and brightness differences of different image areas are flexibly adjusted by performing enhancement processing on the two sub-images to different extents, so that a better enhancement effect is achieved for the final combined image. However, in an actual chemical plant environment, different temperatures outside the chemical tank can influence the motion state of surrounding air, so that the quantity of light rays transmitted in the air and the transmission angle are influenced, the light ray intensity in the chemical plant environment can be greatly changed along with the temperature, time and weather changes of the chemical tank, the intelligent inspection robot can acquire the infrared images according to different quantity of light rays received by the photosensitive elements, the corresponding generated infrared images are subjected to overexposure or underexposure, and the threshold value cannot be reasonably adjusted according to the distribution condition of detail content corresponding to different exposure conditions in the infrared images by the traditional double histogram equalization, so that the traditional double histogram equalization has poor enhancement effect.
It should be further noted that, because the main object in the collected infrared image is a chemical tank, the gray value with more frequent occurrence frequency in the corresponding gray histogram is the gray range of the main distribution of the chemical tank, and meanwhile, because the temperature outside the chemical tank continuously changes along with the region, the occurrence frequency between the adjacent gray values in the gray range of the main distribution of the corresponding chemical tank has larger similarity; in order to improve the final enhancement effect of the infrared gray level image of the chemical tank, the embodiment adaptively adjusts the threshold value by analyzing the distribution condition of gray level values in different gray level histograms in the traditional double-histogram equalization algorithm so as to facilitate subsequent analysis and enhancement treatment.
Specifically, taking any chemical tank infrared gray level image as an example, acquiring an oxford threshold value of gray level values of all pixel points in the chemical tank infrared gray level image, and marking the oxford threshold value as an initial gray level threshold value of the chemical tank; in the chemical tank infrared gray level image, the pixel point with the gray level value smaller than the chemical tank initial gray level threshold value is marked as an initial chemical background pixel point, and the pixel point with the gray level value larger than or equal to the chemical tank initial gray level threshold value is marked as an initial chemical foreground pixel point. The obtaining of the oxford threshold is a well-known content of the maximum inter-class variance method, and this embodiment is not repeated.
Further, acquiring gray level histograms of all the initialized chemical background pixels according to gray level values of all the initialized chemical background pixels, and marking the gray level histograms as the initialized chemical background histograms; in the initialization background histogram, a gray value with the occurrence frequency not being 0 is marked as a background reference gray value, a background reference gray value with the largest occurrence frequency is marked as a background target gray value, each background reference gray value on the right side of the background target gray value is marked as an initial background reference gray value of the initialization background histogram, and each background reference gray value on the left side of the background target gray value is marked as a background reference gray value to be judged of the initialization background histogram; taking any background reference gray value to be determined as an example, the absolute value of the difference value between the background reference gray value to be determined and the background target gray value is recorded as the difference value between the background reference gray value to be determined and the background target gray value. The process of obtaining the gray histogram according to the gray value of the pixel point is known in the art, and the description of this embodiment is omitted. Note that, in the present embodiment, the abscissa of the gray histogram represents the gray value, and the ordinate represents the frequency of occurrence of the corresponding gray value; referring to fig. 3, a schematic diagram of a gray level histogram of an infrared gray level image of a chemical tank is shown.
Further, arranging all the background reference gray values to be judged according to the sequence from small to large of the difference value between the background reference gray values and the background target gray values, and marking the arranged sequence as a background reference gray value sequence to be judged; in the sequence of background reference gray values to be determined, if the absolute value of the difference value of the occurrence frequency between the first background reference gray value to be determined and the second background reference gray value to be determined is larger than the value of half of the occurrence frequency of the first background reference gray value to be determined, the second background reference gray value to be determined is marked as a first background reference gray value; if the absolute value of the difference value of the occurrence frequency between the second background reference gray value to be judged and the third background reference gray value to be judged is larger than the numerical value of half of the occurrence frequency of the second background reference gray value to be judged, marking the third background reference gray value to be judged as a first background reference gray value; if the absolute value of the difference value of the occurrence frequency between the third background reference gray value to be judged and the fourth background reference gray value to be judged is larger than the numerical value of half of the occurrence frequency of the third background reference gray value to be judged, marking the fourth background reference gray value to be judged as a first background reference gray value; and by analogy, until all the background reference gray values to be judged in the background reference gray value sequence to be judged are traversed, all the first background reference gray values in the initialized background histogram are obtained, each first background reference gray value and each initial background reference gray value are marked as a background reference gray value, and each rest background reference gray value to be judged is marked as a background contrast gray value.
Further, the pixel distribution difference degree of the initialized background histogram is obtained according to the background reference gray value and the background contrast gray value in the initialized background histogram. As an example, the pixel distribution variance of the initialized background histogram may be calculated by the following formula:
wherein, alpha represents the pixel distribution difference degree of the initialization background histogram; i represents the number of all background reference gray values in the initialized background histogram; f represents the occurrence frequency of the ith background reference gray value in the initialized background histogram; j represents the number of all background contrast gray values in the initialized background histogram; beta represents a preset super parameter, and in this embodiment, beta=1 is preset to prevent denominator from being 0; f j denotes the frequency of occurrence of the jth background control gray value in the initialized background histogram. And if the pixel distribution difference degree of the initialization background histogram is larger, the image detail displayed by the initialization background pixel point corresponding to the initialization background histogram is more.
Further, acquiring gray level histograms of all the initialized foreground pixels according to gray level values of all the initialized foreground pixels, and marking the gray level histograms as the initialized foreground histograms; and referring to the method for acquiring the pixel distribution difference of the initialized background histogram, acquiring the pixel distribution difference of the initialized foreground histogram. And obtaining the chemical tank self-adaptive gray threshold of the chemical tank infrared gray image according to the initial gray threshold of the chemical tank, the initialization background histogram and the difference of pixel distribution difference between the initialization foreground histograms. As an example, the chemical tank adaptive gray threshold for the chemical tank infrared gray image may be calculated by the following formula:
Wherein T represents a chemical tank self-adaptive gray threshold of the chemical tank infrared gray image; t1 represents an initial gray threshold of the chemical tank infrared gray image; h1 represents a background target gray value of the initialized background histogram; h2 represents the background target gray value of the initialized foreground histogram; alpha represents the pixel distribution difference degree of the initialization background histogram; α1 represents the pixel distribution difference of the initialized foreground histogram; gamma represents a preset hyper-parameter, and in this embodiment, gamma=1 is preset to prevent denominator from being 0; the absolute value is taken. If alpha is larger than alpha 1, the infrared gray level image of the chemical tank is more in detail characteristics of the chemical tank in the initialized background histogram, and compared with the initialized foreground histogram, the larger the influence of the initialized background histogram on the enhancement effect of the final image is, the larger the corresponding error is likely to be, and the gray level value range of the initialized background histogram is required to be adjusted by reflecting the initial gray level threshold value of the chemical tank; if alpha=α1, the difference between detail features of the infrared gray level image of the chemical tank in the initializing background histogram and the initializing foreground histogram is extremely small, the effect on the enhancement of the final image is extremely small, and the initial gray level threshold value of the chemical tank is reflected without adjustment; if alpha is smaller than alpha 1, the infrared gray level image of the chemical tank is more in detail characteristics of the chemical tank in the initialized foreground histogram, and compared with the initialized background histogram, the larger the influence of the initialized foreground histogram on the enhancement effect of the final image is, the larger the corresponding error is likely to be, and the gray level threshold value of the initial gray level image of the chemical tank is required to be adjusted to the gray level value range contained in the initialized foreground histogram. And acquiring the chemical tank self-adaptive gray threshold of the infrared gray images of all chemical tanks.
So far, the chemical tank self-adaptive gray threshold of the infrared gray image of all chemical tanks is obtained through the method.
Step S003: dividing the infrared gray level image of the chemical tank according to the self-adaptive gray level threshold value of the chemical tank to obtain a plurality of infrared sub-images of the chemical tank and target gray level values; according to the change relation between the gray value of the pixel point in the chemical tank infrared sub-image and the chemical tank self-adaptive gray threshold, obtaining the correction weight of each target gray value; adjusting the target gray level value according to the correction weight adjustment to obtain a plurality of final optimized gray level values; and enhancing the infrared gray level image of the chemical tank according to the final optimized gray level value.
Specifically, taking any chemical tank infrared gray level image as an example, dividing the chemical tank infrared gray level image according to a chemical tank self-adaptive gray level threshold value of the chemical tank infrared gray level image to obtain two divided sub-images, and marking each divided sub-image as a chemical tank infrared sub-image; taking any chemical tank infrared sub-image as an example, acquiring a gray level histogram of the chemical tank infrared sub-image, and recording the gray level histogram as an infrared sub-image histogram; and referring to an acquisition method for initializing pixel distribution difference of a background histogram, acquiring the pixel distribution difference of the infrared sub-image histogram, and recording a gray value with the occurrence frequency of not 0 in the infrared sub-image histogram as a target gray value. The process of dividing the image according to the threshold value to obtain two sub-images is a well-known content of the double histogram equalization algorithm, and this embodiment will not be described in detail.
Further, according to the v-th target gray value in the infrared sub-graph and the pixel distribution difference degree of the infrared sub-graph, the initial correction weight of the v-th target gray value is obtained. As an example, the initial correction weight for the v-th target gray value may be calculated by the following formula:
Where τ v represents the initial correction weight of the v-th target gradation value; α2 represents the pixel distribution variability of the infrared sub-graph histogram; delta represents a preset hyper-parameter for preventing denominator from being 0; f1 v denotes the frequency of occurrence of the v-th target gradation value; representing the average value of the occurrence frequencies of all the target gray values; the absolute value is taken. The greater the initial correction weight of the v-th target gray level value, the greater the degree to which the v-th target gray level value needs to be adjusted, and the more unreasonable the original numerical value of the v-th target gray level value is reflected.
Further, obtaining initial correction weights of all target gray values, carrying out linear normalization on all the initial correction weights, and marking each normalized initial correction weight as a correction weight; taking the w-th target gray value as an example, obtaining the corrected gray value of the w-th target gray value according to the correction weight of the w-th target gray value. As an example, the corrected gray value of the w-th target gray value may be calculated by the following formula:
Wherein HL w represents a corrected gradation value of the w-th target gradation value; h w denotes a w-th target gradation value; τ1 w represents the corrective weight of the w-th target gradation value; Representing the average value of all target gray values; the absolute value is taken.
Further, the w-th target gray value is adjusted to be the same value as the corrected gray value of the w-th target gray value, the adjusted w-th target gray value is recorded as the w-th final optimized gray value, and all final optimized gray values are obtained; marking all the chemical tank infrared sub-images formed by the final optimized gray values as chemical tank infrared sub-images to be processed; and acquiring all infrared sub-images of the chemical tank to be processed of the infrared gray level image of the chemical tank. And carrying out equalization treatment on the chemical tank infrared gray image according to all chemical tank infrared sub-images of the chemical tank infrared gray image to obtain an enhanced chemical tank infrared gray image. The process of performing equalization enhancement on the original image according to the plurality of sub-images of the original image is a well-known content of the double histogram equalization algorithm, and the embodiment is not described in detail. Please refer to fig. 4, which illustrates a chemical infrared gray scale image contrast diagram; in fig. 4, a diagram illustrates a schematic diagram before the infrared gray scale image of the chemical tank is enhanced, b diagram illustrates a schematic diagram after the infrared gray scale image of the chemical tank is subjected to conventional double-histogram equalization, and c diagram illustrates a schematic diagram after the infrared gray scale image of the chemical tank is processed by the embodiment.
Further, the enhanced infrared gray level image of the chemical tank is updated in real time, and the infrared gray level image of the chemical tank is input into an intelligent detection system of the intelligent inspection robot for real-time detection and early warning.
This embodiment is completed.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the invention, but any modifications, equivalent substitutions, improvements, etc. within the principles of the present invention should be included in the scope of the present invention.
Claims (10)
1. An image processing method for an intelligent inspection robot of a chemical plant is characterized by comprising the following steps:
Collecting chemical tank infrared gray images of a plurality of chemical tanks;
Dividing the pixel points in the infrared gray level image of the chemical tank into a plurality of initialized chemical background pixel points and a plurality of initialized chemical foreground pixel points according to the gray level distribution condition of the pixel points in the infrared gray level image of the chemical tank; obtaining an initialization background histogram and an initialization foreground histogram according to the number of gray values of all the initialization background pixel points and all the initialization foreground pixel points; obtaining the pixel distribution difference degree of an initialization background histogram and the pixel distribution difference degree of the initialization foreground histogram according to the gray distribution rule of the initialization background pixel points and the initialization foreground pixel points in the infrared gray image of the chemical tank; obtaining a chemical tank self-adaptive gray threshold of each chemical tank infrared gray image according to the variation difference of pixel distribution difference degree between the initialized chemical background histogram and the initialized chemical foreground histogram;
Dividing the infrared gray level image of the chemical tank according to the self-adaptive gray level threshold value of the chemical tank to obtain a plurality of infrared sub-images of the chemical tank and corresponding infrared sub-image histograms; marking a gray value with the occurrence frequency not being 0 in the infrared subgraph histogram as a target gray value; according to the change relation between the gray value of the pixel point in the chemical tank infrared sub-image and the chemical tank self-adaptive gray threshold, obtaining the correction weight of each target gray value; adjusting the target gray level value according to the correction weight adjustment to obtain a plurality of final optimized gray level values; and enhancing the infrared gray level image of the chemical tank according to the final optimized gray level value.
2. The image processing method for the intelligent inspection robot for the chemical plant according to claim 1, wherein the dividing the pixels in the infrared gray level image of the chemical tank into a plurality of initialized chemical background pixels and a plurality of initialized chemical foreground pixels according to the gray level distribution of the pixels in the infrared gray level image of the chemical tank comprises the following specific steps:
For any chemical tank infrared gray level image, acquiring an oxford threshold value of gray level values of all pixel points in the chemical tank infrared gray level image, and marking the oxford threshold value as an initial gray level threshold value of the chemical tank; in the chemical tank infrared gray level image, the pixel point with the gray level value smaller than the chemical tank initial gray level threshold value is marked as an initial chemical background pixel point, and the pixel point with the gray level value larger than or equal to the chemical tank initial gray level threshold value is marked as an initial chemical foreground pixel point.
3. The image processing method for intelligent inspection robots in chemical plants according to claim 1, wherein the obtaining the pixel distribution difference of the initial chemical industry background histogram and the pixel distribution difference of the initial chemical industry foreground histogram according to the gray distribution rule of the initial chemical industry background pixel points and the initial chemical industry foreground pixel points in the chemical industry tank infrared gray image comprises the following specific steps:
Acquiring a background target gray value, an initial background reference gray value and a background reference gray value to be judged of an initial chemical background histogram;
For any background reference gray value to be judged, the absolute value of the difference value between the background reference gray value to be judged and the background target gray value is recorded as the difference value between the background reference gray value to be judged and the background target gray value;
According to the difference values of all the background reference gray values to be judged and the background target gray values, obtaining all the first background reference gray values in the initialized chemical background histogram;
Each first background reference gray value and each initial background reference gray value are marked as a background reference gray value, and each rest background reference gray value to be judged is marked as a background contrast gray value;
Wherein, alpha represents the pixel distribution difference degree of the initialization background histogram; i represents the number of all background reference gray values in the initialized background histogram; f i represents the frequency of occurrence of the ith background reference gray value in the initialized background histogram; j represents the number of all background contrast gray values in the initialized background histogram; beta represents a preset super parameter; f j represents the occurrence frequency of the jth background contrast gray value in the initialized background histogram;
And referring to an acquisition method of the pixel distribution difference of the initialized background histogram, and acquiring the pixel distribution difference of the initialized foreground histogram.
4. The image processing method for intelligent inspection robots in chemical plants according to claim 3, wherein the obtaining the background target gray value, the initial background reference gray value and the background reference gray value to be determined of the initialized background histogram comprises the following specific steps:
In the initialization background histogram, a gray value with the occurrence frequency not being 0 is marked as a background reference gray value, a background reference gray value with the largest occurrence frequency is marked as a background target gray value, each background reference gray value on the right side of the background target gray value is marked as an initial background reference gray value of the initialization background histogram, and each background reference gray value on the left side of the background target gray value is marked as a background reference gray value to be judged of the initialization background histogram.
5. The image processing method for intelligent inspection robots in chemical plants according to claim 3, wherein the obtaining all first background reference gray values in the initialized chemical industry background histogram according to the difference values between all background reference gray values to be determined and the background target gray values comprises the following specific steps:
Arranging all the background reference gray values to be judged according to the sequence from small to large of the difference value between the background reference gray values and the background target gray values, and marking the arranged sequence as a background reference gray value sequence to be judged; in the background reference gray value sequence to be judged, if the absolute value of the difference value of the occurrence frequency between the first background reference gray value to be judged and the second background reference gray value to be judged is larger than the value of half of the occurrence frequency of the first background reference gray value to be judged, the second background reference gray value to be judged is marked as a first background reference gray value; if the absolute value of the difference value of the occurrence frequency between the second background reference gray value to be judged and the third background reference gray value to be judged is larger than the numerical value of half of the occurrence frequency of the second background reference gray value to be judged, marking the third background reference gray value to be judged as a first background reference gray value; and so on until all the background reference gray values to be determined in the background reference gray value sequence to be determined are traversed.
6. The image processing method for intelligent inspection robots in chemical plants according to claim 1, wherein the method for obtaining the adaptive gray threshold of each chemical tank of the chemical tank infrared gray level image according to the variation difference of the pixel distribution difference degree between the initialized chemical background histogram and the initialized chemical foreground histogram comprises the following specific steps:
Wherein T represents a chemical tank self-adaptive gray threshold of any chemical tank infrared gray image; t1 represents an initial gray threshold of the chemical tank infrared gray image; h1 represents a background target gray value of the initialized background histogram; h2 represents the background target gray value of the initialized foreground histogram; alpha represents the pixel distribution difference degree of the initialization background histogram; α1 represents the pixel distribution difference degree of the initialization foreground histogram; gamma represents a preset super parameter; and II represents absolute value.
7. The image processing method for the intelligent inspection robot of the chemical plant according to claim 1, wherein the method for dividing the infrared gray level image of the chemical tank according to the adaptive gray level threshold of the chemical tank to obtain a plurality of infrared sub-images of the chemical tank and corresponding infrared sub-image histograms comprises the following specific steps:
For any chemical tank infrared gray level image, dividing the chemical tank infrared gray level image by using a double-histogram equalization algorithm according to a chemical tank self-adaptive gray level threshold value of the chemical tank infrared gray level image to obtain a plurality of divided sub-images; and recording each divided sub-image as an infrared sub-image of the chemical tank;
And (3) acquiring a gray level histogram of the chemical tank infrared sub-image for any chemical tank infrared sub-image, and recording the gray level histogram as an infrared sub-image histogram.
8. The image processing method for intelligent inspection robots in chemical plants according to claim 1, wherein the obtaining the correction weight of each target gray value according to the change relation between the gray value of the pixel point in the infrared sub-image of the chemical tank and the adaptive gray threshold of the chemical tank comprises the following specific steps:
Obtaining the pixel distribution difference of the infrared sub-picture histogram by referring to an obtaining method of the pixel distribution difference of the initialized background histogram;
Where τ v represents the initial correction weight of the v-th target gradation value; α2 represents the pixel distribution variability of the infrared sub-graph histogram; delta represents a preset super parameter; f1 v denotes the frequency of occurrence of the v-th target gradation value; Representing the average value of the occurrence frequencies of all the target gray values; the absolute value is taken; obtaining initial correction weights of all target gray values, carrying out linear normalization on all the initial correction weights, and marking each normalized initial correction weight as a correction weight.
9. The image processing method for intelligent inspection robots in chemical plants according to claim 1, wherein the adjusting the target gray value according to the correction weight adjusts a plurality of final optimized gray values, comprising the following specific steps:
Wherein HL w represents a corrected gradation value of the w-th target gradation value; h w denotes a w-th target gradation value; τ1 w represents the corrective weight of the w-th target gradation value; Representing the average value of all target gray values; the absolute value is taken;
And adjusting the w-th target gray level value to be the same as the corrected gray level value of the w-th target gray level value, and recording the adjusted w-th target gray level value as the w-th final optimized gray level value.
10. The image processing method for the intelligent inspection robot for the chemical plant according to claim 1, wherein the method for enhancing the infrared gray level image of the chemical tank according to the final optimized gray level value comprises the following specific steps:
Marking all the chemical tank infrared sub-images formed by the final optimized gray values as chemical tank infrared sub-images to be processed; acquiring all infrared sub-images of the chemical tank to be processed of the infrared gray level image of the chemical tank; and according to all chemical tank infrared sub-images of the chemical tank infrared gray images, enhancing the chemical tank infrared gray images by using a double histogram equalization algorithm to obtain enhanced chemical tank infrared gray images.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410085364.8A CN117934350B (en) | 2024-01-22 | 2024-01-22 | Image processing method for intelligent inspection robot of chemical plant |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410085364.8A CN117934350B (en) | 2024-01-22 | 2024-01-22 | Image processing method for intelligent inspection robot of chemical plant |
Publications (2)
Publication Number | Publication Date |
---|---|
CN117934350A true CN117934350A (en) | 2024-04-26 |
CN117934350B CN117934350B (en) | 2024-08-09 |
Family
ID=90758729
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410085364.8A Active CN117934350B (en) | 2024-01-22 | 2024-01-22 | Image processing method for intelligent inspection robot of chemical plant |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117934350B (en) |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20180157927A1 (en) * | 2015-08-04 | 2018-06-07 | Alibaba Group Holding Limited | Character Segmentation Method, Apparatus and Electronic Device |
WO2020107716A1 (en) * | 2018-11-30 | 2020-06-04 | 长沙理工大学 | Target image segmentation method and apparatus, and device |
CN114937055A (en) * | 2022-03-31 | 2022-08-23 | 江苏益捷思信息科技有限公司 | Image self-adaptive segmentation method and system based on artificial intelligence |
CN115272338A (en) * | 2022-09-29 | 2022-11-01 | 南通斯坦普利起重设备有限公司 | Crown block control method based on image processing |
CN116245880A (en) * | 2023-05-09 | 2023-06-09 | 深圳市银河通信科技有限公司 | Electric vehicle charging pile fire risk detection method based on infrared identification |
CN116402729A (en) * | 2023-04-11 | 2023-07-07 | 广西科技大学 | Image enhancement method and system based on double histogram equalization |
CN117078671A (en) * | 2023-10-13 | 2023-11-17 | 陕西秒康医疗科技有限公司 | Thyroid ultrasonic image intelligent analysis system |
US20230377158A1 (en) * | 2020-04-22 | 2023-11-23 | Hangzhou Tuya Information Technology Co., Ltd. | Image segmentation method, apparatus, device, and medium |
CN117218115A (en) * | 2023-11-07 | 2023-12-12 | 江苏玫源新材料有限公司 | Auto part paint surface abnormality detection method |
-
2024
- 2024-01-22 CN CN202410085364.8A patent/CN117934350B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20180157927A1 (en) * | 2015-08-04 | 2018-06-07 | Alibaba Group Holding Limited | Character Segmentation Method, Apparatus and Electronic Device |
WO2020107716A1 (en) * | 2018-11-30 | 2020-06-04 | 长沙理工大学 | Target image segmentation method and apparatus, and device |
US20230377158A1 (en) * | 2020-04-22 | 2023-11-23 | Hangzhou Tuya Information Technology Co., Ltd. | Image segmentation method, apparatus, device, and medium |
CN114937055A (en) * | 2022-03-31 | 2022-08-23 | 江苏益捷思信息科技有限公司 | Image self-adaptive segmentation method and system based on artificial intelligence |
CN115272338A (en) * | 2022-09-29 | 2022-11-01 | 南通斯坦普利起重设备有限公司 | Crown block control method based on image processing |
CN116402729A (en) * | 2023-04-11 | 2023-07-07 | 广西科技大学 | Image enhancement method and system based on double histogram equalization |
CN116245880A (en) * | 2023-05-09 | 2023-06-09 | 深圳市银河通信科技有限公司 | Electric vehicle charging pile fire risk detection method based on infrared identification |
CN117078671A (en) * | 2023-10-13 | 2023-11-17 | 陕西秒康医疗科技有限公司 | Thyroid ultrasonic image intelligent analysis system |
CN117218115A (en) * | 2023-11-07 | 2023-12-12 | 江苏玫源新材料有限公司 | Auto part paint surface abnormality detection method |
Non-Patent Citations (1)
Title |
---|
蒋鹏;金炜东;: "基于加权核密度估计的自适应运动前景检测方法", 西南交通大学学报, no. 05, 15 October 2012 (2012-10-15) * |
Also Published As
Publication number | Publication date |
---|---|
CN117934350B (en) | 2024-08-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112424828B (en) | Nuclear fuzzy C-means quick clustering algorithm integrating space constraint | |
CN103295010B (en) | A kind of unitary of illumination method processing facial image | |
CN116977329B (en) | Photovoltaic grid line detection method based on machine vision | |
CN118115498B (en) | Method and system for rapidly detecting glossiness of titanium rod | |
CN111199245A (en) | Rape pest identification method | |
CN115526811B (en) | Adaptive vision SLAM method suitable for variable illumination environment | |
CN107133937B (en) | A kind of self-adapting enhancement method of infrared image | |
CN116824304A (en) | Low-illumination target detection method based on contrast learning | |
CN115797205A (en) | Unsupervised single image enhancement method and system based on Retinex fractional order variation network | |
CN117934350B (en) | Image processing method for intelligent inspection robot of chemical plant | |
CN113627240B (en) | Unmanned aerial vehicle tree species identification method based on improved SSD learning model | |
CN115100068A (en) | Infrared image correction method | |
CN107369157A (en) | A kind of adaptive threshold Otsu image segmentation method and device | |
CN117893455B (en) | Image brightness and contrast adjusting method | |
CN117314940B (en) | Laser cutting part contour rapid segmentation method based on artificial intelligence | |
CN105139365A (en) | Method for processing Tera-Hertz or infrared image | |
CN110766662B (en) | Forging surface crack detection method based on multi-scale and multi-layer feature learning | |
CN116934761B (en) | Self-adaptive detection method for defects of latex gloves | |
CN117557565A (en) | Detection method and device for lithium battery pole piece | |
CN114565537B (en) | Infrared imaging device based on local information entropy | |
CN117253192A (en) | Intelligent system and method for silkworm breeding | |
CN112541859B (en) | Illumination self-adaptive face image enhancement method | |
CN112488125B (en) | Reconstruction method and system based on high-speed visual diagnosis and BP neural network | |
CN118154480B (en) | Cultivation-combined farm sewage purifying treatment method and system | |
CN117934455B (en) | River water flow purification effect-based detection method and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |