Method and system for automatically optimizing color and transparency of overlapped and crossed data
By calculating intra-class correlation and inter-class non-correlation, and optimizing color palette and transparency, the problem of difficult-to-distinguish category distribution in overlapping cross-data visualization is solved, and the efficiency of visual analysis is improved.
Patent Information
- Application Number
- CN202410724101.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-05
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2044-06-05
AI Technical Summary
In the existing technology, in overlapping and cross-data visualization, color mixing makes it difficult to distinguish category distributions, which reduces the user's perception of different categories of data distribution and the efficiency of visual analysis.
By receiving classification data, calculate intra-class correlation, inter-class non-correlation and color distinction, use weighted and scoring functions to optimize the color palette and transparency, maximize the color name similarity between mixed colors and category colors, and improve the overall and connections between parts.
It enhances the user's perception of the distribution of different categories of data and improves the efficiency of visual analysis, especially the data comparison task in semi-transparent data visualization.
Smart Images

Figure CN118733664A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of data visualization, and in particular relates to a method and system for automatically optimizing the color and transparency of overlapping and intersecting data. Background Art
[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.
[0003] In categorical data, overlapping and intersecting data are common. Due to the mutual occlusion between different categories, the data distribution of the overlapping and intersecting data visualization results is difficult to distinguish. In the above situation, semi-transparent rendering is usually used to improve the efficiency of understanding data distribution, such as overlapping histograms, Venn diagrams, and multivariate parallel coordinate systems. These charts can help users efficiently complete the task of comparing data distribution by overlapping data of different categories. Different categories are usually coded by color, and the occlusion problem between data is reduced by transparency blending technology. However, this rendering process will produce a variety of new colors due to the mixing of colors, which affects people's perception of the whole and parts of the category distribution. For example, mixing red and blue will produce purple, and users are likely to regard purple as a separate category, thus causing category ambiguity.
[0004] In response to the above problems, we are currently looking for solutions from the following three different aspects:
[0005] Solution 1 is to use the semi-transparency effect in the visualization, which may damage the perception of the data distribution represented by the background color and cannot completely eliminate the wrong color;
[0006] Solution 2 is the color optimization method, which is currently designed for opaque visualization and is not suitable for semi-transparent visualization;
[0007] Solution three is to perceive the data distribution in the histogram, but currently it is difficult to understand such a histogram, which is affected by many different factors.
[0008] In summary, the current rendering optimization method is not suitable for overlapping and intersecting data, which makes it difficult to distinguish the data distribution of the overlapping and intersecting data visualization results, reducing the user's perception of the distribution of different categories of data and the efficiency of visual analysis. Summary of the invention
[0009] In order to solve the problem that the current rendering optimization method is not suitable for overlapping and intersecting data, which makes the data distribution of the visualization results of overlapping and intersecting data difficult to distinguish, and reduces the user's perception of the distribution of data of different categories and the efficiency of visual analysis, the present invention provides a method and system for automatic optimization of color and transparency of overlapping and intersecting data, which comprehensively considers the spatial distribution of data and the correlation between colors, and improves the connection between the whole and the part by maximizing the color name similarity between the mixed color and the category color, thereby enhancing the user's perception of the distribution of data of different categories and improving the efficiency of visual analysis.
[0010] In order to achieve the above object, the present invention adopts the following technical solution:
[0011] A first aspect of the present invention provides a method for automatically optimizing the color and transparency of overlapping and intersecting data.
[0012] In one or more embodiments, a method for automatically optimizing the color and transparency of overlapping and intersecting data is provided, comprising:
[0013] Receiving the classified data and drawing it into the screen space, and obtaining specific distribution information of the classified data;
[0014] Based on the distribution information, the number of mixed colors, the color association matrix corresponding to the mixed colors, the number of pixels occupied by different colors, and the neighbor relationship between different colors are counted, and then the intra-class association degree, the inter-class non-association degree and the color distinction degree are calculated;
[0015] Determine the scoring function of the classification data rendering scheme based on the weighted sum of the intra-class association degree, the inter-class unrelatedness degree and the color distinction degree;
[0016] Taking the maximum score value of the scoring function of the classification data rendering solution as the objective function, based on the preset initial solution and preset constraints and end conditions, the corresponding optimized palette, transparency and color rendering order are obtained;
[0017] Rendering of categorical data based on optimized palette, transparency and color rendering order;
[0018] Among them, the intra-class association is defined as the average color name similarity between the color of each overlapping area and multiple original colors of the overlapping area; the inter-class uncorrelation is defined as the average color name similarity between all unrelated colors; and the color distinction is defined as the color difference contrast based on the area size.
[0019] A second aspect of the present invention provides a system for automatically optimizing the color and transparency of overlapping and intersecting data.
[0020] In one or more embodiments, a system for automatically optimizing color and transparency of overlapping and intersecting data includes:
[0021] A classification data loading module, which is used to receive the classification data and draw it into the screen space to obtain specific distribution information of the classification data;
[0022] An evaluation index calculation module is used to calculate the number of mixed colors, the color association matrix corresponding to the mixed colors, the number of pixels occupied by different colors, and the neighbor relationship between different colors based on the distribution information, and then calculate the intra-class association, inter-class non-association and color distinction;
[0023] A scoring function determination module is used to determine a scoring function for a classification data rendering solution based on a weighted sum of intra-class association, inter-class non-association, and color distinction;
[0024] A rendering scheme optimization module is used to obtain the corresponding optimized color palette, transparency and color rendering order based on a preset initial solution and preset constraints and end conditions, taking the maximum score value of the scoring function of the classified data rendering scheme as the objective function;
[0025] A classification data rendering module, which is used to render classification data based on an optimized color palette, transparency, and color rendering order;
[0026] Among them, the intra-class association is defined as the average color name similarity between the color of each overlapping area and multiple original colors of the overlapping area; the inter-class uncorrelation is defined as the average color name similarity between all unrelated colors; and the color distinction is defined as the color difference contrast based on the area size.
[0027] A third aspect of the present invention provides a computer-readable storage medium.
[0028] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps in the method for automatically optimizing the color and transparency of overlapping and intersecting data as described above.
[0029] A fourth aspect of the present invention provides an electronic device.
[0030] An electronic device comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps in the method for automatically optimizing the color and transparency of overlapping and intersecting data as described above are implemented.
[0031] Compared with the prior art, the present invention has the following beneficial effects:
[0032] (1) The present invention utilizes the distribution information of classified data to count the number of mixed colors, the color association matrix corresponding to the mixed colors, the number of pixels occupied by different colors, and the neighbor relationship between different colors, calculates the intra-class association, inter-class unassociatedness, and color distinction, and then uses weighted summation to obtain a scoring function for the classified data rendering scheme; then, the maximum score value of the scoring function for the classified data rendering scheme is used as the objective function, based on a preset initial solution and preset constraints and end conditions, the corresponding optimized color palette, transparency, and color rendering order are obtained, and then the classified data is rendered; the spatial distribution of the data and the correlation between colors are comprehensively considered, and by maximizing the color name similarity between the mixed color and the category color, the connection between the whole and the part is improved, the user's perception of the distribution of data of different categories is enhanced, and the efficiency of visual analysis is improved.
[0033] (2) Based on the distribution of classified data, the present invention adopts a simulated annealing algorithm to automatically generate a coloring scheme. On the basis of considering the data distribution, the color name similarity and color distinction between colors are combined. By optimizing the color, transparency and rendering order assigned to each data category, the visualization effect of semi-transparent data is improved, thereby improving the efficiency of visual analysis, especially data comparison tasks. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0035] Figure 1 This is a schematic diagram of a method for automatically optimizing the color and transparency of overlapping and intersecting data according to an embodiment of the present invention;
[0036] Figure 2 A flow chart of a method for automatically optimizing the color and transparency of overlapping and intersecting data according to an embodiment of the present invention;
[0037] FIG3( a ) is a schematic diagram of precalculating pixel areas occupied by different color blocks on an overlapping histogram according to an embodiment of the present invention;
[0038] FIG3( b ) is a schematic diagram of precalculating the relationship between different color blocks and members on an overlapping histogram according to an embodiment of the present invention;
[0039] FIG3( c ) is a schematic diagram of pre-calculating a membership matrix on an overlapping histogram according to an embodiment of the present invention;
[0040] FIG3(d) is a schematic diagram of precalculating adjacency relationship graphs of different colors on overlapping histograms according to an embodiment of the present invention;
[0041] FIG4( a ) is a schematic diagram of the optimization result of the weight parameter setting (1, 0, 0) in the overlapping histogram according to an embodiment of the present invention;
[0042] FIG4( b ) is a schematic diagram of the optimization result of the weight parameter setting (0, 1, 0) in the overlapping histogram according to an embodiment of the present invention;
[0043] FIG4( c ) is a schematic diagram of the optimization result of the weight parameter setting (0, 0, 1) in the overlapping histogram according to an embodiment of the present invention;
[0044] FIG4( d ) is a schematic diagram of the optimization result of the weight parameter setting (1, 1, 1) in the overlapping histogram according to an embodiment of the present invention;
[0045] Figure 5 A schematic diagram of the results of applying the embodiment of the present invention to a parallel coordinate system;
[0046] Figure 6 A schematic diagram of the result of applying the embodiment of the present invention to the Venn diagram;
[0047] Figure 7 This is a schematic diagram of the structure of a system for automatically optimizing the color and transparency of overlapping and intersecting data according to an embodiment of the present invention;
[0048] Figure 8 Schematic diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0049] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0050] It should be noted that the following detailed descriptions are all illustrative and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0051] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0052] Figure 1 This is a schematic diagram of a method for automatically optimizing the color and transparency of overlapping and intersecting data according to an embodiment of the present invention; Figure 2 This is a flow chart of a method for automatically optimizing the color and transparency of overlapping and intersecting data according to an embodiment of the present invention. Figure 1 and Figure 2 The method for automatically optimizing the color and transparency of overlapping and intersecting data in this embodiment may include:
[0053] S101, receiving classification data and drawing it into the screen space to obtain specific distribution information of the classification data.
[0054] The classification data here are overlapping histograms, parallel coordinates, and Venn diagrams, as shown in Figure 4. Figure 5 and Figure 6 shown.
[0055] Given a classification data set, containing m data distributions M = {1, ..., m}, given a background color c b The goal is to find an appropriate color c for each data distribution i , the corresponding transparency attribute α i , and the rendering order of the color o i ; The final coloring solution includes the color set P = {c1, ..., c m}, the corresponding transparency set A = {α1, ..., α m}, and the color rendering order O=<o1,...,o m >.
[0056] S102, based on the distribution information, count the number of mixed colors, the color association matrix corresponding to the mixed colors, the number of pixels occupied by different colors, and the neighbor relationship between different colors, such as Figure 3(a)-Figure 3(d) , and then calculate the intra-class correlation, inter-class irrelevance and color distinction.
[0057] The membership relationship matrix M contains b×m elements, showing the relationship between each mixed color and different categories. n represents the number of mixed colors, m represents the number of data categories, and M ij Represents the i-th mixed color region R i is part of the jth class distribution (n≥i>m, m≥j≥1);
[0058] Adjacency graph of different colors, which shows the spatial distribution relationship between different mixed colors;
[0059] The pixel area occupied by different color blocks, and the size of the overall canvas occupied by different color areas, S i Represents the mixed color area R i size.
[0060] Among them, the intra-class association is defined as the average color name similarity between the color of each overlapping area and multiple original colors of the overlapping area; the inter-class uncorrelation is defined as the average color name similarity between all unrelated colors; and the color distinction is defined as the color difference contrast based on the area size.
[0061] In this embodiment, for each overlapping region, its association degree is defined as the color name similarity between the color of the region and the multiple original colors of the overlapping region.
[0062] Based on this definition, the intra-class association degree is defined as the average color name similarity between each overlapping area color and multiple original colors of the overlapping area.
[0063] The degree of intra-class correlation E WA The expression of (P, A, O) is:
[0064]
[0065] Among them, Ψ(i) represents the weight term; M j,i Represents the jth mixed color region R j is part of the i-th class distribution; n represents the number of mixed colors, m represents the number of data categories; M i ·M j Indicates whether the i-th region and the j-th region belong to the same class. When i and j have an association relationship, M i ·M j is 1, otherwise it is 0.
[0066] S(c i , c j ) represents a color name similarity measurement method based on the color-name count matrix T collected from data of large-scale online user experiments. Heer and Stone use cosine distance to measure the similarity between two colors c i and c j Color name similarity between:
[0067]
[0068] in, Indicates color c i The color name probability distribution, the larger the S(c i , c j ) indicates that the two colors have more similar names. In addition, a weight term Ψ(i) based on the class data distribution is integrated into the intra-class association, which contains two components: first, the class with more mixed color blocks should be optimized first to obtain better color association; second, if the ratio of the overlap to the overlapped part of a class is large, its corresponding weight should also be increased. Therefore, Ψ(i) is finally defined as:
[0069]
[0070] in, represents the number of overlapping regions of the i-th class, In short, the value of Ψ(i) allows users to consciously assign difficulty to the perceived data distribution i, so that overlapping areas that are difficult to identify are prioritized during the optimization process.
[0071] For mixed colors that do not belong to the same category, the distinction between categories is improved by reducing the similarity of the color names between the colors. BD (P, A, O) is defined as the average color name similarity between all unrelated colors:
[0072]
[0073] The first part of the score represents the average color name similarity between all unrelated colors, and the max function in the second part is used to avoid large differences between different colors.
[0074] The purpose of the scoring function is to make the color difference between different colors as large as possible, and at the same time, for smaller areas, they should have a higher contrast with the surrounding areas. To achieve this goal, we use the nearest neighbor graph that includes the region size to define color discrimination. Considering that the region size affects the perception of color difference (DASzafir. Modeling color difference for visualization design. IEEE Transactions on Visualization and Computer Graphics, 24(1): 392-401, 2018. doi: 10.1109 / TVCG.2017.2744359), the color discrimination is defined as:
[0075]
[0076] Among them, Ω(R i ) represents all neighbors of the ith region, S i Indicates region R i Here we will use S i Normalized based on the size of all regions, so S i ∈(0,1), larger S i Indicates that the region has a larger area. To further ensure that there is sufficient distinction between different regions, we introduce two hard constraints:
[0077] The minimum discernible difference constraint means that any two colors are distinguishable:
[0078]
[0079] Among them, D(c i , cj ) represents two colors c i and c j , η represents the CIEDE2000 color distance between two images (G. Sharma, W. Wu. and E. N. Dalal. The CIEDE2000 color-difference formula: implementation notes, supplementary test data, and mathematical observations. Color Research & Application, 30(1): 21-30, 2005. doi: 10.1002 / co1.20070), η represents the minimum perceptible difference threshold, which is set to 3 by default (Y. Yang, J. Ming, and N. Yu. Color image quality assessment based on CIEDE 2000. Advances in Multimedia, 2012: 11-11, 2012. doi: 10.1155 / 2012 / 273723).
[0080] Background contrast constraint, that is, the color of each area should have enough contrast with the background color to achieve better perception:
[0081]
[0082] Among them, LD(c i , c b ) represents color c i With background color c b The absolute value of the brightness difference between the two; σ is a constant coefficient, the default setting is 5.
[0083] S103, determining a scoring function for a classification data rendering solution according to a weighted sum of the intra-class association degree, the inter-class non-association degree, and the color distinction degree.
[0084] The specific scoring function is as follows:
[0085]
[0086] Among them, each weight term ω i It is a value between [0, 1] and is set to 1 by default. The three optimization items are Within-class Association (WA), Between-class Disassociation (BD), and Color Separability (CS).
[0087] The present invention sets a user-adjustable weight coefficient when calculating the overall visualization score. By adjusting the coefficient, visualization results with different emphases can be generated, such as better discrimination or better class association.
[0088] S104, taking the maximum score value of the score function of the classification data rendering solution as the objective function, and obtaining the corresponding optimized palette, transparency and color rendering order based on the preset initial solution and preset constraints and end conditions.
[0089] Optimize the palette, transparency, and color rendering order under the constraints of the minimum discernible difference and background contrast.
[0090] If the color palette is not given, multiple colors are randomly selected from the discretized color space as the initial color palette. In the subsequent optimization process, the three attribute values of brightness, hue and saturation of each color need to be perturbed to generate a new color palette.
[0091] Discrete color space, such as CIE Lab color space. CIE Lab color space is a uniform color space specified by CIE for color measurement. It is also the most widely used color space in color measuring instruments. This color space uses three dimensions to quantitatively describe color.
[0092] CIE Lab color space is the abbreviation of CIE1976L*a*b* uniform color space. CIE1976L*a*b* uniform color space is a nonlinear transformation of the CIE1931 standard colorimetry system. It converts the XYZ rectangular coordinate color space into cylindrical polar coordinates, and converts the tristimulus value XYZ into lightness L* and chromaticity a*, b* that are consistent with eye vision, where a*, b* are consistent with the sense of hue and saturation.
[0093] If a palette is given, it is used as the initial palette, and a new palette is generated by recombining the colors of the current palette in the subsequent optimization process.
[0094] The objective function is solved based on the simulated annealing algorithm, and the process is as follows:
[0095] S1041, randomly select m colors from the discretized color space to form an initial solution (m is the number of classes in the data), then initialize the transparency corresponding to each color, and then initialize the rendering order of the m colors. Set the initial temperature, cooling coefficient and minimum temperature.
[0096] S1042, check whether the current temperature is greater than the minimum temperature, if so, execute the next step, otherwise exit the iteration and return the final result.
[0097] S1043, randomly perturb the initial solution to obtain a new solution. Considering that the final coloring solution consists of three parts, namely, the color, transparency, and rendering order of each class, the color, transparency, or rendering order is randomly perturbed with the same probability in each iteration. If the palette color is given, the positions of two random colors in the palette are randomly changed, otherwise the color value of a certain color is changed.
[0098] S1044, check whether the new solutions satisfy the minimum discernible difference constraint and the background contrast constraint. If not, perturb the color until they are satisfied.
[0099] S1045, scoring the current solution;
[0100] S1046, if the score of the current solution is better than the previous solution, then accept the current solution; otherwise, with probability exp(ΔE / T t ) accepts the current solution, where ΔE represents the difference between the current solution and the previous solution.
[0101] T t is the current temperature.
[0102] S1047, lower the temperature according to the temperature reduction coefficient, and return to step S1042 to continue iteration.
[0103] S105, rendering the classification data based on the optimized color palette, transparency, and color rendering order;
[0104] The present invention adopts a simulated annealing algorithm to automatically solve the optimal coloring scheme, wherein the scoring of the solution combines color name similarity, color distinction, spatial distance, minimum perceptible difference, and background contrast. The final coloring result optimizes the color, transparency and rendering order of each data category, which can effectively reduce the generation of erroneous colors, enhance the overall perception of different colors in the same category, and improve the efficiency of data visual analysis.
[0105] It should be noted here that, in other embodiments, in addition to using the simulated annealing algorithm to solve the objective function, other existing algorithms may also be used to solve it, such as a particle swarm algorithm, etc., which will not be described in detail here.
[0106] Figure 7 Schematic diagram of the structure of a system for automatically optimizing the color and transparency of overlapping and intersecting data in an embodiment of the present invention. Figure 1 The color and transparency automatic optimization method of overlapping cross data corresponds to Figure 7 As shown, the color and transparency automatic optimization system of overlapping and intersecting data in this embodiment may include:
[0107] A classification data loading module 201 is used to receive the classification data and draw it into the screen space to obtain specific distribution information of the classification data;
[0108] An evaluation index calculation module 202 is used to calculate the number of mixed colors, the color association matrix corresponding to the mixed colors, the number of pixels occupied by different colors, and the neighbor relationship between different colors based on the distribution information, and then calculate the intra-class association, inter-class non-association and color distinction;
[0109] A scoring function determination module 203 is used to determine a scoring function for a classification data rendering solution based on a weighted sum of intra-class association, inter-class non-association, and color distinction;
[0110] A rendering scheme optimization module 204 is used to obtain a corresponding optimized color palette, transparency and color rendering order based on a preset initial solution and preset constraints and end conditions, taking the maximum score value of the scoring function of the classified data rendering scheme as the objective function;
[0111] A classification data rendering module 205 for rendering the classification data based on an optimized color palette, transparency, and color rendering order;
[0112] Among them, the intra-class association is defined as the average color name similarity between the color of each overlapping area and multiple original colors of the overlapping area; the inter-class uncorrelation is defined as the average color name similarity between all unrelated colors; and the color distinction is defined as the color difference contrast based on the area size.
[0113] Specifically, in the rendering scheme optimization module 204, the color palette, transparency and color rendering order are optimized under the minimum discernible difference constraint and the background contrast constraint.
[0114] In the rendering scheme optimization module 204, if a color palette is not given, multiple colors are randomly selected from the discretized color space as the initial color palette. In the subsequent optimization process, the three attribute values of brightness, hue and saturation of each color need to be disturbed to generate a new color palette.
[0115] Discrete color space, such as CIE Lab color space. CIE Lab color space is a uniform color space specified by CIE for color measurement. It is also the most widely used color space in color measuring instruments. This color space uses three dimensions to quantitatively describe color.
[0116] CIE Lab color space is the abbreviation of CIE1976L*a*b* uniform color space. CIE1976L*a*b* uniform color space is a nonlinear transformation of the CIE1931 standard colorimetry system. It converts the XYZ rectangular coordinate color space into cylindrical polar coordinates, and converts the tristimulus value XYZ into lightness L* and chromaticity a*, b* that are consistent with eye vision, where a*, b* are consistent with the sense of hue and saturation.
[0117] In the rendering scheme optimization module 204, if a color palette is given, the given color palette is used as the initial color palette, and a new color palette is generated by recombining the colors of the current color palette in the subsequent optimization process.
[0118] Figure 7 The specific implementation process of modules 201 to 205 in the color and transparency automatic optimization system for overlapping and intersecting data is shown in FIG. Figure 1 The specific implementation process of steps S101 to 105 is the same as that of FIG. 1 and will not be described in detail here.
[0119] Reference Figure 8 , a schematic diagram of an electronic device is given. It should be noted that, Figure 8 The electronic device 100 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0120] like Figure 8 As shown, the electronic device 300 includes a central processing unit (CPU) 301, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 302 or the program loaded from the storage part 108 into the random access memory (RAM) 303. In the RAM 303, various programs and data required for system operation are also stored. The central processing unit 301, the ROM 302 and the RAM 303 are connected to each other through a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.
[0121] The following components are connected to the I / O interface 305: an input section 306 including a keyboard, a mouse, etc.; an output section 307 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 308 including a hard disk, etc.; and a communication section 309 including a network interface card such as a local area network (LAN) card, a modem, etc. The communication section 309 performs communication processing via a network such as the Internet. The drive 110 is also connected to the I / O interface 305 as needed. A removable medium 311, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 310 as needed, so that a computer program read therefrom is installed into the storage section 308 as needed.
[0122] When the central processing unit 301 in the electronic device of this embodiment executes the program, the following is achieved: Figure 1 The steps in the method for automatically optimizing the color and transparency of overlapping and intersecting data are shown.
[0123] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer readable medium, the computer program including a computer program for executing Figure 1 In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 309, and / or installed from the removable medium 311. When the computer program is executed by the central processing unit 301, various functions defined in the apparatus of the present application are executed.
[0124] in, Figure 1 The computer program instructions corresponding to the method shown may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0125] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0126] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for automatically optimizing the color and transparency of overlapping and intersecting data, characterized in that: include: Receiving the classified data and drawing it into the screen space, and obtaining specific distribution information of the classified data; Based on the distribution information, the number of mixed colors, the color association matrix corresponding to the mixed colors, the number of pixels occupied by different colors, and the neighbor relationship between different colors are counted, and then the intra-class association degree, the inter-class non-association degree and the color distinction degree are calculated; Determine the scoring function of the classification data rendering scheme based on the weighted sum of the intra-class association degree, the inter-class unrelatedness degree and the color distinction degree; Taking the maximum score value of the scoring function of the classification data rendering solution as the objective function, based on the preset initial solution and preset constraints and end conditions, the corresponding optimized palette, transparency and color rendering order are obtained; Rendering of categorical data based on optimized palette, transparency and color rendering order; Among them, the intra-class association is defined as the average color name similarity between the color of each overlapping area and multiple original colors of the overlapping area; the inter-class uncorrelation is defined as the average color name similarity between all unrelated colors; and the color distinction is defined as the color difference contrast based on the area size.
2. The method for automatically optimizing the color and transparency of overlapping and intersecting data according to claim 1, characterized in that: Optimize the palette, transparency, and color rendering order under the constraints of the minimum discernible difference and background contrast.
3. The method for automatically optimizing the color and transparency of overlapping and intersecting data according to claim 1, characterized in that: If the color palette is not given, multiple colors are randomly selected from the discretized color space as the initial color palette. In the subsequent optimization process, the three attribute values of brightness, hue and saturation of each color need to be perturbed to generate a new color palette; If a palette is given, it is used as the initial palette, and a new palette is generated by recombining the colors of the current palette in the subsequent optimization process.
4. The method for automatically optimizing the color and transparency of overlapping and intersecting data according to claim 1, characterized in that: If a palette is given, the colors in the current palette are recombined.
5. The method for automatically optimizing the color and transparency of overlapping and intersecting data according to claim 1, characterized in that: The objective function is solved based on the simulated annealing algorithm.
6. A color and transparency automatic optimization system for overlapping and intersecting data, characterized in that: include: A classification data loading module, which is used to receive the classification data and draw it into the screen space to obtain specific distribution information of the classification data; An evaluation index calculation module is used to calculate the number of mixed colors, the color association matrix corresponding to the mixed colors, the number of pixels occupied by different colors, and the neighbor relationship between different colors based on the distribution information, and then calculate the intra-class association, inter-class non-association and color distinction; A scoring function determination module is used to determine a scoring function for a classification data rendering solution based on a weighted sum of intra-class association, inter-class non-association, and color distinction; A rendering scheme optimization module is used to obtain the corresponding optimized color palette, transparency and color rendering order based on a preset initial solution and preset constraints and end conditions, taking the maximum score value of the scoring function of the classified data rendering scheme as the objective function; A classification data rendering module, which is used to render classification data based on an optimized color palette, transparency, and color rendering order; Among them, the intra-class association is defined as the average color name similarity between the color of each overlapping area and multiple original colors of the overlapping area; the inter-class uncorrelation is defined as the average color name similarity between all unrelated colors; and the color distinction is defined as the color difference contrast based on the area size.
7. The color and transparency automatic optimization system of overlapping and intersecting data as claimed in claim 6, characterized in that: In the rendering scheme optimization module, the color palette, transparency and color rendering order are optimized under the constraints of minimum discernible difference and background contrast.
8. The color and transparency automatic optimization system of overlapping and intersecting data as claimed in claim 6, characterized in that: In the rendering scheme optimization module, if a color palette is not given, multiple colors are randomly selected from the discretized color space as the initial color palette. In the subsequent optimization process, the three attribute values of brightness, hue and saturation of each color need to be perturbed to generate a new color palette; If a palette is given, it is used as the initial palette, and a new palette is generated by recombining the colors of the current palette in the subsequent optimization process.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method for automatically optimizing the color and transparency of overlapping and intersecting data as described in any one of claims 1 to 5 are implemented.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps in the method for automatically optimizing the color and transparency of overlapping and intersecting data according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Classified data multi-view visual coloring method and system based on similar significance
CN113345052A
Chrominance image matting method and device and video live broadcast system
CN117274141A
RNA-disease incidence relation visual analysis method based on density relation graph
CN117275748A
Cited By
Hierarchical mapping data visual coloring method and device based on extended adjacency matrix, equipment, medium and program product
CN122134848A
Hierarchical mapping data visualization coloring method and device based on extended adjacency matrix, equipment, medium and program product
CN122134848B
