CN114022649A - GPU-CPU (graphics processing unit-central processing unit) cooperative raster data rapid coordinate conversion method and system - Google Patents

GPU-CPU (graphics processing unit-central processing unit) cooperative raster data rapid coordinate conversion method and system Download PDF

Info

Publication number
CN114022649A
CN114022649A CN202111347774.8A CN202111347774A CN114022649A CN 114022649 A CN114022649 A CN 114022649A CN 202111347774 A CN202111347774 A CN 202111347774A CN 114022649 A CN114022649 A CN 114022649A
Authority
CN
China
Prior art keywords
data
cpu
grid
gpu
information
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.)
Pending
Application number
CN202111347774.8A
Other languages
Chinese (zh)
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.)
Shandong Provincial Institute of Land Surveying and Mapping
Original Assignee
Shandong Provincial Institute of Land Surveying and Mapping
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 Shandong Provincial Institute of Land Surveying and Mapping filed Critical Shandong Provincial Institute of Land Surveying and Mapping
Priority to CN202111347774.8A priority Critical patent/CN114022649A/en
Publication of CN114022649A publication Critical patent/CN114022649A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/20Editing of 3D images, e.g. changing shapes or colours, aligning objects or positioning parts

Landscapes

  • Engineering & Computer Science (AREA)
  • Architecture (AREA)
  • Computer Graphics (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)

Abstract

The invention provides a GPU-CPU (graphics processing unit-central processing unit) cooperative raster data rapid coordinate conversion method and a system, wherein a three-dimensional point cloud data set is constructed, a triangular net is generated, data in the triangular net are extracted and interpolated into a regular grid, and the construction and assignment of the parameters of the whole coordinate conversion regular grid are realized; loading original grid data, acquiring relevant information of a target grid by using the regular grid parameters, and generating blank target grid data; partitioning the raster data according to the data information of the CPU; establishing a memory pointer of a CPU (Central processing Unit) end by utilizing the information of the regular grid parameters, applying for a memory space of a GPU (graphics processing Unit) end, and copying memory information of the CPU end to the GPU end; and (5) iteratively executing the partitioned video memory space of the target raster data, and performing coordinate conversion and interpolation on the original raster data. The invention can really realize high-efficiency data conversion.

Description

GPU-CPU (graphics processing unit-central processing unit) cooperative raster data rapid coordinate conversion method and system
Technical Field
The invention belongs to the technical field of image data processing, and particularly relates to a GPU-CPU cooperative raster data rapid coordinate conversion method and system.
Background
The statements in this section merely provide background information related to the present disclosure and may not necessarily constitute prior art.
The geographic space data mainly comprises vector data and raster data, the raster data is larger and larger along with the improvement of the resolution of a sensor and the improvement of data acquisition frequency, the remote sensing image is used as a main representative of the raster data, the image has various coordinate systems, the requirement on the data conversion efficiency is high, and the conversion efficiency is greatly limited by the coordinate conversion of mass raster data. Meanwhile, the traditional coordinate conversion parameters, especially when the large-amplitude raster data is converted, cause data distortion and influence the conversion precision.
Disclosure of Invention
The invention provides a GPU-CPU cooperative raster data rapid coordinate conversion method and a system for solving the problems, and the method and the system can solve the problems that the coordinate conversion efficiency of the traditional raster data is low and partial huge images cannot be converted, thereby really realizing the high-efficiency conversion of data.
According to some embodiments, the invention adopts the following technical scheme:
a GPU-CPU cooperative raster data fast coordinate conversion method comprises the following steps:
constructing a three-dimensional point cloud data set;
generating a triangular net based on the three-dimensional point cloud data set, extracting data in the triangular net and interpolating the data into a regular grid, and realizing the construction and assignment of the parameters of the whole coordinate conversion regular grid;
loading original grid data, acquiring relevant information of a target grid by using the regular grid parameters, and generating blank target grid data;
partitioning the raster data according to the data information of the CPU;
establishing a memory pointer of a CPU (Central processing Unit) end by utilizing the information of the regular grid parameters, applying for a memory space of a GPU (graphics processing Unit) end, and copying memory information of the CPU end to the GPU end;
establishing a regular grid parameter memory space corresponding to the range according to the range of the grid data block of the CPU end, iteratively executing the regular grid parameter memory space in the target grid data block memory space, performing coordinate conversion and interpolation on original grid data, storing the current grid data block data, and releasing the current GPU data block memory.
As an alternative embodiment, when the three-dimensional point cloud data set is constructed, the three-dimensional point cloud data set is constructed by using the difference value in the X direction and the Y direction as the Z value according to the inputted homonymous control point data of different coordinate systems.
As an alternative embodiment, the specific process for implementing the construction and assignment of the whole coordinate transformation rule grid parameter includes: a Delaunay triangulation network is generated by adopting a divide-and-conquer triangle subdivision algorithm, and a Z value is assigned to each node of the triangulation network; and (3) constructing regular grids with certain resolution, and extracting the numerical value of each grid from the triangular net through a Krigin interpolation algorithm.
As an alternative embodiment, the related information includes four-to information, the number of bands, resolution, band arrangement, and coordinate information.
As an alternative implementation, the data information at the CPU end includes a data size, a number of bands, and a CPU available memory.
As an alternative embodiment, when the target raster data block video memory space is subjected to coordinate conversion, the target raster data block video memory space is applied, and X, Y coordinates of the target coordinate system are obtained by using the conversion parameters.
As an alternative embodiment, the interpolation on the raw raster data uses bilinear interpolation.
A GPU-CPU coordinated raster data fast coordinate transformation system comprises:
a point cloud dataset construction module configured to construct a three-dimensional point cloud dataset;
the regular grid parameter generation module is configured to generate a triangular grid based on the three-dimensional point cloud data set, extract data in the triangular grid and interpolate the data into the regular grid, and realize the construction and assignment of the whole coordinate transformation regular grid parameters;
the raster data read-write module is configured to load original raster data, acquire relevant information of a target raster by using the regular grid parameters and generate blank target raster data;
the data blocking module is configured to block the raster data according to the data information of the CPU;
the memory interaction module is configured to construct a memory pointer of the CPU end by using the information of the regular grid parameters, apply for a memory space of the GPU end and copy the memory information of the CPU end to the GPU end;
and the coordinate conversion module is configured to establish a regular grid parameter video memory space corresponding to the range according to the range of the grid data block of the CPU end, iteratively execute the regular grid parameter video memory space in the target grid data block video memory space, perform coordinate conversion and interpolation on the original grid data, store the current grid data block data and release the current GPU data block memory.
An electronic device comprising a memory and a processor and computer instructions stored on the memory and executed on the processor, the computer instructions, when executed by the processor, performing the steps of the above method.
A computer readable storage medium storing computer instructions which, when executed by a processor, perform the steps of the above method.
Compared with the prior art, the invention has the beneficial effects that:
the invention adopts the image parallel processing method, can realize the rapid processing of the grid, and solves the problems of low efficiency of the traditional grid data coordinate conversion and incapability of converting partial huge images, thereby really realizing the high-efficiency conversion of data.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, are included to provide a further understanding of the invention, and are incorporated in and constitute a part of this specification, illustrate exemplary embodiments of the invention and together with the description serve to explain the invention and not to limit the invention.
FIG. 1 is a schematic flow chart of at least one embodiment of the present invention.
The specific implementation mode is as follows:
the invention is further described with reference to the following figures and examples.
It is to be understood that the following detailed description is exemplary and is intended to provide further explanation of the invention as claimed. Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
It is noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of exemplary embodiments according to the invention. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, and it should be understood that when the terms "comprises" and/or "comprising" are used in this specification, they specify the presence of stated features, steps, operations, devices, components, and/or combinations thereof, unless the context clearly indicates otherwise.
The first embodiment is as follows:
a GPU-CPU cooperative raster data fast conversion method comprises the following steps:
(1) and (5) constructing the parameters of the regular grid.
Firstly, a three-dimensional point cloud data set is constructed, input homonymous control point data of different coordinate systems are utilized, and the difference value of the X direction and the Y direction is used as a Z value to construct the three-dimensional point cloud data set (X, Y and Z).
Zx=xa-xb
Zy=ya-yb
The points a and b are a pair of control points with the same name, and x and y are the abscissa and the ordinate of the points.
② regular grid parameter construction
Firstly, generating a Delaunay triangulation network by using a three-dimensional point cloud data set and adopting a divide-and-conquer triangle subdivision algorithm, and assigning a Z value to each node of the triangulation network; and then, constructing a regular grid with the resolution of 1km x 1km, extracting the numerical value of each grid from the triangular grid through a Krigin interpolation algorithm, and completing the construction and assignment of the grid parameters of the whole coordinate transformation rule, wherein the grid parameters are used as the mathematical basis of the coordinate transformation of the whole grid data. The parameters in this step are built at the cpu end and put into the memory.
(2) And (3) loading original raster data, reading information such as the fourth to the fourth data and the resolution, acquiring the fourth to the fourth information, the number of wave bands, the resolution, the wave band arrangement mode, the coordinate information and the like of the target raster by using the regular grid parameters in the step (1), and generating blank target raster data.
(3) Establishing a grid data blocking strategy at a CPU end, and blocking according to information such as data size, wave band number, available CPU memory and the like by using a line unit to obtain the number of data blocks.
(4) And (3) alternately setting the memory of the CPU-GPU end of the regular grid parameters, constructing a memory pointer of the CPU end by using the information of the regular grid parameters, applying for the memory space of the GPU end, copying the memory information of the CPU end to the GPU end, and realizing efficient reading and operation of the regular grid parameters.
In the step, the parameters are copied to the GPU terminal, the parameters are actually acquired from the GPU terminal, and the parameters of the GPU terminal and the parameters of the CPU terminal are consistent and only different in reading modes.
(5) For each raster data block, developing GPU end data block according to the available video memory of the GPU, and then carrying out iterative processing:
establishing a regular grid parameter video memory space corresponding to the range according to the range of the grid data block, and acquiring corresponding conversion parameters from interpolation in the step (4).
And secondly, applying for a partitioned video memory space of the target raster data, acquiring X, Y coordinates of a target coordinate system by using the parameter result in the step one, performing bilinear interpolation on the original raster data, and assigning the extracted numerical value to the target raster.
And thirdly, storing the current grid block data and finishing the memory release of the current GPU data block.
In order to verify the coordinate conversion efficiency of the method provided in the first embodiment, three data are selected according to parameters such as data size and resolution to perform data conversion respectively, the conversion efficiency is counted, and the specific result is shown in table 1, and the overall efficiency of the GPU algorithm is improved by about 10 times compared with that of the CPU coordinate conversion.
TABLE 1
Figure BDA0003354631060000071
The invention also provides the following product examples:
a GPU-CPU coordinated raster data fast coordinate transformation system comprises:
a point cloud dataset construction module configured to construct a three-dimensional point cloud dataset;
the regular grid parameter generation module is configured to generate a triangular grid based on the three-dimensional point cloud data set, extract data in the triangular grid and interpolate the data into the regular grid, and realize the construction and assignment of the whole coordinate transformation regular grid parameters;
the raster data read-write module is configured to load original raster data, acquire relevant information of a target raster by using the regular grid parameters and generate blank target raster data;
the data blocking module is configured to block the raster data according to the data information of the CPU;
the memory interaction module is configured to construct a memory pointer of the CPU end by using the information of the regular grid parameters, apply for a memory space of the GPU end and copy the memory information of the CPU end to the GPU end;
and the coordinate conversion module is configured to establish a regular grid parameter video memory space corresponding to the range according to the range of the grid data block of the CPU end, iteratively execute the regular grid parameter video memory space in the target grid data block video memory space, perform coordinate conversion and interpolation on the original grid data, store the current grid data block data and release the current GPU data block memory.
An electronic device comprising a memory and a processor, and computer instructions stored on the memory and executed on the processor, the computer instructions when executed by the processor performing the steps of the method provided by embodiment one.
A computer readable storage medium storing computer instructions which, when executed by a processor, perform the steps of a method provided by one embodiment.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Although the embodiments of the present invention have been described with reference to the accompanying drawings, it is not intended to limit the scope of the present invention, and it should be understood by those skilled in the art that various modifications and variations can be made without inventive efforts by those skilled in the art based on the technical solution of the present invention.

