Identification method and identification device for two horizontal boundaries, and measuring mechanism
By continuously collecting and analyzing multiple sampled images of the electrolyte and the aluminum liquid, calculating the average brightness contrast, identifying the dividing line between the electrolyte and the aluminum liquid, solving the problem of low recognition accuracy in the prior art and achieving higher recognition accuracy.
Patent Information
- Application Number
- CN202510317698.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-18
- Publication Date
- 2025-07-04
AI Technical Summary
In the prior art, the identification of the boundary line between the electrolyte and the aluminum liquid is affected by the image acquisition equipment and ambient light, resulting in a low recognition accuracy.
By continuously collecting multiple sampled images of the measurement brazing, identifying the upper, lower and potential dividing lines of each image, calculating the average brightness contrast, and determining the dividing lines of the target sampled image.
The accuracy of the identification of the boundary line between the electrolyte and the aluminum liquid is improved, and the impact of the image itself on the recognition results is reduced.
Smart Images

Figure CN120259214A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of visual recognition technology, for example, to a recognition method, a recognition device, and a measuring mechanism for two horizontal dividing lines. Background Art
[0002] During the production and operation of electrolytic cells in an electrolytic aluminum workshop, the accurate measurement of the two levels of the electrolytic cell is crucial. These measurement data can not only be used to monitor the operating state of the electrolytic cell, but also be used to adjust and optimize the process parameters of the electrolytic cell to ensure the efficient and stable operation of the electrolytic cell.
[0003] In the related art, after the measurement by the sampling probe is completed and the sampling image of the sampling section on the sampling probe is acquired, usually based on the visual recognition technology, the color difference on the sampling section of the sampling probe in the sampling image is recognized to determine the dividing line between the electrolyte and the aluminum liquid.
[0004] In the process of implementing the embodiments of the present disclosure, it is found that at least the following problems exist in the related art:
[0005] Affected by factors such as the image acquisition device and environmental illumination, the color and brightness of the objects in the sampling image will change significantly. In some cases, the dividing line between the electrolyte and the aluminum liquid in the sampling image is not obvious, which will lead to a large error in the recognized dividing line between the electrolyte and the aluminum liquid and low accuracy. Therefore, how to improve the accuracy of identifying the dividing line between the electrolyte and the aluminum liquid during the two-level measurement has become a technical problem to be solved urgently. Summary of the Invention
[0006] To have a basic understanding of some aspects of the disclosed embodiments, a simple summary is given below. This summary is not a general review, nor is it intended to identify key / important constituent elements or delineate the protection scope of these embodiments, but rather serves as a preface to the subsequent detailed description.
[0007] The embodiments of the present disclosure provide a recognition method, a recognition device, and a measuring mechanism for two horizontal dividing lines, which can improve the accuracy of identifying the dividing line between the electrolyte and the aluminum liquid during the two-level measurement.
[0008] In some embodiments, a method for identifying a two-level demarcation line includes: after continuously collecting multiple sampling images of a measurement probe, identifying the upper demarcation line, the lower demarcation line, and the potential demarcation line between the electrolyte and the aluminum liquid in the effective analysis interval of each sampling image; using the potential demarcation line as the starting point, searching for a first target position that meets the set conditions on the upper demarcation line of each sampling image, and searching for a second target position that meets the set conditions on the lower demarcation line; calculating the average brightness contrast between the first area corresponding to the first target position and the second area corresponding to the second target position in each sampling image; based on the average brightness contrast corresponding to each sampling image, determining the target sampling image among the multiple sampling images, and taking the connection line between the first target position and the second target position in the target sampling image as the demarcation line between the electrolyte and the aluminum liquid for this two-level measurement.
[0009] Optionally, identifying the upper and lower demarcation lines in the effective analysis interval of each sampling image includes: determining the first one-dimensional array corresponding to each sampling image through horizontal brightness accumulation of the image; analyzing the first one-dimensional array to determine the longitudinal boundary of the effective analysis interval in each sampling image; and determining the upper demarcation line and the lower demarcation line of the effective analysis interval in each sampling image according to the longitudinal boundary of the effective analysis interval in each sampling image.
[0010] Optionally, identifying the potential demarcation line between the electrolyte and the aluminum liquid in each sampling image includes: identifying the demarcation line between the electrolyte and the probe liquid of the measurement probe in the effective analysis interval of each sampling image; constructing a brightness contrast curve of the effective analysis interval of each sampling image according to the demarcation line between the probe liquid; and determining the potential demarcation line between the electrolyte and the aluminum liquid in each sampling image according to the peak position of the brightness contrast curve.
[0011] Optionally, identifying the demarcation line between the electrolyte and the probe liquid of the measurement probe in each sampling image includes: analyzing the first one-dimensional array to determine the brightness threshold of the demarcation line between the electrolyte and the measurement probe in each sampling image; determining the second one-dimensional array of each sampling image through vertical brightness accumulation of the image; and searching for the position where the second one-dimensional array is first greater than the demarcation line brightness threshold as the demarcation line between the probe liquid in each sampling image.
[0012] Optionally, analyzing the first one-dimensional array to determine the brightness threshold of the demarcation line between the electrolyte and the measurement probe in each sampling image includes: after normalizing the first one-dimensional array, sorting it in ascending order of brightness value; and taking the brightness value at a set position in the sorted first one-dimensional array as the demarcation line brightness threshold.
[0013] Optionally, according to the brazing liquid demarcation line, construct the brightness contrast curve of the effective analysis interval of each sampled image, including: taking the position at a set distance from the brazing liquid demarcation line as the starting point, calculating the first average brightness of each unit segment area in the effective analysis interval, and the second average brightness from the cut-off point of each unit segment area to the measured end of the probe; determining the relative ratio of the average brightness of the effective analysis interval according to the first average brightness and the second average brightness; constructing the brightness contrast curve of the effective analysis interval of each sampled image according to the relative ratio of the average brightness.
[0014] Optionally, determine the target sampled image among multiple sampled images according to the average brightness contrast corresponding to each sampled image, including: determining the sampled image with the largest average brightness contrast among multiple sampled images as the target sampled image; or, selecting the sampled images with an average brightness contrast greater than the set contrast as the target sampled images.
[0015] In some embodiments, the identification device for two-level demarcation lines includes: an identification module configured to identify the upper demarcation line, the lower demarcation line, and the potential demarcation line between the electrolyte and the aluminum liquid in the effective analysis interval of each sampled image after continuously collecting multiple sampled images of the measuring probe; a search module configured to search for the first target position that meets the set conditions on the upper demarcation line of each sampled image and the second target position that meets the set conditions on the lower demarcation line with the potential demarcation line as the starting point; a calculation module configured to calculate the average brightness contrast between the first area corresponding to the first target position and the second area corresponding to the second target position in each sampled image; a determination module configured to determine the target sampled image among multiple sampled images according to the average brightness contrast corresponding to each sampled image, and take the connection line between the first target position and the second target position in the target sampled image as the demarcation line between the electrolyte and the aluminum liquid for this two-level measurement.
[0016] In some embodiments, the identification device for two-level demarcation lines includes a processor and a memory storing program instructions, and the processor is configured to be able to execute the identification method for two-level demarcation lines as described above.
[0017] In some embodiments, the measuring mechanism includes: a mechanism body; the identification device for two-level demarcation lines as described above is provided on the mechanism body.
[0018] The identification method, identification device, and measuring mechanism for two-level demarcation lines provided by the embodiments of the present disclosure can achieve the following technical effects:
[0019] In the embodiments of the present disclosure, after the measurement probe sampling is completed and the probe is retracted to the image sampling position, first, multiple sampling images of the sampling section of the measurement probe are continuously collected. Then, the upper demarcation line, the lower demarcation line, and the potential demarcation line between the electrolyte and the aluminum liquid in each sampling image are identified. Starting from the potential demarcation line, the first target position that meets the set conditions is searched for on the upper demarcation line of each sampling image, and the second target position that meets the set conditions is searched for on the lower demarcation line. And the average luminance contrast between the first area corresponding to the first target position and the second area corresponding to the second target position in each sampling image is calculated. Finally, according to the average luminance contrast corresponding to each sampling image, the target sampling image among the multiple sampling images is determined, and the line connecting the first target position and the second target position in the target sampling image is used as the demarcation line between the electrolyte and the aluminum liquid for this two-level measurement. In this way, the target sampling image finally used to identify the demarcation line between the electrolyte and the aluminum liquid is the sampling image with the most obvious demarcation line contrast among the multiple continuously collected sampling images, reducing the influence of the image itself factors on the recognition result. Therefore, the embodiments of the present disclosure can improve the accuracy of identifying the demarcation line between the electrolyte and the aluminum liquid during two-level measurement.
[0020] The above general description and the following description are only exemplary and explanatory, and are not used to limit this application. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] One or more embodiments are exemplarily illustrated by the corresponding drawings. These exemplary illustrations and the drawings do not constitute a limitation on the embodiments. Elements with the same reference numerals in the drawings are shown as similar elements. The drawings do not constitute a scale limitation, and among them:
[0022] Figure 1 is a schematic diagram of a measurement mechanism provided by an embodiment of the present disclosure;
[0023] Figure 2 is a schematic diagram of a method for identifying a two-level demarcation line provided by an embodiment of the present disclosure;
[0024] Figure 3 is a schematic diagram of a partial sampling image provided by an embodiment of the present disclosure;
[0025] Figure 4 is a schematic diagram of a luminance contrast curve provided by an embodiment of the present disclosure;
[0026] Figure 5 is a schematic diagram of a device for identifying a two-level demarcation line provided by an embodiment of the present disclosure;
[0027] Figure 6 is a schematic diagram of another device for identifying a two-level demarcation line provided by an embodiment of the present disclosure. Detailed Implementation Manner
[0028] In order to more comprehensively understand the features and technical content of the embodiments of the present disclosure, the implementation of the embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings. The accompanying drawings are for reference and illustration purposes only and are not intended to limit the embodiments of the present disclosure. In the following technical description, for the sake of explanation, numerous details are provided to give a full understanding of the disclosed embodiments. However, one or more embodiments may still be implemented without these details. In other cases, well-known structures and devices may be shown in a simplified manner to simplify the drawings.
[0029] In the description of the embodiments of the present disclosure, the terms "first", "second", etc. in the specification, claims and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data may be interchanged under appropriate circumstances so as to implement the embodiments of the present disclosure described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion.
[0030] Unless otherwise specified, the term "a plurality of" features means two or more.
[0031] In the embodiments of the present disclosure, the character " / " features indicate that the objects before and after are in an "or" relationship. For example, the A / B feature means: A or B.
[0032] The term "and / or" is a description of the association relationship of an object, and the feature indicates that three relationships may exist. For example, A and / or B, the feature means: A or B, or, the three relationships of A and B.
[0033] The term "corresponding" may refer to an association relationship or a binding relationship. A corresponding to B means that there is an association relationship or a binding relationship between A and B.
[0034] It should be noted that, without conflict, the embodiments in the embodiments of the present disclosure and the features in the embodiments may be combined with each other.
[0035] As Figure 1 shown, the measuring mechanism 100 provided by the embodiments of the present disclosure includes a mechanism body 110 and an identification device 500(600) for two horizontal dividing lines.
[0036] Optionally, the measuring mechanism 100 further includes a measuring arm 120. A measuring rod for sampling during two horizontal measurements and an image acquisition device for acquiring a sampling image are provided on the measuring arm 120.
[0037] Specifically, the identification device 500(600) for two horizontal dividing lines is provided on the mechanism body 110.
[0038] Specifically, the two levels refer to the height levels of the electrolyte liquid and the aluminum liquid in the electrolytic cell, and the two-level demarcation line refers to the demarcation line between the electrolyte liquid and the aluminum liquid on the measuring probe when measuring the two levels.
[0039] Optionally, the identification device 600 for the two-level demarcation line includes a processor. After continuously collecting multiple sampling images of the measuring probe, the processor can identify the upper demarcation line, the lower demarcation line, and the potential demarcation line between the electrolyte liquid and the aluminum liquid in each sampling image. Starting from the potential demarcation line, the first target position that meets the set conditions can be searched for on the upper demarcation line of each sampling image, and the second target position that meets the set conditions can be searched for on the lower demarcation line. The average brightness contrast between the first area corresponding to the first target position and the second area corresponding to the second target position in each sampling image can be calculated. Based on the average brightness contrast corresponding to each sampling image, the target sampling image among the multiple sampling images can be determined, and the line connecting the first target position and the second target position in the target sampling image can be used as the demarcation line between the electrolyte liquid and the aluminum liquid for this two-level measurement.
[0040] Combined with the above measurement mechanism, an embodiment of the present disclosure provides a method for identifying the two-level demarcation line, as Figure 2 shown, the identification method includes:
[0041] S201, after the processor continuously collects multiple sampling images of the measuring probe, it identifies the upper demarcation line, the lower demarcation line, and the potential demarcation line between the electrolyte liquid and the aluminum liquid in each sampling image.
[0042] Specifically, the effective analysis interval in the sampling image is the image area of the part of the measuring probe inserted into the electrolyte liquid and the aluminum liquid.
[0043] Specifically, for the measuring probe provided on the measuring arm of the measurement mechanism, after sampling through the furnace hole and inserting it into the electrolytic cell and then retracting it to the image sampling position, the processor can continuously collect multiple sampling images through the image acquisition device provided on the measuring arm and located on one side of the measuring probe.
[0044] Exemplarily, the image acquisition device can be two 6mm focal length fish-eye lenses arranged side by side horizontally. The pixel size of the sampling image collected by each lens is 5496×3672. After the fields of view of the two lenses are horizontally stitched, the pixel size of the effective analysis area (Region of Interest, ROI) in the sampling image is approximately 7000×300, corresponding to an effective physical field of view size of approximately 70cm×3cm.
[0045] Specifically, image processing techniques such as edge detection and threshold segmentation can be used to identify the upper demarcation line, the lower demarcation line, and the potential demarcation line between the electrolyte liquid and the aluminum liquid in each sampling image.
[0046] S202, The processor starts from the potential dividing line and searches for the first target position that meets the set conditions on the upper dividing line of each sampled image, and searches for the second target position that meets the set conditions on the lower dividing line.
[0047] Specifically, the set conditions are conditions set based on meeting the brightness threshold of the electrolyte in the image. Therefore, the first target position that meets the set conditions on the upper dividing line of the sampled image can be regarded as the demarcation point between the electrolyte and the aluminum liquid on the upper dividing line. The second target position that meets the set conditions on the lower dividing line of the sampled image can be regarded as the demarcation point between the electrolyte and the aluminum liquid on the lower dividing line.
[0048] It should be noted that when searching on the upper dividing line and the lower dividing line, the search is carried out along the direction from left to right.
[0049] Exemplarily, the set conditions can be the cut-off points of the last areas with a length of 5 mm and a brightness greater than 250 on the upper dividing line and the lower dividing line.
[0050] S203, The processor calculates the average brightness contrast between the first area corresponding to the first target position and the second area corresponding to the second target position in each sampled image.
[0051] Specifically, the first area corresponding to the first target position in the sampled image is a part of the electrolyte area near the demarcation between the electrolyte and the aluminum liquid. The second area corresponding to the second target position in the sampled image is a part of the aluminum liquid area near the demarcation between the electrolyte and the aluminum liquid. By calculating the average brightness contrast of these two parts of the area, it can be determined where the demarcation between the electrolyte and the aluminum liquid is more obvious in which captured image. Therefore, the processor needs to calculate the average brightness contrast between the first area and the second area in each sampled image.
[0052] Exemplarily, as Figure 3 shown in a partial sampled image, point A is used to represent the first target position, and point B is used to represent the second target position. In this case, area C is the first area corresponding to the first target position, and area D is the second area corresponding to the second target position.
[0053] S204, The processor determines the target sampled image among multiple sampled images according to the average brightness contrast corresponding to each sampled image, and takes the connection line between the first target position and the second target position in the target sampled image as the demarcation line between the electrolyte and the aluminum liquid for this two-level measurement.
[0054] Specifically, according to the average brightness contrast corresponding to each sampled image, it can be determined which sampled image has a more obvious boundary between the electrolyte and the aluminum liquid. Therefore, according to the average brightness contrast corresponding to each sampled image, the target sampled images for subsequently identifying the boundary between the electrolyte and the aluminum liquid among multiple sampled images can be determined.
[0055] Optionally, determining the target sampled images among multiple sampled images according to the average brightness contrast corresponding to each sampled image includes: determining the sampled image with the largest average brightness contrast among multiple sampled images as the target sampled image; or, selecting the sampled images with an average brightness contrast greater than a set contrast as the target sampled images.
[0056] Specifically, the sampled image with the largest average brightness contrast is the sampled image with the most obvious boundary between the electrolyte and the aluminum liquid among multiple sampled images. Therefore, this sampled image can be determined as the target sampled image.
[0057] Specifically, the boundaries between the electrolyte and the aluminum liquid in the sampled images with an average brightness contrast greater than the set contrast are all relatively obvious and can all meet the requirement of accurately identifying the boundary between the electrolyte and the aluminum liquid. Therefore, the sampled images with an average brightness contrast greater than the set contrast can be determined as the target sampled images.
[0058] It can be understood that when the probe is inserted into the electrolytic cell through the furnace hole for sampling, it is inserted at a certain inclined angle. Therefore, the boundary between the electrolyte and the aluminum liquid should appear as an oblique line in the sampled image. Therefore, the line connecting the first target position and the second target position in the target sampled image needs to be used as the boundary between the electrolyte and the aluminum liquid for this two-level measurement.
[0059] In the embodiments of the present disclosure, after the measurement brazing sampling is completed and the position is retracted to the image sampling position, first, a plurality of sampling images of the sampling section of the measurement brazing are continuously collected. Then, the upper dividing line, the lower dividing line, and the potential dividing line between the electrolyte and the aluminum liquid in the effective analysis interval of each sampling image are identified. Starting from the potential dividing line, a first target position that meets the set conditions is searched on the upper dividing line of each sampling image, and a second target position that meets the set conditions is searched on the lower dividing line. And the average brightness contrast between the first area corresponding to the first target position and the second area corresponding to the second target position in each sampling image is calculated. Finally, according to the average brightness contrast corresponding to each sampling image, the target sampling image among the plurality of sampling images is determined, and the line connecting the first target position and the second target position in the target sampling image is used as the dividing line between the electrolyte and the aluminum liquid for this two-level measurement. In this way, the target sampling image finally used to identify the dividing line between the electrolyte and the aluminum liquid is the sampling image with the most obvious dividing line contrast among the continuously collected plurality of sampling images, reducing the influence of the image itself factors on the recognition result. Therefore, the embodiments of the present disclosure can improve the accuracy of identifying the dividing line between the electrolyte and the aluminum liquid during two-level measurement.
[0060] In some embodiments, identifying the upper dividing line and the lower dividing line of the effective analysis interval in each sampling image includes: determining a first one-dimensional array corresponding to each sampling image through horizontal brightness accumulation of the image; analyzing the first one-dimensional array to determine the longitudinal boundary of the effective analysis interval in each sampling image; and determining the upper dividing line and the lower dividing line of the effective analysis interval of each sampling image according to the longitudinal boundary of the effective analysis interval in each sampling image.
[0061] Specifically, a sampling image can be regarded as a two-dimensional array composed of a plurality of pixel values, and each pixel value can be regarded as a brightness value. Therefore, through horizontal brightness accumulation of the image, a first one-dimensional array corresponding to each sampling image can be determined. Among them, this one-dimensional array is a longitudinal one-dimensional array.
[0062] Exemplarily, taking the pixel size of the effective analysis area in the sampling image as 7000×300, the length of the obtained first one-dimensional array is 300.
[0063] Specifically, by analyzing the first one-dimensional array, a region with significantly higher brightness in the data can be determined, and this region is the region where the electrolyte is located. The boundary line of this region in the longitudinal direction is the longitudinal boundary of the effective analysis interval in the sampling image.
[0064] Specifically, the upper boundary line of the longitudinal boundary is the upper dividing line of the effective analysis interval, and the lower boundary line of the longitudinal boundary is the lower dividing line of the effective analysis interval.
[0065] In this embodiment, the upper and lower boundaries of the effective analysis interval of each sampled image can be determined by converting the sampled image into a one-dimensional array in the form of luminance values and identifying the longitudinal dividing lines of the luminance values in the array. In this way, compared with traditional image processing techniques such as edge detection and threshold segmentation, the recognition efficiency and accuracy of the upper and lower boundaries of the effective analysis interval can be improved.
[0066] In some embodiments, identifying the potential dividing line between the electrolyte and the aluminum liquid in the effective analysis interval of each sampled image includes: identifying the dividing line between the electrolyte and the brazing liquid of the measuring brazing rod in the effective analysis interval of each sampled image; constructing a luminance contrast curve of the effective analysis interval of each sampled image according to the dividing line of the brazing liquid; and determining the potential dividing line between the electrolyte and the aluminum liquid in each sampled image according to the peak position of the luminance contrast curve.
[0067] Specifically, in the sampled image, there are significant differences in the luminance between the electrolyte region and the measuring brazing rod region. Therefore, methods such as luminance threshold can be used to identify the dividing line between the electrolyte and the brazing liquid of the measuring brazing rod in the effective analysis interval of each sampled image.
[0068] Specifically, in the sampled image, starting from the dividing line of the brazing liquid, the region located within the upper and lower boundaries contains the electrolyte region and the aluminum liquid region. The luminance values of these regions are known, and there will be a significant region at the boundary between the electrolyte region and the aluminum liquid region. Therefore, it is necessary to construct a luminance contrast curve of the effective analysis interval of each sampled image according to the dividing line of the brazing liquid.
[0069] Specifically, in the luminance contrast curve, its peak position belongs to the position where the luminance contrast is the most obvious within the effective analysis region of the sampled image. Therefore, the peak position in the luminance contrast curve corresponding to each sampled image can be used to determine the potential dividing line between the electrolyte and the aluminum liquid in each sampled image.
[0070] Exemplarily, the luminance contrast curve of the sampled image is as Figure 4 shown, where the position indicated by E is the peak position in the luminance contrast curve.
[0071] In this embodiment, the potential dividing line between the electrolyte and the aluminum liquid in each sampled image is identified by constructing a luminance contrast curve of the effective analysis interval of each sampled image. In this way, compared with traditional image processing techniques such as edge detection and threshold segmentation, the efficiency and accuracy of identifying the potential dividing line between the electrolyte and the aluminum liquid can be improved.
[0072] In some embodiments, identifying the boundary line between the electrolyte and the brazing liquid of the measuring brazing in each sampled image includes: analyzing the first one-dimensional array to determine the boundary line brightness threshold between the electrolyte and the measuring brazing in each sampled image; determining the second one-dimensional array of each sampled image through vertical brightness accumulation of the image; searching for the position where the second one-dimensional array is first greater than the boundary line brightness threshold as the boundary line of the brazing liquid in each sampled image.
[0073] Specifically, by analyzing the first one-dimensional array, the brightness situation generally shown by the electrolyte in the sampled image can be determined. Therefore, the boundary line brightness threshold between the electrolyte and the measuring brazing in each sampled image can be determined by analyzing the first one-dimensional array.
[0074] Specifically, the sampled image can be regarded as a two-dimensional array composed of multiple pixel values, and each pixel value can be regarded as a brightness value. Therefore, through vertical brightness accumulation of the image, the second one-dimensional array corresponding to each sampled image can be determined. Among them, this one-dimensional array is a horizontal one-dimensional array.
[0075] Exemplarily, taking the pixel size of the effective analysis area in the sampled image as 7000×300, the length of the obtained second one-dimensional array is 7000.
[0076] Specifically, the right side of the sampled image is the end of the measuring brazing. Therefore, the effective analysis area in the sampled image corresponds to the areas where the measuring brazing, the electrolyte, and the aluminum liquid are located from left to right respectively, and the end of the second one-dimensional array corresponds to the end of the measuring brazing. Therefore, the position where the second one-dimensional array is first greater than the boundary line brightness threshold should be the boundary line position between the measuring brazing and the electrolyte.
[0077] In some embodiments, determining the boundary line brightness threshold between the electrolyte and the measuring brazing in each sampled image includes: after normalizing the first one-dimensional array, sorting it in ascending order of brightness value; taking the brightness value at a set position in the sorted first one-dimensional array as the boundary line brightness threshold.
[0078] Specifically, the number of pixel points shown by the measuring brazing in the sampled image is certain, and the brightness of the measuring brazing in the sampled image is darker than that of the electrolyte and the aluminum liquid. Therefore, after sorting the normalized first one-dimensional array in ascending order of brightness value, the brightness value at a set position in it can be taken as the boundary line brightness threshold.
[0079] Specifically, the set position is determined according to the number of pixel points occupied by the measuring brazing in the sampled image.
[0080] Exemplarily, for the first one-dimensional array with a length of 300, it is usually normalized with a maximum brightness of 255, and then the brightness value at the 85th position of the array is taken as the boundary line brightness threshold.
[0081] In some embodiments, according to the brazing liquid demarcation line, a brightness contrast curve of the effective analysis interval of each sampling image is constructed, including: taking the position at a set distance from the brazing liquid demarcation line as the starting point, calculating the first average brightness of each unit segment area in the effective analysis interval, and the second average brightness from the cut-off point of each unit segment area to the end of the measuring probe; determining the relative ratio of the average brightness of the effective analysis interval according to the first average brightness and the second average brightness; and constructing the brightness contrast curve of the effective analysis interval of each sampling image according to the relative ratio of the average brightness.
[0082] Specifically, for an electrolytic cell, the height of its electrolyte is within a fixed range. For example, for an electrolytic cell with a specification of 600KA, the electrolyte height is generally between 8.5 cm and 22 cm. Therefore, in the sampling image, the demarcation line between the electrolyte and the aluminum liquid should be at the height of the electrolyte behind the brazing liquid demarcation line. Therefore, it is necessary to take the position at a set distance from the brazing liquid demarcation line as the starting point to start identifying the position of the demarcation line between the electrolyte and the aluminum liquid. This is conducive to improving the identification efficiency of the demarcation line between the electrolyte and the aluminum liquid.
[0083] Specifically, by calculating the first average brightness of each unit segment area in the effective analysis interval, the second average brightness from the cut-off point of each unit segment area to the end of the measuring probe, and calculating the relative ratio of the average brightness of the first average brightness and the second average brightness, it is possible to determine whether the difference in brightness contrast between two horizontal pixel points is obvious. Therefore, the brightness contrast curve of the effective analysis interval of each sampling image can be constructed according to the relative ratio of the average brightness.
[0084] Combined with Figure 5 As shown, an identification device for two horizontal demarcation lines provided by an embodiment of the present disclosure includes: an identification module 501, a search module 502, a calculation module 503, and a determination module 504. The identification module 501 is configured to identify the upper demarcation line, the lower demarcation line, and the potential demarcation line between the electrolyte and the aluminum liquid in the effective analysis interval of each sampling image after continuously collecting multiple sampling images of the measuring probe. The search module 502 is configured to search for a first target position that meets the set conditions on the upper demarcation line of each sampling image and a second target position that meets the set conditions on the lower demarcation line with the potential demarcation line as the starting point. The calculation module 503 is configured to calculate the average brightness contrast between the first area corresponding to the first target position and the second area corresponding to the second target position in each sampling image. The determination module 504 is configured to determine the target sampling image among the multiple sampling images according to the average brightness contrast corresponding to each sampling image, and use the connection line between the first target position and the second target position in the target sampling image as the demarcation line between the electrolyte and the aluminum liquid for this two-level measurement.
[0085] Combination Figure 6 As shown in Figure 6 , an identification device 600 for two horizontal dividing lines provided by an embodiment of the present disclosure includes: a processor 601 and a memory 602. Optionally, the device may further include a communication interface 603 and a bus 604. Among them, the processor 601, the communication interface 603, and the memory 602 can communicate with each other through the bus 604. The communication interface 603 can be used for information transmission. The processor 601 can call the logical instructions in the memory 602 to execute the identification method for two horizontal dividing lines in the above embodiment.
[0086] In addition, when the logical instructions in the above-mentioned memory 602 are implemented in the form of software functional units and sold or used as an independent product, they can be stored in a computer-readable storage medium.
[0087] The memory 602, as a computer-readable storage medium, can be used to store software programs and computer-executable programs, such as the program instructions / modules corresponding to the method in the embodiment of the present disclosure. The processor 601 executes functional applications and data processing by running the program instructions / modules stored in the memory 602, that is, implements the identification method for two horizontal dividing lines in the above embodiment.
[0088] The memory 602 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system and application programs required for at least one function; the data storage area can store data created according to the use of the terminal device, etc. In addition, the memory 602 may include a high-speed random access memory and may also include a non-volatile memory.
[0089] An embodiment of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, and the computer-executable instructions are set to execute the above-mentioned identification method for two horizontal dividing lines.
[0090] The technical solution of the embodiment of the present disclosure can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes one or more instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in the embodiment of the present disclosure. The foregoing storage medium may be a non-transitory storage medium, such as: a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk, or an optical disc, etc., which are various media that can store program codes.
[0091] The above description and the accompanying drawings fully illustrate the embodiments of the present disclosure, enabling those skilled in the art to practice them. Other embodiments may include structural, logical, electrical, process, and other changes. The embodiments only represent possible variations. Unless explicitly required, the individual components and functions are optional, and the order of operations may vary. Parts and features of some embodiments may be included in or replace parts and features of other embodiments. Moreover, the terms used in this application are only for describing the embodiments and do not limit the claims. As used in the description of the embodiments and the claims, unless the context clearly indicates otherwise, the singular forms "a", "an", and "the" are intended to also include the plural forms. Similarly, as used in this application, the term "and / or" refers to any and all possible combinations of one or more of the associated listed items. Additionally, when used in this application, the term "comprise" and its variants "comprises" and / or "comprising" etc. mean the presence of the stated features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or groups of these. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, or apparatus that includes the element. Herein, each embodiment may focus on the differences from other embodiments, and the same or similar parts among the embodiments may be referred to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method parts disclosed in the embodiments, the relevant parts may refer to the description of the method parts.
[0092] Those skilled in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner may depend on the specific application and design constraints of the technical solution. The technician can use different methods for each specific application to implement the described functions, but such implementation should not be considered to exceed the scope of the embodiments of the present disclosure. The technician can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments, and will not be elaborated herein.
[0093] In the embodiments disclosed herein, the disclosed methods, products (including but not limited to devices, equipment, etc.) can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units can be merely a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Additionally, the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of the devices or units can be in electrical, mechanical, or other forms. The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to implement this embodiment. Additionally, in the embodiments of the present disclosure, the various functional units can be integrated in one processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit.
[0094] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram can represent a module, a program segment, or a part of code, and the module, program segment, or part of code contains one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions marked in the blocks can also occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks can actually be executed substantially in parallel, and sometimes they can also be executed in the reverse order, which can depend on the functions involved. In the descriptions corresponding to the flowcharts and block diagrams in the accompanying drawings, the operations or steps corresponding to different blocks can also occur in a different order than that disclosed in the description. Sometimes, there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be executed substantially in parallel, and sometimes they can also be executed in the reverse order, which can depend on the functions involved. Each block in the block diagram and / or flowchart, as well as the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.
Claims
1. A recognition method for two-level dividing lines, characterized in that Including: After continuously collecting and measuring multiple sampling images of the measuring probe, identify the upper demarcation line, lower demarcation line, and potential demarcation line between the electrolyte and the aluminum liquid in each sampling image; Taking the potential demarcation line as the starting point, search for the first target position that meets the set conditions on the upper demarcation line of each sampling image, and search for the second target position that meets the set conditions on the lower demarcation line; Calculate the average brightness contrast between the first area corresponding to the first target position and the second area corresponding to the second target position in each sampling image; According to the average brightness contrast corresponding to each sampling image, determine the target sampling image among the multiple sampling images, and use the line connecting the first target position and the second target position in the target sampling image as the demarcation line between the electrolyte and the aluminum liquid for this two-level measurement.
2. The recognition method according to claim 1, wherein Identifying the upper and lower demarcation lines of the effective analysis interval in each sampling image includes: Determine the first one-dimensional array corresponding to each sampling image by accumulating the horizontal brightness of the image; Analyze the first one-dimensional array to determine the longitudinal boundary of the effective analysis interval in each sampling image; According to the longitudinal boundary of the effective analysis interval in each sampling image, determine the upper demarcation line and the lower demarcation line of the effective analysis interval in each sampling image.
3. The recognition method according to claim 2, wherein Identifying the potential demarcation line between the electrolyte and the aluminum liquid in the effective analysis interval of each sampling image includes: Identify the demarcation line between the electrolyte and the probe liquid of the measuring probe in the effective analysis interval of each sampling image; According to the demarcation line of the probe liquid, construct the brightness contrast curve of the effective analysis interval of each sampling image; Determine the potential demarcation line between the electrolyte and the aluminum liquid in each sampling image according to the peak position of the brightness contrast curve.
4. The recognition method according to claim 3, characterized in that, Identifying the demarcation line between the electrolyte and the probe liquid of the measuring probe in each sampling image includes: Analyze the first one-dimensional array to determine the brightness threshold of the demarcation line between the electrolyte and the measuring probe in each sampling image; Determine the second one-dimensional array of each sampling image by accumulating the vertical brightness of the image; Search for the position where the second one-dimensional array is first greater than the demarcation line brightness threshold as the demarcation line of the probe liquid in each sampling image.
5. According to the identification method described in claim 4, analyzing the first one-dimensional array to determine the brightness threshold of the demarcation line between the electrolyte and the measuring probe in each sampling image includes: After normalizing the first one-dimensional array, sort it in ascending order of brightness value; Use the brightness value at the set position in the sorted first one-dimensional array as the demarcation line brightness threshold.
6. The recognition method according to claim 3, characterized in that Constructing the brightness contrast curve of the effective analysis interval of each sampling image according to the demarcation line of the probe liquid includes: Taking the position at a set distance from the demarcation line of the probe liquid as the starting point, calculate the first average brightness of each unit segment area in the effective analysis interval, and the second average brightness from the cut-off point of each unit segment area to the end of the measuring probe; Determine the relative ratio of the average brightness of the effective analysis interval according to the first average brightness and the second average brightness; Construct the brightness contrast curve of the effective analysis interval of each sampling image according to the relative ratio of the average brightness.
7. The recognition method according to any one of claims 1 to 6, characterized in that Determining the target sampling image among the multiple sampling images according to the average brightness contrast corresponding to each sampling image includes: Determine the sampled image with the largest average brightness contrast among multiple sampled images as the target sampled image; or, Select the sampled images with an average brightness contrast greater than a set contrast as the target sampled images.
8. An identification device for a two-level dividing line, characterized in that, Comprising: An identification module, configured to, after continuously acquiring multiple sampled images of the measurement probe, identify the upper demarcation line, the lower demarcation line, and the potential demarcation line between the electrolyte and the aluminum liquid in each sampled image; A search module, configured to start from the potential demarcation line, search for a first target position satisfying a set condition on the upper demarcation line of each sampled image, and search for a second target position satisfying the set condition on the lower demarcation line; A calculation module, configured to calculate the average brightness contrast between a first region corresponding to the first target position and a second region corresponding to the second target position in each sampled image; A determination module, configured to determine the target sampled image among multiple sampled images according to the average brightness contrast corresponding to each sampled image, and use the line connecting the first target position and the second target position in the target sampled image as the demarcation line between the electrolyte and the aluminum liquid for this two-level measurement.
9. An identification device for a two-level dividing line, comprising a processor and a memory storing program instructions, characterized in that The processor is configured to be capable of executing the identification method for the two-level demarcation line according to any one of claims 1 to 7.
10. A measuring mechanism, characterized in that, Comprising: The mechanism body; The identification device for the two-level demarcation line according to claim 8 or 9, provided on the mechanism body.