Method and device for judging cleaning degree of storage tank based on machine vision
By using machine vision technology to collect and process images during the tank cleaning process, the area and distribution uniformity of the sludge area are calculated, and the problem of low cleaning integrity of the tank is solved, achieving efficient and accurate cleaning completion detection.
Patent Information
- Application Number
- CN202311669859.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-06
- Publication Date
- 2025-06-06
AI Technical Summary
In the prior art, the completeness of storage tank cleaning is low, and it cannot be discovered and re-cleaned in time, resulting in sludge settlement and tank corrosion.
Using a machine vision-based method, the camera is used to collect images of the cleaned area by controlling the camera during the tank cleaning process, performing pre-processing, splicing, and segmentation, and calculate the area and distribution uniformity of the sludge area to judge the cleaning completion degree.
It improves the integrity and efficiency of storage tank cleaning, can timely detect the cleaning completion degree, and avoids sludge settlement and tank corrosion.
Smart Images

Figure CN120107146A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a method and device for judging the cleaning degree of a storage tank based on machine vision. Background Art
[0002] Crude oil storage tanks are key equipment for national oil reserves. When crude oil is stored in a tank for too long or when crude oil from different sources is mixed, it is easy to cause sludge sedimentation. The accumulation of sludge in the tank will reduce the tank capacity and corrode the tank body, thus affecting the operation and maintenance of the tank. Once an accident occurs in a large crude oil storage tank, it will cause huge economic losses, and in serious cases, even fires and casualties.
[0003] Existing tank cleaning usually adopts the mode of mechanical cleaning of the tank body. This cleaning method is safer and more economical than manual cleaning, but the cleaning completeness is low. When the deposited sludge on the tank wall and bottom is not fully cleaned, it cannot be discovered in time and re-cleaned.
[0004] How to effectively judge the cleaning degree of storage tanks and improve the cleaning degree is a technical problem that needs to be solved at present. Summary of the invention
[0005] The present invention provides a method and device for judging the cleaning degree of a storage tank based on machine vision, so as to solve the defects existing in the prior art.
[0006] The present invention provides a method for judging the cleaning degree of a storage tank based on machine vision, which is applied to a cleaning device, wherein a camera is provided on the cleaning device, and the cleaning device is used to clean the storage tank. The method comprises:
[0007] Upon receiving the control instruction, the storage tank is cleaned according to a preset trajectory, and during the cleaning process, the camera is controlled to collect a plurality of first cleaning images of the cleaned area at preset time intervals;
[0008] Performing a preprocessing operation on the plurality of first cleaned images to obtain a second cleaned image; wherein the preprocessing operation is used to splice the plurality of first cleaned images;
[0009] Segmenting the second cleaning image to obtain a sludge area in the second cleaning image;
[0010] The area of the sludge region is calculated, and when the area of the sludge region satisfies a preset completion condition, the tank cleaning is confirmed to be completed.
[0011] According to a method for judging the cleaning degree of a storage tank based on machine vision provided by the present invention, the preprocessing operation is performed on the plurality of first cleaning images to obtain a second cleaning image, comprising:
[0012] For each first cleaning image, determining an overlapping area according to image feature information of the first cleaning image as a template image area; wherein the image feature information is used to determine whether there is an overlapping area in the first cleaning image;
[0013] Removing overlapping areas in the plurality of first cleaned images respectively according to the template image area to obtain a plurality of initial second cleaned images;
[0014] A splicing operation is performed on the multiple initial second cleaned images to obtain a second cleaned image.
[0015] According to a method for determining the cleaning degree of a storage tank based on machine vision provided by the present invention, after segmenting the second cleaning image to obtain the sludge area in the second cleaning image, the method further includes:
[0016] Calculating the distribution uniformity of the sludge area in the second cleaning image;
[0017] When the distribution uniformity of the sludge area is less than a uniformity threshold, it is confirmed that the tank cleaning effect meets the standard.
[0018] According to a method for judging the degree of tank cleaning based on machine vision provided by the present invention, the area of the sludge region is calculated, and when the area of the sludge region meets a preset completion condition, the tank cleaning is confirmed to be completed, including:
[0019] Calculating the area ratio of the sludge area in the second cleaning image to obtain a target area ratio;
[0020] When the target area ratio of the sludge area in the second cleaning image is smaller than an area threshold, it is confirmed that the tank cleaning is completed.
[0021] According to a method for determining the cleaning degree of a storage tank based on machine vision provided by the present invention, after calculating the distribution uniformity of the sludge area in the second cleaning image, the method further includes:
[0022] When the distribution uniformity of the sludge area is greater than a uniformity threshold, it is confirmed that the tank cleaning effect does not meet the standard.
[0023] According to a method for determining the cleaning degree of a storage tank based on machine vision provided by the present invention, after calculating the area ratio of the sludge area in the second cleaning image to obtain the target area ratio, the method further includes:
[0024] When the target area ratio of the sludge area in the second cleaning image is greater than an area threshold, it is determined that the tank cleaning is not completed.
[0025] According to a method for judging the degree of cleaning of a storage tank based on machine vision provided by the present invention, after confirming that the cleaning effect of the storage tank does not meet the standard, the method further includes:
[0026] The storage tank is re-cleaned according to a first preset trajectory, and during the cleaning process, the camera is controlled to re-collect multiple first cleaning images of the cleaned area according to a preset time interval; wherein the first preset trajectory is any trajectory different from the preset trajectory.
[0027] According to a method for determining the degree of cleaning of a storage tank based on machine vision provided by the present invention, after confirming that the cleaning of the storage tank is not completed, the method further includes:
[0028] The sludge area of the storage tank is re-cleaned according to a preset trajectory, and during the cleaning process, the camera is controlled to re-collect a plurality of first cleaning images of the cleaned sludge area at preset time intervals.
[0029] The present invention also provides a device for judging the cleaning degree of a storage tank based on machine vision, which is applied to a cleaning device, wherein a camera is provided on the cleaning device, and the cleaning device is used to clean the storage tank. The device comprises:
[0030] A collection module, configured to control the cleaning device to clean the storage tank according to a preset trajectory upon receiving a control instruction, and to control the camera to collect a plurality of first cleaning images of the cleaned area according to a preset time interval during the cleaning process;
[0031] A preprocessing module, configured to perform a preprocessing operation on the plurality of first cleaned images to obtain a second cleaned image; wherein the preprocessing operation is used to splice the plurality of first cleaned images;
[0032] a segmentation module, used for segmenting the second cleaning image to obtain a sludge area in the second cleaning image;
[0033] The calculation module is used to calculate the area of the sludge area and confirm that the tank cleaning is completed when the area of the sludge area meets the preset completion condition.
[0034] The present invention also provides a cleaning device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a method for determining the cleaning degree of a storage tank based on machine vision as described above is implemented.
[0035] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for determining the cleaning degree of a storage tank based on machine vision as described in any one of the above is implemented.
[0036] The present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements any of the above-mentioned methods for determining the cleaning degree of a storage tank based on machine vision.
[0037] The present invention provides a method and device for judging the degree of cleaning of a storage tank based on machine vision, which is applied to a cleaning device. A camera is arranged on the cleaning device, and the cleaning device is used to clean the storage tank. When a control instruction is received, the storage tank is cleaned according to a preset trajectory, and the camera is controlled to collect multiple first cleaning images of the cleaned area according to a preset time interval during the cleaning process, and a pre-processing operation is performed on the multiple first cleaning images to obtain a second cleaning image, wherein the pre-processing operation is used to splice the multiple first cleaning images, segment the second cleaning image to obtain a sludge area in the second cleaning image, calculate the area of the sludge area, and confirm that the cleaning of the storage tank is completed when the area of the sludge area meets the preset completion condition. It can be seen that the present invention synchronously collects the first cleaning image of the cleaned area during the cleaning process of the storage tank, so as to facilitate the subsequent splicing of the first cleaning image to obtain the second cleaning image; the second cleaning image is segmented to obtain the sludge area, and the cleaning completion degree of the entire storage tank can be determined by calculating the area of the sludge area, which is highly efficient. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0039] Figure 1 This is one of the flow charts of the method for judging the cleaning degree of a storage tank based on machine vision provided by the present invention;
[0040] Figure 2 This is the second flow chart of the method for judging the cleaning degree of a storage tank based on machine vision provided by the present invention;
[0041] Figure 3 This is the third flow chart of the method for judging the cleaning degree of a storage tank based on machine vision provided by the present invention;
[0042] Figure 4 This is a fourth flow chart of the method for determining the cleaning degree of a storage tank based on machine vision provided by the present invention;
[0043] Figure 5 It is a structural schematic diagram of a device for judging the cleaning degree of a storage tank based on machine vision provided by the present invention;
[0044] Figure 6 It is a structural schematic diagram of the cleaning equipment provided by the present invention. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings 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 ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0046] Combine the following Figure 1-Figure 6 The present invention describes a method and device for judging the cleaning degree of a storage tank based on machine vision.
[0047] Figure 1 This is one of the flow charts of the method for judging the cleaning degree of a storage tank based on machine vision provided in this embodiment, such as Figure 1 As shown, the method for judging the cleaning degree of a storage tank based on machine vision provided in this embodiment is applied to a cleaning device, wherein a camera is provided on the cleaning device, and the cleaning device is used to clean the storage tank. The method comprises:
[0048] Step 100: upon receiving a control instruction, the storage tank is cleaned according to a preset trajectory, and during the cleaning process, a camera is controlled to collect a plurality of first cleaning images of the cleaned area at preset time intervals.
[0049] It should be noted that in the prior art, the cleaning equipment uses a traditional mechanical cleaning method, which has a high cleaning efficiency, but the cleaning degree is not inspected after the cleaning is completed. If there are many areas where the sludge is not completely removed, it is easy to cause sludge deposition and cause losses. Based on this, this embodiment provides a method for judging the cleaning degree of a storage tank based on machine vision.
[0050] Specifically, the cleaning device provided in this embodiment is provided with a mechanical cleaning nozzle for cleaning the storage tank; a camera, such as a high-definition camera, is placed at the front end of the mechanical cleaning nozzle. When receiving a control instruction, the cleaning device cleans the storage tank according to a preset trajectory, and the high-definition camera monitors the cleaning process in real time, and collects multiple first cleaning images of the cleaned area at preset time intervals. For example, during the cleaning process, a photo is taken every 1 second as the first cleaning image, and all the first cleaning images collected during the cleaning process are transmitted to the data analysis module of the cleaning device for subsequent analysis.
[0051] Step 200: Perform a preprocessing operation on the multiple first cleaned images to obtain a second cleaned image; wherein the preprocessing operation is used to splice the multiple first cleaned images.
[0052] It should be noted that since the camera collects the first cleaning image at a preset time interval during the cleaning process, there may be overlapping areas in multiple first cleaning images. In order to improve the accuracy of judging the cleaning degree of the tank, it is necessary to remove the overlapping areas in the first cleaning image and perform a stitching operation on the first cleaning image after removing the overlapping areas.
[0053] Specifically, a color image automatic splicing method can be used for preprocessing based on the template matching principle. For the first cleaning image with overlapping areas, the template image area is automatically found from the overlapping area of the two first cleaning images using the image feature information, and then the template image area is found in the overlapping area of the other first cleaning image according to the maximum similarity criterion to find the optimal image registration point, and the image data of the overlapping area of the two first cleaning images is fused using the smoothing factor to remove the overlapping area, so as to realize the automatic, fast and seamless splicing of the two first cleaning images. The above steps are performed for each first cleaning image, and finally all the first cleaning images are spliced to obtain the second cleaning image. The second cleaning image can cover all areas inside the storage tank, which is convenient for dividing the sludge area.
[0054] Step 300: segment the second cleaning image to obtain a sludge area in the second cleaning image.
[0055] It should be noted that the specific sludge area is divided by segmenting the second cleaning image obtained after the preprocessing.
[0056] Specifically, the disjunctive normal level set (DNLS) image segmentation algorithm based on the Gaussian Markov (GMFR) model is used to segment the second cleaned image. The algorithm has low requirements on pixel homogeneity, and the step size is not constrained by the convergence condition, and has a good segmentation effect. The algorithm extracts the color channel information of the second cleaned image, uses the GMFR model to describe the characteristics of different color channels, and weights the image texture information and color information as the criterion for the segmentation of the second cleaned image. The specific description of the algorithm is as follows:
[0057] Assume α is a point in the second cleaned image, represents the symmetric neighborhood of position α in the image. For region A, f(α) = f α The probability of α ), referred to as P(f α ).
[0058] If P(f α|f(A))=P(f α |f(η α ))>0, then the image f in region A is considered to have the same Related MRF properties. The MRF model can be described by the conditional probability of the face: where α∈A, is a B-order symmetric neighborhood of position α, where the first-order neighborhood system is Assuming that the image f can be simulated by a GMRF model with a neighborhood system η, then the image f is Among them, θ r is the model parameter of MEF, e S is Gaussian noise with zero mean.
[0059] The interaction between pixels in the GMRF texture is used to express image information. The energy function of the DNLS level set is expressed as c 1 is the grayscale mean of the foreground area, c 2 is the grayscale mean of the background area, H is the Heaviside function. The grayscale mean of the foreground area is: The mean grayscale value of the background area is:
[0060] Let f represent the observed image and I lt Represents the different color channel feature images of the FMRF model, T is the number of texture feature images, λ is the learning rate, β is the weighting coefficient, then the energy function is expressed as
[0061] The evolution function can be written as:
[0062]
[0063] The specific steps of the algorithm are:
[0064] 1. Extract feature graphics I lt ;
[0065] 2. Initialize the level set and distribute the polygons in the image;
[0066] 3. Calculate iteration w ijk , Until the iteration ends, the segmented image is output to confirm the sludge area in the second cleaning image.
[0067] Step 400: Calculate the area of the sludge region, and confirm that the tank cleaning is completed when the area of the sludge region meets a preset completion condition.
[0068] It should be noted that the area ratio of the sludge area in the second cleaning image is calculated to determine whether the tank is cleaned. Prior to this, this embodiment proposes to evaluate the cleaning effect based on distribution uniformity.
[0069] Specifically, the uniformity calculation method based on fractal theory can be used to calculate the distribution uniformity of the storage tank after cleaning. If the uniformity does not meet the preset conditions, it means that the current cleaning path or the current cleaning method is unreasonable, resulting in uneven distribution of residual sludge after cleaning. The cleaning path or cleaning method can be improved and further re-cleaning can be performed; if the uniformity meets the preset conditions, it means that the residual sludge after cleaning is evenly distributed, the cleaning path and cleaning method are reasonable, and the cleaning effect is good. The sludge area calculation can be further performed to determine whether the tank cleaning is completed.
[0070] Specifically, when the target area ratio of the sludge area in the second cleaning image is smaller than the area threshold, it is confirmed that the tank cleaning is completed.
[0071] The above is a step description of the method for judging the degree of cleaning of a storage tank based on machine vision provided by the present invention. From the description of the above steps, it can be seen that the method for judging the degree of cleaning of a storage tank based on machine vision provided by the present invention is applied to a cleaning device, a camera is arranged on the cleaning device, and the cleaning device is used to clean the storage tank. When a control instruction is received, the storage tank is cleaned according to a preset trajectory, and the camera is controlled to collect multiple first cleaning images of the cleaned area according to a preset time interval during the cleaning process, and a pre-processing operation is performed on the multiple first cleaning images to obtain a second cleaning image, wherein the pre-processing operation is used to splice multiple first cleaning images, segment the second cleaning image to obtain a sludge area in the second cleaning image, calculate the area of the sludge area, and confirm that the cleaning of the storage tank is completed when the area of the sludge area meets the preset completion condition. It can be seen from this that the present invention synchronously collects the first cleaning image of the cleaned area during the cleaning process of the storage tank, so as to facilitate the subsequent splicing of the first cleaning image to obtain the second cleaning image; the second cleaning image is segmented to obtain the sludge area, and the cleaning completion degree of the entire storage tank can be determined by calculating the area of the sludge area, which is highly efficient.
[0072] Based on the above embodiments, in this embodiment, Figure 2 This is the second flow chart of the method for judging the cleaning degree of a storage tank based on machine vision provided in this embodiment, such as Figure 2 As shown, step 200 performs a preprocessing operation on the plurality of first cleaned images to obtain a second cleaned image, including:
[0073] Step 210: For each first cleaning image, determine an overlapping area according to image feature information of the first cleaning image as a template image area; wherein the image feature information is used to determine whether there is an overlapping area in the first cleaning image.
[0074] Step 220 : removing overlapping areas in the plurality of first cleaned images respectively according to the template image area to obtain a plurality of initial second cleaned images.
[0075] Step 230: Perform a splicing operation on the multiple initial second cleaning images to obtain a second cleaning image.
[0076] Specifically, the above embodiment has shown that a color image automatic splicing method can be used for preprocessing operations based on the template matching principle. For the first cleaning image with overlapping areas, the template image area is first automatically found from the overlapping area of the two first cleaning images using the image feature information, and then the optimal image registration point is found in the overlapping area of the other first cleaning image according to the maximum similarity criterion, and the image data of the overlapping area of the two first cleaning images is fused using the smoothing factor to remove the overlapping area, so as to achieve automatic, fast and seamless splicing of the two first cleaning images. For each first cleaning image, the above steps are performed, and finally all the first cleaning images are spliced to obtain the second cleaning image. The second cleaning image can cover all areas inside the storage tank, which is convenient for dividing the sludge area.
[0077] The method for determining the cleaning degree of a storage tank based on machine vision provided in this embodiment performs a preprocessing operation on a plurality of first cleaning images to obtain a second cleaning image, thereby facilitating the division of sludge areas.
[0078] Based on the above embodiments, in this embodiment, Figure 3 FIG. 3 is a flow chart of the method for judging the cleaning degree of a storage tank based on machine vision provided in this embodiment. Figure 3 As shown, after segmenting the second cleaning image in step 300 to obtain the sludge area in the second cleaning image, the method further includes:
[0079] Step 310: Calculate the distribution uniformity of the sludge area in the second cleaning image.
[0080] Step 320: When the distribution uniformity of the sludge area is less than a uniformity threshold, confirm that the tank cleaning effect meets the standard.
[0081] It should be noted that the distribution uniformity of the sludge area in the second cleaning image can be calculated based on fractal theory to determine the cleaning effect of the storage tank.
[0082] The second cleaning image formed after the tank wall pretreatment can be regarded as a rectangle. Take one vertex as the starting point and make a square with r as the side length. As the side length increases, the residual sludge area included in the square also increases, and the center point O of the square also changes accordingly. The center point of the residual sludge area is taken as the mass point, and its distance from the center point O of the square is recorded as r. i , the number of particles in the residual oil sludge area in the square is N. It is expressed as the equivalent side length of a square. r If is the side length, then the number of particles in the square is D represents the dimension. In a two-dimensional square, if the particles are evenly distributed, then D = 2.
[0083] against It can be deduced as
[0084] Where C is an arbitrary constant. Let σ = (D-2) 2 , σ is the uniformity. In the two-dimensional case, the smaller σ is, the more uniform it is.
[0085] For the second cleaning image of the rectangular tank wall, one square cannot cover the entire area. Different fixed points can be selected as starting points until the entire rectangular area is covered. Calculate the equivalent side length R of r under different square side lengths r With the number of particles N, the statistical data
[0086] The dimension D and uniformity σ are calculated by the post-fitting formula.
[0087] The second cleaning image formed after the tank bottom pretreatment is in the shape of a circle. The center of the circle is taken as the starting point, and a circle is made with r as the radius. The rest of the calculation process is the same as the tank wall calculation.
[0088] Specifically, when the distribution uniformity of the sludge area is less than the uniformity threshold, it is confirmed that the tank cleaning effect meets the standard; when the distribution uniformity of the sludge area is greater than the uniformity threshold, it is confirmed that the tank cleaning effect does not meet the standard.
[0089] For example, the distribution uniformity σ is used to represent the mechanical cleaning effect, and the uniformity threshold is 0.05. If the uniformity σ>0.05, it means that the residual sludge after mechanical cleaning is unevenly distributed, and there is a lot of residual sludge in some areas. In this case, it is necessary to improve the mechanical cleaning path or cleaning method and further re-clean; if the uniformity σ<0.05, it means that the residual sludge after mechanical cleaning is evenly distributed, and there is no situation where there is a lot of residual sludge in some areas. The mechanical cleaning path or cleaning method is reasonable.
[0090] The method for judging the cleaning degree of a storage tank based on machine vision provided in this embodiment, after obtaining the second cleaning image of the storage tank, judges the cleaning effect of the storage tank by calculating the distribution uniformity of the sludge area in the second cleaning image. The method is simple and highly efficient.
[0091] Based on the above embodiments, in this embodiment, Figure 4 FIG. 4 is a flow chart of the method for judging the cleaning degree of a storage tank based on machine vision provided in this embodiment. Figure 4 As shown, step 400 calculates the area of the sludge area, and confirms that the tank cleaning is completed when the area of the sludge area meets the preset completion condition, including:
[0092] Step 410: Calculate the area ratio of the sludge area in the second cleaning image to obtain a target area ratio.
[0093] Step 420: When the target area ratio of the sludge area in the second cleaning image is less than an area threshold, confirm that the tank cleaning is completed.
[0094] It should be noted that the proportion of the residual sludge area can be used as an indicator to evaluate the degree of cleaning completion and determine whether the tank has been cleaned.
[0095] Specifically, after the sludge region is segmented out in the second cleaning image, the area of the sludge region and the area of the second cleaning image are calculated, and the area ratio of the sludge region in the second cleaning image is calculated to obtain the target area ratio. When the target area ratio of the sludge region in the second cleaning image is less than the area threshold, it is confirmed that the tank cleaning is completed; when the target area ratio of the sludge region in the second cleaning image is greater than the area threshold, it is confirmed that the tank cleaning is not completed.
[0096] For example, if the area threshold is 10%, when the target area ratio is less than 10%, it is considered that mechanical cleaning is completed and mechanical cleaning can be terminated; when the target area ratio is greater than 10%, it is considered that the mechanical cleaning effect is not good and there are still many residual sludge areas, and mechanical cleaning needs to be performed again.
[0097] The method for judging the cleaning degree of a storage tank based on machine vision provided in this embodiment determines whether the cleaning of the storage tank is completed by calculating the target area ratio of the sludge area in the second cleaning image after obtaining the second cleaning image of the storage tank. The method is simple and highly efficient.
[0098] Based on the above embodiment, in this embodiment, after confirming that the tank cleaning effect does not meet the standard, the method further includes:
[0099] The storage tank is re-cleaned according to a first preset trajectory, and during the cleaning process, the camera is controlled to re-collect multiple first cleaning images of the cleaned area according to a preset time interval; wherein the first preset trajectory is any trajectory different from the preset trajectory.
[0100] Specifically, when the cleaning effect does not meet the standard, it means that the current cleaning path or the current cleaning method is unreasonable, and the cleaning device can be directly controlled to perform secondary cleaning, and multiple first cleaning images of the cleaned area can be recollected during the secondary cleaning process. The trajectory of the secondary cleaning is different from the first cleaning trajectory, so as to improve the cleaning process.
[0101] The method for judging the degree of cleaning of a storage tank based on machine vision provided in this embodiment controls the cleaning equipment to perform secondary cleaning after confirming that the cleaning effect of the storage tank does not meet the standard, until the cleaning effect meets the standard, so as to ensure a high degree of cleaning completion.
[0102] Based on the above embodiment, in this embodiment, after confirming that the tank cleaning is not completed, the method further includes:
[0103] The sludge area of the storage tank is re-cleaned according to a preset trajectory, and during the cleaning process, the camera is controlled to re-collect a plurality of first cleaning images of the cleaned sludge area at preset time intervals.
[0104] Specifically, when the tank cleaning is not completed, only the area with more residual sludge can be cleaned to improve the cleaning efficiency.
[0105] The method for judging the degree of tank cleaning based on machine vision provided in this embodiment has high cleaning efficiency by controlling the cleaning equipment to perform secondary cleaning on the area with more residual sludge after confirming that the tank cleaning is not completed until the cleaning is completed.
[0106] The following is a description of the device for determining the degree of cleaning of a storage tank based on machine vision provided by the present invention. The device for determining the degree of cleaning of a storage tank based on machine vision described below and the method for determining the degree of cleaning of a storage tank based on machine vision described above can refer to each other.
[0107] Figure 5 is a schematic diagram of the structure of the device for judging the cleaning degree of a storage tank based on machine vision provided in this embodiment, such as Figure 5 As shown, the device for judging the cleaning degree of a storage tank based on machine vision provided in this embodiment is applied to a cleaning device, wherein a camera is provided on the cleaning device, and the cleaning device is used to clean the storage tank. The device comprises:
[0108] The acquisition module 501 is used to control the cleaning device to clean the storage tank according to a preset trajectory when receiving a control instruction, and control the camera to collect multiple first cleaning images of the cleaned area according to a preset time interval during the cleaning process;
[0109] A preprocessing module 502 is used to perform a preprocessing operation on the plurality of first cleaned images to obtain a second cleaned image; wherein the preprocessing operation is used to splice the plurality of first cleaned images;
[0110] A segmentation module 503, used for segmenting the second cleaning image to obtain a sludge area in the second cleaning image;
[0111] The calculation module 504 is used to calculate the area of the sludge area, and confirm that the tank cleaning is completed when the area of the sludge area meets a preset completion condition.
[0112] The device for judging the degree of cleaning of a storage tank based on machine vision provided by the present invention is applied to a cleaning device, wherein a camera is arranged on the cleaning device, and the cleaning device is used to clean the storage tank. When a control instruction is received, the storage tank is cleaned according to a preset trajectory, and the camera is controlled to collect multiple first cleaning images of the cleaned area according to a preset time interval during the cleaning process, and a pre-processing operation is performed on the multiple first cleaning images to obtain a second cleaning image, wherein the pre-processing operation is used to splice the multiple first cleaning images, segment the second cleaning image to obtain a sludge area in the second cleaning image, calculate the area of the sludge area, and confirm that the cleaning of the storage tank is completed when the area of the sludge area meets the preset completion condition. It can be seen from this that the present invention synchronously collects the first cleaning image of the cleaned area during the cleaning process of the storage tank, so as to facilitate the subsequent splicing of the first cleaning image to obtain the second cleaning image; the second cleaning image is segmented to obtain the sludge area, and the cleaning completion degree of the entire storage tank can be determined by calculating the area of the sludge area, which is highly efficient.
[0113] Based on the above embodiments, in this embodiment, the preprocessing module 502 is specifically used for:
[0114] For each first cleaning image, determining an overlapping area according to image feature information of the first cleaning image as a template image area; wherein the image feature information is used to determine whether there is an overlapping area in the first cleaning image;
[0115] Removing overlapping areas in the plurality of first cleaned images respectively according to the template image area to obtain a plurality of initial second cleaned images;
[0116] A splicing operation is performed on the multiple initial second cleaned images to obtain a second cleaned image.
[0117] Based on the above embodiments, in this embodiment, the calculation module 504 is specifically used for:
[0118] Calculating the distribution uniformity of the sludge area in the second cleaning image;
[0119] When the distribution uniformity of the sludge area is less than a uniformity threshold, it is confirmed that the tank cleaning effect meets the standard.
[0120] Based on the above embodiments, in this embodiment, the calculation module 504 is specifically used for:
[0121] Calculating the area ratio of the sludge area in the second cleaning image to obtain a target area ratio;
[0122] When the target area ratio of the sludge area in the second cleaning image is smaller than an area threshold, it is confirmed that the tank cleaning is completed.
[0123] Based on the above embodiments, in this embodiment, the calculation module 504 is specifically used for:
[0124] After calculating the distribution uniformity of the sludge area in the second cleaning image, if the distribution uniformity of the sludge area is greater than a uniformity threshold, it is confirmed that the tank cleaning effect does not meet the standard.
[0125] Based on the above embodiments, in this embodiment, the calculation module 504 is specifically used for:
[0126] After calculating the area ratio of the sludge area in the second cleaning image to obtain the target area ratio, if the target area ratio of the sludge area in the second cleaning image is greater than the area threshold, it is confirmed that the tank cleaning is not completed.
[0127] Based on the above embodiment, in this embodiment, the device further includes a re-collection module, which is specifically used for:
[0128] After confirming that the tank cleaning effect does not meet the standards, the tank is re-cleaned according to a first preset trajectory, and during the cleaning process, the camera is controlled to re-capture multiple first cleaning images of the cleaned area at preset time intervals; wherein the first preset trajectory is any trajectory different from the preset trajectory.
[0129] Based on the above embodiment, in this embodiment, the re-collection module is specifically used for:
[0130] After confirming that the tank cleaning is not completed, the sludge area of the tank is re-cleaned according to a preset trajectory, and during the cleaning process, the camera is controlled to re-collect a plurality of first cleaning images of the cleaned sludge area at preset time intervals.
[0131] Figure 6 An example of a physical structure diagram of a cleaning device is shown below. Figure 6 As shown, the cleaning device may include: a processor 610, a communication interface 620, a memory 630 and a communication bus 640, wherein the processor 610, the communication interface 620 and the memory 630 communicate with each other through the communication bus 640. The processor 610 may call the logic instructions in the memory 630 to execute the method for judging the cleaning degree of the storage tank based on machine vision, which is applied to the cleaning device, wherein the cleaning device is provided with a camera, and the cleaning device is used to clean the storage tank, and the method includes:
[0132] Upon receiving the control instruction, the storage tank is cleaned according to a preset trajectory, and during the cleaning process, the camera is controlled to collect a plurality of first cleaning images of the cleaned area at preset time intervals;
[0133] Performing a preprocessing operation on the plurality of first cleaned images to obtain a second cleaned image; wherein the preprocessing operation is used to splice the plurality of first cleaned images;
[0134] Segmenting the second cleaning image to obtain a sludge area in the second cleaning image;
[0135] The area of the sludge region is calculated, and when the area of the sludge region satisfies a preset completion condition, the tank cleaning is confirmed to be completed.
[0136] In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0137] On the other hand, the present invention further provides a computer program product, the computer program product includes a computer program, the computer program can be stored in a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the method for judging the cleaning degree of a storage tank based on machine vision provided by the above methods, applied to a cleaning device, the cleaning device is provided with a camera, the cleaning device is used to clean a storage tank, the method includes:
[0138] Upon receiving the control instruction, the storage tank is cleaned according to a preset trajectory, and during the cleaning process, the camera is controlled to collect a plurality of first cleaning images of the cleaned area at preset time intervals;
[0139] Performing a preprocessing operation on the plurality of first cleaned images to obtain a second cleaned image; wherein the preprocessing operation is used to splice the plurality of first cleaned images;
[0140] Segmenting the second cleaning image to obtain a sludge area in the second cleaning image;
[0141] The area of the sludge region is calculated, and when the area of the sludge region satisfies a preset completion condition, the tank cleaning is confirmed to be completed.
[0142] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to execute the method for determining the cleaning degree of a storage tank based on machine vision provided by the above methods, and is applied to a cleaning device, wherein a camera is provided on the cleaning device, and the cleaning device is used to clean a storage tank, and the method comprises:
[0143] Upon receiving the control instruction, the storage tank is cleaned according to a preset trajectory, and during the cleaning process, the camera is controlled to collect a plurality of first cleaning images of the cleaned area at preset time intervals;
[0144] Performing a preprocessing operation on the plurality of first cleaned images to obtain a second cleaned image; wherein the preprocessing operation is used to splice the plurality of first cleaned images;
[0145] Segmenting the second cleaning image to obtain a sludge area in the second cleaning image;
[0146] The area of the sludge region is calculated, and when the area of the sludge region satisfies a preset completion condition, the tank cleaning is confirmed to be completed.
[0147] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0148] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0149] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for judging the degree of tank cleaning based on machine vision. It is characterized in that Applied to a cleaning device, the cleaning device is provided with a camera, the cleaning device is used to clean a storage tank, and the method comprises: Upon receiving the control instruction, the storage tank is cleaned according to a preset trajectory, and during the cleaning process, the camera is controlled to collect a plurality of first cleaning images of the cleaned area at preset time intervals; Performing a preprocessing operation on the plurality of first cleaned images to obtain a second cleaned image; wherein the preprocessing operation is used to splice the plurality of first cleaned images; Segmenting the second cleaning image to obtain a sludge area in the second cleaning image; The area of the sludge region is calculated, and when the area of the sludge region satisfies a preset completion condition, the tank cleaning is confirmed to be completed.
2. According to the method for determining the cleaning degree of a storage tank based on machine vision according to claim 1, It is characterized in that The performing of a preprocessing operation on the plurality of first cleaned images to obtain a second cleaned image comprises: For each first cleaning image, determining an overlapping area according to image feature information of the first cleaning image as a template image area; wherein the image feature information is used to determine whether there is an overlapping area in the first cleaning image; Removing overlapping areas in the plurality of first cleaned images respectively according to the template image area to obtain a plurality of initial second cleaned images; A splicing operation is performed on the multiple initial second cleaned images to obtain a second cleaned image.
3. The method for determining the degree of cleaning of a storage tank based on machine vision according to claim 1, It is characterized in that After segmenting the second cleaning image to obtain the sludge area in the second cleaning image, the method further includes: Calculating the distribution uniformity of the sludge area in the second cleaning image; When the distribution uniformity of the sludge area is less than a uniformity threshold, it is confirmed that the tank cleaning effect meets the standard.
4. The method for determining the degree of cleaning of a storage tank based on machine vision according to claim 1, It is characterized in that The calculating the area of the sludge area and confirming that the tank cleaning is completed when the area of the sludge area meets a preset completion condition includes: Calculating the area ratio of the sludge area in the second cleaning image to obtain a target area ratio; When the target area ratio of the sludge area in the second cleaning image is smaller than an area threshold, it is confirmed that the tank cleaning is completed.
5. The method for determining the degree of cleaning of a storage tank based on machine vision according to claim 3, It is characterized in that After calculating the distribution uniformity of the sludge area in the second cleaning image, the method further includes: When the distribution uniformity of the sludge area is greater than a uniformity threshold, it is confirmed that the tank cleaning effect does not meet the standard.
6. The method for determining the degree of cleaning of a storage tank based on machine vision according to claim 4, It is characterized in that After calculating the area ratio of the sludge area in the second cleaning image to obtain the target area ratio, the method further includes: When the target area ratio of the sludge area in the second cleaning image is greater than an area threshold, it is determined that the tank cleaning is not completed.
7. The method for determining the cleaning degree of a storage tank based on machine vision according to claim 5, It is characterized in that After confirming that the tank cleaning effect does not meet the standard, the method further includes: The storage tank is re-cleaned according to a first preset trajectory, and during the cleaning process, the camera is controlled to re-collect multiple first cleaning images of the cleaned area according to a preset time interval; wherein the first preset trajectory is any trajectory different from the preset trajectory.
8. The method for determining the cleaning degree of a storage tank based on machine vision according to claim 6, It is characterized in that After confirming that the tank cleaning is not completed, the method further includes: The sludge area of the storage tank is re-cleaned according to a preset trajectory, and during the cleaning process, the camera is controlled to re-collect a plurality of first cleaning images of the cleaned sludge area at preset time intervals.
9. A device for judging the cleaning degree of a storage tank based on machine vision. It is characterized in that Applied to a cleaning device, the cleaning device is provided with a camera, the cleaning device is used to clean a storage tank, and the device comprises: A collection module, configured to control the cleaning device to clean the storage tank according to a preset trajectory upon receiving a control instruction, and to control the camera to collect a plurality of first cleaning images of the cleaned area according to a preset time interval during the cleaning process; A preprocessing module, configured to perform a preprocessing operation on the plurality of first cleaned images to obtain a second cleaned image; wherein the preprocessing operation is used to splice the plurality of first cleaned images; a segmentation module, used for segmenting the second cleaning image to obtain a sludge area in the second cleaning image; The calculation module is used to calculate the area of the sludge area and confirm that the tank cleaning is completed when the area of the sludge area meets the preset completion condition.
10. A cleaning device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the program, the method for determining the degree of cleaning of a storage tank based on machine vision as described in any one of claims 1 to 8 is implemented.