Claims (10)

1. A GPU-CPU cooperative raster data rapid coordinate conversion method is characterized by comprising the following steps: the method comprises the following steps:
constructing a three-dimensional point cloud data set;
generating a triangular net based on the three-dimensional point cloud data set, extracting data in the triangular net and interpolating the data into a regular grid, and realizing the construction and assignment of the parameters of the whole coordinate conversion regular grid;
loading original grid data, acquiring relevant information of a target grid by using the regular grid parameters, and generating blank target grid data;
partitioning the raster data according to the data information of the CPU;
establishing a memory pointer of a CPU (Central processing Unit) end by utilizing the information of the regular grid parameters, applying for a memory space of a GPU (graphics processing Unit) end, and copying memory information of the CPU end to the GPU end;
establishing a regular grid parameter memory space corresponding to the range according to the range of the grid data block of the CPU end, iteratively executing the regular grid parameter memory space in the target grid data block memory space, performing coordinate conversion and interpolation on original grid data, storing the current grid data block data, and releasing the current GPU data block memory.
2. The GPU-CPU coordinated raster data fast coordinate transformation method according to claim 1, wherein: when the three-dimensional point cloud data set is constructed, the difference value in the X direction and the Y direction is used as a Z value to construct the three-dimensional point cloud data set according to the input homonymous control point data of different coordinate systems.
3. The GPU-CPU coordinated raster data fast coordinate transformation method according to claim 1, wherein: the specific process for realizing the construction and assignment of the grid parameters of the whole coordinate transformation rule comprises the following steps: a Delaunay triangulation network is generated by adopting a divide-and-conquer triangle subdivision algorithm, and a Z value is assigned to each node of the triangulation network; and (3) constructing regular grids with certain resolution, and extracting the numerical value of each grid from the triangular net through a Krigin interpolation algorithm.
4. The GPU-CPU coordinated raster data fast coordinate transformation method according to claim 1, wherein: the related information includes four-to information, the number of bands, resolution, band arrangement and coordinate information.
5. The GPU-CPU coordinated raster data fast coordinate transformation method according to claim 1, wherein: the data information of the CPU end comprises data size, wave band number and CPU available memory.
6. The GPU-CPU coordinated raster data fast coordinate transformation method according to claim 1, wherein: and when the coordinates of the target raster data are converted in the partitioned video memory space, applying for the partitioned video memory space of the target raster data, and acquiring X, Y coordinates of a target coordinate system by using the conversion parameters.
7. The GPU-CPU coordinated raster data fast coordinate transformation method according to claim 1, wherein: interpolation on the original raster data employs bilinear interpolation.
8. A GPU-CPU cooperative raster data rapid coordinate conversion system is characterized in that: the method comprises the following steps:
a point cloud dataset construction module configured to construct a three-dimensional point cloud dataset;
the regular grid parameter generation module is configured to generate a triangular grid based on the three-dimensional point cloud data set, extract data in the triangular grid and interpolate the data into the regular grid, and realize the construction and assignment of the whole coordinate transformation regular grid parameters;
the raster data read-write module is configured to load original raster data, acquire relevant information of a target raster by using the regular grid parameters and generate blank target raster data;
the data blocking module is configured to block the raster data according to the data information of the CPU;
the memory interaction module is configured to construct a memory pointer of the CPU end by using the information of the regular grid parameters, apply for a memory space of the GPU end and copy the memory information of the CPU end to the GPU end;
and the coordinate conversion module is configured to establish a regular grid parameter video memory space corresponding to the range according to the range of the grid data block of the CPU end, iteratively execute the regular grid parameter video memory space in the target grid data block video memory space, perform coordinate conversion and interpolation on the original grid data, store the current grid data block data and release the current GPU data block memory.
9. An electronic device, characterized by: comprising a memory and a processor and computer instructions stored on the memory and executed on the processor, which when executed by the processor, perform the steps of the method of any one of claims 1 to 7.
10. A computer-readable storage medium characterized by: for storing computer instructions which, when executed by a processor, perform the steps of the method of any one of claims 1 to 7.
CN202111347774.8A 2021-11-15 2021-11-15 GPU-CPU (graphics processing unit-central processing unit) cooperative raster data rapid coordinate conversion method and system Pending CN114022649A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111347774.8A CN114022649A (en) 2021-11-15 2021-11-15 GPU-CPU (graphics processing unit-central processing unit) cooperative raster data rapid coordinate conversion method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111347774.8A CN114022649A (en) 2021-11-15 2021-11-15 GPU-CPU (graphics processing unit-central processing unit) cooperative raster data rapid coordinate conversion method and system

