An image rendering method, apparatus, electronic device, and medium
Through the working together with the server, the client receives rendering requests and obtains image depth value and color information, adjusts the cross-sectional position of the three-dimensional reproduced image, and superimposes the cross-sectional depth value and color information to generate rendering results, solving the problems of algorithm complexity and calculation amount in the three-dimensional reproduction process of massive data, and improving processing speed and accuracy.
Patent Information
- Application Number
- CN202110164425.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-02-05
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2041-02-05
AI Technical Summary
When visually analyzing numerical simulation result data, the algorithm complexity and calculation amount in the process of processing massive data are large, resulting in slow processing speed and huge challenges in the computing power and I/O speed of the equipment.
Through the client and the server working together, they receive rendering requests and obtain image depth values and color information, adjust the cross-sectional position of the three-dimensional reproduced image, and superimpose the cross-sectional depth values and color information to generate rendering results, reducing the performance requirements for computing devices.
It realizes that when massive numerical calculation result data is reproduced in three-dimensionally, the scene characteristics are fully retained, the data processing speed and accuracy are improved, and the performance requirements for computing equipment are reduced.
Smart Images

Figure CN114937108B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of visual analysis of computer technology, and in particular, to an image rendering method, apparatus, electronic device, and medium. Background Art
[0002] With the in-depth research on numerical simulation calculation methods and the continuous improvement of the computing power of high-performance computers, the scale of simulation has also increased, and the amount of data generated by simulation calculations has become larger and larger. Simulating an industrial-scale device may require more than a billion particles and more than a million grids, and more than ten million time steps on the time scale. Therefore, it is necessary to process a large amount of data (if the data information of one billion particles is stored in single-precision floating-point numbers, each time step requires about 260 GB of data).
[0003] Since scientific visualization is an effective method for analyzing numerical simulation result data and can present visualization images with high precision, its visualization analysis tool is an important means for deeply mining and analyzing result data. The cross-section analysis tool is a kind of visualization analysis tool. By calculating the cross-section of the simulation object at a specified position, users can intuitively observe the inside of the simulation object, which helps to deeply analyze the characteristic information of the simulation object. However, when visualizing and analyzing numerical simulation result data and using the cross-section analysis tool to process a large amount of data, it increases the algorithm complexity and computational amount in the three-dimensional reproduction process, reduces the processing speed, and at the same time poses great challenges in terms of device computing power and I / O speed. Summary of the Invention
[0004] The present invention provides an image rendering method, apparatus, electronic device, and medium to reduce the performance requirements for computing devices and further improve the data processing speed and accuracy when rendering the results of reproducing a large amount of numerical calculation results in a complete three-dimensional manner.
[0005] In a first aspect, an embodiment of the present invention provides an image rendering method, which is applied to a client, and the method includes:
[0006] Receiving a rendering request from a user, where the rendering request includes rendering parameters;
[0007] Sending the rendering parameters to a server and obtaining an image depth value and color information from the server;
[0008] Sending the cross-section position information of the three-dimensional reproduction image corresponding to the image depth value and color information to the server and obtaining a cross-section depth value and color information from the server;
[0009] Overlaying the cross-section depth value and color information on the three-dimensional reproduction image as a rendering result.
[0010] Further, the three-dimensional reproduction image corresponding to the image depth value and color information includes:
[0011] Receiving the image depth value and color information from the server;
[0012] If, when the image depth value and color information are read in, the original depth value of a pixel block is greater than the depth value of the corresponding pixel block in the image depth value and color information, then discard the original depth value of the pixel block and the original pixel block color information, and update them to the image depth value and color information.
[0013] Further, before sending the cross-section position information of the three-dimensional reproduction image corresponding to the image depth value and color information to the server, it further includes:
[0014] Changing the normal position of the initial horizontal cross-section of the three-dimensional reproduction image to determine the cross-section position information corresponding to the normal.
[0015] Further, before receiving the rendering request from the user, where the rendering request includes rendering parameters, it further includes:
[0016] The client is monitored by the rendering program on the server;
[0017] If the rendering program on the server monitors that the client has received the user's rendering request, then establish a connection between the rendering program on the server and the server specified by the client.
[0018] Further, before establishing a connection between the rendering program on the server and the server specified by the client, it further includes:
[0019] Determine the server specified by the client according to the rendering request.
[0020] Further, superimposing the cross-section depth value and color information on the three-dimensional reproduction image as a rendering result includes:
[0021] Receiving the cross-section depth value and color information from the server;
[0022] If, when the cross-section depth value and color information are read in, the depth value of a pixel block in the three-dimensional reproduction image is greater than the depth value of the corresponding pixel block in the cross-section depth value and color information, then discard the depth value of the pixel block in the three-dimensional reproduction image and the original pixel block color information, and update them to the cross-section depth value and color information.
[0023] Further, after superimposing the cross-section depth value and color information on the three-dimensional reproduction image as a rendering result, it further includes:
[0024] If there are unrendered parameters in the rendering parameters, send the unrendered parameters to the server and obtain the image depth value and color information corresponding to the unrendered parameters from the server;
[0025] Overlay the image depth value and color information corresponding to the unrendered parameters on the rendering result to obtain a new rendering result.
[0026] In a second aspect, an embodiment of the present invention further provides an image rendering device, which includes:
[0027] A data receiving module, configured to receive a rendering request from a user, where the rendering request includes rendering parameters;
[0028] An initial rendering module, configured to send the rendering parameters to the server and obtain the image depth value and color information from the server;
[0029] A three-dimensional reproduction module, configured to send the cross-section position information of the three-dimensional reproduction image corresponding to the image depth value and color information to the server and obtain the cross-section depth value and color information from the server;
[0030] An information overlay module, configured to overlay the cross-section depth value and color information on the three-dimensional reproduction image as a rendering result.
[0031] Further, the three-dimensional reproduction module is specifically configured to:
[0032] Receive the image depth value and color information of the server;
[0033] If, when the image depth value and color information are read in, the original depth value of the pixel block is greater than the depth value of the corresponding pixel block in the image depth value and color information, discard the original depth value of the pixel block and the original pixel block color information, and update them to the image depth value and color information.
[0034] Further, the three-dimensional reproduction module is specifically further configured to:
[0035] Change the normal position of the initial horizontal cross-section of the three-dimensional reproduction image to determine the cross-section position information corresponding to the normal.
[0036] Further, the data receiving module is specifically further configured to:
[0037] The client is monitored by a rendering program on the server;
[0038] If the rendering program on the server monitors that the client has received the rendering request from the user, establish a connection between the rendering program on the server and the server specified by the client.
[0039] Further, the data receiving module is specifically further configured to:
[0040] Determine the server specified by the client according to the rendering request.
[0041] Further, the three-dimensional reproduction module is specifically configured to:
[0042] Receive the cross-section depth value and color information of the server;
[0043] If, when the cross-section depth value and color information are read, the depth value of the pixel block in the three-dimensional reproduction image is greater than the depth value of the corresponding pixel block in the cross-section depth value and color information, then discard the depth value of the pixel block in the three-dimensional reproduction image and update the original pixel block color information to the cross-section depth value and color information.
[0044] Further, the three-dimensional reproduction module is specifically further configured to:
[0045] If there are unrendered parameters in the rendering parameters, then send the unrendered parameters to the server, and obtain the image depth value and color information corresponding to the unrendered parameters from the server;
[0046] Overlay the image depth value and color information corresponding to the unrendered parameters on the rendering result to obtain a new rendering result.
[0047] In a third aspect, an embodiment of the present invention further provides an electronic device, which includes:
[0048] One or more processors;
[0049] A storage device for storing one or more programs;
[0050] When the one or more programs are executed by the one or more processors, the one or more processors implement the image rendering method described above.
[0051] 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 program is executed by a processor, the image rendering method described above is implemented.
[0052] The present invention receives a rendering request from a user, where the rendering request includes rendering parameters; sends the rendering parameters to a server and obtains an image depth value and color information from the server; sends cross-section position information of a three-dimensional reproduction image corresponding to the image depth value and color information to the server and obtains a cross-section depth value and color information from the server; superimposes the cross-section depth value and color information on the three-dimensional reproduction image as a rendering result; solves the problems that in visualizing numerical simulation result data and using a cross-section analysis tool to process massive data, the algorithm complexity and large amount of calculation in the three-dimensional reproduction process are high, the processing speed is slow, and there are huge challenges in terms of device computing power and I / O speed, etc.; realizes the complete retention of image features during the three-dimensional reproduction of massive data, while reducing the performance requirements for computing devices and further improving the data processing speed and accuracy in the three-dimensional reproduction process. Description of the Drawings
[0053] Figure 1 is a flowchart of an image rendering method in Embodiment 1 of the present invention;
[0054] Figure 1A is a schematic flowchart of an image rendering method in Embodiment 1 of the present invention;
[0055] Figure 2 is a schematic structural diagram of an image rendering device in Embodiment 2 of the present invention;
[0056] Figure 3 is a schematic structural diagram of an electronic device in Embodiment 3 of the present invention. Detailed Embodiments
[0057] The present invention will be further described in detail below with reference to the drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the present invention, rather than limiting the present invention. Additionally, it should be noted that for the sake of description, only parts related to the present invention are shown in the drawings, rather than all structures.
[0058] Embodiment 1
[0059] Figure 1 is a flowchart of an image rendering method provided in Embodiment 1 of the present invention. This embodiment is applicable to the situation of three-dimensional reproduction and cross-section analysis when visualizing massive data. This method can be executed by an image rendering device, and the device can be implemented in software and / or hardware, and can be specifically inherited in an electronic device with storage and computing capabilities for image rendering.
[0060] As Figure 1 shown, an image rendering method is provided, which is applied to a client and specifically includes the following steps:
[0061] S110, receive a rendering request from a user, where the rendering request includes rendering parameters;
[0062] In an embodiment of the present invention, the rendering request from the user can be understood as a request sent when it is necessary to render simulation result data. Among them, the simulation result data can be the simulation result data of the riser section of any reactor device, or the result data generated by simulating other devices, or the data stored in the numerical simulation result database. The rendering parameters can be understood as the data parameters used when rendering the simulation result data, such as the storage location of the case data, the case scale, the start time step of the simulation, the end time step of the simulation, the simulation interval time step, the height of the display window, the width of the display window, etc. The image depth value can be understood as the distance of a pixel block from the acquisition device or apparatus in three-dimensional space when collecting an image in three-dimensional space. Among them, the larger the depth value, the farther the pixel block is from the acquisition device or apparatus. The color information can be understood as the information of the three color channels red (Red), green (Green), and blue (Blue) in the RGB color mode and various colors obtained by superimposing them on each other.
[0063] In an embodiment of the present invention, when the simulation result data in any of the above-mentioned reactor devices, other devices, or simulation result databases needs to be rendered, the client sends the rendering request to the server, and the server starts rendering after receiving the rendering request.
[0064] In an embodiment of the present invention, the specific program annotation content of the rendering parameters in the rendering request is as follows:
[0065]
[0066]
[0067] S120, send the rendering parameters to the server and obtain the image depth value and color information from the server;
[0068] In an embodiment of the present invention, the server can be understood as a computer with a configured IP address and port number where the rendering program corresponding to the client is deployed. Among them, the server can be pre-set, or specified by the client according to the data processing ability of the rendering program. The image depth value and color information of the server can be understood as the corresponding image depth value and color information calculated by the rendering program on the server according to the rendering parameters.
[0069] In an embodiment of the present invention, the client receives a rendering request from a user, and sends the rendering parameters in the rendering request to a rendering program on the server. The rendering program on the server calculates the image depth value and color information corresponding to the rendering parameters according to the rendering parameters, and returns the image depth value and color information corresponding to the rendering request to the client.
[0070] Step S130: Send the cross-section position information of the three-dimensional reproduction image corresponding to the image depth value and color information to the server, and obtain the cross-section depth value and color information from the server;
[0071] In an embodiment of the present invention, the three-dimensional reproduction image can be understood as an image with three-dimensional information presented by the client according to the rendering request. The cross-section position information can be understood as the position information on the three-dimensional reproduction image that needs to be observed. The cross-section depth value and color information can be understood as the image depth value and color information corresponding to the cross-section calculated according to the cross-section position information.
[0072] In an embodiment of the present invention, the client displays the three-dimensional reproduction image corresponding to the simulation result data according to the received image depth value and color information. The client sends the cross-section position information corresponding to the three-dimensional reproduction image in the cross-section analysis tool to the server. The rendering program on the server uses the cross-section position information as the overlay rendering parameter, calculates the cross-section depth value and color information according to the cross-section position information, and sends the cross-section depth value and color information to the client.
[0073] In an embodiment of the present invention, the cross-section position information corresponding to the three-dimensional reproduction image in the client cross-section analysis tool may be the cross-section position information corresponding to multiple normal position information in the cross-section analysis tool.
[0074] In an embodiment of the present invention, the specific program annotation content of the cross-section position information is as follows:
[0075]
[0076] Step S140: Overlay the cross-section depth value and color information on the three-dimensional reproduction image as the rendering result.
[0077] In an embodiment of the present invention, the rendering result can be understood as a three-dimensional reproduction image after the cross-section depth value and color information are overlaid. Among them, the overlaid three-dimensional image not only has the three-dimensional features in the simulation result data in the rendering request, but also has the two-dimensional image features in the cross-section analysis tool.
[0078] In an embodiment of the present invention, the client superimposes the cross-section depth value and color information sent by the server on the three-dimensional reproduction image, so as to obtain a superimposed three-dimensional reproduction image that can directly observe the inside of the simulation object. The three-dimensional reproduction image is obtained by three-dimensionally reconstructing and reproducing the simulation result data through the image depth value and color information in the rendering request.
[0079] In an embodiment of the present invention, the image depth value and color information not only include the depth value of the pixel block in the image depth value and color information, but also include the color information in the image depth value and color information. When the client superimposes the cross-section depth value and color information sent by the server on the three-dimensional reproduction image, what is read in is not only the depth value of the corresponding pixel block in the cross-section depth value and color information, but also the color information corresponding to the depth value of the corresponding pixel block.
[0080] Further, the three-dimensional reproduction image corresponding to the image depth value and color information includes:
[0081] Receiving the image depth value and color information of the server;
[0082] If, when the image depth value and color information are read in, the original depth value of the pixel block is greater than the depth value of the corresponding pixel block in the image depth value and color information, then discard the original depth value of the pixel block and the original pixel block color information, and update it to the image depth value and color information.
[0083] In an embodiment of the present invention, the original depth value of the pixel block can be understood as the depth value of the pixel block in the display window or display device before the client reads in the image depth value and color information. The depth value of the pixel block corresponding to the image depth value and color information can be understood as the depth value of the pixel block in the image depth value and color information calculated according to the rendering parameters sent by the server to the client.
[0084] In an embodiment of the present invention, the client receives the image depth value and color information of the server, and judges whether the depth value of the pixel block in the image depth value and color information is less than the original depth value of the pixel block in the client's display window or display device before reading in the image depth value and color information. If the depth value of the pixel block in the image depth value and color information is less than the original depth value of the pixel block in the client's display window or display device, then discard the original depth value of the pixel block in the display window or display device, and read in the image depth value and color information into the pixel block in the display window or display device, that is, update the original depth value and the original pixel block color information of the pixel block in the display window or display device to the image depth and color information.
[0085] Further, before sending the cross-section position information of the three-dimensional reproduction image corresponding to the image depth value and color information to the server, it further includes:
[0086] Change the normal position of the initial horizontal section of the three-dimensional reproduction image, and determine the section position information corresponding to the normal.
[0087] In the embodiments of the present invention, the initial horizontal section can be understood as the cross-section in the horizontal direction of the three-dimensional reproduction image. Among them, the initial horizontal section is generally located at the top of the three-dimensional reproduction image, and can also be located at other positions. The normal can be understood as the normal corresponding to the initial horizontal section.
[0088] In the embodiments of the present invention, the client determines the section position information according to the normal position of the initial horizontal section of the three-dimensional reproduction image in the cross-section analysis tool. In fact, it is to change the normal position of the initial horizontal section of the three-dimensional reproduction image, that is, to change the position of the initial horizontal section by rotating the normal, and obtain the section position information corresponding to different section positions, so as to determine the internal feature information of the three-dimensional reproduction image that needs to be observed.
[0089] Further, before receiving the rendering request from the user, the rendering request includes rendering parameters, and further includes:
[0090] The client is monitored by the rendering program on the server;
[0091] If the rendering program on the server monitors that the client receives the rendering request from the user, the rendering program on the server establishes a connection with the server specified by the client.
[0092] In the embodiments of the present invention, the rendering program on the server can be understood as a calculation program or software that can generate a three-dimensional image based on the rendering parameters in the rendering request.
[0093] In the embodiments of the present invention, before starting the client display window and the display device, the rendering program on the server corresponding to the client monitors whether the client receives the rendering request from the user; if the rendering program on the server monitors that the client receives the rendering request from the user, the client starts the display window or the display device, and establishes a connection between the rendering program on the server and the server specified by the client.
[0094] Further, before establishing a connection between the rendering program on the server and the server specified by the client, it further includes:
[0095] Determine the server specified by the client according to the rendering request.
[0096] In the embodiments of the present invention, after the client starts the display window or the display device, the client determines the server rendering program that needs to be displayed by the client according to the rendering request, and establishes a connection between the server as the server specified by the client and the rendering program.
[0097] In the embodiments of the present invention, establishing a connection between the server specified by the client and the rendering program according to the rendering request may mean that the client and the rendering program are not on the same computer. Specifically, the front-end display program may be deployed on one computer, which is abbreviated as the client, and the rendering program may be deployed on another computer, which is abbreviated as the server. The specific configuration of the client is as follows: The CPU is an Intel Core i5-9500 3.0GHz, the memory is 8GB, the hard disk is a combination of a 56G solid-state drive and a 1TB ordinary hard disk, the graphics card is an NVIDIA P620, and the operating system is 64-bit Windows 10. The specific configuration of the server is as follows: The CPU is an Intel Xeon E5-2680 v3 2.5GHz, the memory is 64GB, the hard disk is 8TB, the graphics card is two NVIDIA K80s, and the operating system is 64-bit CentOS 7.4. According to the rendering request, the client establishes a connection with the rendering program on the server. Among them, the client as the front-end display program and the rendering program may be deployed on the same computer, and this computer is both the client and the server. The specific configuration of the computer is as follows: The CPU is an Intel Xeon E5-2680 v3 2.5GHz, the memory is 64GB, the hard disk is 8TB, the graphics card is two NVIDIA K80s, and the operating system is 64-bit Windows 10.
[0098] Further, the overlaying the cross-section depth value and the color information on the three-dimensional reproduction image as the rendering result includes:
[0099] Receiving the cross-section depth value and the color information from the server;
[0100] If, when the cross-section depth value and the color information are read in, the depth value of the pixel block in the three-dimensional reproduction image is greater than the depth value of the corresponding pixel block in the cross-section depth value and the color information, then discard the depth value of the pixel block in the three-dimensional reproduction image and update the original pixel block color information to the cross-section depth value and the color information.
[0101] In the embodiments of the present invention, the depth value of the pixel block in the three-dimensional reproduction image can be understood as the depth value corresponding to each pixel block in the three-dimensional reproduction image displayed by the display device or display window of the client. The original pixel block color information can be understood as the color information corresponding to the depth value of the pixel block in the three-dimensional reproduction image.
[0102] In an embodiment of the present invention, the client receives the depth value and color information of the cross-sectional image from the server. When reading in the depth value and color information of the cross-sectional image, the client needs to determine whether the depth value of the pixel block in the three-dimensional reproduction image displayed by the client is greater than the depth value of the corresponding pixel block in the depth value and color information of the cross-sectional image; if the depth of the pixel block in the three-dimensional reproduction image displayed by the client is greater than the depth value of the corresponding pixel block in the depth value and color information of the cross-sectional image, then discard the depth value of the pixel block in the three-dimensional image and update it to the depth value and color information of the cross-sectional image.
[0103] Further, after superimposing the cross-sectional depth value and color information on the three-dimensional reproduction image as the rendering result, the following steps are also included:
[0104] If there are unrendered parameters in the rendering parameters, then send the unrendered parameters to the server and obtain the image depth value and color information corresponding to the unrendered parameters from the server;
[0105] According to the image depth value and color information corresponding to the unrendered parameters and the unrendered parameters, superimpose them on the rendering result to obtain a new rendering result.
[0106] In an embodiment of the present invention, the unrendered parameters can be understood as the uncalculated rendering parameters in the rendering parameters before or after being sent to the server, or can also be the real-time updated rendering parameters.
[0107] In an embodiment of the present invention, after the client superimposes the cross-sectional depth value and color information on the three-dimensional reproduction image as the rendering result, it is necessary to determine again whether there are unrendered parameters in the rendering parameters. If there are unrendered parameters in the rendering parameters, it means that the rendering is incomplete. It is necessary to send the unrendered parameters to the server and obtain the image depth value and color information corresponding to the unrendered parameters from the server. Superimpose the image depth value and color information corresponding to the unrendered parameters on the rendering result to obtain a new rendering result.
[0108] Figure 1A It is a schematic flowchart of an image rendering method in the first embodiment of the present invention, as Figure 1AAs shown in the figure, the rendering program on the server monitors that the client receives the user's rendering request, starts the client display window, the client sends the rendering parameters to the server, and the rendering program on the server calculates the image depth value and color information corresponding to the rendering request based on the received rendering parameters and sends them to the client. The client presents the three-dimensional reproduction image in the display window according to the image depth value and color information. Determine the cross-section position information according to the normal position vector in the cross-section analysis tool, send the cross-section position information of the three-dimensional reproduction image to the server, and the rendering program on the server calculates the corresponding cross-section depth value and color information according to the cross-section position information and sends the cross-section depth value and color information to the client. The client superimposes the cross-section depth value and color information on the three-dimensional reproduction image as the rendering result. Determine whether there are unrendered parameters in the rendering parameters. If there are unrendered parameters in the rendering parameters, send the unrendered parameters to the server, and the rendering program on the server calculates the image depth value and color information corresponding to the unrendered parameters, and superimposes the image depth value and color information corresponding to the unrendered parameters on the rendering result to obtain a new rendering result.
[0109] The present invention receives a user's rendering request, the rendering request includes rendering parameters; sends the rendering parameters to a server and obtains an image depth value and color information from the server; sends cross-section position information of a three-dimensional reproduction image corresponding to the image depth value and color information to the server and obtains a cross-section depth value and color information from the server; superimposes the cross-section depth value and color information on the three-dimensional reproduction image as a rendering result; solves the problems that in visual analysis of numerical simulation result data and when using a cross-section analysis tool to process massive data, the algorithm complexity and calculation amount are large, the processing speed is slow, and there are huge challenges in terms of device computing power and I / O speed, etc.; realizes that when rendering the results of massive numerical calculation results in three dimensions, the three-dimensional characteristics of the scene are completely retained, the performance requirements for computing devices are reduced, and the data processing speed and accuracy are further improved.
[0110] Embodiment 2
[0111] A schematic structural diagram of an image rendering device provided in Embodiment 2 of the present invention. The image processing device includes: a data receiving module 210, an initial rendering module 220, a three-dimensional reproduction module 230, and an information superimposing module 240;
[0112] The data receiving module 210 is configured to receive a user's rendering request, and the rendering request includes rendering parameters;
[0113] The initial rendering module 220 is configured to send the rendering parameters to a server and obtain an image depth value and color information from the server;
[0114] The three-dimensional reproduction module 230 is configured to send the cross-section position information of the three-dimensional reproduction image corresponding to the image depth value and color information to the server, and obtain the cross-section depth value and color information from the server;
[0115] The information overlay module 240 is configured to overlay the cross-section depth value and color information on the three-dimensional reproduction image as a rendering result.
[0116] Furthermore, the three-dimensional reproduction module 230 is specifically configured to:
[0117] Receive the image depth value and color information from the server;
[0118] If, when the image depth value and color information are read, the original depth value of the pixel block is greater than the depth value of the corresponding pixel block in the image depth value and color information, then discard the original depth value of the pixel block and the original pixel block color information, and update them to the image depth value and color information.
[0119] Furthermore, the three-dimensional reproduction module 230 is specifically further configured to:
[0120] Change the normal position of the initial horizontal cross-section of the three-dimensional reproduction image, and determine the cross-section position information corresponding to the normal.
[0121] Furthermore, the data receiving module 210 is specifically further configured to:
[0122] The client is monitored by the rendering program on the server;
[0123] If the rendering program on the server monitors that the client has received the rendering request from the user, then establish a connection between the rendering program on the server and the server specified by the client.
[0124] Furthermore, the data receiving module 210 is specifically further configured to:
[0125] Determine the server specified by the client according to the rendering request.
[0126] Furthermore, the three-dimensional reproduction module 230 is specifically configured to:
[0127] Receive the cross-section depth value and color information from the server;
[0128] If, when the cross-section depth value and color information are read, the depth value of the pixel block in the three-dimensional reproduction image is greater than the depth value of the corresponding pixel block in the cross-section depth value and color information, then discard the depth value of the pixel block in the three-dimensional reproduction image and the original pixel block color information, and update them to the cross-section depth value and color information.
[0129] Further, the information overlay module 240 is specifically further configured to:
[0130] If there are unrendered parameters in the rendering parameters, send the unrendered parameters to the server, and obtain the image depth value and color information corresponding to the unrendered parameters from the server;
[0131] Overlay the image depth value and color information corresponding to the unrendered parameters on the rendering result to obtain a new rendering result.
[0132] The image rendering device provided by the embodiments of the present invention can execute the image rendering method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the method.
[0133] Embodiment III
[0134] Figure 3 It is a schematic structural diagram of an electronic device provided by Embodiment III of the present invention. Figure 3 It shows a block diagram of an exemplary electronic device 12 suitable for implementing the embodiments of the present invention. Figure 3 The shown electronic device 12 is only an example and should not bring any limitation to the functions and usage scope of the embodiments of the present invention.
[0135] As Figure 3 shown, the electronic device 12 is presented in the form of a general-purpose computing device. The components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 connecting different system components (including the system memory 28 and the processing unit 16).
[0136] The bus 18 represents one or more of several types of bus structures, including a memory bus or a memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the multiple bus structures. For example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
[0137] The electronic device 12 typically includes a variety of computer system-readable media. These media can be any available media accessible by the electronic device 12, including volatile and non-volatile media, removable and non-removable media.
[0138] System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. Electronic device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used for reading and writing on non-removable, non-volatile magnetic media ( Figure 3 not shown, commonly referred to as a "hard disk drive"). Although Figure 3 not shown in, a disk drive for reading and writing on removable non-volatile disks (such as a "USB flash drive") and an optical disk drive for reading and writing on removable non-volatile optical disks (such as CD-ROM, DVD-ROM or other optical media) may be provided. In these cases, each drive may be connected to bus 18 through one or more data media interfaces. Memory 28 may include at least one program product having a set (such as at least one) of program modules configured to perform the functions of the embodiments of the present invention.
[0139] A program / utility 40 having a set (at least one) of program modules 42 may be stored in, for example, memory 28. Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 42 generally perform the functions and / or methods in the embodiments described in the present invention.
[0140] Electronic device 12 may also communicate with one or more external devices 14 (such as a keyboard, a pointing device, a display 24, etc.), and may also communicate with one or more devices that enable a user to interact with the electronic device 12, and / or communicate with any device that enables the electronic device 12 to communicate with one or more other computing devices (such as a network card, etc.). Such communication may be carried out through an input / output (I / O) interface 22. Also, electronic device 12 may communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through network adapter 20. As shown in the figure, network adapter 20 communicates with other modules of electronic device 12 through bus 18. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0141] Processing unit 16 executes various functional applications and data processing by running programs stored in system memory 28, such as implementing the image rendering method provided by the embodiments of the present invention, applied to a client. The method includes:
[0142] Receive a rendering request from a user, where the rendering request includes rendering parameters;
[0143] Send the rendering parameters to a server and obtain an image depth value and color information from the server;
[0144] Send cross-section position information of a three-dimensional reproduction image corresponding to the image depth value and color information to the server and obtain a cross-section depth value and color information from the server;
[0145] Overlay the cross-section depth value and color information on the three-dimensional reproduction image as a rendering result.
[0146] Embodiment 4
[0147] Embodiment 4 of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the program is processed and executed, the image rendering method described above is implemented. The method includes:
[0148] Receive a rendering request from a user, where the rendering request includes rendering parameters;
[0149] Send the rendering parameters to a server and obtain an image depth value and color information from the server;
[0150] Send cross-section position information of a three-dimensional reproduction image corresponding to the image depth value and color information to the server and obtain a cross-section depth value and color information from the server;
[0151] Overlay the cross-section depth value and color information on the three-dimensional reproduction image as a rendering result.
[0152] The computer storage medium of the embodiments of the present invention may adopt any combination of one or more computer-readable media. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (non-exhaustive list) of the computer-readable storage medium include: an electrical connection having one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, the computer-readable storage medium may be any tangible medium that contains or stores a program, and the program may be used by or in combination with an instruction execution system, apparatus, or device.
[0153] A computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which computer-readable program code is carried. Such a propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. The computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device.
[0154] The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wire, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0155] The computer program code for performing the operations of the present invention may be written in one or more programming languages or combinations thereof. The programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, executed as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0156] Note that the above is only the preferred embodiment of the present invention and the technical principles applied. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein. Various obvious changes, re-adjustments, and substitutions can be made by those skilled in the art without departing from the protection scope of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments. Without departing from the concept of the present invention, it may also include more other equivalent embodiments, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. An image rendering method, characterized in that, Applied to the client, including: Receiving a rendering request from the user, the rendering request including rendering parameters; Sending the rendering parameters to the server and obtaining an image depth value and color information from the server; Changing the normal position of the initial horizontal section of the three-dimensional reproduction image and determining the cross-section position information corresponding to the normal; Sending the cross-section position information of the three-dimensional reproduction image corresponding to the image depth value and color information to the server and obtaining a cross-section depth value and color information from the server; wherein, the three-dimensional reproduction image is obtained by the client performing three-dimensional reconstruction and reproduction on the simulation result data according to the image depth value and color information in the rendering request; the rendering program in the server uses the cross-section position information as an overlay rendering parameter and calculates the cross-section depth value and color information according to the cross-section position information; Overlaying the cross-section depth value and color information on the three-dimensional reproduction image as a rendering result; wherein, the overlaid three-dimensional image has not only the three-dimensional features in the simulation result data in the rendering request but also the two-dimensional image features in the cross-section analysis tool; Overlaying the cross-section depth value and color information on the three-dimensional reproduction image as a rendering result, including: Receiving the cross-section depth value and color information from the server; If, when the cross-section depth value and color information are read in, the depth value of the pixel block in the three-dimensional reproduction image is greater than the depth value of the corresponding pixel block in the cross-section depth value and color information, then discarding the depth value of the pixel block and the original pixel block color information in the three-dimensional reproduction image and updating them to the cross-section depth value and color information; The three-dimensional reproduction image corresponding to the image depth value and color information, including: Receiving the image depth value and color information from the server; If, when the image depth value and color information are read in, the original depth value of the pixel block is greater than the depth value of the corresponding pixel block in the image depth value and color information, then discarding the original depth value of the pixel block and the original pixel block color information and updating them to the image depth value and color information.
2. The method according to claim 1, characterized in that, Before receiving the rendering request from the user, the rendering request including rendering parameters, further including: The client is monitored by the rendering program on the server; If the rendering program on the server monitors that the client has received the rendering request from the user, then establishing a connection between the rendering program on the server and the server specified by the client.
3. The method according to claim 2, characterized in that, Before establishing a connection between the rendering program on the server and the server specified by the client, further including: Determining the server specified by the client according to the rendering request.
4. The method according to claim 1, characterized in that After overlaying the cross-section depth value and color information on the three-dimensional reproduction image as a rendering result, further including: If there are unrendered parameters in the rendering parameters, then sending the unrendered parameters to the server and obtaining an image depth value and color information corresponding to the unrendered parameters from the server; Overlaying the image depth value and color information corresponding to the unrendered parameters on the rendering result to obtain a new rendering result.
5. An image rendering device, characterized in that, Including: A data receiving module for receiving a rendering request from the user, the rendering request including rendering parameters; An initial rendering module, configured to send the rendering parameters to a server and obtain an image depth value and color information from the server; A 3D reproduction module, configured to send cross-section position information of a 3D reproduction image corresponding to the image depth value and color information to the server and obtain a cross-section depth value and color information from the server; wherein, the 3D reproduction image is obtained by the client performing 3D reconstruction and reproduction on simulation result data based on the image depth value and color information in a rendering request; a rendering program in the server uses the cross-section position information as superimposed rendering parameters and calculates the cross-section depth value and color information according to the cross-section position information; An information superimposing module, configured to superimpose the cross-section depth value and color information on the 3D reproduction image as a rendering result; wherein, the superimposed 3D image has not only the three-dimensional features in the simulation result data in the rendering request, but also the two-dimensional image features in the cross-section analysis tool; Specifically, the 3D reproduction module is further configured to: Change the normal position of an initial horizontal cross-section of the 3D reproduction image and determine that the normal corresponds to the cross-section position information; Specifically, the 3D reproduction module is configured to: Receive the image depth value and color information from the server; If, when the image depth value and color information are read in, the original depth value of a pixel block is greater than the depth value of the corresponding pixel block in the image depth value and color information, discard the original depth value of the pixel block and the original pixel block color information and update them to the image depth value and color information; Specifically, the 3D reproduction module is configured to: Receive the image depth value and color information from the server; If, when the image depth value and color information are read in, the original depth value of a pixel block is greater than the depth value of the corresponding pixel block in the image depth value and color information, discard the original depth value of the pixel block and the original pixel block color information and update them to the image depth value and color information.
6. An electronic device, characterized in that, The electronic device includes: One or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the image rendering method according to any one of claims 1-4.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by a processor, it implements the image rendering method according to any one of claims 1-4.
Citation Information
Patent Citations
Method and apparatus for rendering a location-based user interface
CN103003847A
Apparatus and method of displaying medical image
CN105769240A
Three-D visual method based on image
CN1758286A