Data visualization method and device, electronic equipment and computer readable storage medium
By introducing opacity as a supplement to color mapping, the traditional ribbon map has solved the shortcomings in display effect and adjustment of freedom, and the highlighting of the area of interest and the filtering of the area of interest is achieved, which improves the improvement of the area of interest. Effects and flexibility of data visualization.
Patent Information
- Application Number
- CN202411523266.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-02-21
AI Technical Summary
The traditional ribbon graph has shortcomings in the display effect of data values and the degree of freedom to adjust the ribbon variation range, and it is difficult to effectively highlight the area of interest and filter the area of interest.
By introducing opacity as a supplement to the color map, the filter intervals that can be adjusted are added, and the opacity is determined based on the distance between the measured value and the filter interval, thereby highlighting the area of interest corresponding to the measured value away from the filter interval and realizing the lack of interest. Filtering of the area.
The display effect of data visualization is improved, allowing users to observe changes in the region of interest more intuitively, and at the same time, the freedom to adjust the range of ribbon changes is increased, allowing users to accurately adjust the ribbon to the numerical interval of interest.
Smart Images

Figure CN119494905A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to a data visualization method, device, electronic device and computer-readable storage medium. Background Art
[0002] A color band diagram is an image used to represent the correspondence between data values and colors, where different colors represent different data values. A color band diagram can visualize data and help users understand data changes. For example, when comparing the data difference between the measured three-dimensional face model and the reference model, the difference can be represented by a color band, that is, the three-dimensional face model can be colored based on the acquired difference data to obtain a difference data color band diagram; obviously, different colors in the difference data color band diagram correspond to different differences, so that users can intuitively see the size of the data difference in different areas through the colors in the difference data color band diagram.
[0003] Traditional color band charts have the following problems: the display effect of data values is poor, and the freedom of adjusting the color band variation range is not high. Summary of the invention
[0004] The object of the present invention is to provide a data visualization method, device, electronic device and computer-readable storage medium to improve the display effect and the adjustment freedom of the color band variation range.
[0005] In a first aspect, an embodiment of the present invention provides a data visualization method, including:
[0006] Obtaining visualization data and color band parameter data; wherein the visualization data includes a basic image and measurement values at multiple positions thereof, and the color band parameter data includes a color band upper limit value, a color band lower limit value, and a filter interval;
[0007] Determine the color information and opacity information corresponding to each position according to the visualization data and the color band parameter data; wherein the opacity corresponding to the measurement value of each position increases as the distance from the filter interval increases;
[0008] According to the color information and opacity information corresponding to each position, the basic image is colored to obtain the target visualization image.
[0009] Further, according to the visualization data and the color band parameter data, the color information and opacity information corresponding to each position are determined, including:
[0010] According to the color band parameter data, a color mapping function and an opacity function are determined;
[0011] The color information corresponding to each position is determined according to the measured value at each position and the color mapping function, and the opacity information corresponding to each position is determined according to the measured value at each position and the opacity function.
[0012] Further, according to the color band parameter data, a color mapping function and an opacity function are determined, including:
[0013] According to a preset color sequence, a color band interval consisting of a color band upper limit value and a color band lower limit value is divided into a plurality of sub-intervals, and an upper limit color and a lower limit color of each sub-interval are determined;
[0014] A color mapping function is generated according to the upper and lower limit colors of each sub-interval, the filter interval and the preset mapping rules; wherein the mapping rules include that the color corresponding to the first measurement value belonging to the filter interval is gray, and the color corresponding to the second measurement value not belonging to the filter interval is obtained by interpolating the upper and lower limit colors of the sub-interval to which it belongs.
[0015] Furthermore, the color mapping functions corresponding to the sub-intervals that do not belong to the filtering interval include:
[0016]
[0017] Among them, val u is the upper limit of the subinterval, val d is the lower limit of the subinterval, color u The upper limit color of the sub-interval, color d The lower limit color of the sub-interval.
[0018] Further, according to the color band parameter data, determining the color mapping function and the opacity function also includes:
[0019] Determine multiple segmented intervals corresponding to the opacity function according to the color band upper limit value, the color band lower limit value and the filtering interval;
[0020] An opacity function is generated according to a preset opacity rule; wherein the opacity rule includes that the opacity of the first segmented interval corresponding to the upper limit value of the color band to the upper limit value of the filter interval gradually changes from 1 to 0, the opacity of the second segmented interval corresponding to the filter interval is 0, and the opacity of the third segmented interval corresponding to the lower limit value of the filter interval to the lower limit value of the color band gradually changes from 0 to 1.
[0021] Further, the measured value is the difference between the actual value and the standard value, the color band upper limit value is equal to the absolute value of the color band lower limit value, and the filtering upper limit value of the filtering interval is equal to the absolute value of the filtering lower limit value of the filtering interval;
[0022] The first segmented interval and the third segmented interval are combined into a normalized interval, and the opacity function corresponding to the normalized interval is a preset nonlinear curve.
[0023] Further, the opacity information corresponding to each position is determined according to the measurement value at each position and the opacity function, including:
[0024] When the measured value at a position belongs to the normalized interval, take the absolute value of the measured value and divide it by the upper limit of the color band to obtain the input value corresponding to the position;
[0025] Substitute the input value corresponding to the position into the nonlinear curve and solve for the opacity value corresponding to the position.
[0026] In a second aspect, an embodiment of the present invention further provides a data visualization device, including:
[0027] An acquisition module, used to acquire visualization data and color band parameter data; wherein the visualization data includes a basic image and measurement values at multiple positions thereof, and the color band parameter data includes a color band upper limit value, a color band lower limit value, and a filter interval;
[0028] A determination module, used to determine the color information and opacity information corresponding to each position according to the visualization data and the color band parameter data; wherein the opacity corresponding to the measurement value of each position increases as the distance from the filtering interval increases;
[0029] The coloring module is used to color the basic image according to the color information and opacity information corresponding to each position to obtain a target visualization image.
[0030] In a third aspect, an embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program executable on the processor, and when the processor executes the computer program, the data visualization method of the first aspect is implemented.
[0031] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the data visualization method of the first aspect is executed.
[0032] The data visualization method, device, electronic device and computer-readable storage medium provided by the embodiment of the present invention can obtain visualization data and color band parameter data; wherein the visualization data includes the basic image and the measurement values at multiple positions thereof, and the color band parameter data includes the color band upper limit value, the color band lower limit value and the filter interval; according to the visualization data and the color band parameter data, the color information and opacity information corresponding to each position are determined; wherein the opacity corresponding to the measurement value at each position increases with the increase of the distance from the filter interval; according to the color information and opacity information corresponding to each position, the basic image is colored to obtain the target visualization image. In this way, by introducing opacity as a supplement to color mapping, the filter interval available for adjustment is increased, the area of interest corresponding to the measurement value far from the filter interval is highlighted, and the filtering of the uninterested area corresponding to the filter interval is realized, so as to facilitate user observation and improve the display effect; at the same time, the user can not only adjust the color band upper limit value and the color band lower limit value, but also adjust the filter interval. The adjustment of the filter interval facilitates the user to accurately adjust the color band to the numerical interval of interest, thereby improving the degree of freedom of adjustment of the color band variation range. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0034] Figure 1 A flowchart of a data visualization method provided by an embodiment of the present invention;
[0035] Figure 2 Schematic diagram of three color ribbons provided by an embodiment of the present invention;
[0036] Figure 3 A nonlinear curve of an opacity function provided by an embodiment of the present invention;
[0037] Figure 4 A four-channel RGBA visualization image provided by an embodiment of the present invention;
[0038] Figure 5 A three-channel RGB visualization image provided by an embodiment of the present invention;
[0039] Figure 6 A visual image that changes dynamically with the adjustment of the color band change range provided by an embodiment of the present invention;
[0040] Figure 7A schematic diagram of the structure of a data visualization device provided by an embodiment of the present invention;
[0041] Figure 8 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0042] The technical solution of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are part of the embodiments of the present invention, rather than 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.
[0043] At present, different color bands usually change in gradient without transparency change, and only support the adjustment of the range size of each color band color; or, different color bands change in transition but without transparency change, and only support the adjustment of the range size of the entire color band; taking the data value as the difference between the actual value and the standard value as an example, the user pays more attention to the area with a larger absolute difference value, and pays less attention to the area with a smaller absolute difference value. Under the existing color band scheme, the color displayed in the area of interest with a larger absolute difference value is not prominent enough, and the uninteresting area with a smaller absolute difference value cannot be filtered, and the adjustment of the color band change range is not free enough. Based on this, a data visualization method, device, electronic device and computer-readable storage medium provided by an embodiment of the present invention introduce opacity A as a supplement to the traditional three-channel red (R), green (G), and blue (B) color mapping, increase the filter interval that can be adjusted, can highlight the area with a larger absolute difference value, and semi-transparently display the area with a smaller absolute difference value, realize the filtering of the uninteresting area, and improve the freedom of adjusting the color band change range.
[0044] To facilitate understanding of this embodiment, a data visualization method disclosed in an embodiment of the present invention is first introduced in detail.
[0045] The embodiment of the present invention provides a data visualization method, which can be performed by an electronic device with image processing capabilities. Figure 1 The flowchart of a data visualization method shown in FIG. 1 mainly includes the following steps S110 to S130:
[0046] Step S110, obtaining visualization data and color band parameter data; wherein the visualization data includes the basic image and measurement values at multiple positions thereof, and the color band parameter data includes the color band upper limit value, the color band lower limit value and the filter interval.
[0047] The above-mentioned visualization data can be any data with visualization requirements. For example, when visualizing the data difference between the measured three-dimensional face model and the reference model, the visualization data can include the three-dimensional face model and the measurement values at multiple positions in the three-dimensional face model. The measurement value is the difference between the actual value measured in the three-dimensional face model and the standard value of the reference model. Specifically, it can be the distance (scalar value) from any mesh vertex in the area where the position is located in the three-dimensional face model to the nearest point of the reference model mesh, and the positive and negative signs are determined by the normal.
[0048] This embodiment proposes a color band with four channels of RGBA and a filter interval. The user can adjust the color band upper limit value, the color band lower limit value and the filter interval according to actual needs; wherein the color band upper limit value is the maximum measurement value of the entire color band, the color band lower limit value is the minimum measurement value of the entire color band, and the filter interval is a measurement value interval that the user is not interested in, which can be one or more measurement value intervals between the color band upper limit value and the color band lower limit value. Taking the three-dimensional model of a human face as an example, the filter interval can be a measurement value interval defined by the filter lower limit value and the filter upper limit value, and the filter lower limit value and the filter upper limit value are adjusted symmetrically with 0 as the center.
[0049] Step S120, determining the color information and opacity information corresponding to each position according to the visualization data and the color band parameter data; wherein the opacity corresponding to the measurement value of each position increases as the distance from the filtering interval increases.
[0050] Opacity information refers to the opacity of the color band itself, that is, the farther away from the filter interval, the higher the opacity of the corresponding color band and the more obvious the color of the color band. Conversely, the closer to the filter interval, the lower the opacity of the color band and the less obvious the color of the color band.
[0051] In this embodiment, not only the color corresponding to the corresponding position is determined according to the measured value, but also the opacity corresponding to the corresponding position is determined according to the measured value, so that the color information and opacity information corresponding to the corresponding position can be obtained; taking the RGB color model as an example, this method can obtain the RGBA four-channel data corresponding to each position. In order to highlight the area of interest and filter the area of no interest, the opacity of the filter interval can be minimized. The closer the measured value is to the filter interval, the smaller the opacity corresponding to the measured value is, and the farther away from the filter interval, the greater the opacity corresponding to the measured value is. Optionally, the opacity corresponding to the filter interval can be 0; the opacity corresponding to the measured value greater than or equal to the upper limit of the color band and less than or equal to the lower limit of the color band can be 1, and the opacity corresponding to other measured values is between 0 and 1.
[0052] In some possible embodiments, the color mapping function and the opacity function may be determined first according to the color band parameter data; then, the color information corresponding to each position may be determined according to the measured value at each position and the color mapping function, and the opacity information corresponding to each position may be determined according to the measured value at each position and the opacity function. It should be noted that there is no sequential order between the step of determining the color information corresponding to each position and the step of determining the opacity information corresponding to each position.
[0053] The user can adjust the color band parameter data to dynamically adjust the color mapping function and opacity function, thereby adjusting the display effect of the target visualization image.
[0054] In a possible implementation, the color mapping function can be determined as follows: according to a preset color sequence, the color band interval consisting of the color band upper limit value and the color band lower limit value is divided into multiple sub-intervals, and the upper limit color and the lower limit color of each sub-interval are determined; according to the upper limit color and the lower limit color of each sub-interval, as well as the filter interval and the preset mapping rules, a color mapping function is generated; wherein the mapping rules include that the color corresponding to the first measurement value belonging to the filter interval is gray, and the color corresponding to the second measurement value that does not belong to the filter interval is obtained by interpolating the upper limit color and the lower limit color of the sub-interval to which it belongs.
[0055] The color sequence can be set according to actual needs. For example, the color sequence can be dark blue, light blue, cyan, green, yellow, orange and red arranged in sequence, so that the color band range is divided into 7 sub-intervals, among which dark blue can correspond to the sub-interval to which the lower limit of the color band belongs, red corresponds to the sub-interval to which the upper limit of the color band belongs, and other colors are distributed in each sub-interval between dark blue and red. By setting the color corresponding to the filter interval to gray, the filtering of the uninterested area corresponding to the filter interval can be better achieved, thereby improving the display effect.
[0056] Optionally, the color corresponding to the second measurement value that does not belong to the filtering interval is obtained by linear interpolation of the upper limit color and the lower limit color of the subinterval to which it belongs (but the protection scope of the present invention is not limited to the linear interpolation method, and a nonlinear difference method may also be used in other embodiments). Based on this, the color mapping function corresponding to the subinterval that does not belong to the filtering interval may include:
[0057]
[0058] Among them, val u is the upper limit of the subinterval, val d is the lower limit of the subinterval, color u The upper limit color of the sub-interval, color d The lower limit color of the sub-interval.
[0059] In one possible implementation, the opacity function can be determined as follows: based on the color band upper limit value, the color band lower limit value and the filter interval, multiple segmented intervals corresponding to the opacity function are determined; based on a preset opacity rule, an opacity function is generated; wherein the opacity rule includes that the opacity of the first segmented interval corresponding to the color band upper limit value to the filter upper limit value of the filter interval gradually changes from 1 to 0, the opacity of the second segmented interval corresponding to the filter interval is 0, and the opacity of the third segmented interval corresponding to the filter lower limit value to the color band lower limit value of the filter interval gradually changes from 0 to 1.
[0060] Optionally, the measured value may be the difference between the actual value and the standard value, the color band upper limit value is equal to the absolute value of the color band lower limit value, and the filter upper limit value of the filter interval is equal to the absolute value of the filter lower limit value of the filter interval; based on this, the first segmented interval and the third segmented interval may be combined into a normalized interval, and the opacity function corresponding to the normalized interval is a preset nonlinear curve. It should be noted that the opacity function corresponding to the normalized interval may be set according to actual needs, and is not limited to a nonlinear curve. In other embodiments, a linear curve may also be used.
[0061] Furthermore, the opacity function corresponding to the normalized interval is a preset nonlinear curve. When the measured value at a certain position belongs to the normalized interval, the absolute value of the measured value is taken and divided by the upper limit value of the color band to obtain the input value corresponding to the position; the input value corresponding to the position is substituted into the nonlinear curve to solve the opacity value corresponding to the position.
[0062] Step S130 , coloring the basic image according to the color information and opacity information corresponding to each position to obtain a target visualized image.
[0063] In specific implementation, in order to improve the display effect of the target visualization image, the basic image can be first converted into a grayscale image, and then the color and opacity of the corresponding position in the grayscale image are modified accordingly based on the color information and opacity information corresponding to each position, so as to obtain the target visualization image.
[0064] The data visualization method of the embodiment of the present invention can obtain visualization data and color band parameter data; wherein the visualization data includes the basic image and the measurement values at multiple positions thereof, and the color band parameter data includes the color band upper limit value, the color band lower limit value and the filter interval; according to the visualization data and the color band parameter data, the color information and opacity information corresponding to each position are determined; wherein the opacity corresponding to the measurement value at each position increases as the distance from the filter interval increases; according to the color information and opacity information corresponding to each position, the basic image is colored to obtain the target visualization image. In this way, by introducing opacity as a supplement to color mapping, the filter interval available for adjustment is increased, the area of interest corresponding to the measurement value far from the filter interval is highlighted, and the filtering of the uninterested area corresponding to the filter interval is realized, so as to facilitate user observation and improve the display effect; at the same time, the user can not only adjust the color band upper limit value and the color band lower limit value, but also adjust the filter interval. The adjustment of the filter interval facilitates the user to accurately adjust the color band to the numerical interval of interest, thereby improving the degree of freedom of adjustment of the color band variation range.
[0065] For ease of understanding, the data visualization method is described in detail below by taking the visualization of the data difference between the measured three-dimensional face model and the reference model as an example.
[0066] The embodiment of the present invention proposes a method for nonlinear mapping of color bands and measurement values, that is, a nonlinear four-channel mapping color band coloring technology is proposed, and opacity A is introduced as a supplement to the traditional three-channel red (R), green (G), and blue (B) color mapping, highlighting the areas with large measured absolute values and semi-transparently displaying the areas with small measured absolute values.
[0067] 1. Color band mapping function
[0068] Figure 2 Three color bands are shown, among which B is the color band legend of discrete color blocks, A is the generated gradient color band legend, and C is the color band legend after adjusting the filter interval. For A, the color band will be displayed for the measured values between 0 and 3 and -3 to 0; for C, the user only pays attention to the measured values of a part of the color band interval, and the color band only needs to be displayed between 1.2 to 3 and -3 to 1.2. By adjusting the filter interval, the area where the color band is displayed can be changed, and the part of the interval that is of concern can be displayed emphatically.
[0069] The input of the color band mapping function is the measured value, and the upper and lower limits of the color band range can be adjusted ( Figure 2The output is three-channel color (RGB). The mapping rules are as follows: the measured value exceeding the upper limit of the color band outputs the reddest color, and the measured value exceeding the lower limit of the color band outputs the bluest color; the measured value less than the upper limit of the filter and greater than the lower limit of the filter outputs gray; other values are piecewise interpolation functions, such as the segmented interval is divided into Figure 2 There are 7 subintervals in B, and the interval width is the difference between the upper and lower limits of the subinterval. The output is obtained by linear interpolation of the upper and lower limit colors. The interpolation formula is as follows:
[0070]
[0071] Among them, val u is the upper limit of the subinterval, val d is the lower limit of the subinterval, color u The upper limit color of the sub-interval, color d The lower limit color of the sub-interval.
[0072] 2. Opacity function
[0073] The input is the measured value. First, take the absolute value of the measured value and then divide it by the upper limit of the color band. The value greater than 1 is normalized to 1 to normalize the measured value to between 0 and 1. Then substitute it into Figure 3 The nonlinear curve shown (e.g. y=x 2 +0.3) in the vertical coordinate y to obtain the corresponding horizontal coordinate x value as the fourth channel opacity value output. When the input y is equal to 1, the opacity is 1.0; when y is between the upper filter limit and the lower filter limit, the opacity is 0, for example, Figure 2 In C, the opacity is 0 in the range of -1.2 to 1.2.
[0074] 3. Four-channel RGBA color ribbon color mixing output
[0075] like Figure 4 As shown, in the four-channel RGBA visualization image, the area with a larger absolute value of the measured value is highlighted, and the area with a smaller absolute value of the measured value is displayed semi-transparently. Figure 5 A three-channel RGB visualization image is shown, that is, the color band effect without the opacity channel; Figure 5 and Figure 4 In contrast, it is obvious that the nonlinear RGBA four-channel color band mapping brings a more intuitive visual effect.
[0076] 4. Color ribbon range adjustment logic
[0077] like Figure 6As shown, (a) when the upper limit of the color band is adjusted, the measurement value corresponding to the reddest color increases; when the lower limit of the color band is adjusted, the measurement value corresponding to the bluest color decreases; (b) when the filter limit is adjusted (i.e., the filter interval is adjusted), the opacity interpolation function changes dynamically.
[0078] The embodiments of the present invention have the following advantages:
[0079] 1. Through the nonlinear RGBA four-channel color band mapping technology, the area with a larger absolute value of the measured value is highlighted, and the area with a smaller absolute value of the measured value is semi-transparently filtered, which is convenient for users to observe and has a beautiful display effect.
[0080] 2. When adjusting the upper and lower limits of the color band, the color corresponding to the maximum value of the measurement does not change, and the colors corresponding to other values change adaptively, and the change in visual effect is intuitive; filtering adjustment allows users to accurately adjust the color band to the numerical range of their interest.
[0081] Corresponding to the above-mentioned data visualization method, the embodiment of the present invention further provides a data visualization device. Figure 7 A structural schematic diagram of a data visualization device is shown, the device comprising:
[0082] The acquisition module 701 is used to acquire visualization data and color band parameter data; wherein the visualization data includes the basic image and the measurement values at multiple positions thereof, and the color band parameter data includes the color band upper limit value, the color band lower limit value and the filtering interval;
[0083] A determination module 702, for determining color information and opacity information corresponding to each position according to the visualization data and the color band parameter data; wherein the opacity corresponding to the measurement value of each position increases as the distance from the filtering interval increases;
[0084] The coloring module 703 is used to color the basic image according to the color information and opacity information corresponding to each position to obtain a target visual image.
[0085] The data visualization device provided by the embodiment of the present invention can obtain visualization data and color band parameter data; wherein the visualization data includes the basic image and the measurement values at multiple positions thereof, and the color band parameter data includes the color band upper limit value, the color band lower limit value and the filter interval; according to the visualization data and the color band parameter data, the color information and opacity information corresponding to each position are determined; wherein the opacity corresponding to the measurement value at each position increases as the distance from the filter interval increases; according to the color information and opacity information corresponding to each position, the basic image is colored to obtain the target visualization image. In this way, by introducing opacity as a supplement to color mapping, the filter interval available for adjustment is increased, the area of interest corresponding to the measurement value far from the filter interval is highlighted, and the filtering of the uninterested area corresponding to the filter interval is realized, so as to facilitate user observation and improve the display effect; at the same time, the user can not only adjust the color band upper limit value and the color band lower limit value, but also adjust the filter interval. The adjustment of the filter interval facilitates the user to accurately adjust the color band to the numerical interval of interest, thereby improving the degree of freedom of adjustment of the color band variation range.
[0086] Furthermore, the above-mentioned determination module 702 is specifically used to: determine the color mapping function and the opacity function according to the color band parameter data; determine the color information corresponding to each position according to the measured value at each position and the color mapping function, and determine the opacity information corresponding to each position according to the measured value at each position and the opacity function.
[0087] Furthermore, the above-mentioned determination module 702 is also used to: divide the color band interval composed of the color band upper limit value and the color band lower limit value into multiple sub-intervals according to a preset color sequence, and determine the upper limit color and the lower limit color of each sub-interval; generate a color mapping function according to the upper limit color and the lower limit color of each sub-interval, as well as the filter interval and the preset mapping rules; wherein the mapping rules include that the color corresponding to the first measurement value belonging to the filter interval is gray, and the color corresponding to the second measurement value that does not belong to the filter interval is obtained by interpolating the upper limit color and the lower limit color of the sub-interval to which it belongs.
[0088] Furthermore, the color mapping functions corresponding to the sub-intervals that do not belong to the filtering interval include:
[0089]
[0090] Among them, val u is the upper limit of the subinterval, val d is the lower limit of the subinterval, color u The upper limit color of the sub-interval, color d The lower limit color of the sub-interval.
[0091] Furthermore, the above-mentioned determination module 702 is also used to: determine multiple segmented intervals corresponding to the opacity function according to the color band upper limit value, the color band lower limit value and the filter interval; generate an opacity function according to a preset opacity rule; wherein the opacity rule includes that the opacity of the first segmented interval corresponding to the color band upper limit value to the filter upper limit value of the filter interval gradually changes from 1 to 0, the opacity of the second segmented interval corresponding to the filter interval is 0, and the opacity of the third segmented interval corresponding to the filter lower limit value of the filter interval to the color band lower limit value gradually changes from 0 to 1.
[0092] Furthermore, the measured value is the difference between the actual value and the standard value, the upper limit value of the color band is equal to the absolute value of the lower limit value of the color band, and the upper limit value of the filter interval is equal to the absolute value of the lower limit value of the filter interval; the first segmented interval and the third segmented interval are merged into a normalized interval, and the opacity function corresponding to the normalized interval is a preset nonlinear curve.
[0093] Furthermore, the above-mentioned determination module 702 is also used for: when the measured value at a position belongs to a normalized interval, taking the absolute value of the measured value and dividing it by the upper limit value of the color band to obtain the input value corresponding to the position; substituting the input value corresponding to the position into the nonlinear curve to solve for the opacity value corresponding to the position.
[0094] The data visualization device provided in this embodiment has the same implementation principle and technical effects as those of the aforementioned data visualization method embodiment. For the sake of brief description, for matters not mentioned in the data visualization device embodiment, reference may be made to the corresponding contents in the aforementioned data visualization method embodiment.
[0095] like Figure 8 As shown, an electronic device 800 provided by an embodiment of the present invention includes: a processor 801, a memory 802 and a bus, the memory 802 stores a computer program that can be run on the processor 801, when the electronic device 800 is running, the processor 801 and the memory 802 communicate through the bus, and the processor 801 executes the computer program to implement the above-mentioned data visualization method.
[0096] Specifically, the memory 802 and the processor 801 can be general-purpose memories and processors, which are not specifically limited here.
[0097] The embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the data visualization method in the above method embodiment is executed. The computer-readable storage medium includes: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a RAM, a magnetic disk or an optical disk, and other media that can store program codes.
[0098] The term "and / or" herein is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C can represent including any one or more elements selected from the set consisting of A, B, and C.
[0099] In all examples shown and described herein, any specific values should be interpreted as merely exemplary and not as limiting, and thus other examples of the exemplary embodiments may have different values.
[0100] The flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and a part of a module, a program segment or a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of the boxes in the block diagram and / or the flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0101] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0102] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0103] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0104] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A data visualization method, characterized in that: include: Obtaining visualization data and color band parameter data; wherein the visualization data includes a basic image and measurement values at multiple positions thereof, and the color band parameter data includes a color band upper limit value, a color band lower limit value, and a filter interval; Determine the color information and opacity information corresponding to each of the positions according to the visualization data and the color band parameter data; wherein the opacity corresponding to the measured value of each of the positions increases as the distance from the filter interval increases; The basic image is colored according to the color information and opacity information corresponding to each of the positions to obtain a target visualization image.
2. The data visualization method according to claim 1, characterized in that: Determining the color information and opacity information corresponding to each of the positions according to the visualization data and the color band parameter data includes: Determining a color mapping function and an opacity function according to the color band parameter data; The color information corresponding to each of the positions is determined according to the measured values at each of the positions and the color mapping function, and the opacity information corresponding to each of the positions is determined according to the measured values at each of the positions and the opacity function.
3. The data visualization method according to claim 2, characterized in that: Determining a color mapping function and an opacity function according to the color band parameter data comprises: According to a preset color sequence, the color band interval consisting of the color band upper limit value and the color band lower limit value is divided into a plurality of sub-intervals, and an upper limit color and a lower limit color of each of the sub-intervals are determined; The color mapping function is generated according to the upper limit color and the lower limit color of each sub-interval, the filter interval and the preset mapping rule; wherein the mapping rule includes that the color corresponding to the first measurement value belonging to the filter interval is gray, and the color corresponding to the second measurement value not belonging to the filter interval is obtained by interpolating the upper limit color and the lower limit color of the sub-interval to which it belongs.
4. The data visualization method according to claim 3, characterized in that: The color mapping function corresponding to the sub-interval that does not belong to the filtering interval includes: Among them, val u is the upper limit of the subinterval, val d is the lower limit of the sub-interval, color u is the upper limit color of the sub-interval, color d is the lower limit color of the subinterval.
5. The data visualization method according to claim 2, characterized in that: Determining a color mapping function and an opacity function according to the color band parameter data further includes: Determine a plurality of segmented intervals corresponding to the opacity function according to the color band upper limit value, the color band lower limit value and the filtering interval; The opacity function is generated according to a preset opacity rule; wherein the opacity rule includes that the opacity of the first segmented interval corresponding to the upper limit value of the color band to the upper limit value of the filter interval gradually changes from 1 to 0, the opacity of the second segmented interval corresponding to the filter interval is 0, and the opacity of the third segmented interval corresponding to the lower limit value of the filter interval to the lower limit value of the color band gradually changes from 0 to 1.
6. The data visualization method according to claim 5, characterized in that: The measured value is the difference between the actual value and the standard value, the color band upper limit value is equal to the absolute value of the color band lower limit value, and the filtering upper limit value of the filtering interval is equal to the absolute value of the filtering lower limit value of the filtering interval; The first segmented interval and the third segmented interval are combined into a normalized interval, and the opacity function corresponding to the normalized interval is a preset nonlinear curve.
7. The data visualization method according to claim 6, characterized in that: Determining the opacity information corresponding to each of the positions according to the measurement values at each of the positions and the opacity function includes: When the measured value at the position belongs to the normalized interval, taking the absolute value of the measured value and dividing it by the upper limit of the color band to obtain the input value corresponding to the position; The input value corresponding to the position is brought into the nonlinear curve to solve and obtain the opacity value corresponding to the position.
8. A data visualization device, characterized in that: include: An acquisition module, used to acquire visualization data and color band parameter data; wherein the visualization data includes a basic image and measurement values at multiple positions thereof, and the color band parameter data includes a color band upper limit value, a color band lower limit value, and a filter interval; A determination module, configured to determine color information and opacity information corresponding to each of the positions according to the visualization data and the color band parameter data; wherein the opacity corresponding to the measurement value of each of the positions increases as the distance from the filtering interval increases; The coloring module is used to color the basic image according to the color information and opacity information corresponding to each of the positions to obtain a target visual image.
9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, characterized in that: When the processor executes the computer program, the data visualization method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the data visualization method according to any one of claims 1 to 7 is executed.
Citation Information
Cited By
Data visualization method and apparatus, and electronic device and computer-readable storage medium
WO2026092527A1