A method for local GPU accelerated real-time rendering of medical graphics
By preprocessing the medical graphics model and setting multi-view texture information, combined with implicit triangular meshes and blending functions, the rendering performance problem caused by CPU-GPU memory limitations was solved, achieving efficient and smooth medical graphics rendering effects.
Patent Information
- Application Number
- CN202211294186.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-21
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2042-10-21
AI Technical Summary
In existing medical graphics rendering technologies, due to the limitations of CPU-GPU memory bus bandwidth and latency, physical simulation and detail optimization are performed on the CPU, which affects hardware performance and easily produces artifacts and jagged edges during the rendering process.
By preprocessing the human tissue model, setting texture information for multiple views, using implicit triangular meshes and blending functions to avoid artifacts, employing bilinear interpolation upsampling to reduce aliasing, and integrating the model into the hardware subdivision pipeline, rendering efficiency is improved.
It achieves efficient rendering of medical graphics, reduces artifacts and jagged edges, improves rendering smoothness and realism, and enhances computing speed and rendering simplicity.
Smart Images

Figure CN115578496B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of computer rendering technology, and particularly relates to a local GPU-accelerated real-time rendering method for medical graphics. Background Technology
[0002] Tessellation is an exciting new feature in OpenGL 4.x. Tessellation is primarily used to address the static properties of 3D models, including their detail and polygon count. Specifically, when we look closely at a complex model (such as a heart), we want to be able to see all the details of the model (such as the wrinkles on the surface of tissues), which is a feature required for rendering medical graphics.
[0003] The key issue is that physical simulations and detail optimizations typically run on the CPU, while the rendered surface geometry is stored...
[0004] On the GPU, this requires the CPU to access mesh data from the GPU to calculate surface deformation. Furthermore, physics updates involve uploading the modified surface geometry back to the GPU. Due to bandwidth and latency limitations of the CPU-GPU memory bus, this results in significant runtime overhead and impacts the performance of current hardware architectures.
[0005] In conclusion, existing rendering technologies clearly have inconveniences and shortcomings in practical use, so it is necessary to improve them. Summary of the Invention
[0006] The purpose of this invention is to provide a local GPU-accelerated real-time rendering method for medical graphics, characterized by the following steps:
[0007] S1: Preprocessing of human tissue models;
[0008] S2: Set multiple views of the preprocessed human tissue model, and obtain the texture information of the target view through two adjacent input views;
[0009] S3: For real-time performance, improve the resolution by upsampling the native depth map and the blended map, thereby improving the rendering effect;
[0010] S4: Draw the triangular facets that make up human tissues;
[0011] S5: Rasterize the processed human tissue model to obtain the final rendering result.
[0012] Further, S2 specifically involves: setting the target view. and Two adjacent input views and depth map, the input image and are warped to the target view respectively , and the source view and depth map are deformed to the target view respectively to obtain and , so as to obtain the occlusion information, which is expressed by formula one:
[0013] ;
[0014] In the formula one, and are simultaneously 1 or 2. i
[0015] Further, for the occlusion information, the adjacent pixels of each triplet are linked to obtain an implicit triangular mesh, then the implicit triangular mesh is warped to the target view position using the corresponding depth map, and rasterization is performed using the related color, when other input images do not contain information for filling the implicit triangular mesh, the pixels located in the implicit triangular mesh on the occlusion are detected to be discarded, and remain black in the final result, so as to avoid artifacts when the scene depth changes, and further achieve the purpose of accelerating rendering.
[0016] Further, by using a quality criterion q characterizing the ability to avoid elongated triangles, so as to detect the triangle at the outward position, the quality criterion q is obtained by an empirical formula, and the empirical formula is expressed as:
[0017] ;
[0018] In the empirical formula, L is the longest side of the triangle, T is a pixel threshold, is a target camera observation vector, is a normal of the triangle, and when q of the triangle is zero, the pixels inside the triangle are discarded.
[0019] Further, by using a blending function , the local fine geometry and texture information of the adjacent input views are fused with the pixel-level blending map W, so as to avoid artifacts generated after blending, and the blending function is expressed as:
[0020] .
[0021] Further, in the S3, by using bilinear interpolation, the is up-sampled, then the exclusive or operation is applied to extract the boundary area, and a new depth map is formed at 1K resolution , using obtained by warping the original high-resolution input image into the target view has , thereby avoiding the jagged effect caused by native sampling near the boundary due to the ambiguity of depth inference.
[0022] Further, the final texture blending result is represented by Formula Two:
[0023] ;
[0024] In the Formula Two, is the high-resolution blended image that is natively sampled by bilinear interpolation.
[0025] Further, in the S1, the preprocessing includes the following steps:
[0026] S11: using a set of medical images of human tissues as a basic model;
[0027] S12: reading model information of the basic model, the model information including topological relationship, characteristic label and basic vertex of each fixed point;
[0028] S13: transmitting the read model information into a vertex shader, and processing the vertex into a surface in the vertex shader.
[0029] Further, in the S4, a light model of human tissues is also needed to be set and related textures are loaded.
[0030] Compared with the prior art, the beneficial effects of the present application mainly lie in: integrating medical images into a hardware subdivision pipeline, improving the simplicity and efficiency of rendering by a neural blending pipeline method, not only improving the operation speed, but also speeding up the fluency and reality of rendering. BRIEF DESCRIPTION OF DRAWINGS
[0031] Figure 1 is a flow chart of a local GPU accelerated real-time rendering method for medical images. DETAILED DESCRIPTION
[0032] The local GPU accelerated real-time rendering method for medical images will be described in more detail below with reference to the accompanying drawings, in which a preferred embodiment of the present application is shown, it should be understood that those skilled in the art can modify the present application described herein while still achieving the advantageous effects of the present application, therefore, the following description should be understood as a broad knowledge for those skilled in the art, and not as a limitation of the present application.
[0033] As Figure 1 shown, a local GPU accelerated real-time rendering method for medical images, characterized by comprising the following steps:
[0034] Step (1) Use a set of medical graphics of human tissues as the basic model.
[0035] Step (1-1) reads the model information, including the topological relationships of each vertex, feature labels, and basic vertices.
[0036] Step (1-2) involves passing the above data into the vertex shader and processing the vertices into surfaces in the vertex shader.
[0037] Step (2) For a set of medical graphics input, when setting multiple views, most of the texture information in the target view can be obtained through its two adjacent input views.
[0038] Based on this, the target view is generated first. and two input views and For the depth map, we use Input image and Distort it into the target view, using This indicates that we also transform the source view depth map into the target view and obtain... and To obtain occlusion information ; and middle i It can be either 1 or 2.
[0039] Before being blended with other views, each input view is warped according to the target camera pose. To avoid holes in the final output image, adjacent pixels of each triplet are linked together to obtain an implicit triangle mesh; the triangles are then warped to the target view location using the corresponding depth map and finally rasterized with their associated colors; if no other input image contains information to fill them, pixels detected as occluded are discarded and remain black in the final result; this method avoids artifacts caused by sudden depth changes in the scene and is not as time-consuming as image repair or segmentation in superpixels; to detect triangles in outward-facing positions, a quality metric q is used to characterize the ability to avoid elongating triangles. q This can be obtained empirically using the following formula:
[0040] ;
[0041] Where L is the longest side of the triangle, and T is the pixel threshold. It is the target camera's observation vector. It is the normal of the triangle. Slender triangles have a very poor visual effect and correspond to a relatively small q. When the q of a triangle is zero, it will be discarded.
[0042] Due to self-occlusion and inaccurate geometric features There may be significant errors, and simple blending can produce severe artifacts; therefore, a blending function is used. It utilizes global information from multi-view settings to fuse local fine-grained geometric and texture information from adjacent input views with a pixel-level blending map W, defined as:
[0043] ;
[0044] Step (3) For real-time performance, the depth map is generated at a low resolution of 256×256.
[0045] To achieve more realistic rendering, it's necessary to sample from both the native depth map and the blended map to reach 1K resolution. However, due to the inherent ambiguity of depth inference, native sampling can cause severe jagged edges near the boundaries. To overcome this jagged edge effect, bilinear interpolation is used. Upsampling is performed; then an XOR operation is applied to extract the boundary region; the depth values within the boundary region are recalculated using a hybrid pipeline to form a new depth map at 1K resolution. Then use Distort the original high-resolution input image to the target view to obtain The final texture blending result is represented as follows:
[0046] ;
[0047] in It is a high-resolution blended image obtained through native sampling using bilinear interpolation.
[0048] Step (4) Draw the triangular facets that make up the human body tissues.
[0049] Step (4-1) Set up the lighting model of human tissue and load the relevant textures.
[0050] Step (5) rasterizes the processed model to obtain the final rendering result.
[0051] The above are merely preferred embodiments of the present invention and do not constitute any limitation on the present invention. Any equivalent substitutions or modifications made by those skilled in the art to the technical solutions and content disclosed in the present invention without departing from the scope of the present invention shall be deemed to have remained within the protection scope of the present invention.
Claims
1. A local GPU-accelerated real-time rendering method for medical graphics, characterized in that, Includes the following steps: S1: Preprocessing of human tissue models; S2: Set multiple views of the preprocessed human tissue model, and obtain the texture information of the target view through two adjacent input views; S3: For real-time performance, improve the resolution by upsampling the native depth map and the blended map, thereby improving the rendering effect; S4: Draw the triangular facets that make up human tissues; S5: Rasterize the processed human tissue model to obtain the final rendering result; Specifically, S2 involves setting the target view. and Two adjacent input views and The depth map of the input image and Distort to the target view respectively get Then, transform the source view and depth map into the target view respectively to obtain and This allows us to obtain occlusion information, which can be represented by Formula 1: ; In Formula 1, and middle i It can be either 1 or 2; For occlusion information, the adjacent pixels of each triple are linked to obtain an implicit triangle mesh. Then, the implicit triangle mesh is distorted to the target view position using the corresponding depth map and rasterized with the relevant color. When other input images do not contain information for filling the implicit triangle mesh, the pixels in the implicit triangle mesh located on the occlusion are discarded and kept black in the final result, thereby avoiding artifacts when the scene depth changes, and thus achieving the purpose of accelerating rendering. By using quality standards q The ability to characterize triangles without elongating them, thus detecting triangles facing outwards, is a quality standard. q This is obtained through empirical formulas, which are expressed as follows: ; In the empirical formula, L is the longest side of the triangle, and T is the pixel threshold. For the target camera observation vector, Let be the normal to the triangle, when the triangle's q When the value is zero, discard the pixels inside the triangle; By using a blending function This involves fusing the local fine geometric and texture information of adjacent input views with a pixel-level blending map W, avoiding... The artifacts produced after blending, the blending function Represented as: ; In S3, bilinear interpolation pairs are used. Upsampling is performed, then an XOR operation is applied to extract the boundary region, and a new depth map is formed at 1K resolution. ,use Distort the original high-resolution input image to the target view to obtain This avoids the jagged effect caused by native sampling near the boundary due to the ambiguity of depth inference; The final texture blending result is represented by Formula 2: ; In Formula 2, represents a high-resolution hybrid image obtained through native sampling via bilinear interpolation.
2. The local GPU-accelerated real-time rendering method for medical graphics according to claim 1, characterized in that, In step S1, the preprocessing includes the following steps: S11: Uses a set of medical graphics of human tissues as the basic model; S12: Read the model information of the basic model, which includes the topological relationship of each vertex, feature labels and basic vertices; S13: Pass the read model information into the vertex shader, and process the vertices into surfaces in the vertex shader.
3. The method for local GPU-accelerated real-time rendering of medical graphics according to claim 1, characterized in that, In step S4, it is also necessary to set the lighting model of human tissue and load the relevant textures.
Citation Information
Patent Citations
Scene model rendering method and device thereof, electronic equipment and storage medium
CN113178014A