A method for extracting morphological parameters of long-gap AC arc based on RGB color space
Through the image processing method based on RGB color space, the morphological parameters of long gap AC arc are extracted, which solves the problem of inaccurate extraction in traditional methods, realizes direct and accurate measurement of arc morphological parameters, and provides important support for the three-dimensional reconstruction of arc.
Patent Information
- Application Number
- CN202111172501.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-08
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2041-10-08
AI Technical Summary
It is difficult for the prior art to accurately extract the morphological parameters of long gap AC arcs, and the traditional methods are too indirect and the measurement accuracy is insufficient.
Using an image processing method based on RGB color space, image binarization and skeleton extraction are performed by segmenting the arc body and background, and a single pixel width skeleton of the arc is obtained by using the K3M skeleton extraction algorithm, and branches are deleted to obtain the arc axis.
The direct and accurate extraction of long-gap AC arc morphological parameters is achieved, including parameters such as arc length, arc radius and arc motion changes, which improves measurement accuracy and provides important assistance for the three-dimensional reconstruction of arcs.
Smart Images

Figure CN114004791B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of machine vision image processing, and in particular to a method for extracting morphological parameters of a long-gap alternating current arc based on an RGB color space. Background Art
[0002] In power systems, long-gap AC arcs are mostly generated when ground faults occur in AC systems. Research on the physical characteristics of arcs is beneficial to the optimization design of parallel gaps for lightning protection in power systems, the formulation of relevant relay protection strategies, and the development of new arc extinguishing measures. Since the actual length of long-gap AC arcs can reach several meters when they are generated, and their spatial movement is irregular and complex, simulation experiments are often used to study their characteristics. In the simulation experiment, researchers often use CCD high-speed cameras to capture the arc movement process, and the obtained arc images are saved in RGB color information. Therefore, an image processing technology for RGB color space is needed to extract complete and accurate arc morphology information.
[0003] Generally speaking, image processing includes a series of processes such as image denoising, image segmentation and image binarization. However, for arc images in RGB color space, the traditional processing method is obviously inappropriate. For image denoising, the denoising method is generally implemented after the image is grayed, but it cannot give full play to the advantages of RGB images. In terms of image segmentation, the OTSU method with adaptive threshold is often used. However, for some long-gap AC arc images, there will be a large difference in the brightness of each part of the arc. After applying the OTSU method, it is easy to cause the image extraction to be inaccurate and the image subject to be imperfect. Therefore, a new method is proposed to segment the color arc image by comparing different RGB components. Based on the principle of arc and background radiation, arc radiation is emitted due to the continuous transition and collision of particles inside the plasma, and background radiation is generated by the thermal radiation of high-temperature gas around the arc. The wavelength ranges in which the radiation energy of the two is concentrated are different. In the visible light wavelength range, the arc radiation energy is mainly concentrated in the range of 400-600nm, and the background radiation can be derived from Wien's displacement law that the maximum spectral radiation wavelength is inversely proportional to the temperature. Taking the temperature of 4000K as an example, its maximum spectral radiation wavelength is 725nm, and the radiation power decreases on both sides of this wavelength. For the RGB components of the CCD camera, the R component responds to radiation in the 630nm range, the G component responds to radiation in the 550nm range, and the B component responds to radiation in the 450nm range. Therefore, the arc body radiation is manifested as the B component being greater than the R component, and the background radiation is manifested as the R component being greater than the B component. By comparing different components, the arc body and the background can be distinguished to achieve image segmentation. After the above image processing, in order to obtain the morphological parameters of the long gap AC arc, edge detection is often used as a means to extract the arc edge to obtain relevant information such as arc length, arc radius and arc motion changes. However, this method is too indirect and the measurement accuracy is insufficient. Summary of the invention
[0004] The purpose of the present invention is to provide a method for extracting morphological parameters of long-gap AC arc based on RGB color space, which can obtain arc morphological parameters more directly and accurately by extracting arc skeleton to obtain arc axis.
[0005] To achieve the above object, the technical solution of the present invention is:
[0006] A method for extracting morphological parameters of a long-gap AC arc based on an RGB color space, the method comprising the following steps:
[0007] Step 1: In the RGB color space, the grayscale matrix is divided into three components: R, G, and B, and image filtering is performed on the three components;
[0008] Step 2: For the filtered image, using the radiation characteristics of the arc, by comparing the three components of R, G, and B, the main part of the arc is obtained to complete the arc image segmentation;
[0009] Step 3: binarize the segmented arc image;
[0010] Step 4: Based on the binary arc image, the K3M skeleton extraction algorithm is used to obtain a single-pixel width skeleton of the arc image, and the skeleton branches are deleted to obtain a complete arc skeleton.
[0011] As a preferred improvement of the present invention, in step 1, mean filtering is used to perform graphic filtering.
[0012] As a preferred improvement of the present invention, in step 2, the comparison of the three components of R, G, and B specifically includes the following steps:
[0013] Select the R and B components in the arc image. For each pixel point of the arc body,
[0014] I r ≤kI b
[0015] Among them, I r , I b are the R component and B component of the pixel respectively, and k is a constant related to the colorimetric process.
[0016] As a preferred improvement of the present invention, in step 2, a small amount of pixel points are lost in the main part of the obtained arc, and the lost part of the single pixel width inside the arc needs to be supplemented.
[0017] As a preferred improvement of the present invention, in step 4, the K3M skeleton extraction algorithm specifically includes the following steps:
[0018] Select a 3×3 pre-selected box and determine the arc pixel position by assigning different weights to different positions.
[0019]
[0020] Since the essence of skeleton extraction is to refine the arc image, the situation near the pixel is represented by summing N matrices. At the same time, all the situations that need to be deleted are listed based on experience, and pixels are continuously deleted in multiple cycles until they cannot be deleted.
[0021] As a preferred improvement of the present invention, in step four, the obtained single-pixel width arc skeleton is limited by its own shape, resulting in the existence of many branches in the arc skeleton, and the branches need to be deleted to obtain the arc trunk.
[0022] As a preferred improvement of the present invention, the specific judgment logic for deleting branches to obtain the arc trunk is: starting from the lower end point of the arc, go up along the arc skeleton, and when encountering a bifurcation point, store the bifurcation point information, and explore each bifurcation route, using the length of each route as the standard for judging the arc trunk. When encountering the next bifurcation point during the bifurcation route exploration process, retain the previous bifurcation point information and give priority to judging the latest bifurcation point.
[0023] The beneficial effect of the long-gap AC arc morphology parameter extraction method based on RGB color space provided by the present invention is that: through a series of image processing, the accurate extraction of the long-gap AC arc can be guaranteed, and the arc axis obtained by skeleton extraction can more accurately obtain relevant physical parameters, including arc morphology, arc length, arc centroid, etc., which is more convincing in principle and accuracy compared with the traditional method of indirectly obtaining arc-related parameters by arc edge extraction. At the same time, the arc skeleton can also characterize the slope of each part of the arc, and can provide researchers with parameters related to the radial direction. For example, when studying the radial light intensity distribution of the arc, it is usually necessary to know the radial direction of the arc, so as to apply the Abel inverse transform to solve the radial light intensity of the arc. The extraction of the arc skeleton can also play an important role in the three-dimensional reconstruction of the arc. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. The drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work, including:
[0025] Figure 1 This is a schematic diagram of the overall process of RGB arc image processing;
[0026] Figure 2 is the RGB arc image;
[0027] Figure 3 This is the arc image segmentation result before binarization using the OTSU method;
[0028] Figure 4 This is the arc image segmentation result diagram in the present invention;
[0029] Figure 5 This is the arc image binarization result diagram in the present invention;
[0030] Figure 6 This is the arc image skeleton extraction result diagram in the present invention;
[0031] Figure 7 It is a schematic diagram of the arc skeleton branch deletion process in the present invention;
[0032] Figure 8 This is an example of arc skeleton branch deletion in the present invention. DETAILED DESCRIPTION
[0033] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0034] The present invention provides a method for extracting morphological parameters of long-gap AC arc based on RGB color space, including four parts: image denoising, image segmentation, image binarization and image skeleton extraction. For details, please refer to Figure 1 As shown, the method comprises the following steps:
[0035] Step 1: In the RGB color space, the grayscale matrix is divided into three components: R, G, and B, and image filtering is performed on the three components;
[0036] Step 2: For the filtered image, using the radiation characteristics of the arc, by comparing the three components of R, G, and B, the main part of the arc is obtained to complete the arc image segmentation;
[0037] Step 3: binarize the segmented arc image;
[0038] Step 4: Based on the binary arc image, the K3M skeleton extraction algorithm is used to obtain a single-pixel width skeleton of the arc image, and the skeleton branches are deleted to obtain a complete arc skeleton.
[0039] Since the arc image in the present invention is taken by a CCD high-speed camera, Figure 2 To simulate the RGB image taken by the CCD camera in the experiment, the imaging principle is that three imaging elements that respond to different wavelengths record the radiation emitted by the arc. The three wavelength ranges correspond to the three primary colors of R, G, and B. Therefore, in this application, the arc image information is decomposed into the three primary colors of R, G, and B. The three-color matrix represents the radiation intensity in the corresponding color space.
[0040] First, the arc image is denoised. Since the three channels of the camera are independent imaging elements, the randomly generated noise is different. Therefore, it is necessary to perform mean filtering on the matrices of the three components of R, G, and B, that is, to assign the average pixel value of the range near the pixel point. A 3×3 pre-selected box is selected to ensure the image processing speed and denoising effect. The specific operation is:
[0041]
[0042] Among them, I mean is the pixel value after mean filtering, I i,j is the pixel value of the pixel in the i-th row and j-th column, and Ω represents the pre-selected area in the mean filtering process.
[0043] Then, the arc body is segmented on the denoised image. Traditional methods generally use the grayscale value of the image to define the arc body area and the background area of the image. For example, the OTSU image segmentation method uses the grayscale value of the image as the segmentation condition and uses the maximum inter-class variance to select an adaptive threshold. However, there are large differences in the grayscale values of the various parts of the long-gap AC arc body. This threshold cannot extract the complete arc under certain circumstances, such as Figure 3 The present invention aims at the different radiation intensities of long gap AC arcs at different wavelengths, which are reflected in the CCD camera as different pixel components in the three wavelength ranges of R, G, and B. The R component and the B component are compared to distinguish the arc main body and the arc flame, and the segmented image is binarized. The specific judgment logic is as follows:
[0044]
[0045] Among them, H i,j Represents the logical value of the image after binarization, H i,j =1 means that the pixel is the main part of the arc, H i,j =0 indicates the background part, I r , I b are the R component and B component of the pixel respectively. k is a constant related to the colorimetric process, which is related to the experimental environment and experimental equipment. In this experimental example, it is set to 1.2.
[0046] The long gap AC arc image segmentation method of the present invention is as follows: Figure 4 As shown, it should be added that, due to the inevitable image noise in the arc main body obtained by the above R, G, B component colorimetry, there will be a small amount of missing with a single pixel width as the main feature inside the arc main body. This missing part is the arc main body, so it needs to be supplemented. The specific operation is: search the surrounding 3×3 neighborhood of each pixel point. If it is found that the logical value of the pixel point is 0, and there are 6 or more pixels with a logical value of 1 around it, then the pixel point is considered to be the arc main body missed after image segmentation, and the pixel point is set to 1. The logical judgment is:
[0047]
[0048] After filling the defects of the arc body, it is binarized and the results are as follows: Figure 5 As shown, the superiority of the method of the present invention can be clearly observed.
[0049] Finally, the skeleton of the long gap AC arc image is extracted using the K3M skeleton extraction method. Image skeleton extraction is essentially a refinement of the image. The so-called arc skeleton is the result of the arc image being refined to a single pixel width, which can represent the central axis of the arc. In the skeleton extraction process, deletable pixels and non-deletable pixels are involved, and the pixel neighborhood situation needs to be understood. The specific process is: select a 3×3 size pre-selection box to call the pixel neighborhood situation, and use different weights to represent the positional relationship between other pixels and the pixel, as listed in the following formula, and represent the pixel neighborhood by summing the N matrix:
[0050]
[0051] Then, the neighborhood of the deletable pixels is enumerated, A = ΣN,
[0052] 1) There are 3 pixels in the neighborhood, A = [7, 14, 28, 56, 112, 131, 193, 224];
[0053] 2) There are 4 pixels in the neighborhood, A = [15, 30, 60, 120, 135, 195, 225, 240];
[0054] 3) There are 5 pixels in the neighborhood, A = [31, 62, 124, 143, 199, 227, 241, 248];
[0055] 4) There are 6 pixels in the neighborhood, A = [63, 126, 159, 207, 231, 243, 249, 252];
[0056] 5) There are 7 pixels in the neighborhood, A = [191, 239, 251, 254].
[0057] The irrelevant pixels are deleted from the binarized arc image repeatedly until the arc image is refined into a single-pixel width image, such as Figure 6 As shown in the figure, there are several branches. However, for the arc, its path in space should be a complete single path. The branches are caused by the characteristics of the arc image shape, so it is necessary to delete the relevant branches and retain the main part. The specific process is as follows Figure 7 As shown, first locate the start of the arc skeleton. Since the structure of the lower half of the arc is relatively simple, the arc start point is located as the lower endpoint. Then search for the arc bifurcation point in a clockwise order along the arc skeleton. Once the bifurcation point is found, record it and explore each branching route at that point. The length of the route is used as the judgment standard, and the longest route is considered to be the main part. When the bifurcation point is encountered again during the exploration of the bifurcation route, the information of the previous bifurcation point is recorded at this time, and the latest bifurcation point is explored first, and so on, until the entire arc skeleton is explored, and the complete central axis of the long gap AC arc is obtained. Figure 8 Take this as an example, the specific operation of deleting branches is:
[0058] 1) Locate the lower endpoint a according to the motion characteristics of the arc;
[0059] 2) Confirm that point a is a non-bifurcating point and find the next pixel point b;
[0060] 3) Determine that point b is a bifurcation point, and its bifurcation direction is the direction of point d and point c, and store the bifurcation point b in the bifurcation point matrix B;
[0061] 4) Calculate the lengths of the two bifurcated routes at point b. First, select direction d, determine that point d is a bifurcation point, and its bifurcation direction is the direction of point g and point e. Store the bifurcation point d in the bifurcation point matrix B, and give priority to calculating the lengths of the two bifurcation routes at point d.
[0062] 5) By analogy, we can get m, j, g, d, and b as bifurcation points;
[0063] 6) Calculate the bifurcation path at point m first, and the length of the bifurcation point m in the o direction is The length of the n direction is 1, so the o direction is selected and point n is deleted, and the relevant information of pixel point m in the bifurcation point matrix B is deleted;
[0064] 7) Search the bifurcation point matrix B, select the latest bifurcation point, that is, pixel j, and calculate that the k-direction and l-direction route lengths of bifurcation point j are the same, both In the case of the same length, the first route is selected in a clockwise order, point l is deleted, and the relevant information of pixel point j in the bifurcation point matrix B is deleted;
[0065] 8) Similarly, when the program runs to the upper endpoint of the arc and the bifurcation point matrix B is empty, the entire loop ends and the arc trunk is obtained.
[0066] It should be further explained that when calculating the length of the bifurcation route, other directions of the bifurcation point are not accumulated, that is, when calculating the k direction of point j, point l is considered to be non-existent.
[0067] The present invention ensures that the main body of the long-gap AC arc in the RGB color space is accurately extracted through a series of image processing operations, including image denoising, image segmentation, and image binarization. Then, the arc skeleton is extracted and redundant branches are deleted to obtain the arc axis, so as to obtain more direct or indirect arc morphological parameters, such as arc length, arc average radius, arc centroid, etc. At the same time, the slope of each part of the long-gap AC arc in space can be calculated through the arc axis, thereby providing radial information of the arc, for example, the radial light intensity distribution of the arc is obtained through the Abel inverse transform, and the radial temperature of the arc is calculated by the colorimetry method, etc. At the same time, it can also provide important assistance for the three-dimensional reconstruction of the arc, and thereby help more scientific researchers to implement and apply it in the field of arc.
[0068] Although the embodiments of the present invention have been disclosed as above, they are not limited to the applications listed in the specification and the embodiments. They can be fully applied to various fields suitable for the present invention. For those familiar with the art, additional modifications can be easily implemented. Therefore, without departing from the general concept defined by the claims and the scope of equivalents, the present invention is not limited to the specific details and the illustrations shown and described herein.
Claims
1. A method for extracting morphological parameters of long-gap AC arc based on RGB color space, characterized in that: The method comprises the following steps: Step 1: In the RGB color space, the grayscale matrix is divided into three components: R, G, and B, and image filtering is performed on the three components; Step 2: For the filtered image, using the radiation characteristics of the arc, by comparing the three components of R, G, and B, the main part of the arc is obtained to complete the arc image segmentation. The comparison of the three components of R, G, and B specifically includes the following steps: Select the R and B components in the arc image. For each pixel point of the arc body, ; in, I r , I b are the R and B components of the pixel respectively. k is a constant related to the colorimetric process; Step 3: binarize the segmented arc image; Step 4: Based on the binary arc image, the K3M skeleton extraction algorithm is used to obtain a single-pixel width skeleton of the arc image, and the skeleton branches are deleted to obtain a complete arc skeleton.
2. A method for extracting morphological parameters of a long gap AC arc based on RGB color space as claimed in claim 1, characterized in that: In step one, the image is filtered by using a mean filter.
3. The method for extracting morphological parameters of a long gap AC arc based on RGB color space as claimed in claim 1, characterized in that: In step 2, a small amount of pixels are lost in the main part of the obtained arc, and the lost part of the single pixel width inside the arc needs to be supplemented.
4. The method for extracting morphological parameters of a long gap AC arc based on RGB color space as claimed in claim 1, characterized in that: In step 4, the K3M skeleton extraction algorithm specifically includes the following steps: Select a 3´3 size pre-selected box and determine the arc pixel position by assigning different weights to different positions. ; Since the essence of skeleton extraction is to refine the arc image, the situation near the pixel is represented by summing N matrices. At the same time, all the situations that need to be deleted are listed based on experience, and pixels are continuously deleted in multiple cycles until they cannot be deleted.
5. A method for extracting morphological parameters of a long gap AC arc based on RGB color space as claimed in claim 1 or 3, characterized in that: In step 4, the obtained arc skeleton with a single pixel width is limited by its own shape, resulting in the existence of many branches in the arc skeleton. The branches need to be deleted to obtain the arc trunk.
6. A method for extracting morphological parameters of a long gap AC arc based on RGB color space as claimed in claim 5, characterized in that: The specific judgment logic for deleting branches to obtain the arc trunk is as follows: starting from the lower end point of the arc, go up along the arc skeleton, and when encountering a bifurcation point, store the bifurcation point information, and explore each bifurcation route. The length of each route is used as the standard for judging the arc trunk. When encountering the next bifurcation point during the bifurcation route exploration process, retain the previous bifurcation point information and give priority to judging the latest bifurcation point.