Environmental test restricted area safety monitoring system based on image recognition
The grayscale image of the test is processed in blocks through image recognition technology, and the possibility and transmittance of fog are calculated, which solves the problem of misjudgment of white areas and lacks light intensity in the sky and the improvement of safety monitoring accuracy of the salt spray test. and reliability of salt spray leakage monitoring.
Patent Information
- Application Number
- CN202411397255.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-09
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2044-10-09
AI Technical Summary
In the salt spray test, a large white area in the laboratory environment was mistaken for salt spray, and the sky and atmospheric light intensity reference points were lacking, resulting in inaccurate acquisition of global atmospheric light intensity values, which reduced the accuracy of safety monitoring of environmental test restricted areas sex.
The environmental test restricted area safety monitoring system based on image recognition is adopted to obtain the test grayscale images inside the laboratory through the image acquisition module. After blocking, the mist possibility and transmittance of each image block are obtained, combining the image block position distribution and atmosphere. Light intensity value, calculate the overall mist content to monitor salt spray leakage.
It improves the accuracy of safety monitoring in the restricted area of environmental tests, accurately obtains the overall fog content inside the laboratory, avoids errors caused by misjudgment in white areas and non-uniform mist distribution, and enhances the reliability of salt spray leakage monitoring.
Smart Images

