CN112652023A - Power grid commutation failure line range division algorithm based on color interpolation - Google Patents
Power grid commutation failure line range division algorithm based on color interpolation Download PDFInfo
- Publication number
- CN112652023A CN112652023A CN202011383615.9A CN202011383615A CN112652023A CN 112652023 A CN112652023 A CN 112652023A CN 202011383615 A CN202011383615 A CN 202011383615A CN 112652023 A CN112652023 A CN 112652023A
- Authority
- CN
- China
- Prior art keywords
- equivalent
- value
- point
- different
- pixel
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/90—Determination of colour characteristics
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/30—Circuit design
- G06F30/31—Design entry, e.g. editors specifically adapted for circuit design
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2113/00—Details relating to the application field
- G06F2113/04—Power grid distribution networks
Landscapes
- Engineering & Computer Science (AREA)
- Computer Hardware Design (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Evolutionary Computation (AREA)
- Geometry (AREA)
- General Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Processing (AREA)
- Image Generation (AREA)
Abstract
The invention discloses a power grid commutation failure line range division algorithm based on color interpolation, which comprises the following steps of: 1) dividing the center point into different sets S according to the value of the equivalent center pointiDetermining the coordinate positions of different equivalent center points in the screen space; 2) calculating the influence degree value corresponding to each pixel point near the equivalent center point according to the distance from the pixel point to the equivalent center point; 3) according to the numerical value of each equivalent center point, storing the influence degree value in different equivalent layers by a gray value; 4) superposing and synthesizing a plurality of different equivalent layers, and calculating the superposition comprehensive influence degree of each pixel point to determine a set S to which each pixel point belongsi(ii) a 5) Filling set SiAnd drawing a range-dividing coloring graph by the color of each pixel point. The algorithm of the present invention fills in different center points by color interpolationThe coverage range of (2) is naturally divided into the boundaries of various equivalent ranges, and the non-convex hull equivalent range can be obtained under the complexity of 'O (n').
Description
Technical Field
The invention relates to the field of data visualization analysis, in particular to a power grid commutation failure line range division algorithm based on color interpolation.
Background
The electromechanical-electromagnetic hybrid simulation evaluation technology needs to form batch transient stable operation according to faults, and needs to count lines with commutation failure in batch operation and manually color areas with the same statistical value. Because the number of the geographical wiring diagrams of the power grid is large, and the same number of failed lines are scattered in different areas of the geographical wiring diagrams and are in extremely irregular shapes, the geographical wiring diagrams are not convex hulls in the traditional sense. Fig. 2 lists the value range division of a manually filled commutation failure line in a real scene of electromechanical-electromagnetic hybrid simulation evaluation.
The contour line algorithm based on the Marching Square cannot meet the requirements of non-convex hull equivalent range division and color filling. Matt Duckham et al propose a method for calculating a non-convex hull edge polygon based on a Delaunay triangle structure point set, and the basic idea is shown in FIG. 3. The method for calculating the edge curve of the sampling point by the non-convex hull is only suitable for the scene with dense sampling points. Similarly, some scholars propose approximate edge polygon calculation methods based on Voronoi diagrams. The computational complexity of the two algorithms is "O (nlgn), and n is the number of points. However, none of these algorithms identify disconnected equivalence ranges.
Disclosure of Invention
The invention provides an equivalent range division algorithm based on color interpolation, which aims to solve the defects that the computation complexity of a non-convex boundary polygon is high and the density of equivalent center points is required to be high in the equivalent range division problem.
In order to achieve the above purpose, the invention adopts the following technical scheme:
a power grid commutation failure line range division algorithm based on color interpolation comprises the following steps:
1) according to the value of the equivalent center pointThe centre points being divided into different sets SiDetermining the coordinate positions of different equivalent center points in the screen space;
2) calculating the influence degree value corresponding to each pixel point near the equivalent center point according to the distance from the pixel point to the equivalent center point;
3) according to the numerical value of each equivalent center point, storing the influence degree value in different equivalent layers by a gray value;
4) superposing and synthesizing a plurality of different equivalent layers, and calculating the superposition comprehensive influence degree of each pixel point to determine a set S to which each pixel point belongsi;
5) Filling set SiAnd drawing a range-dividing coloring graph by the color of each pixel point.
Preferably, the specific process of step 1) includes:
1.1) dividing the center points into different sets S according to the value of the equivalent center pointsi;
1.2) for each set SiThe inner equivalent center point is assigned with the same gray original value ui;
1.3) aligning the screen coordinate origin with the center point set coordinate origin;
1.4) calculating the coordinates of each central point in the different point sets in the screen.
Preferably, the calculation process of step 2) includes:
2.1) calculating pixel points (x, y) to corresponding equivalent center points (x)i,yi) A distance d of;
2.2) calculating the influence degree of the pixel points (x, y) according to the distance d;
2.3) if the affected degree value is lower than the set threshold epsilon, stopping calculating the farther pixel point.
Preferably, the calculation formula adopted in step 2.2) is as follows:
wherein alpha is less than 0, uiIs the gray scale original value.
Preferably, in the step 3), the influence degree values are respectively stored in the pixel points corresponding to the picture in a two-dimensional texture form.
Preferably, in the step 4), a final gray value component is obtained by performing linear superposition according to the mixed influence factor through a predefined layer color, and the final gray value component is used as the comprehensive influence degree of superposition.
Further preferably, the calculation process of step 4) includes:
4.1) setting the degree of influence value of the corresponding coordinate of each layer as ax,y,iThe gray value of the layer is uiThe influence probability of each layer isThe influence probability is the ratio of the number of center points of each layer to the total number of the center points, and can be calculated as follows:
wherein C isiThe number of center points of the layer i is shown, and S is the total number of center points;
the calculation formula corresponding to the superposition comprehensive influence degree is as follows:
4.2) determining the equivalent range to which each pixel point belongs:
the gray value of each equivalence range is compared to determine the equivalence range to which the pixel belongs, and the calculation formula is as follows:
adding (x, y) pixels into the set S when the superposition comprehensive influence degree is closest to the gray value of the layer iiAnd if the superposition comprehensive influence degree is greatly different from the gray value of any image layer, the pixel is not processed.
Preferably, the specific calculation process of step 5) includes:
step 5.1) distributing different RGB values for different equivalent division ranges;
and 5.2) filling colors according to the equivalent range to which each pixel point belongs to draw a coloring image.
The algorithm fills the coverage ranges of different central points through color interpolation, naturally divides the boundaries of various equivalent ranges, and can obtain the non-convex hull equivalent range under the complexity of O (n); since the present algorithm is based on pixel computation, its edges are smoother in high resolution screen space.
Drawings
FIG. 1 is a flow chart of a power grid commutation failure line range division algorithm based on color interpolation;
FIG. 2 is a manual plot of commutation failure line range division;
FIG. 3 is a non-convex hull edge polygon method for constructing a set of points based on Delaunay triangles;
FIG. 4 shows the partitioning of a set of points for three different equivalence ranges;
FIG. 5 is a diagram of the actual effect of a single equivalence range;
FIG. 6 is a diagram of actual effect of dividing 6 equivalent ranges of a power grid commutation failure line;
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention, however, the present invention may be practiced in other ways than those specifically described herein, and thus the present invention is not limited to the specific embodiments disclosed below.
As shown in fig. 1, the implementation method of the power grid commutation failure line range division algorithm based on color interpolation specifically includes the following steps:
(1) determining the spatial positions of different equivalent center points on a screen;
a) dividing the central point into different point sets S according to the numerical value of the equivalent central pointiFIG. 4 shows different center point divisions with the same value, wherein the point set with value 1 is { (1, 1, 1), (2, 0, 1), (2, 3, 1), (4, 1, 1) } and the point set with value 3 is { (0, 4, 3), (1, 7, 3), (2, 5, 3), (4, 4, 3) } and the point set with value 6 is { (3, 8, 6), (5, 6, 6), (5, 9, 6), (6, 7, 6), (6, 8, 8) }, where the first two bits are coordinate values and the last bit is an equivalent value;
b) assigning the same gray value u to the central point of each isopoint setiFor convenience of subsequent calculation, the gray value is set to be [0, 255] according to the equivalent value]Scaling the range in equal proportion;
c) aligning the screen coordinate origin with the center point set coordinate origin;
d) the coordinates of each center point in the different point sets in the screen are calculated.
(2) Calculating the influence degree of each pixel point near the equivalent central point in the screen space;
a) calculating pixel point (x, y) to center point (x)i,yi) A distance d of;
b) the affected degree calculation formula of the pixel point (x, y) is as follows:
wherein alpha is less than 0, uiIs the gray scale original value.
c) And if the affected degree value is lower than the threshold epsilon, stopping calculating the farther pixel points, wherein the threshold epsilon can be determined according to the distribution density of the points.
(3) The influence degree values are stored in different layers by gray values;
a) establishing a two-dimensional array for each center point set, wherein the point sets with the equivalent values of 1, 3 and 6 in the figure 4 respectively correspond to the three two-dimensional arrays, and the actual size is dynamically adjusted according to the calculation in the last step;
b) respectively storing the influence degree values of the pixel points in the step (2) into different two-dimensional arrays according to pixel coordinates;
c) the two-dimensional array is stored in the GPU memory by the pixel value of the coloring image, so that the next calculation is facilitated.
(4) Performing superposition synthesis calculation on a plurality of different equivalent layers;
considering that any pixel point in the screen space may be influenced by different equivalent layers, the comprehensive influence degree of the pixel point is calculated according to the influence probability mixing superposition of different layers.
Setting the degree of influence value of the corresponding coordinate of each layer as ax,y,iThe gray value of the layer is uiThe influence probability of each layer isThe influence probability is the ratio of the number of center points of each layer to the total number of the center points, and can be calculated as follows:
wherein C isiThe number of the center points of the layer i is shown, and S is the total number of the center points.
The calculation formula corresponding to the superposition comprehensive influence degree is as follows:
since the total influence probability of each layer is 1, namely:
the easy verification is that the superposition calculation formula is irrelevant to the layer superposition sequence, and the original numerical values of [0, 255] are superposed without exceeding the [0, 255] interval.
The comprehensive overlapping influence degree of any pixel point can be obtained according to the calculation, the equivalence range to which the pixel point belongs can be determined by comparing the gray value of each equivalence range, and the calculation formula is as follows:
adding (x, y) pixels into the set S when the superposition comprehensive influence degree is closest to the gray value of the layer iiAnd if the superposition comprehensive influence degree is greatly different from the gray value of any image layer, the pixel is not processed.
And storing the result of the mixed calculation into a new coloring image texture and storing the new coloring image texture in the GPU equipment.
(5) Color drawing division range coloring graph for filling each pixel point
Set S of OpenGL texture shader pairsiAll screen pixel points in the image processing system assign the same color value and generate an image, the edge of a divided region is smooth, and nonadjacent equivalent ranges can be distinguished. FIG. 5 lists the single equivalent range dividing effect of the commutation failure line for actual data, wherein the colored area in the graph is a non-convex polygon, and the edge of the dividing result is smooth. Fig. 6 lists the actual partitioning coloring effect of 6 iso-ranges, the different iso-ranges are well-defined and the edges are smooth.
The above description is only exemplary of the preferred embodiments of the present invention, and is not intended to limit the present invention, and any modifications, equivalents, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (8)
1. A power grid commutation failure line range division algorithm based on color interpolation is characterized by comprising the following steps:
1) dividing the center point into different sets S according to the value of the equivalent center pointiDetermining the coordinate positions of different equivalent center points in the screen space;
2) calculating the influence degree value corresponding to each pixel point near the equivalent center point according to the distance from the pixel point to the equivalent center point;
3) according to the numerical value of each equivalent center point, storing the influence degree value in different equivalent layers by a gray value;
4) superposing and synthesizing a plurality of different equivalent layers, and calculating the superposition comprehensive influence degree of each pixel point to determine a set S to which each pixel point belongsi;
5) Filling set SiAnd drawing a range-dividing coloring graph by the color of each pixel point.
2. The grid commutation failure line range division algorithm based on color interpolation according to claim 1, wherein the specific process of the step 1) comprises:
1.1) dividing the center points into different sets S according to the value of the equivalent center pointsi;
1.2) for each set SiThe inner equivalent center point is assigned with the same gray original value ui;
1.3) aligning the screen coordinate origin with the center point set coordinate origin;
1.4) calculating the coordinates of each central point in the different point sets in the screen.
3. The grid commutation failure line range division algorithm based on color interpolation according to claim 1, wherein the calculation process of the step 2) comprises:
2.1) calculating pixel points (x, y) to corresponding equivalent center points (x)i,yi) A distance d of;
2.2) calculating the influence degree of the pixel points (x, y) according to the distance d;
2.3) if the affected degree value is lower than the set threshold epsilon, stopping calculating the farther pixel point.
5. The power grid commutation failure line range division algorithm based on color interpolation according to claim 1, wherein in the step 3), the influence degree values are respectively stored in pixel points corresponding to the picture in a form of two-dimensional texture.
6. The power grid commutation failure line range division algorithm based on color interpolation according to claim 1, wherein in the step 4), a final gray value component is obtained by linear superposition according to a mixed influence factor through a predefined layer color, and the final gray value component is used as a superposition comprehensive influence degree.
7. The grid commutation failure line range division algorithm based on color interpolation according to claim 6, wherein the calculation process of the step 4) comprises:
4.1) setting the degree of influence value of the corresponding coordinate of each layer as ax,y,iThe gray value of the layer is uiThe influence probability of each layer isThe influence probability is the ratio of the number of center points of each layer to the total number of the center points, and can be calculated as follows:
wherein C isiThe number of center points of the layer i is shown, and S is the total number of center points;
the calculation formula corresponding to the superposition comprehensive influence degree is as follows:
4.2) determining the equivalent range to which each pixel point belongs:
the gray value of each equivalence range is compared to determine the equivalence range to which the pixel belongs, and the calculation formula is as follows:
adding (x, y) pixels into the set S when the superposition comprehensive influence degree is closest to the gray value of the layer iiAnd if the superposition comprehensive influence degree is greatly different from the gray value of any image layer, the pixel is not processed.
8. The grid commutation failure line range division algorithm based on color interpolation according to claim 7, wherein the specific calculation process of the step 5) comprises:
step 5.1) distributing different RGB values for different equivalent division ranges;
and 5.2) filling colors according to the equivalent range to which each pixel point belongs to draw a coloring image.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011383615.9A CN112652023B (en) | 2020-11-30 | 2020-11-30 | Power grid commutation failure line range division algorithm based on color interpolation |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011383615.9A CN112652023B (en) | 2020-11-30 | 2020-11-30 | Power grid commutation failure line range division algorithm based on color interpolation |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112652023A true CN112652023A (en) | 2021-04-13 |
CN112652023B CN112652023B (en) | 2023-04-14 |
Family
ID=75351069
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011383615.9A Active CN112652023B (en) | 2020-11-30 | 2020-11-30 | Power grid commutation failure line range division algorithm based on color interpolation |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112652023B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117523153A (en) * | 2024-01-08 | 2024-02-06 | 中国核动力研究设计院 | Three-dimensional visualization method and device for reactor core data |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001053977A (en) * | 1999-08-09 | 2001-02-23 | Max Co Ltd | Color picture contour line extracting device |
US20060044323A1 (en) * | 2004-08-27 | 2006-03-02 | Alias Systems | Transparency and/or color processing |
US20060176304A1 (en) * | 2005-02-04 | 2006-08-10 | Lilian Ji | Method and apparatus for rapid shading in a raster image processor |
CN101477695A (en) * | 2009-01-05 | 2009-07-08 | 东南大学 | Method for fast painting image and video |
CN110795463A (en) * | 2019-06-27 | 2020-02-14 | 浙江大学 | Mass time series data visualization method for transient analysis of power system |
-
2020
- 2020-11-30 CN CN202011383615.9A patent/CN112652023B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001053977A (en) * | 1999-08-09 | 2001-02-23 | Max Co Ltd | Color picture contour line extracting device |
US20060044323A1 (en) * | 2004-08-27 | 2006-03-02 | Alias Systems | Transparency and/or color processing |
US20060176304A1 (en) * | 2005-02-04 | 2006-08-10 | Lilian Ji | Method and apparatus for rapid shading in a raster image processor |
CN101477695A (en) * | 2009-01-05 | 2009-07-08 | 东南大学 | Method for fast painting image and video |
CN110795463A (en) * | 2019-06-27 | 2020-02-14 | 浙江大学 | Mass time series data visualization method for transient analysis of power system |
Non-Patent Citations (3)
Title |
---|
KLAUS ENGEL,ET AL: "Hihg-quality pre-integrated volume rendering using hardware-accelerated pixel shading", 《PROCEEDINGS OF THE ACM SIGGRAPH/EUROGRAPHICS WORKSHOP ON GRAPHICS HARDWARE》 * |
张雄辉 等: "基于区域划分的快速图像插值算法", 《图形、图像与多媒体》 * |
胥值礼 等: "直方图均衡化技术在矢量等值填充图中的算法及实现", 《物探化探计算技术》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117523153A (en) * | 2024-01-08 | 2024-02-06 | 中国核动力研究设计院 | Three-dimensional visualization method and device for reactor core data |
CN117523153B (en) * | 2024-01-08 | 2024-03-26 | 中国核动力研究设计院 | Three-dimensional visualization method and device for reactor core data |
Also Published As
Publication number | Publication date |
---|---|
CN112652023B (en) | 2023-04-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107767382B (en) | The extraction method and system of static three-dimensional map contour of building line | |
CN110969624A (en) | Laser radar three-dimensional point cloud segmentation method | |
CN108510562B (en) | Digital camouflage pattern generation method based on image fractal texture | |
CN104318605B (en) | Parallel lamination rendering method of vector solid line and three-dimensional terrain | |
CN107564087A (en) | A kind of Three-D linear symbol rendering intent based on screen | |
CN102708369A (en) | Sea ice parameter extraction method on basis of satellite image | |
CN110176053B (en) | Large-scale live-action three-dimensional integral color homogenizing method | |
CN105046735A (en) | Three-dimensional surface texture synthesis method based on primitive element distribution | |
CN112652023B (en) | Power grid commutation failure line range division algorithm based on color interpolation | |
CN110378992A (en) | Towards large scene model web terminal dynamic rendering LOD processing method | |
CN106500626A (en) | A kind of mobile phone stereoscopic imaging method and three-dimensional imaging mobile phone | |
CN106528942A (en) | Data visualization method based on neutron transport characteristic line theory | |
CN110322547A (en) | A kind of adaptive Tetrahedron subdivision method of reservoir | |
CN109918858B (en) | CST simulation antenna data visualization method | |
US11037357B2 (en) | Pixelation optimized delta color compression | |
CN112668197A (en) | Power grid commutation failure line range division algorithm based on color interpolation | |
US11348261B2 (en) | Method for processing three-dimensional point cloud data | |
CN108280870A (en) | A kind of point cloud model texture mapping method and system | |
CN108230430A (en) | The processing method and processing device of cloud layer shade figure | |
CN110276270A (en) | A kind of high-resolution remote sensing image building area extracting method | |
CN114863258B (en) | Method for detecting small target based on visual angle conversion in sea-sky-line scene | |
WO2020095292A1 (en) | A method for transforming 3-dimensional image data into a 2-dimensional image | |
CN114549714A (en) | WebGL-based rendering method for three-dimensional wind graph visualization | |
EP3437072B1 (en) | System and method for rendering points without gaps | |
CN115082597A (en) | Palette-based image recoloring method and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |