CN111145331B - Cloud rendering image fusion method and system for massive urban space three-dimensional data - Google Patents

Cloud rendering image fusion method and system for massive urban space three-dimensional data Download PDF

Info

Publication number
CN111145331B
CN111145331B CN202010019825.3A CN202010019825A CN111145331B CN 111145331 B CN111145331 B CN 111145331B CN 202010019825 A CN202010019825 A CN 202010019825A CN 111145331 B CN111145331 B CN 111145331B
Authority
CN
China
Prior art keywords
image
depth
data
pixel
fused
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010019825.3A
Other languages
Chinese (zh)
Other versions
CN111145331A (en
Inventor
王瑜
万波
王鹏
左泽均
胡茂胜
钱颢月
甄文杰
潘明敏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Research Center Of Digital City Engineering
China University of Geosciences
Original Assignee
Shenzhen Research Center Of Digital City Engineering
China University of Geosciences
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Research Center Of Digital City Engineering, China University of Geosciences filed Critical Shenzhen Research Center Of Digital City Engineering
Priority to CN202010019825.3A priority Critical patent/CN111145331B/en
Publication of CN111145331A publication Critical patent/CN111145331A/en
Application granted granted Critical
Publication of CN111145331B publication Critical patent/CN111145331B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/10Geometric effects
    • G06T15/20Perspective computation
    • G06T15/205Image-based rendering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/20Processor architectures; Processor configuration, e.g. pipelining

Abstract

The invention relates to the field of cloud rendering of massive urban space three-dimensional data, in particular to a cloud rendering image fusion method and a cloud rendering image fusion system for the massive urban space three-dimensional data, wherein the method is characterized by comprising the following steps of: s1, acquiring image data to be fused; s2, judging the number of images; s3, fusing the CPU images; s4, fusing GPU images; and S5, completing image fusion. The method and the device can greatly improve the fusion efficiency of a plurality of images, and further improve the rendering performance of the three-dimensional large scene.

Description

Cloud rendering image fusion method and system for massive urban space three-dimensional data
Technical Field
The invention relates to the field of cloud rendering of massive urban space three-dimensional data, in particular to a cloud rendering image fusion method and system for massive urban space three-dimensional data.
Background
High accuracy, high resolution's urban space three-dimensional data extraction are the key of "wisdom city", "digital city", along with the development of computer technology, virtual reality technique to and the appearance of novel mapping technique, compensatied the lack of multisource mass data acquisition means, urban three-dimensional space data is exponential formula leap.
The urban space three-dimensional data mainly comprises data acquired by combining a two-dimensional map and a building design map, digital photogrammetry, a laser scanning system, high-resolution satellite remote sensing, a vehicle-mounted mobile mapping system and the like. The combination of the two-dimensional map and the building design map means that map data which can meet the contour precision requirement is combined with a building planning design map which can provide corresponding building height information and side elevation structure information so as to obtain three-dimensional data required by building three-dimensional model construction; the digital photogrammetry takes a shot digital image as a basis, and three-dimensional space data of a shot object is obtained by combining a computer with a related digital image processing technology according to the basic principle of the digital photogrammetry; the laser scanning system can simultaneously acquire point cloud, geometric data and corresponding texture data of the surface of a shot object; the high-resolution remote sensing satellite can periodically provide global high-resolution image information, and the global high-resolution image information is superposed with the digital elevation model to generate a ground natural landscape model in a large range; the vehicle-mounted mobile measurement system can acquire panoramic images and point cloud data of ground objects in the surrounding effective surveying and mapping range in real time in the process of quick movement of the platform. The rapid accumulation of large-scale and high-precision three-dimensional urban spatial data brings huge challenges to the existing processor resources and storage systems in the aspects of comprehensive, real and accurate geographic scene visualization, and becomes one of the core contents for building digital cities and smart cities.
The contradiction between the limited rendering performance of the computer and the massive urban spatial data is a key problem faced by the visualization of the massive data, the computing efficiency is improved by adopting a cloud parallel rendering mode, and the image fusion is a very key process in the process of performing the distributed rendering of the large three-dimensional model. And with the gradual increase of the size of the three-dimensional model, the number of required nodes is increased, the image fusion process is slowed down, and the rendering performance is further influenced.
In view of this, in order to overcome the technical defects, providing a cloud rendering image fusion method and system for massive urban space three-dimensional data becomes an urgent problem to be solved in the field.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provides a cloud rendering image fusion method and system for massive urban space three-dimensional data, which can greatly improve the fusion efficiency of multiple images and further improve the rendering performance of a three-dimensional large scene.
In order to solve the technical problems, the technical scheme of the invention is as follows: a cloud rendering image fusion method for massive urban space three-dimensional data is different in that the method comprises the following steps:
s1, acquiring image data to be fused: acquiring all image data to be fused, and sending the image data of the child nodes to the master node;
s2, image quantity judgment: selecting different threshold values n according to different resolutions, and judging the size comparison between the number m and n of the images to be fused: if m is less than or equal to n, executing step S3; if m is larger than n, executing step S4;
s3, fusing the CPU images: performing image fusion according to the image depth value, comparing the depth data of the same positions of different images, and finding out the minimum depth data and the pixel data corresponding to all the positions respectively to obtain the data of a fused image; executing the next step S5;
s4, GPU image fusion: performing parallel computation in the GPU according to image pixels, namely performing cyclic comparison value-taking operation on a corresponding pixel in all the sub-images by each thread, and obtaining data of a fused image after all the threads are executed;
and S5, completing image fusion.
According to the scheme, the specific steps of the step S1 comprise:
s11, initialization: manually dividing a large three-dimensional model to be rendered into models with proper sizes and quantities, and then respectively placing the models on child nodes of each process; the main node carries out MPI parallel initialization, and makes each sub-node enter a parallel operation process to execute subsequent operation;
s12, loading a primitive: all the processes are loaded with the distributed three-dimensional models respectively;
s13, pretreatment: performing geometric processing and rasterization operation on the loaded model, and storing a pixel array and a depth array of the image to be sent, which are obtained after calculation; all child nodes need to send the generated pixel array and depth array to the master node;
s14, data receiving: and receiving and acquiring pixel arrays and depth arrays of all images by the main node through a loop operation.
According to the scheme, the specific steps of the step S3 comprise:
s31, selecting image data to be compared: the main node acquires pixel arrays and depth arrays of all sub-images, creates depth arrays and pixel arrays of fused images, and selects the depth array of the fused image in each pixel to be compared with the depth array of the next image;
s32, comparing the depths of the corresponding two pixels: circularly comparing the depth array of the fused image in each pixel with the depth array of the next image, and respectively assigning the depth value and the pixel value with small depth to the depth value and the pixel value of the fused image;
s33, judging whether comparison of all pixels in the image is completed: if all the pixel data are not compared, executing step S32; if all the pixel comparison is completed, executing the next step S34;
s34, judging whether all the image data to be fused are compared and finished: if all the image data are not compared, executing step S31; if all the images are compared, executing the next step S35;
and S35, obtaining a pixel array and a depth array of the fusion image after the calculation is finished.
According to the scheme, the specific steps of the step S4 comprise:
s41, creating a corresponding pixel array, a depth array and a fused pixel array and depth array for the GPU, and mapping the existing data in the CPU to the corresponding array in the GPU;
s42, in each thread, circularly comparing the depth value of the fused image in the pixel with the depth value of the next image, and assigning the depth value and the pixel value with small depth values to the depth value and the pixel value of the fused image until all sub-images in all threads are compared;
s43, transmitting the pixel array and the depth array of the fused image from the GPU to the CPU;
and S44, obtaining the pixel array and the depth array of the fusion image after the transmission is finished.
According to the scheme, the main node manages calculation and storage operations in a unified mode, each sub-node mainly performs calculation, and corresponding data can be stored at the same time.
According to the scheme, the image data comprises a pixel array and a depth array, data contained in the pixel array is an RGBA value of each pixel, and data contained in the depth array is a depth value of each pixel.
According to the scheme, the pixel array and the depth array of the child node are transmitted to the main node through MPI.
According to the scheme, in the process of image fusion, the acceleration effect of the GPU is more and more obvious along with the increase of the image resolution, and the value of the decision threshold n of the fusion mode is smaller and smaller.
According to the scheme, the data to be fused are transmitted into the GPU by using a zero copy technology.
A system for applying a cloud rendering image fusion method of massive city space three-dimensional data is characterized in that: which comprises
The image data module to be fused is used for sending the image data of the child nodes to the main node to obtain all the image data to be fused;
the image quantity judging module selects different thresholds n according to different resolutions, and judges the size comparison of the quantity m and n of the images to be fused: if m is less than or equal to n, performing image fusion through a CPU image fusion module; if m is larger than n, performing image fusion through a GPU image fusion module;
the CPU image fusion module is used for carrying out image fusion operation according to the image depth value so as to obtain data of a fused image;
and the GPU image fusion module is used for performing parallel calculation in the GPU according to the image pixels to obtain the data of the fusion image.
Compared with the prior art, the invention has the beneficial characteristics that:
the method solves the problem of scheduling and merging the visual tasks in the CPU + GPU hybrid acceleration environment, so as to realize complete, high-quality and high-performance drawing of a large-scale three-dimensional scene in urban space;
(1) In the cloud parallel rendering process, an image fusion process under a CPU is modified in a GPU parallel mode, and an obvious acceleration effect is achieved when data is large;
(2) The zero copy technology in the CUDA is used for improving the data transmission efficiency in the GPU parallel process, so that when the data of the whole image fusion process is large, the GPU is 1 time faster than the CPU;
(3) The image fusion mode of mixing the CPU and the GPU can achieve a faster fusion effect on image fusion in the cloud rendering process of massive three-dimensional data in urban space under many conditions.
Drawings
FIG. 1 is a schematic overall flow chart of an embodiment of the present invention;
FIG. 2 is a schematic diagram of a process of acquiring image data to be fused according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a CPU image fusion process according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a GPU image fusion process according to an embodiment of the present invention;
FIG. 5 is a broken-line diagram of the zero-copy synthesis time-acceleration ratio of the CPU and the GPU in the embodiment of the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Many aspects of the invention are better understood with reference to the following drawings. The components in the drawings are not necessarily to scale. Instead, emphasis is placed upon clearly illustrating the components of the present invention. Moreover, in the several views of the drawings, like reference numerals designate corresponding parts.
The word "exemplary" or "illustrative" as used herein means serving as an example, instance, or illustration. Any embodiment described herein as "exemplary" or "illustrative" is not necessarily to be construed as preferred or advantageous over other embodiments. All of the embodiments described below are exemplary embodiments provided to enable persons skilled in the art to make and use the examples of the disclosure and are not intended to limit the scope of the disclosure, which is defined by the claims. In other instances, well-known features and methods are described in detail so as not to obscure the invention. For purposes of the description herein, the terms "upper," "lower," "left," "right," "front," "rear," "vertical," "horizontal," and derivatives thereof shall relate to the invention as oriented in fig. 1. Furthermore, there is no intention to be bound by any expressed or implied theory presented in the preceding technical field, background, brief summary or the following detailed description. It is also to be understood that the specific devices and processes illustrated in the attached drawings, and described in the following specification are simply exemplary embodiments of the inventive concepts defined in the appended claims. Hence, specific dimensions and other physical characteristics relating to the embodiments disclosed herein are not to be considered as limiting, unless the claims expressly state otherwise.
Referring to fig. 1 to 5, the present invention performs visualized result fusion in a multi-node mode based on a CPU + GPU parallel programming model. The main control node fuses the task processing results of all the sub-nodes, so that the visualization effect can reproduce a real geographical scene as much as possible, and data collision is avoided. Meanwhile, a GPU parallel acceleration method is adopted in the key steps, so that the time spent on visual fusion is reduced as much as possible, the fusion efficiency of multiple images can be greatly improved, and the rendering performance of a three-dimensional large scene is improved.
The technology related by the invention is as follows:
(1)OpenGL
OpenGL (Open Graphics Library) literally understands an Open Graphics Library, which is a specialized Graphics application program interface for rendering and may also be referred to as an Open Graphics program interface. The OpenGL library has its own defined basic type data and related functions, so that the OpenGL library can use the same data type and the same graphics processing function on different programming languages, which embodies the strong cross-language programming capability and also embodies the capability of having cross-platform programming from the side. In fact, openGL is an application program interface that is almost independent of hardware itself, which makes it very convenient to port between different development tools and development platforms, such as a very wide variety of windows operating systems, more specialized Unix systems and Linux systems, macOS systems for apple computers, etc. Therefore, the related software supporting the OpenGL graphic library also can be said to have certain portability, and has a wider application range compared with other types of software.
(2)MPI
The MPI (Message serving Interface) is a Message transmission Interface in a literal view, and mainly functions to enable all child nodes of the distributed system architecture to perform Message transmission, thereby coordinating all nodes to normally complete a large task executed together. MPI, a standard that can be developed to date, has its own defined core semantics and associated syntax.
The MPI library can be called by multiple languages. And during programming, functions contained in the MPI library can be called like a general function call mode. Up to now, almost all industries and fields related to parallel computing support the use of MPI libraries because they have the characteristics of being able to support parallel computing well and being easy to use. A program correctly programmed with the MPI library can, if executed successfully, be successfully executed on any other parallelizable computer that supports the MPI library without any modification. It can be said that MPI has become a representative of a model for parallel programming based on message passing, and is also considered a fact-based standard that all can recognize.
(3) Sort-last rendering mode
The Sort-last rendering mode is a common method in parallel rendering, and when the Sort-last rendering mode is applied to the distributed rendering mode, three problems need to be solved: task allocation, load balancing, and image fusion.
When the Sort-last rendering mode is used in a distributed system, the Sort-last rendering mode is a task mode based on the division of the scene content space. The division artificially divides a large three-dimensional model into a plurality of three-dimensional models according to proper standards, and each divided three-dimensional model is respectively arranged on each node in the distributed system. And rendering the corresponding three-dimensional model on each node. The problem of judging the attribution of the scene cannot occur in the process of using the Sort-last rendering mode, the rendering speed of each node is only related to the current complexity of the scene, and manual control can be easily performed when the load balance problem is processed. In addition, different nodes are rendered by using machines with different configurations, and when a large three-dimensional model is manually divided into a plurality of small three-dimensional models, the large three-dimensional model can be divided according to different machine performances, so that the influence caused by the load balance problem is further processed.
(4)CUDA
The CUDA (computer Unified Device Architecture) is a Unified Device Architecture manufactured by engida corporation that is well suited for general purpose programming of GPUs. The software can fully utilize the parallel execution function of the GPU, so that the GPU can exert strong computing capability when solving the problem of very large computation amount. The CUDA programming model is well suited to uncover the parallel functionality of the GPU. The method is a software environment of a parallel programming model and is suitable for various environments with proper GPUs. In the actual use process, a user does not need to learn special instructions and structures related to the GPU, and the powerful parallel functions of the GPU are utilized by programming in the C language. According to the results of the usage test of CUDA by imperial viation corporation, the average performance of algorithms such as fast fourier transform, BLAS, sorting and solving linear equations based on GPU is approximately 20 times higher than that of algorithms implemented by CPU only.
The embodiment of the invention comprises three parts of image data acquisition to be fused, CPU image fusion and GPU image fusion:
(1) And acquiring image data to be fused. The computers communicate with each other via MPI, the main node manages calculation and storage operations in a unified way, and each subnode mainly performs calculation and stores corresponding data. The large three-dimensional model to be rendered is first manually segmented into models of appropriate size and number, and then the models are placed on the computers of the respective processes. Then the host calls an MPI _ Init () function to inform other processes to start execution; MPI _ init () is used to initialize MPI, which means that the program starts to enter the parallel operation process. And then all processes load the distributed three-dimensional model, perform geometric processing and rasterization operation on the loaded model by using OpenGL, and store the pixel array and the depth array of the image to be sent, which are obtained after calculation. The fusion image is composed of a pixel array and a depth array, and one pixel corresponds to one depth pixel and the depth is stored in the array form. The data contained in the pixel array is the RGBA value of each pixel, and the data contained in the depth array is the depth value of each pixel. When the MPI program runs, firstly, the MPI-based executable program needs to be compiled on one machine, the program needs to be copied to the same absolute path of all node machines to be run, and finally, the IP address of the node machine to be run can be marked in a command for executing the program to run successfully.
(2) And fusing the CPU images. And determining the final pixel value according to the depth value of the image pixel, and selecting two images for comparison after the main node receives the pixel array and the depth array sent by all the sub nodes. When two images are fused, corresponding pixels are covered with each other. Since the depth of a pixel represents the distance between the point model and the viewpoint, the lower the depth value the smaller the distance of the pixel from the viewpoint. When two overlapped images are observed through a viewpoint, the far pixel points cannot be seen due to the fact that the far pixel points are shielded by the near pixel points, namely, the back model is shielded by the front model. All the pixel points which can be directly seen in the two images are selected, and then the fused image can be obtained.
(3) And fusing the GPU images. In the process of image fusion, when the number of images is small or the resolution is low, the image fusion speed is higher by using the CPU; when the number of images is large or the resolution is high, the image fusion method using the GPU zero-copy technology is faster, the image number threshold n for judging whether the CPU or the GPU is used is an empirical value, changes along with the resolution of the image to be fused, has a certain relation with the performance of the CPU and the performance of the GPU, and therefore needs to be determined according to actual conditions. Therefore, the image fusion architecture with the CPU and the GPU is designed, different judgment thresholds n are given according to different resolutions, and the image fusion mode is determined, so that the image fusion process is accelerated. And the data to be fused are transmitted into the GPU by using a zero-copy technology so as to eliminate unnecessary intermediate copy times of the transmission data between memories, thereby effectively improving the data transmission efficiency. The pixel array and the depth array of the finally needed fusion image need to be updated frequently, so a general GPU data transmission mode is used.
The system of the embodiment of the invention comprises:
the image fusion system comprises an image data module to be fused, an image quantity judging module, a CPU image fusion module and a GPU image fusion module. In the process of image fusion, the acceleration effect of the GPU becomes more and more obvious along with the increase of the image resolution, and the value of the decision threshold n of the fusion mode is smaller and smaller. Therefore, different threshold values n are selected according to different resolutions, and the judgment module decides to start the CPU image fusion module or the GPU image fusion module according to the number of the images to be fused, wherein:
the image data module to be fused: all the image data to be fused are obtained by the page locking memory, and when the image data of the child nodes are sent to the master node, not only the RGBA pixel array of the image needs to be sent, but also the corresponding depth array needs to be sent. The pixel arrays and the depth arrays of all the child nodes need to be transmitted to the main node through MPI;
an image quantity judging module: selecting different threshold values n according to different resolutions, and judging the number m and n of the images to be fused;
if m < = n, starting a CPU image fusion module;
if m is larger than n, starting a GPU image fusion module;
a CPU image fusion module: performing image fusion according to the depth values, and comparing the depth data of the same positions of different images when performing image fusion to find out the pixel data with the minimum depth data of all the positions, namely the pixel data of the final image;
a GPU image fusion module: and performing parallel calculation according to the pixels, namely, each thread performs circular comparison operation on a corresponding pixel in all the sub-images, threads with the number of pixels are required in total, and a result can be obtained after all the threads are compared.
As shown in fig. 2, the specific steps of acquiring the image data to be fused in the present invention are as follows:
MPI _ Init () function step S11: before the system starts to execute, a large three-dimensional model to be rendered needs to be manually segmented into models with proper sizes and numbers, and then the models are respectively placed on computers of all processes; starting an execution program on the host, calling an MPI _ Init () function after partial operation, and informing other processes of starting execution; then entering the next step to load the distributed primitives;
primitive loading step S12: all processes are loaded with the distributed three-dimensional models respectively, and then the step 203 is carried out for data preprocessing;
a preprocessing step S13: using OpenGL to perform geometric processing and rasterization operation on the loaded model, and storing a pixel array and a depth array of the image to be sent, which are obtained after calculation; all child nodes need to send the generated pixel array and depth array to the master node;
data reception step S14: receiving by the main node through a cycle operation, and then not running all the child nodes; and the main node executes image fusion operation after acquiring the pixel arrays and the depth arrays of all the images.
As shown in fig. 3, the CPU image fusion in the present invention specifically comprises the following steps:
selecting image data to be compared step S31: the main node acquires pixel arrays and depth arrays of all sub-images, creates depth arrays and pixel arrays of fused images, and selects the depth array of the fused image in each pixel to be compared with the depth array of the next image;
step S32 of comparing the depths of the corresponding two pixels: circularly comparing the depth array of the fused image in each pixel with the depth array of the next image, and respectively assigning the depth value and the pixel value with small depth to the depth value and the pixel value of the fused image;
comparison completion determination step S33: judging whether all pixels in the image are compared;
if the comparison of all the pixel data is not finished, the step S32 is continued to circularly compare the depth array of the fusion image in each pixel with the depth array of the next image;
if all the pixel comparison is completed, the step S34 is carried out;
comparison completion judgment step S34: judging whether all the image data to be fused are compared;
if not, circulating all the sub-images and repeating the step S31 until all the sub-images are compared; if all the images are compared, the step S35 is carried out;
step S35: and obtaining the pixel array and the depth array of the fusion image after the calculation is finished.
As shown in fig. 4, the specific steps of the GPU image fusion in the present invention are as follows:
CUDA zero copy step S41: creating a corresponding pixel array, a depth array and a fused pixel array and depth array for the GPU, and mapping the existing data in the CPU to the corresponding array in the GPU;
step S42: in each thread ID, circularly comparing the depth value of the fused image in the pixel with the depth value of the next image, assigning the depth value and the pixel value with small depth values to the depth value and the pixel value of the fused image, and waiting for the completion of the kernel function until all sub-images in all threads are compared; in the CUDA program architecture, the main program is still executed by the CPU. When parallel processing of data is encountered, the CUDA compiles a program into a function that the GPU can execute in the host, and transmits it to the GPU to run in the device. This function is called a kernel function (kernel) inside the CUDA;
step S43: transmitting the pixel array and the depth array of the fused image from the GPU to the CPU;
step S44: and obtaining the pixel array and the depth array of the fusion image after the transmission is finished.
As shown in fig. 5, a zero-copy synthesis time acceleration ratio case of the CPU and the GPU is shown, that is, the CPU synthesis time/total GPU synthesis time, wherein the horizontal axis represents the number of fused images, the vertical axis represents the total synthesis time acceleration ratio value, and three broken lines represent acceleration ratio cases at three resolutions of 800 × 600, 1200 × 900, and 1900 × 1000, respectively.
At 1900 × 1000 resolution, the total time acceleration ratio can reach 1.74 at the maximum under the condition that the number of fused images is 50, which shows that the GPU has certain acceleration effect compared with the CPU.
Under the same resolution, when the number of the fused images is small, the calculation speed-up ratio is less than 1, which indicates that the GPU is slower than the CPU. As the number of fused images increases, the acceleration ratio of the image with the resolution of 800 × 600 exceeds 1 when the number of fused images reaches about 14; the acceleration ratio of the image with the resolution of 1200 x 900 exceeds 1 when the number of fused images reaches about 10; the acceleration ratio of the image with the resolution 1900 × 1000 exceeds 1 when the number of fused images reaches about 5.
Under all fusion conditions, the calculation speed-up ratio exceeds 1 finally and is higher and higher, which shows that the GPU is faster than the CPU when the number of the fused images is higher, and the broken line still has a trend of rising along with the increase of the number of the fused images, which shows that the GPU is faster and faster than the CPU.
Under the condition that the number of the fused images is the same, no matter whether the speed-up ratio exceeds 1 or not, the speed-up ratio is higher and higher along with the increase of the resolution ratio in the whole view, and the GPU is more advantageous in fusing high-resolution images. In general, the GPU can exhibit better acceleration effect when the number of fused images is higher and the resolution is larger.
The foregoing is a more detailed description of the present invention that is presented in conjunction with specific embodiments, and the practice of the invention is not to be considered limited to those descriptions. For those skilled in the art to which the invention pertains, numerous simple deductions or substitutions may be made without departing from the spirit of the invention, which shall be deemed to belong to the scope of the invention.

Claims (7)

1. A cloud rendering image fusion method for massive urban space three-dimensional data is characterized by comprising the following steps:
s1, acquiring image data to be fused: acquiring all image data to be fused, and sending the image data of the child nodes to the main node;
the specific steps of the step S1 include:
s11, initialization: manually dividing a large three-dimensional model to be rendered into models with specified size and number, and then respectively placing the models on child nodes of each process; the main node carries out MPI parallel initialization, and makes each sub-node enter a parallel operation process to execute subsequent operation;
s12, loading a primitive: all the processes are loaded with the distributed three-dimensional models respectively;
s13, pretreatment: performing geometric processing and rasterization operation on the loaded model, and storing a pixel array and a depth array of the image to be sent, which are obtained after calculation; all child nodes need to send the generated pixel array and depth array to the master node;
s14, data receiving: receiving and acquiring pixel arrays and depth arrays of all images by the main node through cyclic operation;
s2, image quantity judgment: selecting different threshold values n according to different resolutions, and judging the size comparison between the number m and n of the images to be fused: if m is less than or equal to n, executing step S3; if m is larger than n, executing step S4;
s3, CPU image fusion: performing image fusion according to the image depth value, comparing the depth data of the same positions of different images, and finding out the minimum depth data and the pixel data corresponding to all the positions respectively to obtain the data of a fused image; executing the next step S5;
the specific steps of the step S3 include:
s31, selecting image data to be compared: the main node acquires pixel arrays and depth arrays of all sub-images, creates depth arrays and pixel arrays of fused images, and selects the depth array of the fused image in each pixel to be compared with the depth array of the next image;
s32, comparing the depths of the corresponding two pixels: circularly comparing the depth array of the fused image in each pixel with the depth array of the next image, and respectively assigning the depth value and the pixel value with small depth to the depth value and the pixel value of the fused image;
s33, comparison completion judgment: judging whether all pixels in the image are compared;
if all the pixel data are not compared, the step S32 is continued to circularly compare the depth array of the fused image in each pixel with the depth array of the next image;
if all the pixel comparison is completed, the step S34 is carried out;
s34, comparison completion judgment: judging whether all the image data to be fused are compared;
if all the image data are not compared, circulating all the sub-images and repeating the step S31 until all the sub-images are compared; if all the images are compared, the step S35 is carried out;
s35, obtaining a pixel array and a depth array of the fusion image after the calculation is finished;
s4, GPU image fusion: performing parallel computation in the GPU according to image pixels, namely performing cyclic comparison value-taking operation on a corresponding pixel in all the sub-images by each thread, and obtaining data of a fused image after all the threads are executed;
the specific steps of the step S4 include:
s41, CUDA zero copy: creating a corresponding pixel array, a depth array and a fused pixel array and depth array for the GPU, and mapping the existing data in the CPU to the corresponding array in the GPU;
s42, in each thread, circularly comparing the depth value of the fused image in the pixel with the depth value of the next image, assigning the depth value and the pixel value with small depth values to the depth value and the pixel value of the fused image, and waiting for the completion of the kernel function until all sub-images in all threads are compared; in the CUDA program architecture, the main program is still executed by the CPU; when the parallel processing of the data is met, the CUDA compiles a program into a kernel function which can be executed by the GPU in the host, and transmits the kernel function to the GPU so as to run in the equipment;
s43, transmitting the pixel array and the depth array of the fused image out of the GPU to a CPU;
s44, obtaining a pixel array and a depth array of the fused image after the transmission is finished;
and S5, completing image fusion.
2. The cloud rendering image fusion method for the massive urban space three-dimensional data according to claim 1, characterized in that: the main node manages calculation and storage operations in a unified manner, and each child node mainly performs calculation and can store corresponding data.
3. The cloud rendering image fusion method for the massive city space three-dimensional data according to claim 1, characterized in that: the image data comprises a pixel array and a depth array, wherein data contained in the pixel array is an RGBA value of each pixel, and data contained in the depth array is a depth value of each pixel.
4. The cloud rendering image fusion method for the massive city space three-dimensional data according to claim 3, characterized in that: the pixel array and the depth array of the child node are transferred to the master node through MPI.
5. The cloud rendering image fusion method for the massive urban space three-dimensional data according to claim 1, characterized in that: in the process of image fusion, the acceleration effect of the GPU becomes more and more obvious along with the increase of the image resolution, and the value of the decision threshold n of the fusion mode is smaller and smaller.
6. The cloud rendering image fusion method for the massive urban space three-dimensional data according to claim 1, characterized in that: and transferring the data to be fused into the GPU by using a zero copy technology.
7. A system for applying the cloud rendering image fusion method for massive urban space three-dimensional data according to any one of claims 1 to 6, is characterized in that: which comprises
The image data module to be fused is used for sending the image data of the child nodes to the main node to obtain all the image data to be fused;
the image quantity judging module selects different thresholds n according to different resolutions, and judges the size comparison of the quantity m and n of the images to be fused: if m is less than or equal to n, performing image fusion through a CPU image fusion module; if m is larger than n, performing image fusion through a GPU image fusion module;
the CPU image fusion module is used for carrying out image fusion operation according to the image depth value so as to obtain data of a fused image;
and the GPU image fusion module is used for performing parallel calculation in the GPU according to the image pixels to obtain the data of the fusion image.
CN202010019825.3A 2020-01-09 2020-01-09 Cloud rendering image fusion method and system for massive urban space three-dimensional data Active CN111145331B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010019825.3A CN111145331B (en) 2020-01-09 2020-01-09 Cloud rendering image fusion method and system for massive urban space three-dimensional data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010019825.3A CN111145331B (en) 2020-01-09 2020-01-09 Cloud rendering image fusion method and system for massive urban space three-dimensional data

Publications (2)

Publication Number Publication Date
CN111145331A CN111145331A (en) 2020-05-12
CN111145331B true CN111145331B (en) 2023-04-07

Family

ID=70524112

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010019825.3A Active CN111145331B (en) 2020-01-09 2020-01-09 Cloud rendering image fusion method and system for massive urban space three-dimensional data

Country Status (1)

Country Link
CN (1) CN111145331B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112037333B (en) * 2020-06-23 2023-04-07 中国地质大学(武汉) Urban three-dimensional space circle layer structure calculation method
CN114416365B (en) * 2022-01-18 2022-09-27 北京拙河科技有限公司 Ultra-clear image quality image data processing method and device based on GPU fusion processing

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108520557A (en) * 2018-04-10 2018-09-11 中国人民解放军战略支援部队信息工程大学 A kind of magnanimity building method for drafting of graph image fusion
CN109961506A (en) * 2019-03-13 2019-07-02 东南大学 A kind of fusion improves the local scene three-dimensional reconstruction method of Census figure
CN110020627A (en) * 2019-04-10 2019-07-16 浙江工业大学 A kind of pedestrian detection method based on depth map and Fusion Features
CN110517213A (en) * 2019-08-22 2019-11-29 杭州图谱光电科技有限公司 A kind of real time field depth continuation method based on laplacian pyramid of microscope

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108520557A (en) * 2018-04-10 2018-09-11 中国人民解放军战略支援部队信息工程大学 A kind of magnanimity building method for drafting of graph image fusion
CN109961506A (en) * 2019-03-13 2019-07-02 东南大学 A kind of fusion improves the local scene three-dimensional reconstruction method of Census figure
CN110020627A (en) * 2019-04-10 2019-07-16 浙江工业大学 A kind of pedestrian detection method based on depth map and Fusion Features
CN110517213A (en) * 2019-08-22 2019-11-29 杭州图谱光电科技有限公司 A kind of real time field depth continuation method based on laplacian pyramid of microscope

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
HeteroSpark: A Heterogeneous CPU/GPU Spark;Peilong Li;《IEEE》;20150807;全文 *
基于Spark平台GPU资源管理与调度的扩展与研发;宋尧;《《中国优秀硕士学位论文全文数据库信息科技辑》》;20180415;全文 *

Also Published As

Publication number Publication date
CN111145331A (en) 2020-05-12

Similar Documents

Publication Publication Date Title
CN109509138B (en) Reduced acceleration structure for ray tracing system
CN108648269B (en) Method and system for singulating three-dimensional building models
EP2939208B1 (en) Sprite graphics rendering system
US11810239B2 (en) Methods and graphics processing units for determining differential data for rays of a ray bundle
US8102391B2 (en) Hybrid rendering of image data utilizing streaming geometry frontend interconnected to physical rendering backend through dynamic accelerated data structure generator
US8384711B2 (en) Ray tracing a three dimensional scene using a grid
WO2012158868A2 (en) Rendering tessellated geometry with motion and defocus blur
JP2008077627A (en) Method and system for early z test in three-dimensional image rendering
US20230206565A1 (en) Providing augmented reality in a web browser
CN111145331B (en) Cloud rendering image fusion method and system for massive urban space three-dimensional data
CN106990961B (en) Method for establishing WebGL graphic rendering engine
WO2018063582A1 (en) Method and apparatus for the proper ordering and enumeration of multiple successive ray-surface intersections within a ray tracing architecture
US11790593B2 (en) Ray-tracing multi-sample anti-aliasing
WO2009078561A1 (en) Method and system of rendering parallel global illumination
KR20210092231A (en) Watertight ray triangle intersection that does not restore with double precision
US10909764B2 (en) Providing augmented reality target images in a web browser
Masood et al. High‐performance virtual globe GPU terrain rendering using game engine
CN115496835A (en) Point cloud data coloring method and system based on CPU and GPU heterogeneous parallel architecture
Kang et al. Developing a tile-based rendering method to improve rendering speed of 3d geospatial data with html5 and webgl
KR20220166777A (en) Motion computing of pixels between images
Ioannidis et al. Multithreaded rendering for cross-platform 3D visualization based on Vulkan Api
KR101281156B1 (en) Ray tracing core and processing mehtod for ray tracing
CN113256771A (en) Graphics system and graphics processing method therefor
US11861785B2 (en) Generation of tight world space bounding regions
CN116863052A (en) Map drawing method and device based on distributed operating system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant