Disclosure of Invention
The present invention is directed to a three-dimensional reconstruction method based on virtual resource management, so as to solve the foregoing problems in the prior art.
In order to achieve the purpose, the technical scheme adopted by the invention is as follows:
a three-dimensional reconstruction method based on virtual resource management comprises the following steps,
s1, loading images in the oblique live-action modeling software, setting modeling parameters and submitting a modeling task;
s2, starting a node program on each computer; each time the node program is enabled, distinguishing virtual nodes by adding different digital forms;
s3, respectively virtualizing the hardware resources of each computer into a resource pool, and realizing the separation of hardware and resources so as to virtualize a plurality of computing nodes in each computer;
s4, setting node access authority and working path in each computer, and automatically reading each node on each computer;
s5, performing a multi-node modeling task, wherein in the process of performing the multi-node modeling task, each computer dynamically distributes hardware resources to the nodes contained in the computer, calculates the required resources according to the calculation task of each node, and dynamically distributes a hardware CPU and a GPU to each node in real time;
and S6, outputting a three-dimensional model result after the tasks distributed by each computer are completed by the nodes contained in the computer.
Preferably, the multi-node modeling task specifically includes aerial triangulation, point cloud construction, prime model construction and automatic texture mapping.
Preferably, in step S4, when a node occupies a high CPU resource in the computer, the computer will automatically allocate the GPU computing resource to other nodes included in the node.
The invention has the beneficial effects that: the hardware resources of each computer are virtualized into a resource pool, so that the hardware and the resources are separated, a plurality of computing nodes can be virtualized on one computer, the resources are dynamically allocated to each computing node according to the computing process, the hardware resources of the computers are utilized to the maximum extent, the utilization rate of each computer is improved, and the modeling efficiency of a single computer is improved on the premise of not influencing the modeling effect.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail below with reference to the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating the invention, are intended for purposes of illustration only and are not intended to limit the scope of the invention.
As shown in fig. 1, the present invention provides a three-dimensional reconstruction method based on virtual resource management, comprising the following steps,
s1, loading images in the oblique live-action modeling software, setting modeling parameters and submitting a modeling task;
s2, starting a node program on each computer; each time the node program is enabled, distinguishing virtual nodes by adding different digital forms;
s3, respectively virtualizing the hardware resources of each computer into a resource pool, and realizing the separation of hardware and resources so as to virtualize a plurality of computing nodes in each computer;
s4, setting node access authority and working path in each computer, and automatically reading each node on each computer;
s5, performing a multi-node modeling task, wherein in the process of performing the multi-node modeling task, each computer dynamically distributes hardware resources to the nodes contained in the computer, calculates the required resources according to the calculation task of each node, and dynamically distributes a hardware CPU and a GPU to each node in real time;
and S6, outputting a three-dimensional model result after the tasks distributed by each computer are completed by the nodes contained in the computer.
In this embodiment, the computers are located in the same local area network, and each computer in the local area network can virtualize hardware resources into a resource pool to implement resource and hardware separation, so that each computer in the local area network can virtualize a plurality of computing nodes, set node access rights and working paths, and the host interface can automatically read out the plurality of nodes on each computer.
In this embodiment, the multi-node modeling task specifically includes aerial triangulation, point cloud construction, prime modeling, and automatic texture mapping.
In this embodiment, the aerial triangulation is a measurement method in which, in stereo photogrammetry, control point encryption is performed indoors according to a small number of field control points to obtain the elevation and the plane position of an encrypted point. The main purpose of the method is to provide absolutely directional control points for mapping regions lacking field control points. Aerial triangulation is generally divided into two categories: simulating aerial triangulation, namely aerial triangulation by an optical mechanical method; and resolving the aerial triangulation, namely commonly called computerised encryption. The simulated aerial triangulation is aerial triangulation performed on an all-purpose stereo measurement instrument (such as a multiplier). It recovers the space model similar to or corresponding to the shooting course on the instrument, selects the encrypted points according to the mapping requirement, and determines the elevation and plane position.
The method for encrypting the control point indoors utilizes the intrinsic geometric characteristics of the photo in the aerial photogrammetry. The method is characterized in that aerial camera films which are continuously shot and have certain overlap are utilized, and a corresponding flight path model or area network model (optical or digital) on the same site is established by a photogrammetry method according to a small number of field control points, so that the plane coordinates and the elevation of an encrypted point are obtained. The method is mainly used for measuring the topographic map.
In this embodiment, the point cloud construction is the extraction of feature points of the terrain and the ground features based on the aerial triangulation result. In the reverse engineering, a point data set of the product appearance surface obtained by a measuring instrument is also called point cloud, the number of points obtained by using a three-dimensional coordinate measuring machine is small, the distance between the points is large, and the point data set is called sparse point cloud; the point clouds obtained by using the three-dimensional laser scanner or the photographic scanner have larger and denser point quantities, and are called dense point clouds. The point cloud is a collection of a vast number of points on the surface characteristic of the object.
The point cloud obtained according to the laser measurement principle comprises three-dimensional coordinates (XYZ) and laser reflection Intensity (Intensity).
The point cloud obtained according to the photogrammetry principle comprises three-dimensional coordinates (XYZ) and color information (RGB).
And combining laser measurement and photogrammetry principles to obtain a point cloud comprising three-dimensional coordinates (XYZ), laser reflection Intensity (Intensity) and color information (RGB).
After obtaining the spatial coordinates of each sampling Point on the surface of the object, a set of points is obtained, which is called "Point Cloud". Format of the point cloud: *. pts; *. asc; *. dat; *. stl; *. imw, respectively; *. xyz.
In this embodiment, the prime modeling refers to a process in which point clouds form a triangular mesh, and a large number of point clouds form a dense triangular mesh.
In this embodiment, the texture mapping refers to a process of automatically performing mapping on the constructed triangle surface.
In this embodiment, step S4 is specifically that, when a node has a high CPU computing resource occupancy rate in the computer in which the node is located, the computer automatically allocates the GPU computing resource to other nodes included in the node. By dynamically distributing the computing resources, the CPU and GPU computing resources can be fully utilized at any time.
In the embodiment, the method carries out the reconstruction of the inclined real-scene three-dimensional model by virtualizing a plurality of computing nodes on a single computer through a virtual resource pool; the method realizes the separation of hardware and resources by virtualizing the hardware resources of each computer into a resource pool, so that a plurality of computing nodes can be virtualized on one computer, the resources are dynamically allocated to each computing node according to the computing process, the hardware resources of the computers are utilized to the maximum extent, the utilization rate of each computer is improved, and the modeling efficiency of a single computer is improved on the premise of not influencing the modeling effect.
In this embodiment, compared with the existing modeling technology, the method provided by the present invention has the following advantages:
1. the computer with 16 cores can virtualize two computing nodes, the computing efficiency is the same as that of the previous two computers with 64G memory and 16 cores, so that the two nodes are virtualized by the virtualization technology at present, the computing efficiency of each computer is 2 times that of the previous single computer, the number of the nodes which can be virtualized for the computation with higher hardware configuration is 3 or 4, and the computing efficiency is 3-4 times that of the single computer without adopting the virtual node technology; therefore, the modeling efficiency of a single computer can be greatly improved.
2. Secondly, the computing power of one computer is equivalent to that of a plurality of computers before through a virtual node technology, the total investment of computer hardware resources can be reduced, the investment of the hardware resources can be reduced by 30% -40% on the basis of the original investment, in addition, the hardware maintenance and the consumed electric quantity at the later stage can also be reduced by 40% -60% on the basis of the original investment, and therefore the hardware resources and the later-stage daily expenditure are greatly reduced.
By adopting the technical scheme disclosed by the invention, the following beneficial effects are obtained:
the invention provides a three-dimensional reconstruction method based on virtual resource management, which realizes the separation of hardware and resources by virtualizing the hardware resources of each computer into a resource pool, further can virtually simulate a plurality of computing nodes on one computer, dynamically allocates resources to each computing node according to the computing process, maximally utilizes the hardware resources of the computer, improves the utilization rate of each computer, and simultaneously improves the modeling efficiency of a single computer on the premise of not influencing the modeling effect.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and improvements can be made without departing from the principle of the present invention, and such modifications and improvements should also be considered within the scope of the present invention.