A method for correcting perspective distortion of infrared thermal images of electrolytic cells
In the infrared thermal image processing of the electrolytic cell, effective straight lines are extracted using Hough transformation and straight line grouping screening algorithm, and combined with the inverse perspective transformation model for correction, the problems of insufficient correction efficiency, accuracy and adaptability in the prior art are solved, and high-precision perspective distortion correction is achieved.
Patent Information
- Application Number
- CN202210091873.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-26
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2042-01-26
AI Technical Summary
In the correcting of infrared thermal image perspective distortion in electrolytic cells, the correction efficiency, accuracy and adaptability are poor, especially when the outlines of the plate and busbar edges are blurred, the accuracy of linear detection is affected, resulting in low accuracy of point extraction.
The Hough transformation is used to extract the straight lines in the direction of the busbar and the plate, and the effective straight lines are screened in combination with the straight line grouping screening algorithm. The destruction point is obtained by intersecting straight lines, and the destruction point pair is used to construct the front and back transformation point pairs, and the inverse perspective transformation model is used for correction.
The correction efficiency, accuracy and adaptability of the infrared thermal image of the electrolytic cell is improved, the accuracy of point extraction is enhanced, and effective correction under different imaging perspectives and conditions are ensured.
Smart Images

Figure CN114494064B_ABST
Abstract
Description
Technical Field
[0001] The disclosed embodiments relate to the field of image processing technology, and in particular to a method for correcting perspective distortion of infrared thermal images of an electrolytic cell. Background Art
[0002] At present, in the process of using infrared thermal imaging to diagnose electrolytic cell plate circuit faults, due to the non-parallelism between the imaging plane and the electrolytic cell plane, different degrees of perspective distortion occur, which affects the subsequent location and classification of electrolytic cell plate circuit faults. Therefore, it is necessary to study an automatic correction method for infrared thermal image perspective distortion to achieve high-precision automatic correction of perspective distortion of electrolytic cell infrared thermal images under various imaging perspectives and imaging conditions.
[0003] The current perspective distortion correction methods are all based on the extraction of vanishing points, and then the inverse perspective transformation is used to achieve correction. The general vanishing point extraction method is based on edge analysis. The detection accuracy of this method depends on the accuracy of straight line detection, which requires clear edges or contours in the image. However, in the infrared thermal image of the electrolytic cell, due to the temperature transition and fluctuation on the surface of the electrolytic cell, and this temperature transition and fluctuation has a large degree of randomness, the edge contours of the plates and busbars in the electrolytic cell appear blurred to varying degrees, which affects the accuracy of straight line detection and, in turn, the accuracy of vanishing point extraction. It can be seen that when the vanishing point extraction method based on edge analysis is applied to the perspective distortion correction scene of the infrared thermal image of the electrolytic cell, the correction effect of the algorithm is very unstable.
[0004] It can be seen that there is an urgent need for a method for correcting the perspective distortion of infrared thermal images of electrolytic cells with high correction efficiency, correction accuracy and adaptability. Summary of the invention
[0005] In view of this, an embodiment of the present disclosure provides a method for correcting perspective distortion of an infrared thermal image of an electrolytic cell, which at least partially solves the problems of poor correction efficiency, correction accuracy and adaptability in the prior art.
[0006] The present disclosure provides a method for correcting perspective distortion of an infrared thermal image of an electrolytic cell, comprising:
[0007] Collect infrared thermal images of the target electrolytic cell;
[0008] After binarizing the infrared thermal image, a Hough transform is used to extract a straight line in the busbar direction; and after edge detection is performed on the infrared thermal image, a Hough transform is used to extract a straight line in the plate direction;
[0009] Using a straight line grouping and screening algorithm, effective straight lines are screened from the busbar direction straight lines and the plate direction straight lines, and two directional vanishing points are obtained by intersecting them;
[0010] The two directional vanishing points are used to construct a pair of front and back transformation points, and an inverse perspective transformation model is used to correct the perspective distortion of the infrared thermal image.
[0011] According to a specific implementation of the embodiment of the present disclosure, the step of binarizing the infrared thermal image and then extracting the busbar direction straight line using Hough transform includes:
[0012] Converting the infrared thermal image into a grayscale image;
[0013] Adopting an adaptive binarization algorithm to process the grayscale image to obtain a binary image;
[0014] Performing the Hough transform on the binary image to convert the binary image into a parameter space;
[0015] Finding a peak of the intersection point in the parameter space;
[0016] The straight line corresponding to the peak point is used as the busbar direction straight line.
[0017] According to a specific implementation of the embodiment of the present disclosure, the step of performing edge detection on the infrared thermal image and then using the Hough transform to extract the straight line in the direction of the plate includes:
[0018] Converting the infrared thermal image into a grayscale image;
[0019] Using the Canny edge detection operator to process the grayscale image to obtain an edge image;
[0020] Performing the Hough transform on the edge image to convert the edge image into a parameter space;
[0021] Finding a peak of the intersection point in the parameter space;
[0022] The straight line corresponding to the peak point is used as the electrode direction straight line.
[0023] According to a specific implementation of the embodiment of the present disclosure, the step of using a straight line grouping screening algorithm to screen effective straight lines from the busbar direction straight lines and the plate direction straight lines, and intersecting them to obtain two directional vanishing points, includes:
[0024] Mapping all the busbar direction straight lines and all the plate direction straight lines to the parameter space to obtain a plurality of initial point groups;
[0025] Select a point from each of the two initial point groups;
[0026] If the slope between two points is less than 0, and the angle product between the two points is greater than 0, then the two points are added to the re-screening library;
[0027] After traversing all the initial point groups, the point sets in the re-screening library are re-screened to obtain the valid straight lines, and the two directional vanishing points are obtained by intersecting them.
[0028] According to a specific implementation of the embodiment of the present disclosure, after traversing all the initial point groups, the step of rescreening the point set in the rescreening library to obtain the valid straight lines and intersecting them to obtain the vanishing points in the two directions includes:
[0029] According to the parameter distribution in the point set, the point set is divided into a plurality of re-screening point groups;
[0030] Select a point from any two of the multiple screening point groups, and calculate the sum of the vertical distances from all remaining points to the straight line formed by the two points;
[0031] Traversing all the re-screening point groups, taking the direction straight lines corresponding to the two points with the smallest sum of vertical distances as the effective straight lines;
[0032] The two effective straight lines are intersected to obtain the two directional vanishing points.
[0033] According to a specific implementation of the embodiment of the present disclosure, the two directional vanishing points are the plate direction vanishing point and the busbar direction vanishing point, and the step of constructing a front and back transformation point pair using the two directional vanishing points and correcting the perspective distortion of the infrared thermal image using an inverse perspective transformation model includes:
[0034] Connecting the plate direction vanishing point and the selected first reference point after correction to obtain a first connecting line;
[0035] Connect the busbar direction vanishing point and the selected corrected second reference point to obtain a second connecting line;
[0036] Intersecting the first connecting line and the second connecting line to obtain four target reference points before correction;
[0037] All the target reference points are solved and substituted into the inverse perspective transformation model, and the infrared thermal image is corrected for perspective distortion to obtain a corrected image.
[0038] According to a specific implementation method of the embodiment of the present disclosure, the expression of the inverse perspective transformation model is: Among them, (x, y) is the original distorted image of the electrolytic cell, (x′, y′) is the image of the electrolytic cell after perspective distortion correction, represents the transformation matrix, where represents a linear transformation, [t 31 t 32 ] represents translation transformation, [t 13 t 23 ]T Represents a perspective transformation.
[0039] The perspective distortion correction scheme of the infrared thermal image of the electrolytic cell in the disclosed embodiment includes: collecting the infrared thermal image of the target electrolytic cell; binarizing the infrared thermal image and extracting the busbar direction straight line by using Hough transform, and edge detecting the infrared thermal image and extracting the plate direction straight line by using Hough transform; using a straight line grouping screening algorithm to screen effective straight lines from the busbar direction straight line and the plate direction straight line, and intersecting them to obtain two directional vanishing points; using the two directional vanishing points to construct a front and back transformation point pair, and using an inverse perspective transformation model to correct the perspective distortion of the infrared thermal image.
[0040] The beneficial effects of the embodiments of the present disclosure are as follows: through the scheme of the present disclosure, Hough transform is used to detect the directional straight lines of the plate and busbar respectively, the vanishing point is obtained by the intersection of the straight lines, the front and rear point pairs are transformed by the vanishing point construction, and finally the perspective distortion correction of the infrared thermal image is realized by the inverse perspective transform. In view of the problem of fuzzy edge contours of the plate and busbar due to temperature transition and temperature fluctuation in the electrolytic cell, a straight line grouping and screening algorithm is proposed to screen out effective straight lines from different degrees of messy straight lines, thereby improving the extraction accuracy of the vanishing point, and improving the correction efficiency, correction accuracy and adaptability of the infrared thermal image of the electrolytic cell. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0042] Figure 1 A schematic diagram of a flow chart of a method for correcting perspective distortion of an infrared thermal image of an electrolytic cell provided in an embodiment of the present disclosure;
[0043] Figure 2 A result step diagram of a Hough transform to realize busbar direction straight line detection provided by an embodiment of the present disclosure;
[0044] Figure 3 A result step diagram of a Hough transform to realize straight line detection of the direction of the plate provided in an embodiment of the present disclosure;
[0045] Figure 4 A flow chart of a linear clustering screening algorithm provided in an embodiment of the present disclosure;
[0046] Figure 5 A screening result diagram of a straight line clustering screening algorithm provided in an embodiment of the present disclosure;
[0047] Figure 6 A schematic diagram of constructing a pair of front and back transformation points using a vanishing point provided by an embodiment of the present disclosure;
[0048] Figure 7 A comparison chart of the final correction effect provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0049] The embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
[0050] The following describes the embodiments of the present disclosure through specific examples, and those skilled in the art can easily understand other advantages and effects of the present disclosure from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all of the embodiments. The present disclosure can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present disclosure. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present disclosure.
[0051] It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that the aspects described herein may be embodied in a wide variety of forms, and any specific structure and / or function described herein is merely illustrative. Based on the present disclosure, it should be understood by those skilled in the art that an aspect described herein may be implemented independently of any other aspect, and two or more of these aspects may be combined in various ways. For example, any number of aspects described herein may be used to implement the device and / or practice the method. In addition, other structures and / or functionalities other than one or more of the aspects described herein may be used to implement this device and / or practice this method.
[0052] It should also be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present disclosure. The drawings only show components related to the present disclosure rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.
[0053] Additionally, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, it will be understood by those skilled in the art that the aspects described may be practiced without these specific details.
[0054] The disclosed embodiment provides a method for correcting perspective distortion of infrared thermal images of an electrolytic cell, which can be applied to the correction process of infrared thermal imaging images of an electrolytic scene.
[0055] See also Figure 1 , is a flow chart of a method for correcting perspective distortion of an infrared thermal image of an electrolytic cell provided by an embodiment of the present disclosure. Figure 1 As shown, the method mainly comprises the following steps:
[0056] S101, collecting infrared thermal images of the target electrolytic cell;
[0057] In a specific implementation, the electronic device may have a built-in image acquisition module or an external image acquisition device. The infrared thermal image of the target electrolytic cell is acquired through the image acquisition module or the external image acquisition device. After the infrared thermal image is acquired, the infrared thermal image may be sent to a processor for further processing, or the infrared thermal image may be stored in an internal storage space. When the infrared thermal image needs to be analyzed, the image may be extracted from the storage space.
[0058] S102, binarizing the infrared thermal image and extracting a busbar direction straight line using Hough transform, and edge detecting the infrared thermal image and extracting a plate direction straight line using Hough transform;
[0059] Optionally, in step S102, binarizing the infrared thermal image and then extracting the busbar direction straight line using Hough transform may include:
[0060] Converting the infrared thermal image into a grayscale image;
[0061] Adopting an adaptive binarization algorithm to process the grayscale image to obtain a binary image;
[0062] Performing the Hough transform on the binary image to convert the binary image into a parameter space;
[0063] Finding a peak of the intersection point in the parameter space;
[0064] The straight line corresponding to the peak point is used as the busbar direction straight line.
[0065] Optionally, in step S102, performing edge detection on the infrared thermal image and then using the Hough transform to extract the plate direction straight line may include:
[0066] Converting the infrared thermal image into a grayscale image;
[0067] Using the Canny edge detection operator to process the grayscale image to obtain an edge image;
[0068] Performing the Hough transform on the edge image to convert the edge image into a parameter space;
[0069] Finding a peak of the intersection point in the parameter space;
[0070] The straight line corresponding to the peak point is used as the electrode direction straight line.
[0071] In specific implementation, the infrared thermal image can be first converted into a grayscale image, and then an adaptive binarization algorithm is used to process the grayscale image to obtain a binary image. The binary image is then subjected to the Hough transform, and the binary image is converted into a parameter space. The peak value of the intersection is found in the parameter space, and finally the straight line corresponding to the peak point is used as the busbar direction straight line, such as Figure 2 As shown, (a) is the result of adaptive binarization of the grayscale image, and the threshold corresponding to each small area on the image is calculated, so that better results can be obtained under different brightness conditions, (b) is the selection result of the peak value in the parameter space of the present invention, and the main setting parameters are the number of peaks in the parameter space (ρ, θ): 9, and the minimum peak value: 0.3*max (the value in the parameter space), (c) is the detection result of the straight line corresponding to the peak, and the main setting parameters are the straight line merging distance: 20, and the minimum length of the straight line: 100.
[0072] At the same time, the infrared thermal image can be converted into a grayscale image, and then the Canny edge detection operator is used to process the grayscale image to obtain an edge image, and the edge image is subjected to the Hough transform, and the edge image is converted into a parameter space, and then the peak value of the intersection is found in the parameter space, and finally the straight line corresponding to the peak point is used as the plate direction straight line. Figure 3 As shown, (a) is the processing result of the Canny edge detection operator, and the main steps are as follows:
[0073] Perform Gaussian smoothing on the image to reduce the error rate;
[0074] Calculate the gradient magnitude and direction to estimate the edge strength and direction at each point;
[0075] According to the gradient direction, the gradient amplitude is non-maximum suppressed;
[0076] Use double thresholding to process and connect edges.
[0077] (b) is the result of peak selection in the parameter space. The main setting parameters are the number of peaks in the parameter space (ρ, θ): 13, and the minimum peak value: 0.3*max (the value in the parameter space).
[0078] (c) is the detection result of the straight line corresponding to the peak value. The main setting parameters are the straight line merging distance: 50 and the minimum length of the straight line: 90.
[0079] S103, using a straight line grouping and screening algorithm to screen effective straight lines from the busbar direction straight lines and the plate direction straight lines, and intersecting them to obtain two directional vanishing points;
[0080] On the basis of the above embodiment, in step S103, the effective straight lines are selected from the busbar direction straight lines and the plate direction straight lines by using the straight line grouping screening algorithm, and two directional vanishing points are obtained by intersecting them, including:
[0081] Mapping all the busbar direction straight lines and all the plate direction straight lines to the parameter space to obtain a plurality of initial point groups;
[0082] Select a point from each of the two initial point groups;
[0083] If the slope between two points is less than 0, and the angle product between the two points is greater than 0, then the two points are added to the re-screening library;
[0084] After traversing all the initial point groups, the point sets in the re-screening library are re-screened to obtain the valid straight lines, and the two directional vanishing points are obtained by intersecting them.
[0085] Furthermore, after traversing all the initial point groups, the step of rescreening the point sets in the rescreening library to obtain the valid straight lines and intersecting them to obtain the vanishing points in the two directions includes:
[0086] According to the parameter distribution in the point set, the point set is divided into a plurality of re-screening point groups;
[0087] Select a point from any two of the multiple screening point groups, and calculate the sum of the vertical distances from all remaining points to the straight line formed by the two points;
[0088] Traversing all the re-screening point groups, taking the direction straight lines corresponding to the two points with the smallest sum of vertical distances as the effective straight lines;
[0089] The two effective straight lines are intersected to obtain the two directional vanishing points.
[0090] In the specific implementation, considering that through the analysis of the ρ and θ parameters in the straight lines detected under various field of view angles and imaging conditions, it is found that ρ should decrease continuously as θ increases, so a two-step straight line grouping screening algorithm is proposed, for example, Figure 4 As shown, the initial screening steps of the linear clustering screening algorithm include:
[0091] Step S401, mapping all straight lines from the image space (x, y) to the parameter space (ρ, θ), that is, each straight line corresponds to a point (ρ, θ) in the parameter space;
[0092] Step S402: according to the distribution of the ρ parameter in the straight line, all the straight lines are divided into different straight line groups, that is, into different point groups G 1 ,G 2 ,…G m1 ;
[0093] Step S403, selecting a point (θ′, ρ′) and (θ”, ρ”) from the two point groups respectively;
[0094] Step S404, if the following conditions are met at the same time: (1) the slope k of the straight line formed by the two points is less than 0, and (2) the angle product of the two points is greater than 0, then the two points are added to the re-screening library;
[0095] Step S405, traverse all the combinations of two points in the point group, In which, m 1 is the number of point groups, q i ,q j is the number of points in the i-th and j-th point groups.
[0096] In the initial screening stage, the main purpose is to screen out straight lines that are in the same direction of the plate or busbar and whose ρ decreases with the increase of θ, and add these straight lines to the re-screening library to prepare for the re-screening stage.
[0097] In the embodiment, in the initial screening stage, in the direction of the electrode plate, the original point set includes 33 points in total, which are divided into 8 point groups according to the distribution of ρ, and 29 points enter the re-screening library.
[0098] In the embodiment, in the primary screening stage, in the busbar direction, the original point set has a total of 12 points, which are divided into 6 point groups according to the distribution of ρ, and 12 points enter the re-screening library.
[0099] exist Figure 4 In the rescreening phase of the linear clustering screening algorithm, the steps include:
[0100] Step S406: re-dividing the point set into different point groups G′ according to the distribution of the point set ρ parameters in the re-screening library 1 ,G′ 2 ,…G′ m2 ;
[0101] Step S407, select a point (θ′, ρ′) and (θ”, ρ”) from each of the two point groups, and find the straight line formed by the two points
[0102] Step S408, calculate the straight line formed by all remaining points to the two points The total vertical distance Among them, s is the total distance, t is the number of point sets in the re-screening library, and w i is the number of coincidences of the i-th point, d i is the vertical distance from the i-th point to the straight line;
[0103] Step S409, traverse the two-point combinations of all point groups in the re-screening library, and find In which, m 2 is the number of point groups in the multiple screening library, q′ i ,q′ j is the number of points in the i-th and j-th point groups in the re-screening library;
[0104] Step S410 , taking the image space straight line corresponding to the two points with the smallest total vertical distance s as the straight line finally screened.
[0105] In the rescreening stage, the main purpose is to select the two points that best represent the downward trend of the point set in the rescreening library as the best points. The measurement method is the sum of the vertical distances from the remaining points to the straight line where the two points are located.
[0106] The straight line in the image space corresponding to these two points is the final straight line obtained by screening.
[0107] like Figure 5 As shown, (a) is the straight line screening result diagram in the plate direction, and (b) is the straight line screening result diagram in the busbar direction.
[0108] From the result graph, it can be seen that the straight line clustering and screening algorithm proposed in the present invention screens out effective straight lines from the messy straight lines, thereby improving the extraction accuracy of vanishing points.
[0109] S104, constructing a front-back transformation point pair using the two directional vanishing points, and using an inverse perspective transformation model to perform perspective distortion correction on the infrared thermal image.
[0110] Optionally, the two vanishing points are a plate direction vanishing point and a busbar direction vanishing point, and the step of constructing a front-to-back transformation point pair using the two vanishing points and correcting the perspective distortion of the infrared thermal image using an inverse perspective transformation model includes:
[0111] Connecting the plate direction vanishing point and the selected first reference point after correction to obtain a first connecting line;
[0112] Connect the busbar direction vanishing point and the selected corrected second reference point to obtain a second connecting line;
[0113] Intersecting the first connecting line and the second connecting line to obtain four target reference points before correction;
[0114] All the target reference points are solved and substituted into the inverse perspective transformation model, and the infrared thermal image is corrected for perspective distortion to obtain a corrected image.
[0115] Furthermore, the expression of the inverse perspective transformation model is: Among them, (x, y) is the original distorted image of the electrolytic cell, (x′, y′) is the image of the electrolytic cell after perspective distortion correction, represents the transformation matrix, where represents a linear transformation, [t 31 t 32 ] represents translation transformation, [t 13 t 23 ] T Represents a perspective transformation.
[0116] When implementing it, Figure 6 As shown, Figure 6 It is a schematic diagram of constructing the front and back transformation point pairs using the vanishing point in the present invention, corresponding to the construction method under the imaging viewing angle on the left.
[0117] For the construction method under the imaging perspective on the right, Figure 6 Similarly, no additional drawings are provided here for illustration.
[0118] Figure 6 In, V 1 is the vanishing point in the direction of the plate, V 2 is the vanishing point in the busbar direction, and the four reference points P′ before correction 1 , P′ 2 , P′ 3 , P′ 4 , the four reference points P after correction 1 , P 2 , P 3 , P 4 , forming four sets of point pairs for solving the eight parameters of the inverse perspective transformation model.
[0119] For the left imaging perspective, P 3 , P 4 is the first reference point, P 1 , P 4 The second reference point.
[0120] The inverse perspective transformation model is:
[0121]
[0122]
[0123] Where (x, y) is the original distorted image of the electrolytic cell, (x′, y′) is the image of the electrolytic cell after perspective distortion correction, and t 11 ,t 12 ,…t 31 ,t 32 is the inverse perspective transformation parameter.
[0124] 8 parameters of inverse perspective transformation 11 ,t 12 ,…t 31 ,t 32 8 equations are needed to solve, using four sets of corresponding points P i to P′ i (i=1,2,3,4) to generate 8 equations as follows:
[0125]
[0126] B T =(x′ 1 ,y′ 1 ,x′ 2 ,y′ 2 ,x′ 3 ,y′ 3 ,x′ 4 ,y′ 4 )
[0127] t T =(t 11 ,t 12 ,t 13 ,t 21 ,t 22 ,t 23 ,t 31 ,t 32 )
[0128] At=B
[0129] Through the matrix A -1 Multiplying by B, we can solve for 8 parameters t 11 ,t 12 ,…t 31 ,t 32 .
[0130] The solved parameters are brought into the inverse perspective transformation model to correct the original distorted infrared thermal image of the electrolytic cell.
[0131] Figure 7 This is a comparison chart of the final correction effect of the present invention. Using the inverse perspective transformation model, 18 pictures under various imaging viewing angles and imaging conditions were corrected, and good correction effects were achieved.
[0132] like Figure 7 As shown in the figure, (a) is the selected distorted image of the infrared thermal image of the electrolytic cell, corresponding to the perspective distortion under various imaging viewing angles and imaging conditions. It can be seen that in the original distorted image, the electrolytic cell has a visual effect of "larger near and smaller far", and the busbars and plates in the electrolytic cell are skewed to varying degrees.
[0133] (b) is the correction result of the distorted image of the selected electrolytic cell infrared thermal image. It can be seen that for various imaging angles and imaging conditions, after the infrared thermal image perspective distortion correction method we proposed, effective correction is achieved, the angle is transformed into a normal viewing angle, the direction of the plate tends to be vertical, and the direction of the busbar tends to be parallel.
[0134] The perspective distortion correction method of the infrared thermal image of the electrolytic cell provided in this embodiment uses Hough transformation to detect the directional straight lines of the plate and busbar respectively, obtains the vanishing point by the intersection of the straight lines, constructs the front and back point pairs through the vanishing point, and finally uses the inverse perspective transformation to achieve the perspective distortion correction of the infrared thermal image. In view of the problem of blurred edge contours of the plate and busbar due to temperature transition and temperature fluctuation in the electrolytic cell, a straight line grouping screening algorithm is proposed to screen out effective straight lines from different degrees of messy straight lines, thereby improving the extraction accuracy of the vanishing point, and improving the correction efficiency, correction accuracy and adaptability of the infrared thermal image of the electrolytic cell.
[0135] It should be understood that various parts of the present disclosure may be implemented in hardware, software, firmware, or a combination thereof.
[0136] The above is only a specific implementation of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present disclosure should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.
Claims
1. A method for correcting perspective distortion of infrared thermal images of electrolytic cells. It is characterized in that include: Collect infrared thermal images of the target electrolytic cell; After binarizing the infrared thermal image, a Hough transform is used to extract a straight line in the busbar direction; and after edge detection is performed on the infrared thermal image, a Hough transform is used to extract a straight line in the plate direction; Using a straight line grouping and screening algorithm, effective straight lines are screened from the busbar direction straight lines and the plate direction straight lines, and two directional vanishing points are obtained by intersecting them; The step of using the straight line grouping screening algorithm to screen effective straight lines from the busbar direction straight lines and the plate direction straight lines, and intersecting them to obtain two directional vanishing points, comprises: Mapping all the busbar direction straight lines and all the plate direction straight lines to the parameter space to obtain a plurality of initial point groups; Select a point from each of the two initial point groups; If the slope between two points is less than 0, and the angle product between the two points is greater than 0, then the two points are added to the re-screening library; After traversing all the initial point groups, rescreening the point sets in the rescreening library to obtain the valid straight lines, and intersecting them to obtain the two directional vanishing points; The two directional vanishing points are used to construct a pair of front and back transformation points, and an inverse perspective transformation model is used to correct the perspective distortion of the infrared thermal image.
2. The method according to claim 1, Features The step of binarizing the infrared thermal image and extracting the busbar direction straight line using Hough transform comprises: Converting the infrared thermal image into a grayscale image; Adopting an adaptive binarization algorithm to process the grayscale image to obtain a binary image; Performing the Hough transform on the binary image to convert the binary image into a parameter space; Finding a peak of the intersection point in the parameter space; The straight line corresponding to the peak point is used as the busbar direction straight line.
3. The method according to claim 1, Features The step of performing edge detection on the infrared thermal image and then using the Hough transform to extract the straight line in the direction of the plate comprises: Converting the infrared thermal image into a grayscale image; Using the Canny edge detection operator to process the grayscale image to obtain an edge image; Performing the Hough transform on the edge image to convert the edge image into a parameter space; Finding a peak of the intersection point in the parameter space; The straight line corresponding to the peak point is used as the electrode direction straight line.
4. The method according to claim 1, Features After traversing all the initial point groups, the step of rescreening the point set in the rescreening library to obtain the effective straight lines and intersecting them to obtain the vanishing points in the two directions includes: According to the parameter distribution in the point set, the point set is divided into a plurality of re-screening point groups; Select a point from any two of the multiple screening point groups, and calculate the sum of the vertical distances from all remaining points to the straight line formed by the two points; Traversing all the re-screening point groups, taking the direction straight lines corresponding to the two points with the smallest sum of vertical distances as the effective straight lines; The two effective straight lines are intersected to obtain the two directional vanishing points.
5. The method according to claim 1, Features The two vanishing points are the plate direction vanishing point and the busbar direction vanishing point. The steps of constructing a front-back transformation point pair using the two vanishing points and correcting the perspective distortion of the infrared thermal image using an inverse perspective transformation model include: Connecting the plate direction vanishing point and the selected first reference point after correction to obtain a first connecting line; Connect the busbar direction vanishing point and the selected corrected second reference point to obtain a second connecting line; Intersecting the first connecting line and the second connecting line to obtain four target reference points before correction; All the target reference points are solved and substituted into the inverse perspective transformation model, and the infrared thermal image is corrected for perspective distortion to obtain a corrected image.
6. The method according to claim 5, Features , the expression of the inverse perspective transformation model is Among them, (x, y) is the original distorted image of the electrolytic cell, (x', y') is the image of the electrolytic cell after perspective distortion correction, represents the transformation matrix, where represents a linear transformation, [t 31 t 32 ] represents translation transformation, [t 13 t 23 ] T Represents a perspective transformation.
Citation Information
Patent Citations
Image correction method and device
CN110084236A
Distortion correction method and apparatus, electronic device, and computer-readable storage medium
US20210097653A1