Method and device for detecting effectiveness of electrolytic cell cover cloth
By processing the original image of the electrolytic cell, a front view binary image is generated, and the semi-folding condition of the electrolytic cell cover cloth is detected, which solves the problem of inaccurate detection of semi-folding of the cover cloth in the prior art, and achieves a more accurate detection of the cover cloth effectiveness.
Patent Information
- Application Number
- CN202510019703.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-07
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2045-01-07
AI Technical Summary
The prior art cannot accurately detect the semi-folding condition of the electrolytic cell cover cloth, and the effectiveness detection of the cover cloth is not accurate enough, which affects the accuracy of the electrolytic cell short circuit detection algorithm.
By obtaining the original image of the electrolytic cell, it is processed into a front view binary image, distinguishing the cover area and the background area, and semi-folding detection of the cover cloth is performed based on this, and the semi-folding detection result is obtained, and the effectiveness detection result of the cover cloth is finally obtained.
It realizes accurate detection of semi-folding of the electrolytic cell cover cloth, and can fully detect whether the cover cloth is offset or fully folded, as well as uncovered cloth, which improves the accuracy of the effectiveness detection of the cover cloth and helps on-site personnel to handle it effectively.
Smart Images

Figure CN119417828B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a method and a device for detecting the effectiveness of an electrolytic cell cover cloth. Background Art
[0002] Electrolysis technology is a key industrial method for extracting and refining metals. However, during the electrolysis process, structural damage or uneven current density may occur inside the electrolytic cell, which can lead to short circuits, which in turn cause excessive heating of the electrodes, seriously affecting production quality and efficiency. To meet this challenge, there are currently some technologies that use infrared images and image processing technology to detect whether the plates of the electrolytic cell have failed. These technologies identify potential problem areas by analyzing the temperature distribution in infrared images, thereby performing preventive maintenance. However, existing technologies still face some limitations. For example, in practical applications, electrolytes at high temperatures are prone to evaporation, especially in open environments. In order to maintain the stability of the electrolyte concentration and ensure the continuity and stability of the electrolysis process, a cover cloth is often placed on the electrolytic cell, and the cover cloth is often placed manually by the staff. This manual operation may be irregular or inaccurate, such as abnormal conditions such as cover cloth position offset, improper covering or accumulation, and no cover cloth, which will seriously affect the accuracy of the electrolytic cell short circuit detection algorithm.
[0003] In the prior art, the temperature judgment method is often used to roughly judge the area of the cover cloth, and then draw a conclusion on whether the cover cloth is covered properly. This method is based on temperature judgment. The working environment of the electrolytic cell is relatively complex, and the folding of the cover cloth will affect the temperature, resulting in poor accuracy of the temperature-based judgment method. At the same time, this method can only judge whether the cover cloth on the electrolytic cell is covered properly, and cannot detect situations such as cover cloth position offset and accumulation, especially the half-folding detection of the cover cloth, and cannot provide reasonable guidance for the improvement of subsequent work. Summary of the invention
[0004] In view of the above defects of the prior art, the present invention provides a method and device for detecting the effectiveness of an electrolytic cell cover cloth, so as to solve the technical problems that the half-folding detection of the cover cloth cannot be performed and the effectiveness detection of the cover cloth is not accurate enough.
[0005] To achieve the above-mentioned purpose and other related purposes, the present invention provides a method for detecting the effectiveness of an electrolytic cell cover cloth, comprising: acquiring an original image of the electrolytic cell to be detected; obtaining a front view of each electrolytic cell based on the original image, wherein the front view is a binary image for distinguishing between a cover cloth area and a background area; performing a half-folding detection on the electrolytic cell cover cloth based on the front view to obtain a half-folding detection result; and obtaining a effectiveness detection result based on the half-folding detection result.
[0006] In one embodiment of the present invention, a front view of each electrolytic cell is obtained based on the original image, including: sending the original image to a trained cover cloth segmentation model to segment it into a cover cloth area and a background area to obtain a mask image; obtaining a labeled area based on a pre-labeled electrolytic cell area of interest; and obtaining the front view of the electrolytic cell corresponding to the labeled area based on the mask image in the labeled area.
[0007] In one embodiment of the present invention, based on the mask image in the marked area, the front view of the electrolytic cell corresponding to the marked area is obtained, including: performing a connected domain analysis on the mask image in the marked area to obtain an electrolytic cell image containing a plurality of connected domains; after deleting the connected domains in the electrolytic cell image that are smaller than a preset area, determining whether there are other connected domains in the image: if yes, retaining only the connected domain with the largest area in the electrolytic cell image as the cover cloth area, and performing a perspective transformation on the image to obtain the front view of the electrolytic cell; if not, the cover cloth is an invalid cover.
[0008] In one embodiment of the present invention, a half-folding detection of the cover cloth is performed on the electrolytic cell according to the front view, including: a cover cloth displacement or full folding detection is performed on the electrolytic cell according to the front view to determine whether the cover cloth is displaced or fully folded: if the cover cloth is displaced or fully folded, the cover cloth is invalid; if the cover cloth is not displaced or fully folded, a half-folding detection of the cover cloth is performed on the electrolytic cell according to the front view.
[0009] In one embodiment of the present invention, the electrolytic cell is subjected to a cover cloth displacement or full folding detection based on the front view to determine whether the cover cloth is displaced or fully folded, including: obtaining a minimum axis-aligned circumscribed rectangle of the cover cloth area based on the front view; calculating a first uncovered ratio on each side of the cover cloth based on the minimum axis-aligned circumscribed rectangle of the cover cloth area; if the first uncovered ratio on either side of the cover cloth is greater than a preset first ratio threshold, the cover cloth is displaced or fully folded; otherwise, the cover cloth is not displaced or fully folded.
[0010] In one embodiment of the present invention, a half-fold detection of the cover cloth of the electrolytic cell is performed according to the front view to obtain a half-fold detection result, including: obtaining an edge of the electrolytic cell that may be half-folded; marking the folding contour points on the edge according to the front view; obtaining a half-fold detection result of the edge according to the folding contour points on the edge; and obtaining a half-fold detection result of the electrolytic cell according to the half-fold detection results of all edges of the electrolytic cell.
[0011] In one embodiment of the present invention, according to the front view, marking the folding contour points on the edge includes: according to the front view, traversing the second uncovered ratio of the coordinate points on the edge in the direction perpendicular to the edge; judging whether the second uncovered ratio of the coordinate points is greater than a preset second ratio threshold: if yes, marking the coordinate point as a folding contour point and adding it to the folding contour point set; if not, not marking the coordinate point.
[0012] In one embodiment of the present invention, according to the front view, the second uncovered ratio of the coordinate points on the edge in the direction perpendicular to the edge is traversed, including: according to the front view, obtaining the coordinate points on the edge; searching inside the electrolytic cell along the coordinate points in the direction perpendicular to the edge to find the first cover cloth edge point; according to the coordinates of the cover cloth edge point and the coordinate point, obtaining the distance between the two points; according to the ratio of the distance to the dimension of the electrolytic cell in the direction perpendicular to the edge, obtaining the second uncovered ratio of the coordinate point.
[0013] In one embodiment of the present invention, a half-fold detection result of the edge is obtained based on the folding contour points on the edge, including: calculating the ratio of the length of the folding contour point set and the length of the edge to obtain the proportion of the folding contour points on the edge; judging whether the proportion of the folding contour points on the edge is greater than a preset third ratio threshold: if yes, the cover cloth is half-folded at the edge; if no, the cover cloth is not half-folded at the edge.
[0014] To achieve the above-mentioned purpose and other related purposes, the present invention also provides an electrolytic cell cover cloth effectiveness detection device, comprising: a data acquisition unit, used to acquire the original image of the electrolytic cell to be detected; a preprocessing unit, used to obtain a front view of each electrolytic cell based on the original image, and the front view is a binary image for distinguishing the cover cloth area from the background area; a half-folding detection unit, used to perform a cover cloth half-folding detection on the electrolytic cell based on the front view to obtain a half-folding detection result; a judgment unit, used to obtain a effectiveness detection result based on the half-folding detection result.
[0015] Beneficial effects of the present invention: The present invention proposes a method and device for detecting the effectiveness of an electrolytic cell cover cloth. The method processes the original image of the electrolytic cell and obtains a binary image that distinguishes the cover cloth from the background area at a frontal angle, and performs a half-folding detection of the cover cloth based on the binary image. With the half-folding detection result, on-site personnel can be well guided to handle the cover cloth; at the same time, a complete and detailed detection can be performed on various scenarios such as whether the cover cloth is offset or fully folded, whether there is a cover cloth, etc., which is conducive to troubleshooting when the cover cloth does not effectively cover. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0017] Figure 1 A flow chart of a detection method provided by an embodiment of the present invention;
[0018] Figure 2 A flowchart of processing an original image provided by an embodiment of the present invention;
[0019] Figure 3 A schematic diagram of an original image, a mask image and a front view of an electrolytic cell provided in one embodiment of the present invention;
[0020] Figure 4 A schematic diagram of a pre-marked electrolytic cell region of interest provided for one embodiment of the present invention;
[0021] Figure 5 A flowchart of processing a mask image provided by an embodiment of the present invention;
[0022] Figure 6 A flow chart of detection of cover cloth deviation or full folding provided in one embodiment of the present invention;
[0023] Figure 7 A flow chart of half-fold detection of a cover cloth provided in one embodiment of the present invention;
[0024] Figure 8 A flow chart of marking folding contour points provided by an embodiment of the present invention;
[0025] Fig. 9 A second uncovered ratio calculation flow chart provided in one embodiment of the present invention;
[0026] Fig.10 A schematic diagram of an electrolytic cell with a half-folded upper edge of a cover cloth provided in an embodiment of the present invention;
[0027] Fig.11 A flow chart of performing half-fold detection according to fold contour points provided by an embodiment of the present invention;
[0028] Fig.12 A complete detection method flow chart provided by an embodiment of the present invention;
[0029] Fig.13 A schematic diagram of a detection device provided in one embodiment of the present invention.
[0030] Explanation of the reference numerals: 101, data acquisition unit; 102, preprocessing unit; 103, half-folding detection unit; 104, judgment unit. DETAILED DESCRIPTION
[0031] The following describes the embodiments of the present invention through specific specific embodiments, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. It should be noted that the following embodiments and the features in the embodiments can be combined with each other without conflict. In addition to the specific methods, equipment, and materials used in the embodiments, according to the technical personnel in this technical field's grasp of the prior art and the records of the present invention, any methods, equipment, and materials of the prior art that are similar or equivalent to the methods, equipment, and materials described in the embodiments of the present invention can also be used to implement the present invention.
[0032] It should be understood that the terms used in the embodiments of the present invention are for describing specific embodiments rather than for limiting the scope of protection of the present invention. Unless otherwise defined, all technical and scientific terms used in the present invention have the same meaning as those generally understood by those skilled in the art.
[0033] In the following description, numerous details are discussed to provide a more thorough explanation of the embodiments of the present invention. However, it is obvious to those skilled in the art that the embodiments of the present invention can be implemented without these specific details. In some of the embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present invention difficult to understand.
[0034] The flowchart and block diagram in the accompanying drawings illustrate the system architecture, functions and operations that may be implemented according to the methods and computer program products of various embodiments disclosed in the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment, or a part of a code, and the module, the program segment, or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of the boxes in the block diagram and / or the flowchart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0035] See also Figure 1 , Figure 1A method for detecting the effectiveness of an electrolytic cell cover cloth provided in one embodiment of the present invention includes steps S100 to S400.
[0036] Step S100, obtaining an original image of the electrolytic cell to be tested. In this step, the original image can be photographed by an infrared camera, and the subject (such as a computer, an industrial computer or a microcontroller unit) that performs the cover cloth effectiveness detection method is connected to the infrared camera to obtain the image. The subsequent detection of the effectiveness of the cover cloth is based on the original image. In actual application, a test can be performed after the on-site staff completes the laying of the cover cloth, or a test can be performed as needed.
[0037] When taking the original image of the electrolytic cell to be inspected, the image may include a single electrolytic cell, multiple electrolytic cells, or a certain area of background. It should be noted that the image shooting range should be the same as the image shooting range used for the pre-marked electrolytic cell area of interest in the subsequent steps. In actual processing, the original image and the image used for pre-marking the area of interest are shot using the camera in the same position.
[0038] The format of the original image taken by the infrared camera is related to the infrared camera. Different infrared cameras may output grayscale images, pseudo-color images, multi-band images, enhanced images or images in other formats. The subsequent processes in this application are all aimed at processing grayscale images. Therefore, it can be understood that if the original image of the electrolytic cell is a pseudo-color or other format image, it needs to be processed into a grayscale image first.
[0039] Step S200: Obtain a front view of each electrolytic cell based on the original image. The front view is a binary image used to distinguish the cover cloth area from the background area. The front view of the electrolytic cell is a view of the electrolytic cell from above. Only at this angle can the covering condition of the cover cloth be more accurately identified.
[0040] See also Figure 2 In a specific embodiment of the present invention, step S200 includes steps S210 to S230.
[0041] Step S210: sending the original image to the trained cover cloth segmentation model to segment it into a cover cloth area and a background area to obtain a mask image. Figure 3 The image on the left is the original image, and the image in the middle is the mask image. It should be noted that Figure 3 The binary images in the middle and on the right are inverted. Since the background of the whole image is white, the surrounding white is easy to merge with the background and is not easy to show, so the inversion process is performed. In fact, Figure 3In the middle and right images, the drape area is black and the background area is white. The drape segmentation model can be, for example, a DeepLabv3p semantic segmentation model, or other classification models such as Unet and FCN. In this step, after the drape segmentation model is introduced, the drape area can be well segmented, and in actual use, the model can be trained using actual pictures of the scene, or different models can be selected to achieve more accurate segmentation. After obtaining the mask image, a morphological opening operation can be performed on the mask image to eliminate the burrs caused by the model segmentation.
[0042] In this step, the trained cover cloth segmentation model is used to segment the original image to obtain the mask image, as shown in the formula:
[0043] ,
[0044] Among them, M(x,y) represents the pixel value of the mask image at (x,y), 0 represents the background, and 1 represents the cover area.
[0045] Step S220: Obtain the marked area according to the pre-marked electrolytic cell area of interest. Figure 4 In the embodiment, the pre-marked electrolytic cell area of interest is shown as the yellow box in the figure. Although other electrolytic cells are involved in the figure, the electrolytic cells that are manually pre-marked are those that we need to perform occlusion detection. The pre-marked electrolytic cell area of interest is also generally referred to as an ROI box or ROI area. The reason for obtaining the marked area is to perform corresponding cover cloth effectiveness detection on each electrolytic cell area in the subsequent process. You can also choose to detect the entire image, but there will be many other non-electrolytic cell areas in the entire image that interfere with subsequent detection. Therefore, in this embodiment, the area of interest of the electrolytic cell is pre-marked, and the infrared image is divided into several small areas, and then these small areas are tested for the effectiveness of the cover cloth.
[0046] In this step, each annotated area needs to be represented independently, and the pixels in the yellow box corresponding to the annotated area to be processed are set to 1, and the pixels in the remaining areas are set to 0, as shown in the formula:
[0047] .
[0048] Step S230: Obtain a front view of the electrolytic cell corresponding to the marked area according to the mask image in the marked area. If there are several marked areas, i.e. electrolytic cells corresponding to several sensing areas, then several front views can be obtained according to this step. Figure 3 Each small picture in the right view in corresponds to a front view of an electrolytic cell. In the subsequent steps, the front view of each electrolytic cell is processed respectively to determine the effectiveness of the cover cloth of the electrolytic cell.
[0049] See also Figure 5 In a specific embodiment of the present invention, step 230 includes step S231 and step S232.
[0050] Step S231, perform connected domain analysis on the mask image in the marked area to obtain an electrolytic cell image containing several connected domains. Connected domain analysis is a basic concept in image processing, which involves identifying areas composed of adjacent pixels with the same pixel value in the image. Connected domain analysis usually processes a binary image, that is, the pixel value in the image has only two possible values. In this step, the cover cloth area and the background area are processed into several connected domains through connected domain analysis to quickly perform analysis on the presence or absence of the cover cloth.
[0051] In this step, the mask image in the marked area is denoted as M ROI (x,y), can be expressed by the formula:
[0052] .
[0053] Step S232, after deleting the connected domains smaller than the preset area in the electrolytic cell image, determine whether there are other connected domains in the image: if so, only the connected domain with the largest area in the electrolytic cell image is retained as the cover cloth area, and the image is perspectively transformed to obtain a front view of the electrolytic cell; if not, the cover cloth is invalid. After eliminating some noise and interference items, the connected domain with the largest area in the image is the cover cloth, which needs to be perspectively transformed; if it is found that there is no connected domain after eliminating the noise, it means that the electrolytic cell is not covered with the cover cloth, and the validity test result of the cover cloth is invalid covering, or it can directly prompt "not covered with cover cloth", and an alarm can be issued.
[0054] In a specific embodiment of the present invention, the step of performing perspective transformation on the image to obtain a front view of the electrolytic cell may specifically include: first, for each ROI area, determine its width (width) and height (height) by calculating the Euclidean distance between adjacent vertices. Specifically, the width of the area is obtained by calculating the distance between the upper left vertex and the upper right vertex of the ROI area; the height of the area is obtained by calculating the distance between the upper right vertex and the lower right vertex. Next, the four vertices of the ROI area are mapped to a target rectangular area, the coordinates of the upper left vertex of the rectangular area are (0,0), the coordinates of the upper right vertex are (width-1,0), the coordinates of the lower right vertex are (width-1,height-1), and the coordinates of the lower left vertex are (0,height-1), where the width and height correspond to the width and height of the above ROI area, respectively.
[0055] Step S300, perform a half-folding detection of the electrolytic cell according to the front view to obtain a half-folding detection result. The half-folding mentioned here and the full-folding mentioned below are different folding methods for the cover cloth. Half-folding refers to a folding of one corner of the cover cloth, and full-folding refers to a folding of one side of the cover cloth.
[0056] In a specific embodiment of the present invention, step S300 includes: performing a cover cloth offset or full folding detection on the electrolytic cell according to the front view to determine whether the cover cloth is offset or fully folded: if the cover cloth is offset or fully folded, the cover cloth is invalid; if the cover cloth is not offset or fully folded, performing a cover cloth half-folding detection on the electrolytic cell according to the front view.
[0057] In this embodiment, before performing the cover cloth half-folding detection, the cover cloth offset or full-folding detection is performed first, so that the detection will be more comprehensive and a more accurate detection result of the cover cloth can be obtained.
[0058] See also Figure 6 In a specific embodiment of the present invention, the electrolytic cell is subjected to a cover cloth offset or full folding detection according to the front view to determine whether the cover cloth is offset or fully folded, including steps S301 to S303.
[0059] Step S301, according to the front view, obtain the minimum axis-aligned bounding box of the cover cloth area. The minimum axis-aligned bounding box (MAAB or MABR) refers to the smallest rectangular area that can completely contain a given two-dimensional shape or three-dimensional object, and the sides of the rectangle are parallel to the coordinate axes. In this step, the minimum axis-aligned bounding box contains the cover cloth.
[0060] Step S302: Calculate the first uncovered ratio on each side of the cover cloth according to the minimum axis-aligned circumscribed rectangle of the cover cloth area.
[0061] For a certain front view, the width and height are denoted as R w and R h , assuming that in this figure, the minimum axis-aligned bounding rectangle is denoted by B mask , B mask The coordinates of the upper left corner are marked as (x tl ,y tl ), the coordinates of the lower right corner are marked as (x tr ,y tr ), due to B mask The sides of the triangle are parallel to the coordinate axes, so the coordinates of the lower left corner are (x tl ,y tr ), the coordinates of the upper right corner are (x tr ,y tl ).
[0062] For the left side of the cover cloth, the first uncovered ratio r1=x tl / R w .
[0063] For the right side of the cover cloth, the first uncovered ratio r2=(R w -x tr ) / R w .
[0064] For the upper side of the cover cloth, the first uncovered ratio r3=y tl / R h .
[0065] For the lower side of the cover cloth, the first uncovered ratio r4=(R h -y tr ) / R h .
[0066] Step S303: If the first uncovered ratio on any side of the cover cloth is greater than the preset first ratio threshold, the cover cloth is offset or fully folded; otherwise, the cover cloth is not offset or fully folded. Ideally, the cover cloth should be 100% covered, that is, the above r1~r4 should all be 0, but in actual situations, there will often be deviations in a certain reasonable range of ratios. Therefore, a threshold value, namely the first ratio threshold value, can be set in advance. If any of the ratios r1~r4 exceeds the first ratio threshold value, it means that the cover cloth is not covered well, is offset or fully folded, and an alarm can be issued and prompt "the cover cloth is offset or fully folded". Only when r1~r4 are all less than the first ratio threshold value, it means that the cover cloth is not offset or fully folded.
[0067] See also Figure 7 In a specific embodiment of the present invention, a half-folding detection of the cover cloth of the electrolytic cell is performed according to the front view to obtain a half-folding detection result, including steps S310~S340.
[0068] Step S310: Obtain the edge of the electrolytic cell that may be half-folded. Figure 3 For the cover cloth in the front view on the right, its upper and lower edges may be half-folded, but the left and right edges are basically unlikely to be half-folded. In this case, only the upper and lower edges can be tested in the future. Of course, if the computing power allows, it is also possible to select all edges of the electrolytic cell for half-folding detection.
[0069] Step S320: Mark the folding contour points on the edge according to the front view. The folding contour points mentioned here refer to the points on the edge of the cover cloth where the folding occurs. The specific marking process is as follows.
[0070] See also Figure 8In a specific embodiment of the present invention, step S320 includes step S321 and step S322.
[0071] Step S321: According to the front view, traverse the second uncovered ratio of the coordinate points on the edge in the direction perpendicular to the edge.
[0072] See also Fig. 9 In a specific embodiment of the present invention, step S321 includes steps S3211~S3214.
[0073] Step S3211: Obtain the coordinate points on the edge according to the front view. Fig.10 Take the upper edge in as an example, we can start traversing from the first point, or we can start from x tl This coordinate starts the traversal. Assume that the coordinate point on the edge obtained is (x tl ,0) time.
[0074] Step S3212, search inside the electrolytic cell along the coordinate point in the direction perpendicular to the edge to find the first edge point of the cover cloth. The coordinate point is searched in the direction perpendicular to the edge, i.e., the Y-axis direction, and the electrolytic cell is searched vertically from top to bottom along the Y-axis direction. Since the cover cloth area is 1 after processing, the first point with a pixel of 1 (or not 0) found during the search is the edge point of the cover cloth.
[0075] Step S3213, according to the coordinates of the edge point of the cover cloth and the coordinate point, the distance between the two points is obtained. The X-axis coordinates of the two points are the same, and the Y-axis coordinates are different. The distance between the two points can be calculated according to the y-coordinates. Of course, since the y-coordinate of the edge point of the cover cloth is 0, in this step, the y-coordinate of the edge point of the cover cloth can be directly used as the distance between the two points.
[0076] Step S3214: Obtain the second uncovered ratio of the coordinate point according to the ratio of the distance to the dimension of the electrolytic cell in the direction perpendicular to the edge. The direction perpendicular to the edge of the electrolytic cell is the Y-axis direction of the electrolytic cell. As mentioned above, the dimension in this direction is R h , that is, the y coordinate of the edge point of the cover cloth and R h The ratio of the coordinates of the point (x tl ,0)’s second uncovered ratio.
[0077] Step S322, determine whether the second uncovered ratio of the coordinate point is greater than a preset second ratio threshold: if yes, mark the coordinate point as a folded contour point and add it to the folded contour point set; if no, do not mark the coordinate point. The second ratio threshold is also preset, and by comparing with the threshold, it can be determined whether the coordinate point is a folded contour point. In this step, the reason for adding the coordinate point to the folded contour point set is to facilitate subsequent statistics.
[0078] Step S330: Obtain the half-fold detection result of the edge according to the fold contour points on the edge. After the fold contour points on the edge are determined, it is convenient to determine whether the edge is half-folded.
[0079] See also Fig.11 In a specific embodiment of the present invention, step S330 includes step S331 and step S332.
[0080] Step S331, calculate the ratio of the length of the folding contour point set to the length of the edge, and obtain the proportion of the folding contour points on the edge; the length of the folding contour point set is the number of folding contour points on the edge, and the length of the edge is the width dimension R of the electrolytic cell. w , the ratio of these two parameters is the proportion of folded contour points on the edge.
[0081] Step S332, determine whether the proportion of folded contour points on the edge is greater than a preset third ratio threshold: if yes, the cover cloth is half-folded at the edge; if no, the cover cloth is not half-folded at the edge. In this step, the preset third ratio threshold is also introduced, and whether the cover cloth is half-folded is determined based on the threshold.
[0082] The above is an explanation of the whole process of whether one edge of the electrolytic cell is half-folded. For other edges, the above steps can be repeated, but the specific search methods are different. For the lower edge, when searching for the edge point of the cover cloth, a vertical linear search is required from bottom to top along the Y axis; for the left edge, a horizontal linear search is required from left to right along the X axis, and for the right edge, a horizontal linear search is required from right to left along the X axis.
[0083] Step S340, according to the half-fold detection results of all edges of the electrolytic cell, the half-fold detection result of the electrolytic cell is obtained. When any edge of the electrolytic cell is half-folded, the half-fold detection result of the electrolytic cell is "the cover cloth is half-folded"; only when all edges of the electrolytic cell are not half-folded, the half-fold detection result of the electrolytic cell is "the cover cloth is not half-folded".
[0084] Step S400, obtain the validity test result according to the half-folding test result. This step is relatively simple, that is, the validity test result initially corresponds to the half-folding test result. For example, if the half-folding test result of the cover cloth is half-folded, then the validity test result of the cover cloth is invalid covering; otherwise, the validity test result of the cover cloth is normal.
[0085] It should be noted that the steps of the above methods are divided only for the purpose of clear description. When implementing, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they contain the same logical relationship, they are all within the protection scope of this patent; adding insignificant modifications or introducing insignificant designs to the algorithm or process, but not changing the core design of the algorithm and process are all within the protection scope of this patent. Fig.12 This is a complete detection method flow provided for an embodiment of the present invention. These steps correspond to the specific embodiments of the present invention, but the division of the steps is different.
[0086] See also Fig.13 , Fig.13 An electrolytic cell cover cloth validity detection device provided in one embodiment of the present invention includes a data acquisition unit 101, a preprocessing unit 102, a folding detection unit 103 and a judgment unit 104. The data acquisition unit 101 is used to acquire the original image of the electrolytic cell to be detected; the preprocessing unit 102 is used to obtain a front view of each electrolytic cell according to the original image, and the front view is a binary image used to distinguish the cover cloth area from the background area; the folding detection unit 103 is used to perform a cover cloth half-folding detection on the electrolytic cell according to the front view to obtain a half-folding detection result; the judgment unit 104 is used to obtain a validity detection result according to the half-folding detection result.
[0087] It should be noted that the cover cloth validity detection device of the present embodiment is a device corresponding to the above-mentioned cover cloth validity detection method, and the functional modules in the cover cloth validity detection device may correspond to the corresponding steps in the cover cloth validity detection method. The cover cloth validity detection device of the present embodiment can be implemented in coordination with the cover cloth validity detection method, that is, in the absence of conflict, the relevant technical details mentioned in the cover cloth validity detection method of the above-mentioned embodiment can also be applied to the cover cloth validity detection device of the present embodiment.
[0088] In general, the cover cloth effectiveness detection method of the present invention can not only detect the half-folding of the cover cloth, but also detect whether the cover cloth is offset or fully folded, or not covered, etc., and for each situation, the detection is based on image processing technology. Compared with the temperature analysis in the prior art, the detection result is more accurate.
[0089] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the art may modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by a person of ordinary skill in the art without departing from the spirit and technical concept disclosed by the present invention shall still be covered by the claims of the present invention.
Claims
1. A method for detecting the effectiveness of an electrolytic cell cover cloth, characterized in that: include: Acquire an original image of the electrolytic cell to be inspected; According to the original image, a front view of each electrolytic cell is obtained, wherein the front view is a binary image for distinguishing a cover cloth area from a background area; Perform a half-folding test on the electrolytic cell according to the front view to obtain a half-folding test result; Obtaining a validity test result according to the half-folding test result; Performing a half-folding detection of the cover cloth on the electrolytic cell according to the front view includes: According to the front view, the electrolytic cell is tested for cover deviation or full folding to determine whether the cover is deviated or fully folded: If the cover cloth is offset or fully folded, the cover cloth is invalid; If the cover cloth is not offset or fully folded, a half-folding detection of the cover cloth is performed on the electrolytic cell according to the front view; The electrolytic cell is subjected to a cover cloth deviation or full folding detection according to the front view to determine whether the cover cloth is deviated or fully folded, including: According to the front view, a minimum axis-aligned circumscribed rectangle of the cover cloth area is obtained; Calculating a first uncovered ratio on each side of the cover cloth according to a minimum axis-aligned circumscribed rectangle of the cover cloth area; For the left side of the cover cloth, the first uncovered ratio r1=x tl / R w ; For the right side of the cover cloth, the first uncovered ratio r2=(R w -x tr ) / R w ; For the upper side of the cover cloth, the first uncovered ratio r3=y tl / R h ; For the lower side of the cover cloth, the first uncovered ratio r4=(R h -y tr ) / R h ; Among them, R w and R h is the width and height of the front view, (x tl ,y tl ) and (x tr ,y tr ) are respectively the upper left corner coordinates and the lower right corner coordinates of the minimum axis-aligned bounding rectangle; If the first uncovered ratio on either side of the cover cloth is greater than a preset first ratio threshold, the cover cloth is offset or fully folded; otherwise, the cover cloth is not offset or fully folded.
2. The method for detecting the effectiveness of an electrolytic cell cover cloth according to claim 1, characterized in that: According to the original image, a front view of each electrolytic cell is obtained, including: The original image is sent to a trained cover cloth segmentation model to segment it into a cover cloth area and a background area to obtain a mask image; Obtaining a marked region according to the pre-marked electrolytic cell region of interest; The front view of the electrolytic cell corresponding to the marked area is obtained according to the mask image in the marked area.
3. The method for detecting the effectiveness of the electrolytic cell cover cloth according to claim 2, characterized in that: Obtaining the front view of the electrolytic cell corresponding to the marked area according to the mask image in the marked area includes: Performing a connected domain analysis on the mask image within the marked area to obtain an electrolytic cell image including a plurality of connected domains; After deleting the connected domain smaller than the preset area in the electrolytic cell image, it is determined whether there are other connected domains in the image: If yes, only the connected domain with the largest area in the electrolytic cell image is retained as the cover cloth area, and the image is perspective transformed to obtain the front view of the electrolytic cell; If not, the cover is an invalid cover.
4. The method for detecting the effectiveness of an electrolytic cell cover cloth according to claim 1, characterized in that: According to the front view, the electrolytic cell is subjected to a half-folding detection of the cover cloth, and a half-folding detection result is obtained, including: Get the edge of the electrolytic cell where a half-fold may occur; According to the front view, marking the folding contour points on the edge; Obtaining a half-fold detection result of the edge according to the folded contour points on the edge; According to the half-folding detection results of all edges of the electrolytic cell, a half-folding detection result of the electrolytic cell is obtained.
5. The method for detecting the effectiveness of the electrolytic cell cover cloth according to claim 4, characterized in that: According to the front view, marking the folding contour points on the edge includes: According to the front view, traverse a second uncovered ratio of the coordinate points on the edge in a direction perpendicular to the edge; Determine whether the second uncovered ratio of the coordinate point is greater than a preset second ratio threshold: If yes, mark the coordinate point as a folded contour point and add it to the folded contour point set; If not, do not mark the coordinate point.
6. The method for detecting the effectiveness of the electrolytic cell cover cloth according to claim 5, characterized in that: According to the front view, traversing a second uncovered ratio of the coordinate points on the edge in a direction perpendicular to the edge comprises: According to the front view, obtaining coordinate points on the edge; Searching inside the electrolytic cell along the coordinate point in a direction perpendicular to the edge to find the first edge point of the cover cloth; According to the coordinates of the edge point of the cover cloth and the coordinate point, the distance between the two points is obtained; According to the ratio of the distance to the dimension of the electrolytic cell in a direction perpendicular to the edge, a second uncovered ratio of the coordinate point is obtained.
7. The method for detecting the effectiveness of an electrolytic cell cover cloth according to claim 4, characterized in that: According to the folded contour points on the edge, a half-folded detection result of the edge is obtained, including: Calculating the ratio of the length of the folding contour point set to the length of the edge to obtain the proportion of the folding contour points on the edge; Determine whether the proportion of folded contour points on the edge is greater than a preset third ratio threshold: If so, the cover is half-folded at that edge; If no, the cover is not half-folded at that edge.
8. An electrolytic cell cover cloth effectiveness detection device, characterized in that: include: A data acquisition unit, used for acquiring an original image of the electrolytic cell to be inspected; A preprocessing unit, used to obtain a front view of each electrolytic cell according to the original image, wherein the front view is a binary image used to distinguish a cover cloth area from a background area; A half-folding detection unit, used for performing a half-folding detection of the cover cloth on the electrolytic cell according to the front view to obtain a half-folding detection result; A judgment unit, used for obtaining a validity detection result according to the half-folding detection result; Performing a half-folding detection of the cover cloth on the electrolytic cell according to the front view includes: According to the front view, the electrolytic cell is tested for cover deviation or full folding to determine whether the cover is deviated or fully folded: If the cover cloth is offset or fully folded, the cover cloth is invalid; If the cover cloth is not offset or fully folded, a half-folding detection of the cover cloth is performed on the electrolytic cell according to the front view; The electrolytic cell is subjected to a cover cloth deviation or full folding detection according to the front view to determine whether the cover cloth is deviated or fully folded, including: According to the front view, a minimum axis-aligned circumscribed rectangle of the cover cloth area is obtained; Calculating a first uncovered ratio on each side of the cover cloth according to a minimum axis-aligned circumscribed rectangle of the cover cloth area; For the left side of the cover cloth, the first uncovered ratio r1=x tl / R w ; For the right side of the cover cloth, the first uncovered ratio r2=(R w -x tr ) / R w ; For the upper side of the cover cloth, the first uncovered ratio r3=y tl / R h ; For the lower side of the cover cloth, the first uncovered ratio r4=(R h -y tr ) / R h ; Among them, R w and R h is the width and height of the front view, (x tl ,y tl ) and (x tr ,y tr ) are respectively the coordinates of the upper left corner and the lower right corner of the minimum axis-aligned circumscribed rectangle; if the first uncovered ratio on either side of the cover cloth is greater than the preset first ratio threshold, the cover cloth is offset or fully folded; otherwise, the cover cloth is not offset or fully folded.
Citation Information
Patent Citations
MLCC appearance defect detection method and device and storage medium
CN115439410A
Belt edge tearing detection method, system, equipment and medium
CN117495857A