Figure CN118898813B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and more specifically, to a safety monitoring system for an environmental test restricted area based on image recognition. Background Art
[0002] Salt spray monitoring is an environmental test that mainly uses artificial simulated salt spray environment conditions created by salt spray test equipment to evaluate the corrosion resistance of products or metal materials. However, when conducting accelerated salt spray corrosion tests, it is necessary to monitor the test equipment in real time to prevent salt spray gas from overflowing and corroding other equipment in the laboratory and causing damage. Therefore, an environmental test restricted area safety monitoring system based on image recognition is proposed to conduct safety monitoring of environmental tests.
[0003] The patent document with publication number CN113920136A currently discloses an improved dark channel prior dehazing algorithm, which uses Rayleigh scattering theory to improve the estimated value of atmospheric light; uses a segmentation method based on an active contour model to segment the sky area to obtain sky areas and non-sky areas; uses filters of different sizes to estimate dark channel values; and simplifies the determination of transmittance.
[0004] The safety of the environmental test restricted area can be monitored by the overall fog content in the laboratory. However, when the global atmospheric light intensity value is obtained by the dark channel prior algorithm in the above method, the overall fog content inside the laboratory is obtained by the global atmospheric light intensity value; due to the presence of large white areas in the laboratory environment, such as the surface of the test box, the white areas are mistaken for salt spray; and the lack of sky and atmospheric light intensity as reference points in the laboratory makes the global atmospheric light intensity value inaccurate, which in turn leads to inaccurate overall fog content inside the laboratory, thereby reducing the accuracy of safety monitoring of the environmental test restricted area. Summary of the invention
[0005] In order to solve the problem that there are large white areas on the surface of the test box in the laboratory environment, which causes the white areas to be mistaken for salt spray; and the lack of sky and atmospheric light intensity as reference points in the laboratory makes the acquisition of global atmospheric light intensity values inaccurate, the present invention proposes an environmental test restricted area safety monitoring system based on image recognition.
[0006] An image acquisition module is used to obtain grayscale images of the experiments inside the laboratory;
[0007] The global atmospheric light intensity value acquisition module is used to divide the test grayscale image into multiple image blocks; obtain the fog possibility of each image block, and the fog possibility represents the grayscale distribution in the image block; obtain the global atmospheric light intensity value of the test grayscale image , Represents the total number of all image patches of the test grayscale image; Indicates Dark channel atmospheric light intensity value of each image block; Indicates The white foreground ratio of each image block; Indicates The probability of fog in an image block; Indicates The atmospheric light intensity value of the bright channel of each image block;
[0008] The overall fog content acquisition module is used to obtain the suspected leakage points of the test grayscale image according to the position distribution of the image blocks and the possibility of fog; obtain the transmittance of each image block, and the transmittance is a weighted fusion of the distance between the image block and the suspected leakage point and the global atmospheric light intensity value on the possibility of fog; according to the transmittance of each image block, the overall fog content of the test grayscale image is obtained;
[0009] The salt spray leakage monitoring module is used to monitor the salt spray leakage of the laboratory according to the overall fog content of the test grayscale image.
[0010] By accurately obtaining the overall fog content inside the laboratory, the accuracy of safety monitoring of the environmental test restricted area is improved.
[0011] Preferably, dividing the test grayscale image into a plurality of image blocks comprises:
[0012] Preset a block parameter , divide the test grayscale image into several Image blocks of size.
[0013] Preferably, obtaining the possibility of fogging of each image block includes:
[0014] Get the grayscale adjustment factor of each image block;
[0015] For any image block, the inverse proportional value of the image contrast of the image block is recorded as the contrast factor of the image block; the product of the contrast factor of the image block and the grayscale adjustment factor of the image block is taken as the possibility of fogging of the image block.
[0016] Preferably, the step of obtaining the grayscale adjustment factor of each image block includes:
[0017] Preset a comparison parameter For any image block, the standard deviation of the grayscale values of all pixels in the image block is normalized and evenly mapped to the interval The value after is recorded as the first mapping value; if the first mapping value is greater than the comparison parameter , 0 is used as the adjustment factor of the image block; if the first mapping value is less than or equal to the contrast parameter ,Will as the adjustment factor of the image block; recording the difference between the first mapping value and the adjustment factor of the image block as the first difference; and taking the cosine value of the first difference as the grayscale adjustment factor of the image block.
[0018] The possibility of fog is used to solve the problem of lack of sky and atmospheric light intensity as reference points in the laboratory, making the global atmospheric light intensity value more accurate; when the pixels in the image block tend to be pure white or pure black, the appearance of salt fog will cause irregular noise in the image. By obtaining the grayscale adjustment factor of the image block, the influence of irregular noise can be avoided.
[0019] Preferably, obtaining the suspected leakage point of the test grayscale image includes:
[0020] The coordinate position of the central pixel point in any image block is recorded as the target coordinate position of the image block; a three-dimensional space is constructed according to the coordinate position of the pixel points in the test grayscale image and the fog possibility of the image block, and the target coordinate position and fog possibility of all image blocks are input into the three-dimensional space to obtain multiple data points; all data points are clustered using a hierarchical clustering algorithm to obtain multiple cluster clusters; for any cluster cluster; the mean of the fog possibility of all data points in the cluster cluster is recorded as the first mean of the cluster cluster; the cluster cluster with the largest first mean is recorded as the first cluster cluster; the coordinate position of the data point at the cluster center position of the first cluster cluster is recorded as the first target position; in the test grayscale image, the pixel point at the first target position is used as the suspected leakage point of the test grayscale image.
[0021] The distribution of fog in the test grayscale image is not uniform, but is more densely distributed near the leakage point. Therefore, the accuracy of obtaining the overall fog content of the test grayscale image is improved by obtaining the suspected leakage point.
[0022] Preferably, obtaining the transmittance of each image block includes:
[0023] Preset comparison parameters , for any image block, obtain the dark channel image of the image block; record the ratio of the mean grayscale value of all pixels in the dark channel image of the image block to the global atmospheric light intensity value of the test grayscale image as the second ratio; record the Euclidean distance between the central pixel of the image block and the suspected leakage point of the test grayscale image as the first distance; and record the comparison parameter The ratio of 1 to the first distance is recorded as the third ratio; the difference between 1 and the second ratio is recorded as the second difference; the product of the second difference and the possibility of fog in the image block is recorded as the third product; the difference between 1 and the third ratio is recorded as the third difference; the product of the third difference and the third ratio is recorded as the fourth product; the sum of the third product and the fourth product is taken as the transmittance of the image block.
[0024] By obtaining the transmittance of the image block, the problem that the overall fog content of the test grayscale image cannot be obtained by using the globally same transmittance is solved because the distribution of fog in the test grayscale image is not uniform.
[0025] Preferably, the step of obtaining the overall fog content of the test grayscale image includes:
[0026] The fog content of each image block is obtained, and the sum of the fog contents of all image blocks is taken as the overall fog content of the test grayscale image.
[0027] Preferably, obtaining the fog content of each image block includes:
[0028] For any pixel in any image block, the difference between the grayscale value of the pixel and the global atmospheric light intensity value of the test grayscale image is recorded as the light intensity difference value of the pixel; the reciprocal of the transmittance of the image block is recorded as the first reciprocal; the difference between 1 and the first reciprocal is recorded as the transmittance difference value of the image block; the product of the transmittance difference value of the image block and the light intensity difference value of the pixel is taken as the first difference value of the pixel; the cumulative sum of the first difference values of all pixels in the image block is taken as the fog content of the image block.
[0029] Improve the accuracy of obtaining the overall fog content of the test grayscale image.
[0030] Preferably, the salt mist leakage monitoring of the laboratory according to the overall mist content of the test grayscale image includes:
[0031] Preset a threshold parameter , if the overall fog content of the test grayscale image is greater than or equal to the threshold parameter , then salt spray leakage occurs in the laboratory.
[0032] The present invention has the following technical effects: the present invention innovatively proposes to obtain the overall fog content of the test grayscale image, and the overall fog content is the sum of the fog content of all image blocks; the laboratory is monitored for salt fog leakage according to the overall fog content of the test grayscale image; by accurately obtaining the overall fog content inside the laboratory, the accuracy of safety monitoring of the environmental test restricted area is improved; the test grayscale image is divided into a plurality of image blocks; the fog possibility of each image block is obtained, and the fog possibility characterizes the grayscale distribution within the image block; the problem of lack of sky and atmospheric light intensity as reference points in the laboratory is solved by the fog possibility, so that the accuracy of the global atmospheric light intensity value is higher; the suspected leakage point of the test grayscale image is obtained; the distribution of fog in the test grayscale image is not uniform, but is more densely distributed near the leakage point, so the accuracy of obtaining the overall fog content of the test grayscale image is improved by obtaining the suspected leakage point; the transmittance of each image block is obtained; by obtaining the transmittance of the image block, the problem that the overall fog content of the test grayscale image cannot be obtained by using the globally same transmittance due to the uneven distribution of fog in the test grayscale image is solved. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] By reading the following detailed description with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:
[0034] Figure 1 It is a system block diagram of an environmental test restricted area safety monitoring system based on image recognition according to an embodiment of the present invention. DETAILED DESCRIPTION
[0035] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0036] It should be understood that when the terms "first", "second", etc. are used in the claims, descriptions, and drawings of the present invention, they are only used to distinguish different objects, rather than to describe a specific order. The terms "include" and "comprise" used in the description and claims of the present invention indicate the presence of the described features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their collections.
[0037] The present invention provides an environmental test restricted area safety monitoring system based on image recognition. Figure 1 As shown, the environmental test restricted area safety monitoring system based on image recognition includes modules 101 to 104, which are described in detail below.
[0038] The image acquisition module 101 is used to acquire the grayscale image of the test inside the laboratory.
[0039] Specifically, we first need to collect the grayscale image of the test chamber inside the laboratory. The specific process is as follows:
[0040] In a laboratory equipped with salt spray accelerated corrosion equipment, a high-resolution camera is used to photograph the interior of the laboratory during the test to obtain a test image inside the laboratory; the test image inside the laboratory is subjected to median filtering, denoising and grayscale operations to obtain a test grayscale image inside the laboratory. In this embodiment, the size of the obtained test grayscale image inside the laboratory is 800×800; the median filtering and grayscale operations are prior arts, and this embodiment will not be described in detail here.
[0041] So far, the experimental grayscale image inside the laboratory is obtained through the above method.
[0042] The global atmospheric light intensity value acquisition module 102 is used to divide the test grayscale image into a number of image blocks; obtain the fog possibility of each image block according to the grayscale distribution in each image block; and obtain the global atmospheric light intensity value of the test grayscale image according to the fog possibility and the distribution of pixels in different image blocks.
[0043] It should be noted that, in the event of a salt fog leak in the laboratory, the distribution of fog in the collected test grayscale image is not uniform, but is more densely distributed near the leakage point; therefore, when establishing an atmospheric scattering model, it is not appropriate to use a globally identical transmittance, so this embodiment requires block processing of the test grayscale image, and assumes that the areas in the same image block have the same transmittance; when using the dark channel prior algorithm to defog the test grayscale image, it is necessary to obtain the fog possibility of each image block in combination with the laboratory environment characteristics, and then use the fog possibility to assist in obtaining the global atmospheric light intensity value of the test grayscale image.
[0044] Preset a block parameter , wherein this embodiment is based on This example is described as an example, and this embodiment is not specifically limited. It depends on the specific implementation situation.
[0045] Specifically, the test grayscale image is divided into several Image blocks of size.
[0046] 1. Get the fog probability of each image patch.
[0047] It should be noted that when using the dark channel prior algorithm to defog the test grayscale image, it is necessary to obtain the fog possibility of each image block in combination with the laboratory environment characteristics, and the fog possibility is used to assist in obtaining the global atmospheric light intensity value of the test grayscale image; the appearance of salt fog will reduce the clarity of the image, the less clear the image is, the higher the image contrast is, and at the same time, salt fog will blur the image, making the grayscale value tend to be consistent, that is, it will reduce the standard deviation of the grayscale values of all pixels in the image; but when the image contrast is small to a certain extent, that is, when the pixels in the image block tend to be pure white or pure black, the appearance of salt fog will cause irregular noise to appear in the image, that is, increase the standard deviation of the grayscale value of the image; at this time, the larger the standard deviation, the more likely it is to contain salt fog, so it is necessary to avoid the influence of irregular noise by obtaining the grayscale adjustment factor of the image block.
[0048] Preferably, in some implementations of the embodiments of the present invention, the calculation method for obtaining the possibility of fogging of each image block according to the grayscale distribution in each image block is:
[0049] Obtaining a grayscale adjustment factor for each image block according to the standard deviation of the grayscale values of all pixels in each image block;
[0050] For any image block, the inverse proportional value of the image contrast of the image block is recorded as the contrast factor of the image block; the product of the contrast factor of the image block and the grayscale adjustment factor of the image block is taken as the possibility of fogging of the image block.
[0051] The specific formula is:
[0052]
[0053] In the formula, Indicates the possibility of fog in the image block; represents the image contrast of the image patch; Represents the grayscale adjustment factor of the image block; represents an exponential function with a natural constant as the base, and the embodiment adopts The model shows an inverse proportional relationship. As the input of the model, implementers can choose the inverse proportional function according to actual conditions.
[0054] It should be noted that the appearance of salt fog will reduce the clarity of the image. The less clear the image is, the higher the image contrast is. At the same time, salt fog will blur the image, making the grayscale value tend to be consistent, that is, it will reduce the standard deviation of the grayscale values of all pixels in the image. Therefore, the lower the image contrast of the image block and the smaller the standard deviation of the grayscale value, the greater the possibility that the image block contains fog.
[0055] Preferably, in some implementations of the embodiments of the present invention, the method for obtaining the grayscale adjustment factor of the image block includes:
[0056] Preset a comparison parameter , wherein this embodiment is based on This example is described as an example, and this embodiment is not specifically limited. It depends on the specific implementation situation.
[0057] For any image block, the standard deviation of the grayscale values of all pixels in the image block is normalized and evenly mapped to the interval The value after is recorded as the first mapping value; if the first mapping value is greater than the comparison parameter , 0 is used as the adjustment factor of the image block; if the first mapping value is less than or equal to the contrast parameter ,Will as the adjustment factor of the image block; recording the difference between the first mapping value and the adjustment factor of the image block as the first difference; and taking the cosine value of the first difference as the grayscale adjustment factor of the image block.
[0058] At this point, the fog possibility of each image block is obtained.
[0059] 2. Obtain the global atmospheric light intensity value of the experimental grayscale image.
[0060] It should be noted that when using the traditional dark channel prior algorithm, the sky is regarded as the depth of field, and the global atmospheric light intensity value is inferred to be the dark channel value of the sky image part; however, there is no reference point of atmospheric light intensity such as the sky in the laboratory, and the difference in the change of depth of field in the laboratory is not large; therefore, the method of using the traditional dark channel prior algorithm to obtain the global atmospheric light intensity value of the test grayscale image is not appropriate, and it is necessary to combine the dark channel atmospheric light intensity values and bright channel atmospheric light intensity values of different image blocks to obtain the global atmospheric light intensity value of the test grayscale image; and due to the large white area on the surface of the test box in the internal environment of the laboratory, the dark channel value in the white area is generally high, so it does not meet the theory of the dark channel prior algorithm, so it is necessary to segment each image block in the grayscale image of the test box to distinguish the white foreground area and the background area in the image block, so as to obtain the global atmospheric light intensity value of the test grayscale image.
[0061] Preferably, in some implementations of the embodiments of the present invention, according to the possibility of fog and the distribution of pixels in different image blocks, a calculation method for obtaining the global atmospheric light intensity value of the test grayscale image is:
[0062] For any image block, perform threshold segmentation on the image block using the Otsu threshold segmentation algorithm to obtain a segmentation result map of the image block; correspond all connected domains in the segmentation result map of the image block to all areas in the image block, all of which are recorded as white foreground areas of the image block; obtain the dark channel atmospheric light intensity value of the image block using the dark channel prior algorithm; and obtain the bright channel atmospheric light intensity value of the image block using the bright channel prior algorithm;
[0063] The ratio of the total number of all pixels in all white foreground areas in the image block to the total number of all pixels in the image block is recorded as the white foreground proportion value; the product of the difference between 1 and the white foreground proportion value, the dark channel atmospheric light intensity value of the image block and the fog possibility of the image block is recorded as the first product; the product of the difference between 1 and the fog possibility of the image block, the white foreground proportion value and the bright channel atmospheric light intensity value of the image block is recorded as the second product; the sum of the first product and the second product is recorded as the first sum value of the image block; the average of the first sum values of all image blocks of the test grayscale image is taken as the global atmospheric light intensity value of the test grayscale image.
[0064] The specific formula is:
[0065]
[0066] In the formula, Represents the global atmospheric light intensity value of the test grayscale image; Represents the total number of all image patches of the test grayscale image; Represents the first grayscale image of the test Dark channel atmospheric light intensity value of each image block; Represents the first grayscale image of the test The white foreground ratio of each image block; Represents the first grayscale image of the test The probability of fog in an image block; Represents the first grayscale image of the test The atmospheric light intensity value of the bright channel of an image block.
[0067] It should be noted that, in the dark channel, the greater the fog content, the salt fog scattering increases the brightness of the dark channel, and the greater the global atmospheric light intensity value of the test grayscale image; however, in the bright channel, the salt fog scattering reduces the brightness in the bright channel, so the global atmospheric light intensity value of the test grayscale image is smaller; among them, Otsu threshold segmentation algorithm, dark channel prior algorithm and bright channel prior algorithm are all existing technologies, and this embodiment will not be described in detail here.
[0068] So far, the global atmospheric light intensity value of the test grayscale image is obtained through the above method.
[0069] The overall fog content acquisition module 103 is used to obtain the suspected leakage points of the test grayscale image according to the fog possibility of the image block; obtain the transmittance of each image block according to the distance between each image block and the suspected leakage point, the global atmospheric light intensity value and the fog possibility; obtain the overall fog content of the test grayscale image according to the transmittance of the image block and the global atmospheric light intensity value.
[0070] It should be noted that when a salt spray leak occurs in the laboratory, the distribution of fog in the collected test grayscale image is not uniform, but is more densely distributed near the leakage point; therefore, when establishing the atmospheric scattering model, it is not appropriate to use a globally identical transmittance, so it is necessary to obtain the transmittance of each image block; taking into account the influence of the distance from the leakage point on the transmittance, that is, the closer the image block is to the suspected leakage point, the higher the transmittance may be even if the possibility of fog is lower; therefore, it is necessary to first obtain the suspected leakage point of the test grayscale image; obtain the fog content of each image block according to the transmittance of the image block, and then obtain the overall fog content of the test grayscale image.
[0071] 1. Obtain the suspected leakage point of the test grayscale image.
[0072] Preferably, in some implementations of the embodiments of the present invention, the specific method for obtaining the suspected leakage point of the test grayscale image according to the possibility of the image block containing fog is:
[0073] For any image block, the coordinate position of the central pixel point in the image block is recorded as the target coordinate position of the image block; a three-dimensional space is constructed according to the coordinate position of the pixel points in the test grayscale image and the fog possibility of the image block, and the target coordinate position and fog possibility of all image blocks are input into the three-dimensional space to obtain a number of data points; a hierarchical clustering algorithm is used to cluster all data points to obtain a number of cluster clusters; for any cluster cluster; the mean of the fog possibility of all data points in the cluster cluster is recorded as the first mean of the cluster cluster; the cluster cluster with the largest first mean is recorded as the first cluster cluster; the coordinate position of the data point at the cluster center position of the first cluster cluster is recorded as the first target position; in the test grayscale image, the pixel point at the first target position is used as the suspected leakage point of the test grayscale image.
[0074] It should be noted that the goal of the clustering algorithm is to group similar objects into the same cluster, and the similarity is determined by two factors: one is the distance between image blocks, and the other is the possibility of fog in the image blocks; different image blocks with similar distances and adjacent fog possibilities are merged into one clustering cluster; the hierarchical clustering algorithm is a prior art and will not be described in detail in this embodiment.
[0075] At this point, the suspected leakage point of the test grayscale image is obtained.
[0076] 2. Get the transmittance of each image block.
[0077] Preferably, in some implementations of the embodiments of the present invention, the calculation method for obtaining the transmittance of each image block is as follows, based on the distance between each image block and the suspected leakage point, the global atmospheric light intensity value, and the possibility of fog:
[0078] Preset a comparison parameter , wherein this embodiment is based on This example is described as an example, and this embodiment is not specifically limited. It depends on the specific implementation situation.
[0079] For any image block, a dark channel image of the image block is obtained using a dark channel priori algorithm; the ratio of the mean grayscale value of all pixels in the dark channel image of the image block to the global atmospheric light intensity value of the test grayscale image is recorded as the second ratio; the Euclidean distance between the central pixel of the image block and the suspected leakage point of the test grayscale image is recorded as the first distance; and the comparison parameter The ratio of 1 to the first distance is recorded as the third ratio; the difference between 1 and the second ratio is recorded as the second difference; the product of the second difference and the possibility of fog in the image block is recorded as the third product; the difference between 1 and the third ratio is recorded as the third difference; the product of the third difference and the third ratio is recorded as the fourth product; the sum of the third product and the fourth product is taken as the transmittance of the image block.
[0080] The specific formula is:
[0081]
[0082] In the formula, represents the transmittance of the image block; Indicates the possibility of fog in the image block; Represents the mean grayscale value of all pixels in the dark channel image of the image block; Represents the global atmospheric light intensity value of the test grayscale image; Represents the Euclidean distance between the central pixel of the image block and the suspected leakage point of the test grayscale image; Indicates the preset comparison parameters.
[0083] It should be noted that the greater the possibility of fog in an image block, the higher the transmittance of the image block; taking into account the influence of the distance from the leakage point on the transmittance, that is, the closer the central pixel point of the image block is to the suspected leakage point, the higher the transmittance may be even if the possibility of fog is low.
[0084] At this point, the transmittance of each image block is obtained.
[0085] 3. Obtain the overall fog content of the test grayscale image.
[0086] Preferably, in some implementations of the embodiments of the present invention, the calculation method for obtaining the overall fog content of the test grayscale image according to the transmittance of the image block and the global atmospheric light intensity value is:
[0087] Obtain the fog content of each image block according to the transmittance of the image block and the global atmospheric light intensity value;
[0088] The cumulative sum of all fog contents of the test grayscale image is taken as the overall fog content of the test grayscale image.
[0089] It should be noted that the fog content of each image block is obtained by comparing the differences between the grayscale values of different pixels in the image block and the transmittance and global atmospheric light intensity values; and the greater the difference, the greater the fog content of the image block.
[0090] Preferably, in some implementations of the embodiments of the present invention, the method for obtaining the fog content of each image block includes:
[0091] For any pixel in any image block, the difference between the grayscale value of the pixel and the global atmospheric light intensity value of the test grayscale image is recorded as the light intensity difference value of the pixel; the reciprocal of the transmittance of the image block is recorded as the first reciprocal; the difference between 1 and the first reciprocal is recorded as the transmittance difference value of the image block; the product of the transmittance difference value of the image block and the light intensity difference value of the pixel is taken as the first difference value of the pixel; the cumulative sum of the first difference values of all pixels in the image block is taken as the fog content of the image block.
[0092] The specific formula is:
[0093]
[0094] In the formula, Indicates the amount of fog in the image block; Represents the total number of all pixels in the image block; represents the transmittance of the image block; Indicates the image block Gray value of pixel; Represents the global atmospheric light intensity value of the test grayscale image.
[0095] So far, the overall fog content of the test grayscale image is obtained through the above method.
[0096] The salt mist leakage monitoring module 104 is used to monitor the salt mist leakage of the laboratory according to the overall mist content of the test grayscale image.
[0097] Preset a threshold parameter , wherein this embodiment is based on This example is described as an example, and this embodiment is not specifically limited. It depends on the specific implementation situation.
[0098] Specifically, if the overall fog content of the test grayscale image is greater than or equal to the threshold parameter If salt spray leakage occurs in the laboratory, the suspected leakage point will be marked in the test grayscale image so that technicians can conduct leakage investigation.
[0099] At this point, this embodiment is completed.
[0100] The present invention has the following technical effects: the present invention innovatively proposes to obtain the overall fog content of the test grayscale image, and the overall fog content is the sum of the fog content of all image blocks; the laboratory is monitored for salt fog leakage according to the overall fog content of the test grayscale image; by accurately obtaining the overall fog content inside the laboratory, the accuracy of safety monitoring of the environmental test restricted area is improved; the test grayscale image is divided into a plurality of image blocks; the fog possibility of each image block is obtained, and the fog possibility characterizes the grayscale distribution within the image block; the problem of lack of sky and atmospheric light intensity as reference points in the laboratory is solved by the fog possibility, so that the accuracy of the global atmospheric light intensity value is higher; the suspected leakage point of the test grayscale image is obtained; the distribution of fog in the test grayscale image is not uniform, but is more densely distributed near the leakage point, so the accuracy of obtaining the overall fog content of the test grayscale image is improved by obtaining the suspected leakage point; the transmittance of each image block is obtained; by obtaining the transmittance of the image block, the problem that the overall fog content of the test grayscale image cannot be obtained by using the globally same transmittance due to the uneven distribution of fog in the test grayscale image is solved.
[0101] Although this specification has shown and described a number of embodiments of the present invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art will conceive of many modifications, changes and alternatives without departing from the ideas and spirit of the present invention. It should be understood that in the practice of the present invention, various alternatives to the embodiments of the present invention described herein may be employed.
[0102] The above are all preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Therefore, any equivalent changes made based on the structure, shape, and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. Environmental test restricted area safety monitoring system based on image recognition, characterized by: Includes the following modules: An image acquisition module is used to obtain grayscale images of the experiments inside the laboratory; The global atmospheric light intensity value acquisition module is used to divide the test grayscale image into multiple image blocks; obtain the fog possibility of each image block, and the fog possibility represents the grayscale distribution in the image block; obtain the global atmospheric light intensity value of the test grayscale image , Represents the total number of all image patches of the test grayscale image; Indicates Dark channel atmospheric light intensity value of each image block; Indicates The white foreground ratio of each image block; Indicates The probability of fog in an image block; Indicates The atmospheric light intensity value of the bright channel of each image block; The overall fog content acquisition module is used to obtain the suspected leakage points of the test grayscale image according to the position distribution of the image blocks and the possibility of fog; obtain the transmittance of each image block ; Indicates the possibility of fog in the image block; Represents the mean grayscale value of all pixels in the dark channel image of the image block; Represents the global atmospheric light intensity value of the test grayscale image; Represents the Euclidean distance between the central pixel of the image block and the suspected leakage point of the test grayscale image; Indicates the preset contrast parameter; according to the transmittance of each image block, the overall fog content of the test grayscale image is obtained; The salt spray leakage monitoring module is used to monitor the salt spray leakage of the laboratory according to the overall fog content of the test grayscale image.
2. The environmental test restricted area safety monitoring system based on image recognition according to claim 1 is characterized in that: The step of dividing the test grayscale image into a plurality of image blocks comprises: Preset a block parameter , divide the test grayscale image into several Image blocks of size.
3. The environmental test restricted area safety monitoring system based on image recognition according to claim 1 is characterized in that: The obtaining of the possibility of fogging of each image block includes: Get the grayscale adjustment factor of each image block; For any image block, the inverse proportional value of the image contrast of the image block is recorded as the contrast factor of the image block; the product of the contrast factor of the image block and the grayscale adjustment factor of the image block is taken as the possibility of fogging of the image block.
4. The environmental test restricted area safety monitoring system based on image recognition according to claim 3 is characterized in that: The step of obtaining the grayscale adjustment factor of each image block includes: Preset a comparison parameter For any image block, the standard deviation of the grayscale values of all pixels in the image block is normalized and evenly mapped to the interval The value after is recorded as the first mapping value; if the first mapping value is greater than the comparison parameter , 0 is used as the adjustment factor of the image block; if the first mapping value is less than or equal to the contrast parameter ,Will as the adjustment factor of the image block; recording the difference between the first mapping value and the adjustment factor of the image block as the first difference; and taking the cosine value of the first difference as the grayscale adjustment factor of the image block.
5. The environmental test restricted area safety monitoring system based on image recognition according to claim 1 is characterized in that: The step of obtaining the suspected leakage point of the test grayscale image includes: The coordinate position of the central pixel point in any image block is recorded as the target coordinate position of the image block; a three-dimensional space is constructed according to the coordinate position of the pixel points in the test grayscale image and the fog possibility of the image block, and the target coordinate position and fog possibility of all image blocks are input into the three-dimensional space to obtain multiple data points; all data points are clustered using a hierarchical clustering algorithm to obtain multiple cluster clusters; for any cluster cluster; the mean of the fog possibility of all data points in the cluster cluster is recorded as the first mean of the cluster cluster; the cluster cluster with the largest first mean is recorded as the first cluster cluster; the coordinate position of the data point at the cluster center position of the first cluster cluster is recorded as the first target position; in the test grayscale image, the pixel point at the first target position is used as the suspected leakage point of the test grayscale image.
6. The environmental test restricted area safety monitoring system based on image recognition according to claim 1 is characterized in that: The obtaining of the overall fog content of the test grayscale image comprises: The fog content of each image block is obtained, and the sum of the fog contents of all image blocks is taken as the overall fog content of the test grayscale image.
7. The environmental test restricted area safety monitoring system based on image recognition according to claim 6 is characterized in that: The obtaining of the fog content of each image block includes: For any pixel in any image block, the difference between the grayscale value of the pixel and the global atmospheric light intensity value of the test grayscale image is recorded as the light intensity difference value of the pixel; the reciprocal of the transmittance of the image block is recorded as the first reciprocal; the difference between 1 and the first reciprocal is recorded as the transmittance difference value of the image block; the product of the transmittance difference value of the image block and the light intensity difference value of the pixel is taken as the first difference value of the pixel; the cumulative sum of the first difference values of all pixels in the image block is taken as the fog content of the image block.
8. The environmental test restricted area safety monitoring system based on image recognition according to claim 1 is characterized in that: The salt spray leakage monitoring of the laboratory according to the overall fog content of the test grayscale image includes: Preset a threshold parameter , if the overall fog content of the test grayscale image is greater than or equal to the threshold parameter , then salt spray leakage occurs in the laboratory.