Publications (1)

Publication Number Publication Date
CN114022649A true CN114022649A (en) 2022-02-08

Family

ID=80064157

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111347774.8A Pending CN114022649A (en) 2021-11-15 2021-11-15 GPU-CPU (graphics processing unit-central processing unit) cooperative raster data rapid coordinate conversion method and system

Country Status (1)

Country Link
CN (1) CN114022649A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116721228A (en) * 2023-08-10 2023-09-08 山东省国土测绘院 Building elevation extraction method and system based on low-density point cloud

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116721228A (en) * 2023-08-10 2023-09-08 山东省国土测绘院 Building elevation extraction method and system based on low-density point cloud
CN116721228B (en) * 2023-08-10 2023-10-24 山东省国土测绘院 Building elevation extraction method and system based on low-density point cloud

Similar Documents

Publication Publication Date Title
JP2013178671A (en) Image processing apparatus, image processing method and program
CN103985085A (en) Image super-resolution amplifying method and device
CN102881000A (en) Super-resolution method, device and equipment for video image
CN112489183A (en) Unity 3D-based skeletal animation rendering method and system
CN105678831A (en) Image rendering method and apparatus
CN114022649A (en) GPU-CPU (graphics processing unit-central processing unit) cooperative raster data rapid coordinate conversion method and system
CN116227209A (en) Multi-dimensional linear difference method for point cloud data, terminal equipment and storage medium
CN112825199A (en) Collision detection method, device, equipment and storage medium
CN112598802B (en) Thermodynamic diagram generation method and system based on crowdsourcing data
CN109522532B (en) Method and device for calculating selection range of line drawing frame
CN113034582A (en) Pose optimization device and method, electronic device and computer readable storage medium
JP2021144428A (en) Data processing device and data processing method
Khan et al. Ntire 2022 challenge on efficient super-resolution: Methods and results
CN115049558A (en) Model training method, human face image processing device, electronic equipment and readable storage medium
CN114998699A (en) Distortion recovery method and device for compressed point cloud and electronic equipment
CN115034351A (en) Data processing method, convolutional neural network training method and device and FPGA
CN109509218A (en) The method, apparatus of disparity map is obtained based on FPGA
CN105844688B (en) Virtual reality rendering method and device
CN114898094B (en) Point cloud upsampling method and device, computer equipment and storage medium
CN116755636B (en) Parallel reading method, device and equipment for grid files and storage medium
US20230419561A1 (en) Three-dimensional model rendering method and apparatus, device, storage medium, and program product
CN111324678B (en) Data processing method, apparatus and computer readable storage medium
CN117057999A (en) Image amplifying method, device, electronic equipment and storage medium
CN116843838A (en) Human body grid model face changing method and device
CN118229510A (en) Partitioned image remap optimization method, system, equipment and medium suitable for DSP

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