[go: up one dir, main page]

CN111915711A - Method and device for acquiring stereoscopic images of three-tone ground-type patches supporting virtual VR - Google Patents

Method and device for acquiring stereoscopic images of three-tone ground-type patches supporting virtual VR Download PDF

Info

Publication number
CN111915711A
CN111915711A CN202010775261.6A CN202010775261A CN111915711A CN 111915711 A CN111915711 A CN 111915711A CN 202010775261 A CN202010775261 A CN 202010775261A CN 111915711 A CN111915711 A CN 111915711A
Authority
CN
China
Prior art keywords
ground pattern
initial geometric
target
rendering
tone
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.)
Granted
Application number
CN202010775261.6A
Other languages
Chinese (zh)
Other versions
CN111915711B (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.)
Beijing Jiwei Space Information Co Ltd
Original Assignee
Beijing Jiwei Space Information Co Ltd
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 Beijing Jiwei Space Information Co Ltd filed Critical Beijing Jiwei Space Information Co Ltd
Priority to CN202010775261.6A priority Critical patent/CN111915711B/en
Publication of CN111915711A publication Critical patent/CN111915711A/en
Application granted granted Critical
Publication of CN111915711B publication Critical patent/CN111915711B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Graphics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Geometry (AREA)
  • Software Systems (AREA)
  • Instructional Devices (AREA)
  • Processing Or Creating Images (AREA)

Abstract

本发明涉及图像处理技术领域,公开了一种支持虚拟VR的三调地类图斑立体图像获取方法及装置,该方法包括:获取三调地类图斑对应的矢量瓦片块数据,并对矢量瓦片块数据进行处理获得多个初始几何图形,并获取对应的地理类型;分别根据地理类型对对应的初始几何图形进行颜色渲染,获得多个地类图斑;对地类图斑进行组合获得二维纹理图,并确定目标地类图斑,对目标地类图斑进行拉伸,生成三调地类图斑立体图像。本发明通过对矢量瓦片块数据进行处理以获得多个初始几何图形,之后分别对各初始几何图形进行颜色渲染,并获得目标地类图斑,最后对目标地类图斑进行拉伸,以生成三维立体感较强,并支持虚拟VR展示的三调地类图斑立体图像。

Figure 202010775261

The invention relates to the technical field of image processing, and discloses a method and a device for obtaining a stereoscopic image of a three-tone ground-type patch supporting virtual VR. The method includes: acquiring vector tile block data corresponding to the three-tone ground-type patch; The vector tile block data is processed to obtain multiple initial geometric figures, and the corresponding geographic types are obtained; the corresponding initial geometric figures are color-rendered according to the geographic types to obtain multiple terrain patches; the terrain patches are combined Obtain a two-dimensional texture map, determine the target ground pattern, stretch the target ground pattern, and generate a three-tone ground pattern stereo image. The present invention obtains a plurality of initial geometric figures by processing the vector tile block data, then performs color rendering on each initial geometric figure, and obtains the target ground pattern, and finally stretches the target ground pattern to obtain the target ground pattern. Generate three-dimensional stereoscopic images with strong three-dimensional sense and support virtual VR display.

Figure 202010775261

Description

支持虚拟VR的三调地类图斑立体图像获取方法及装置Method and device for acquiring stereoscopic images of three-tone ground-type patches supporting virtual VR

技术领域technical field

本发明涉及图像处理技术领域,尤其涉及一种支持虚拟VR的三调地类图斑立体图像获取方法、装置、设备及存储介质。The invention relates to the technical field of image processing, and in particular, to a method, device, device and storage medium for obtaining a three-tone ground-type spot stereo image that supports virtual VR.

背景技术Background technique

随着社会的发展和科学的进步,三维立体图像逐渐应用在生活中的各个方面,例如,看3D电影或三维地类图像等,现有技术中,对地类图斑展示方式基本以地形纹理形式为主,以矢量栅格化后的图片作为地形纹理的方式贴合在地形表面,但本质上得到的图像还是二维的栅格图片。这种方式地类图斑界限不明显,只能通过配置颜色或者符号样式来区分不同地类图斑属性,三维的立体感不强,同时无法支持虚拟VR展示。因此,如何获取三维立体感较强、并支持虚拟VR展示的三调地类图斑立体图像是亟待解决的技术问题。With the development of society and the progress of science, 3D stereo images are gradually applied in all aspects of life, for example, watching 3D movies or 3D terrain images. The main form is the form, and the vector rasterized image is used as a terrain texture to fit on the terrain surface, but the image obtained is essentially a two-dimensional raster image. In this way, the boundaries of the types of patches are not obvious, and the attributes of different types of patches can only be distinguished by configuring the color or symbol style. The three-dimensional sense is not strong, and the virtual VR display cannot be supported. Therefore, it is an urgent technical problem to be solved how to obtain a stereoscopic image of three-tone ground-type spots that has a strong three-dimensional sense and supports virtual VR display.

上述内容仅用于辅助理解本发明的技术方案,并不代表承认上述内容是现有技术。The above content is only used to assist the understanding of the technical solutions of the present invention, and does not mean that the above content is the prior art.

发明内容SUMMARY OF THE INVENTION

本发明的主要目的在于提供一种支持虚拟VR的三调地类图斑立体图像获取方法、装置、设备及存储介质,旨在解决如何获取三维立体感较强、并支持虚拟VR展示的三调地类图斑立体图像的技术问题。The main purpose of the present invention is to provide a method, device, device and storage medium for obtaining a three-tone stereoscopic image of a spot pattern that supports virtual VR. Technical Problems of Geo-pattern Stereo Imagery.

为实现上述目的,本发明提供一种支持虚拟VR的三调地类图斑立体图像获取方法,所述支持虚拟VR的三调地类图斑立体图像获取方法包括以下步骤:In order to achieve the above object, the present invention provides a method for obtaining a stereoscopic image of a three-tone ground-type patch supporting virtual VR, and the method for obtaining a three-tone ground-type stereoscopic image supporting virtual VR includes the following steps:

获取三调地类图斑对应的矢量瓦片块数据,并对所述矢量瓦片块数据进行处理获得初始几何图像,所述初始几何图像中包括多个初始几何图形;Obtaining vector tile data corresponding to the three-tone ground pattern, and processing the vector tile data to obtain an initial geometric image, where the initial geometric image includes a plurality of initial geometric figures;

获取各初始几何图形对应的地理类型;Get the geographic type corresponding to each initial geometry;

分别根据所述地理类型对对应的初始几何图形进行颜色渲染,获得多个地类图斑;Color rendering is performed on the corresponding initial geometric figures according to the geographic types, respectively, to obtain a plurality of geographic map spots;

对所述地类图斑进行组合,获得二维纹理图;combining the ground pattern patches to obtain a two-dimensional texture map;

根据所述二维纹理图确定目标地类图斑,并对所述目标地类图斑进行拉伸,以生成三调地类图斑立体图像。The target ground pattern is determined according to the two-dimensional texture map, and the target ground pattern is stretched to generate a three-tone ground pattern three-dimensional image.

优选地,所述对所述矢量瓦片块数据进行处理获得初始几何图像的步骤,包括:Preferably, the step of processing the vector tile data to obtain an initial geometric image includes:

将所述矢量瓦片块数据转换成空间数据,所述空间数据包括点数据、线数据和面数据;converting the vector tile data into spatial data, the spatial data including point data, line data and area data;

根据所述点数据、所述线数据和所述面数据生成初始几何图像。An initial geometric image is generated from the point data, the line data and the area data.

优选地,所述分别根据所述地理类型对对应的初始几何图形进行颜色渲染,获得多个地类图斑的步骤,包括:Preferably, the step of performing color rendering on the corresponding initial geometric figures according to the geographic types to obtain a plurality of geographic patches includes:

通过三角网构建算法获得各初始几何图形对应的三角网;Obtain the triangulation corresponding to each initial geometric figure through the triangulation construction algorithm;

根据所述三角网生成基础图形绘制单元;generating a basic graphics drawing unit according to the triangulation;

分别查找所述地理类型对应的样式配置文件;Find the style configuration files corresponding to the geographic types respectively;

根据所述样式配置文件和所述基础图形绘制单元对对应的初始几何图形进行颜色渲染,获得多个地类图斑。Color rendering is performed on the corresponding initial geometric figures according to the style configuration file and the basic figure drawing unit to obtain a plurality of terrain patches.

优选地,所述根据所述二维纹理图确定目标地类图斑的步骤,包括:Preferably, the step of determining the target ground pattern according to the two-dimensional texture map includes:

将所述地理类型作为键对象,并根据预设键值对获取所述键对象对应的目标样式标识;Using the geographic type as a key object, and obtaining a target style identifier corresponding to the key object according to a preset key-value pair;

根据所述目标样式标识和所述二维纹理图确定目标地类图斑。Determine the target ground type patch according to the target style identifier and the two-dimensional texture map.

优选地,所述对所述目标地类图斑进行拉伸,以生成三调地类图斑立体图像的步骤,包括:Preferably, the step of stretching the target ground pattern to generate a stereoscopic image of the three-tone ground pattern includes:

获取所述目标地类图斑的基准顶点坐标集合;Obtain the reference vertex coordinate set of the target ground pattern;

根据预设坐标高度阈值对所述目标地类图斑进行纵向拉伸,获得拉伸后的目标地类图斑;According to the preset coordinate height threshold, longitudinally stretch the target terrain patch to obtain the stretched target terrain patch;

获取拉伸后的所述目标地类图斑对应的拉伸顶点坐标集合;Obtain the stretched vertex coordinate set corresponding to the stretched target ground pattern;

根据所述基准顶点坐标集合和所述拉伸顶点坐标集合生成三调地类图斑立体图像。A three-tone ground-like patch stereo image is generated according to the reference vertex coordinate set and the stretched vertex coordinate set.

优选地,所述根据所述基准顶点坐标集合和所述拉伸顶点坐标集合生成三调地类图斑立体图像的步骤,包括:Preferably, the step of generating a stereoscopic image of three-tone ground pattern spots according to the reference vertex coordinate set and the stretched vertex coordinate set includes:

根据所述基准顶点坐标集合和所述拉伸顶点坐标集合构建侧面空洞图形区域;Constructing a side hollow figure area according to the reference vertex coordinate set and the stretch vertex coordinate set;

对所述侧面空洞图形区域进行颜色渲染,获得侧面纹理图;performing color rendering on the side cavity graphic area to obtain a side texture map;

根据拉伸后的所述目标地类图斑和所述侧面纹理图生成三调地类图斑立体图像。According to the stretched target terrain patch and the side texture map, a three-tone terrain patch stereo image is generated.

优选地,所述根据所述二维纹理图确定目标地类图斑,并对所述目标地类图斑进行拉伸,以生成三调地类图斑立体图像的步骤之后,还包括:Preferably, after the step of determining the target terrain patch according to the two-dimensional texture map and stretching the target terrain patch to generate a three-tone stereoscopic image of the terrain patch, the method further includes:

获取逻辑相机对应的位置信息和三调地类图斑立体图像;Obtain the position information corresponding to the logical camera and the stereo image of the three-tone ground pattern;

根据所述位置信息确定渲染相机组的位置距离,所述渲染相机组包括第一渲染相机和第二渲染相机;Determine the position distance of the rendering camera group according to the position information, the rendering camera group includes a first rendering camera and a second rendering camera;

根据所述位置距离分别设置所述第一渲染相机对应的第一渲染视口与所述第二渲染相机对应的第二渲染视口;respectively setting a first rendering viewport corresponding to the first rendering camera and a second rendering viewport corresponding to the second rendering camera according to the position distance;

将所述第一渲染视口与所述第二渲染视口作为目标渲染视口;using the first rendering viewport and the second rendering viewport as target rendering viewports;

通过所述目标渲染视口对所述三调地类图斑立体图像进行虚拟VR展示。A virtual VR display is performed on the three-tone ground-like patch stereoscopic image through the target rendering viewport.

此外,为实现上述目的,本发明还提出一种支持虚拟VR的三调地类图斑立体图像获取装置,所述支持虚拟VR的三调地类图斑立体图像获取装置包括:In addition, in order to achieve the above object, the present invention also proposes a three-tone ground-type patch stereo image acquisition device supporting virtual VR, and the three-tone ground-type patch stereo image acquisition device supporting virtual VR includes:

获取模块,用于获取三调地类图斑对应的矢量瓦片块数据,并对所述矢量瓦片块数据进行处理获得初始几何图像,所述初始几何图像中包括多个初始几何图形;an acquisition module, configured to acquire vector tile data corresponding to the three-tone ground pattern, and process the vector tile data to obtain an initial geometric image, where the initial geometric image includes a plurality of initial geometric figures;

所述获取模块,还用于获取各初始几何图形对应的地理类型;The obtaining module is also used to obtain the geographic type corresponding to each initial geometric figure;

渲染模块,用于分别根据所述地理类型对对应的初始几何图形进行颜色渲染,获得多个地类图斑;a rendering module, configured to perform color rendering on the corresponding initial geometric figures according to the geographic types, respectively, to obtain a plurality of geographic map spots;

组合模块,用于对所述地类图斑进行组合,获得二维纹理图;a combination module, used for combining the ground pattern patches to obtain a two-dimensional texture map;

生成模块,用于根据所述二维纹理图确定目标地类图斑,并对所述目标地类图斑进行拉伸,以生成三调地类图斑立体图像。The generating module is configured to determine the target ground pattern according to the two-dimensional texture map, and stretch the target ground pattern to generate a three-tone ground pattern three-dimensional image.

本发明中,首先获取三调地类图斑对应的矢量瓦片块数据,为加快数据处理效率,可对矢量瓦片块数据进行处理获得多个初始几何图形,然后获取各初始几何图形对应的地理类型,并根据地理类型对对应的初始几何图形进行颜色渲染,以获得便于区分地理类型的多个地类图斑,之后对地类图斑进行组合,获得二维纹理图,最后根据二维纹理图确定目标地类图斑,并对目标地类图斑进行拉伸,以生成三维立体感较强、并支持虚拟VR展示的三调地类图斑立体图像。In the present invention, the vector tile block data corresponding to the three-tone ground pattern is first obtained. In order to speed up the data processing efficiency, the vector tile block data can be processed to obtain a plurality of initial geometric figures, and then the corresponding initial geometric figures are obtained. Geographic type, and color-render the corresponding initial geometric figures according to the geographic type, so as to obtain multiple ground-type patches that are easy to distinguish geographic types, and then combine the ground-type patches to obtain a two-dimensional texture map. The texture map determines the target ground pattern, and stretches the target ground pattern to generate a three-dimensional three-dimensional ground pattern stereo image with strong three-dimensional sense and support for virtual VR display.

附图说明Description of drawings

图1为本发明支持虚拟VR的三调地类图斑立体图像获取方法第一实施例的流程示意图;FIG. 1 is a schematic flowchart of a first embodiment of a method for obtaining a three-tone ground-type spot stereoscopic image that supports virtual VR according to the present invention;

图2为本发明支持虚拟VR的三调地类图斑立体图像获取方法第一实施例的预设方位像素坐标集合散点图;2 is a scatter diagram of a set of pixel coordinates of preset orientations according to the first embodiment of a method for obtaining a stereoscopic image of three-tone ground-type spots supporting virtual VR according to the present invention;

图3为本发明支持虚拟VR的三调地类图斑立体图像获取方法第一实施例的侧面空洞图形区域图;FIG. 3 is a side view of a hollow figure area of a first embodiment of a method for obtaining a stereoscopic image of three-tone ground-type spots supporting virtual VR according to the present invention;

图4为本发明支持虚拟VR的三调地类图斑立体图像获取方法第二实施例的流程示意图;FIG. 4 is a schematic flowchart of a second embodiment of a method for obtaining a stereoscopic image of a three-tone ground pattern spot supporting virtual VR according to the present invention;

图5为本发明支持虚拟VR的三调地类图斑立体图像获取装置第一实施例的结构框图。FIG. 5 is a structural block diagram of a first embodiment of an apparatus for obtaining a stereoscopic image of three-tone ground-type patches supporting virtual VR according to the present invention.

本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization, functional characteristics and advantages of the present invention will be further described with reference to the accompanying drawings in conjunction with the embodiments.

具体实施方式Detailed ways

应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。It should be understood that the specific embodiments described herein are only used to explain the present invention, but not to limit the present invention.

参照图1,图1为本发明支持虚拟VR的三调地类图斑立体图像获取方法第一实施例的流程示意图,提出本发明支持虚拟VR的三调地类图斑立体图像获取方法第一实施例。Referring to FIG. 1, FIG. 1 is a schematic flowchart of a first embodiment of a method for obtaining a stereoscopic image of a three-tone ground type spot that supports virtual VR according to the present invention. Example.

在第一实施例中,所述支持虚拟VR的三调地类图斑立体图像获取方法包括以下步骤:In the first embodiment, the method for obtaining a stereoscopic image of a three-tone ground pattern spot supporting virtual VR includes the following steps:

步骤S10:获取三调地类图斑对应的矢量瓦片块数据,并对所述矢量瓦片块数据进行处理获得初始几何图像,所述初始几何图像中包括多个初始几何图形。Step S10 : obtaining vector tile data corresponding to the three-tone ground pattern, and processing the vector tile data to obtain an initial geometric image, where the initial geometric image includes a plurality of initial geometric figures.

需要说明的是,本实施例的执行主体是支持虚拟VR的三调地类图斑立体图像获取设备,其中,该设备是具有图像处理、数据处理、网络通信及程序运行等功能的支持虚拟VR的三调地类图斑立体图像获取设备,也可为其他设备,本实施例对此不做限制。It should be noted that the execution body of this embodiment is a three-tone ground-type patch stereo image acquisition device that supports virtual VR, wherein the device is a virtual VR that supports functions such as image processing, data processing, network communication, and program running. The device for obtaining the stereoscopic image of the three-tone ground pattern spot can also be other devices, which is not limited in this embodiment.

其中,“国家第三次土地调查”简称“三调”,三调的成果数据之一是土地分类数据,即地类图斑,也就是说,国家第三次土地调查的土地分类数据称为三调地类图斑,之后根据三调地类图斑获取三调地类图斑数据,并将三调地类图斑数据以矢量数据形式存储于数据库中。Among them, "the third national land survey" is abbreviated as "three surveys". One of the results of the three surveys is the land classification data, that is, the land classification map. That is to say, the land classification data of the third national land survey is called the land classification data. The three-tone earth pattern pattern is then obtained according to the three-tone earth pattern pattern, and the three-tone earth pattern pattern data is stored in the database in the form of vector data.

为了加快数据的展示效率,将这些矢量数据按照一定的规则切块,形成矢量瓦片块。可以理解为,根据三维场景中相机视锥体裁剪以获得当前所需的矢量瓦片覆盖范围,根据矢量瓦片覆盖范围计算所需的矢量瓦片块行列号,并获取对应的矢量瓦片块,之后通过数据服务从所述数据库中请求到对应的矢量瓦片块数据,保存到系统中以进行缓存。In order to speed up the display efficiency of data, these vector data are cut into blocks according to certain rules to form vector tiles. It can be understood that, according to the camera frustum in the 3D scene to obtain the current required vector tile coverage, calculate the required vector tile block row and column number according to the vector tile coverage, and obtain the corresponding vector tile block , and then request the corresponding vector tile block data from the database through the data service, and save it to the system for caching.

此外,将所述矢量瓦片块数据转换成空间数据,所述空间数据包括点数据、线数据和面数据,之后对点数据、线数据和面数据进行组合,获得初始几何图像,也就是说,矢量瓦片块数据以json_encode形式存储在数据库中,客户端加载后需要对json_encode数据进行解析,将字符串转换成点、线和面的内存组织形式,之后将点、线和面进行组合以获取初始几何图像,所述初始几何图像中包括多个初始几何图形。In addition, the vector tile data is converted into spatial data, the spatial data includes point data, line data and area data, and then the point data, line data and area data are combined to obtain an initial geometric image, that is , the vector tile data is stored in the database in the form of json_encode, and the client needs to parse the json_encode data after loading, convert the string into the memory organization of points, lines and surfaces, and then combine the points, lines and surfaces to An initial geometric image is obtained, where the initial geometric image includes a plurality of initial geometric figures.

步骤S20:获取各初始几何图形对应的地理类型。Step S20: Obtain the geographic type corresponding to each initial geometric figure.

各初始几何图形对应的地理类型可能相同,也可能不同,假设初始几何图像中包括多个初始几何图形,所述初始几何图形为三角形、菱形和矩形等,本方案中可以将三角形对应的地理类型设置为山,可以将菱形对应的地理类型为土地,也可以将矩形对应的地理类型为河流等,本方案中也可以将三角形对应的地理类型设置为山,也可以将菱形对应的地理类型设置为山等,本方案还可以为数据库中已预先设定好初始几何图形对应的地理类型,将初始几何图形在数据库中进行匹配,以获取对应的地理类型,本实施例并不加以限制。The geographic types corresponding to each initial geometric figure may be the same or different. Assuming that the initial geometric image includes multiple initial geometric figures, the initial geometric figures are triangles, diamonds, rectangles, etc. If it is set to mountain, the geographic type corresponding to the diamond can be set to land, or the geographic type corresponding to the rectangle can be set to river, etc. In this scheme, the geographic type corresponding to the triangle can also be set to mountain, or the geographic type corresponding to the diamond can be set to For mountains, etc., this solution can also pre-set the geographic type corresponding to the initial geometric figure in the database, and match the initial geometric figure in the database to obtain the corresponding geographic type, which is not limited in this embodiment.

步骤S30:分别根据所述地理类型对对应的初始几何图形进行颜色渲染,获得多个地类图斑。Step S30: Perform color rendering on the corresponding initial geometric figures according to the geographic types, respectively, to obtain a plurality of geographic patches.

分别查找地理类型对应的样式配置文件,之后通过三角网构建算法获得各初始几何图形对应的三角网,然后根据三角网生成基础图形绘制单元,最后根据样式配置文件和基础图形绘制单元对对应的初始几何图形进行颜色渲染,以获得多个地类图斑。Find the style configuration file corresponding to the geographic type respectively, then obtain the triangulation corresponding to each initial geometric figure through the triangulation network construction algorithm, and then generate the basic graphics drawing unit according to the triangular net, and finally, according to the style configuration file and the basic graphics drawing unit, the corresponding initial Geometry is color-rendered to obtain multiple terrain patches.

也就是说,三调地类图斑是以多边形的形式来表达的,矢量瓦片块解析后的矢量瓦片块数据以点、线和面生成初始几何图形来进行存储,这些初始几何图形无法直接通过三维的应用程序编程接口(Application Programming Interface API)直接进行颜色渲染,因此需要通过狄洛尼(Delaunay)三角网构建算法将各初始几何图形生成对应的三角网,之后根据三角网形成对应的基础图形绘制单元,供三维绘制API调用以进行颜色渲染。That is to say, the three-tone ground pattern is expressed in the form of polygons, and the parsed vector tile data of the vector tiles is stored in the initial geometric figures generated by points, lines and surfaces. These initial geometric figures cannot be Color rendering is performed directly through the 3D Application Programming Interface API. Therefore, it is necessary to generate the corresponding triangular network for each initial geometric figure through the Delaunay triangulation network construction algorithm, and then form the corresponding triangular network according to the triangular network. Basic graphics drawing unit for 3D drawing API calls for color rendering.

可以理解为,假设初始几何图形为矩形,通过Delaunay三角网构建算法将矩形生成一个三角网,所述三角网中对应两个三角形,之后根据得到的三角网形成矩形对应的基础图形绘制单元,假设初始几何图形为三角形,通过Delaunay三角网构建算法将三角形生成一个三角网,之后根据得到的三角网形成三角形对应的基础图形绘制单元等,本实施例并不加以限制。It can be understood that, assuming that the initial geometric figure is a rectangle, a triangle network is generated from the rectangle through the Delaunay triangle network construction algorithm, and the triangle network corresponds to two triangles, and then the basic graphics drawing unit corresponding to the rectangle is formed according to the obtained triangle network. The initial geometric figure is a triangle, and a triangular net is generated from the triangle through the Delaunay triangular net construction algorithm, and then a basic figure drawing unit corresponding to the triangle is formed according to the obtained triangular net, which is not limited in this embodiment.

其中,初始几何图形对应的地理类型都具有对应的样式标识,样式标识有对应的样式配置文件,所述样式配置文件为用户自定义设置,其中可以包括需要渲染的颜色、符号和透明度等。The geographic types corresponding to the initial geometric figures all have corresponding style identifiers, and the style identifiers have corresponding style configuration files. The style configuration files are user-defined settings, which may include colors, symbols, and transparency that need to be rendered.

将初始几何图形对应的地理类型作为键对象,之后根据预设键值对获取所述键对象对应的样式标识,所述预设键值对包括地理类型和样式标识,所述地理类型与样式标识的对应关系以键值对的形式预先储存至数据库中,以便后续调取使用,假设初始几何图形对应的地理类型为山,所对应的样式标识为1,则获取数值1对应的样式配置文件,也就是说每种地理类型都有对应的样式配置文件,也就是关于山对应的渲染颜色及透明度等,也可以是假设初始几何图形对应的地理类型为水,所对应的样式标识为1,则根据样式标识从样式配置文件(所述样式配置文件中存在各种地理类型对应的配置信息)中选取水对应的渲染颜色等配置信息等,本实施例并不加以限制。The geographic type corresponding to the initial geometric figure is used as the key object, and then the style identifier corresponding to the key object is obtained according to a preset key-value pair, where the preset key-value pair includes a geographic type and a style identifier, and the geographic type and style identifier The corresponding relationship is stored in the database in the form of key-value pairs in advance for subsequent retrieval and use. Assuming that the geographic type corresponding to the initial geometric figure is mountain and the corresponding style identifier is 1, the style configuration file corresponding to the value 1 is obtained. That is to say, each geographic type has a corresponding style configuration file, that is, the rendering color and transparency corresponding to the mountain. It can also be assumed that the geographic type corresponding to the initial geometric figure is water, and the corresponding style identifier is 1, then Configuration information such as rendering colors corresponding to water is selected from a style configuration file (the style configuration file contains configuration information corresponding to various geographic types) according to the style identifier, which is not limited in this embodiment.

步骤S40:对所述地类图斑进行组合,获得二维纹理图。Step S40 : combining the ground pattern patches to obtain a two-dimensional texture map.

地类图斑为已经进行颜色渲染后的初始几何图形,将颜色渲染后的各初始几何图形进行图形组合,获得带有颜色的初始几何图像,之后将带有颜色的初始几何图像称为二维纹理图。The ground-type patch is the initial geometric figure that has been rendered in color. The initial geometric figures after color rendering are combined graphically to obtain the initial geometric image with color, and then the initial geometric image with color is called two-dimensional. texture map.

假设初始几何图像中包括三角形、矩形和菱形,三角形、矩形和菱形都为无色图形,之后将三角形渲染为黄色,以成黄色三角形、矩形渲染为蓝色,以生成蓝色矩形、菱形渲染为红色,以生成红色菱形,之后将黄色三角形、蓝色矩形及红色菱形进行图形组合,以获得二维纹理图,所述二维纹理图也就是最终完整的地类图斑图像。Assuming that the initial geometric image includes triangles, rectangles and rhombus, triangles, rectangles and rhombus are all colorless shapes, and then the triangles are rendered in yellow to form yellow triangles, and the rectangles are rendered in blue to generate blue rectangles, and the rhombus is rendered as red to generate a red rhombus, and then graphically combine the yellow triangle, the blue rectangle, and the red rhombus to obtain a two-dimensional texture map, which is the final complete land-type patch image.

步骤S50:根据所述二维纹理图确定目标地类图斑,并对所述目标地类图斑进行拉伸,以生成三调地类图斑立体图像。Step S50: Determine a target ground patch according to the two-dimensional texture map, and stretch the target ground patch to generate a three-tone ground patch stereo image.

将所述地理类型作为键对象,并根据预设键值对获取所述键对象对应的目标样式标识,根据所述目标样式标识和所述二维纹理图确定目标地类图斑。The geographic type is used as a key object, and a target style identifier corresponding to the key object is obtained according to a preset key-value pair, and a target land type patch is determined according to the target style identifier and the two-dimensional texture map.

预先将初始几何图形对应的地理类型及样式标识存储在数据库中,并将地理类型与样式标识以键值对的形式进行一一对应,也就是说,每种地理类型都有对应的样式标识,假设初始几何图形为三角形,则对应的地理类型为山,则对应的样式标识为1,假设初始几何图形为矩形,则对应的地理类型为水,则对应的样式标识为2等。Pre-store the geographic types and style identifiers corresponding to the initial geometric figures in the database, and make a one-to-one correspondence between geographic types and style identifiers in the form of key-value pairs, that is, each geographic type has a corresponding style identifier. Assuming that the initial geometric figure is a triangle, the corresponding geographic type is mountain, and the corresponding style identifier is 1. If the initial geometric figure is a rectangle, the corresponding geographic type is water, and the corresponding style identifier is 2, etc.

根据所述二维纹理图中确定目标地类图斑的方式可以根据样式标识,也可以根据颜色来确定目标地类图斑,若用户筛选样式标识为1的目标地类图斑即为三角形对应的目标地类图斑,也可以利用颜色来确定目标地类图斑,若用户选定黄色,则将具有黄色的初始几何图形即地类图斑作为目标地类图斑等。The way to determine the target ground type patch according to the two-dimensional texture map can be based on the style identifier or the color. If the user selects the target ground type patch with the style identifier of 1, it corresponds to a triangle. If the user selects yellow, the initial geometric figure with yellow, that is, the terrain patch, will be used as the target terrain patch, etc.

根据所述矢量瓦片块数据获取各初始几何图形对应的预设方位的顶点像素坐标集合,并根据所述顶点像素坐标集合获得所述目标地类图斑对应的法线坐标集合,获取所述目标地类图斑的基准顶点坐标集合,根据预设坐标高度阈值对所述目标地类图斑进行拉伸,也就是说,对同一个矢量瓦片块中的不同地类图斑对应的多边形,分别设置顶点的不高程值,使得不同地类图斑能高低错开。由于只是对高程值做了修改,图斑多边形始终保持在通一个平面,因此法线信息不需要做调整,从而可以减少计算量,提高工作效率,获得拉伸后的目标地类图斑,获取拉伸后的所述目标地类图斑的拉伸顶点坐标集合,根据所述基准顶点坐标集合和所述拉伸顶点坐标集合生成三调地类图斑立体图像。Acquire the vertex pixel coordinate set of the preset orientation corresponding to each initial geometric figure according to the vector tile data, and obtain the normal coordinate set corresponding to the target ground type patch according to the vertex pixel coordinate set, and obtain the The reference vertex coordinate set of the target terrain patch, and the target terrain patch is stretched according to the preset coordinate height threshold, that is, the polygons corresponding to different terrain patches in the same vector tile block are stretched. , respectively set the non-elevation values of the vertices, so that the different types of patches can be staggered. Because only the elevation value is modified, the polygon of the patch is always kept in the same plane, so the normal information does not need to be adjusted, which can reduce the amount of calculation and improve the work efficiency. The stretched vertex coordinate set of the target ground pattern spot after being stretched, and a three-tone ground pattern three-dimensional image is generated according to the reference vertex coordinate set and the stretched vertex coordinate set.

进一步地,所述根据所述第一预设方位的顶点像素坐标集合获得各初始几何图形对应的法线坐标集合的步骤包括,矢量瓦片块数据坐标是以瓦片的左上角为原点的像素坐标集合即预设方位的顶点像素坐标集合,如图2所示。所述图2为本发明支持虚拟VR的三调地类图斑立体图像获取方法第一实施例的预设方位像素坐标集合散点图,其中预设方位像素坐标集合只能满足在二维底图中绘制使用,在三维场景中需要绘制带有景深效果,因此需要转换为真实的地理坐标。其中,坐标转换方式可以为,通过矢量瓦片块的层行列号,通过第一预设公式计算出该矢量瓦片块的东西南北对应的经纬度,再根据矢量瓦片块中每一个顶点像素坐标,可以内插得到每个顶点的经纬度坐标,再根据第二预设公式,将经纬度坐标转换为空间直角坐标,以使空间直角坐标用于三维场景渲染。也就是说,对所述第一预设方位的顶点像素坐标集合进行坐标转换,获得空间直角坐标集合,并根据所述空间直角坐标集合获取各初始几何图形对应的法线坐标集合。Further, the step of obtaining the normal coordinate set corresponding to each initial geometric figure according to the vertex pixel coordinate set of the first preset orientation includes: the vector tile block data coordinate is a pixel whose origin is the upper left corner of the tile. The coordinate set is the vertex pixel coordinate set of the preset orientation, as shown in FIG. 2 . 2 is a scatter diagram of a set of preset orientation pixel coordinates according to the first embodiment of the method for obtaining a stereoscopic image of three-tone ground-type spots supporting virtual VR according to the present invention, wherein the preset orientation pixel coordinate set can only satisfy the requirements of a two-dimensional base. It is used for drawing in the figure. In the three-dimensional scene, it needs to be drawn with a depth of field effect, so it needs to be converted into real geographic coordinates. Wherein, the coordinate conversion method may be, through the layer row and column number of the vector tile block, calculate the latitude and longitude corresponding to the east, west, north and south of the vector tile block through the first preset formula, and then according to the pixel coordinates of each vertex in the vector tile block , the latitude and longitude coordinates of each vertex can be obtained by interpolation, and then the latitude and longitude coordinates are converted into space rectangular coordinates according to the second preset formula, so that the space rectangular coordinates are used for three-dimensional scene rendering. That is, coordinate transformation is performed on the vertex pixel coordinate set of the first preset orientation to obtain a spatial rectangular coordinate set, and a normal coordinate set corresponding to each initial geometric figure is obtained according to the spatial rectangular coordinate set.

所述第一预设公式为:

Figure BDA0002616664050000081
The first preset formula is:
Figure BDA0002616664050000081

式中,L为矢量瓦片块的层级,Col为矢量瓦片块的列号,Row为矢量瓦片块的行号,TileSize为经纬度,West为西经,East为东经,South为南纬,North为北纬。In the formula, L is the level of the vector tile, Col is the column number of the vector tile, Row is the row number of the vector tile, TileSize is the longitude and latitude, West is the west longitude, East is the east longitude, South is the south latitude, North is the northern latitude.

所述第二预设公式为:

Figure BDA0002616664050000082
The second preset formula is:
Figure BDA0002616664050000082

式中,Latitude Degree为纬度坐标,Longitude Degree为经度坐标,x、y、z为笛卡尔空间直角坐标,radCosLat为定义的中间变量,radius为地球半径(可取值6378137)。In the formula, Latitude Degree is the latitude coordinate, Longitude Degree is the longitude coordinate, x, y, z are Cartesian space Cartesian coordinates, radCosLat is the defined intermediate variable, and radius is the radius of the earth (value 6378137).

根据所述顶点像素坐标集合获得所述目标地类图斑对应的法线坐标集合的步骤为,对所述顶点像素坐标集合进行坐标转换,获得空间直角坐标集合,根据所述空间直角坐标集合获取所述目标地类图斑对应的法线坐标集合。The step of obtaining the normal coordinate set corresponding to the target ground type patch according to the vertex pixel coordinate set is as follows: performing coordinate transformation on the vertex pixel coordinate set to obtain a space rectangular coordinate set, and obtaining a space rectangular coordinate set according to the spatial rectangular coordinate set. The set of normal coordinates corresponding to the target ground type patches.

为了使得纯色的矢量瓦片在三维场景中有立体感,需要加入光照信息,通过地形的起伏形成的亮度明暗变化,使得立体感更强。使用光照的前提是需要顶点具有法线信息。首先计算每个三角形的面法线信息,计算方法为选取三角形的两条边构建方向矢量,对这两个矢量进行叉积得到该面的面法线,其次,将该三角形的面法线赋值给该三角形的每个顶点,一个顶点可能被多个三角形共享,则该顶点的法线记录为所有共享三角形面法线的累加值,最后,将该顶点的累计法线值进行归一化,转为单位法线矢量传入GPU中供光照计算使用。In order to make the solid-color vector tiles have a three-dimensional sense in the three-dimensional scene, it is necessary to add lighting information, and the brightness and shade changes formed by the ups and downs of the terrain make the three-dimensional sense stronger. The premise of using lighting is that vertices need to have normal information. First, calculate the surface normal information of each triangle. The calculation method is to select two sides of the triangle to construct a direction vector, and perform the cross product of these two vectors to obtain the surface normal of the surface. Second, assign the value of the surface normal of the triangle. For each vertex of the triangle, a vertex may be shared by multiple triangles, then the normal of the vertex is recorded as the cumulative value of the normals of all shared triangle faces, and finally, the cumulative normal value of the vertex is normalized, Converted to a unit normal vector and passed to the GPU for use in lighting calculations.

参考图3,所述图3为本发明支持虚拟VR的三调地类图斑立体图像获取方法第一实施例的侧面空洞图形区域图,之后对所述侧面空洞图形区域进行颜色渲染,获得侧面纹理图,所述根据拉伸后的所述目标地类图斑和所述侧面纹理图生成三调地类图斑立体图像。Referring to FIG. 3 , said FIG. 3 is a side hole graphic area diagram of the first embodiment of the three-tone ground-type stereo image acquisition method supporting virtual VR of the present invention, and then color rendering is performed on the side side hole graphic area to obtain a side view A texture map, generating a three-tone three-dimensional image of the terrain patch according to the stretched target terrain patch and the side texture map.

对所述侧面空洞图形区域进行颜色渲染,获得侧面纹理图的步骤为将侧面空洞图形通过Delaunay三角网构建算法将矩形生成多个三角网,之后根据得到的三角网形成侧面空洞图形区域对应的基础图形绘制单元,最后根据侧面空洞图形区域对应的样式配置文件和基础图形绘制单元对侧面空洞图形区域进行颜色渲染,以获得侧面纹理图,所述侧面空洞图形区域对应的样式配置文件中的颜色为了使三维图像的立体感更强,可以设置为灰色等,本实施例并不加以限制。Color rendering is performed on the side cavity graphic area, and the step of obtaining the side texture map is to generate a plurality of triangular nets from the rectangle through the Delaunay triangulation network construction algorithm, and then form the basis corresponding to the side cavity graphic area according to the obtained triangular net. The graphics drawing unit finally performs color rendering on the side hollow graphic area according to the style configuration file corresponding to the side hollow graphic area and the basic graphics drawing unit to obtain a side texture map, and the color in the style configuration file corresponding to the side hollow graphic area is To make the three-dimensional image more three-dimensional, it can be set to gray, etc., which is not limited in this embodiment.

本方案中,还可以将每个瓦片块内的不同地类图斑生成阶梯状的立体三角网,需要对顶面和侧面分别贴图,为了加快渲染效率,可以使用了一体化贴图。具体的,在上述实施例描述的过程中,根据已经渲染生成的一张栅格纹理,将该纹理作为一个整体映射到高低起伏的三角网即可完成贴图,具体的映射关系需要计算出每个顶点的纹理坐标。也就是保留的以瓦片的左上角为原点的像素坐标值,除以矢量瓦片的尺寸大小,得到归一化后的坐标,将改坐标作为顶点的纹理坐标,即可完成纹理坐标和三角网的映射,之后通过过滤条件设置,能达到不同地类图斑抬升到不同的高度,但是突然的抬升显得突兀。因此,可以将过滤条件设置的高度值和地类图斑当前的高度值直接进行插值,在渲染的每一帧进行高度值的调整,逼近设置目标值,从而达到高度抬升或者下降的动画效果,使得地类图斑有个抬升动画过程,使得交互更为平滑。In this solution, a stepped three-dimensional triangular mesh can also be generated from different terrain patterns in each tile block, and the top and side surfaces need to be mapped separately. In order to speed up the rendering efficiency, an integrated map can be used. Specifically, in the process described in the above embodiment, according to a grid texture that has been generated by rendering, the texture can be mapped as a whole to the undulating triangle mesh to complete the mapping. The specific mapping relationship needs to be calculated for each The texture coordinates of the vertex. That is to say, the reserved pixel coordinate value with the upper left corner of the tile as the origin, divided by the size of the vector tile, to get the normalized coordinates, and the changed coordinates are used as the texture coordinates of the vertex to complete the texture coordinates and triangle. The mapping of the network, and then through the filter condition setting, can achieve the elevation of different types of patches to different heights, but the sudden elevation is abrupt. Therefore, the height value set by the filter condition and the current height value of the terrain patch can be directly interpolated, and the height value can be adjusted in each frame of rendering to approach the set target value, so as to achieve the animation effect of height rising or falling. Makes the terrain patch have a lifting animation process, making the interaction smoother.

此外,所述根据所述二维纹理图确定目标地类图斑,并对所述目标地类图斑进行拉伸,以生成三调地类图斑立体图像的步骤之后,获取逻辑相机对应的位置信息和三调地类图斑立体图像,根据所述位置信息确定渲染相机组的位置距离,所述渲染相机组包括第一渲染相机和第二渲染相机,根据所述位置距离分别设置所述第一渲染相机对应的第一渲染视口与所述第二渲染相机对应的第二渲染视口,将所述第一渲染视口与所述第二渲染视口作为目标渲染视口,也就是说通过所述目标渲染视口对所述三调地类图斑立体图像进行虚拟VR展示。本实施例的具体实现方式可以完成在三维场景中的正常渲染操作,但为了支持虚拟VR展示,另外,还需要扩展支持立体像对的渲染能力。因此,可以在三维场景中设置了三个相机,一个逻辑相机和两个渲染相机。在虚拟VR展示模式下,应用程序只能操控逻辑相机,在上述步骤中的三维交互以及动画过程都只和逻辑相机挂钩;两个渲染相机与逻辑相机在朝向上保持一致,位置上左右各偏移一定距离,模拟人眼的瞳距。渲染相机分别设置对应的渲染视口,其中渲染视口的高度为屏幕的高度,宽度为屏幕宽度的一半,两个视口合并覆盖整个渲染屏幕。当关闭虚拟VR模式,渲染相机被移除,逻辑相机切换为唯一的渲染相机,正常在屏幕中渲染。In addition, after the step of determining the target ground pattern according to the two-dimensional texture map, and stretching the target ground pattern to generate a three-tone ground pattern three-dimensional image, obtain the corresponding ground pattern of the logical camera. position information and a three-tone ground-like patch stereo image, determine the position distance of the rendering camera group according to the position information, the rendering camera group includes a first rendering camera and a second rendering camera, and set the said position and distance respectively according to the position distance The first rendering viewport corresponding to the first rendering camera and the second rendering viewport corresponding to the second rendering camera, the first rendering viewport and the second rendering viewport are used as the target rendering viewport, that is It is said that a virtual VR display is performed on the stereoscopic image of the three-tone ground-type patch through the target rendering viewport. The specific implementation manner of this embodiment can complete the normal rendering operation in the 3D scene, but in order to support the virtual VR display, in addition, the rendering capability of supporting stereo image pairs needs to be extended. Therefore, three cameras, one logical camera and two rendering cameras, can be set up in the 3D scene. In the virtual VR display mode, the application can only control the logical camera, and the 3D interaction and animation process in the above steps are only linked to the logical camera; the orientation of the two rendering cameras and the logical camera are consistent, and the positions are offset from left to right. Move a certain distance to simulate the interpupillary distance of the human eye. The rendering camera sets the corresponding rendering viewports, where the height of the rendering viewport is the height of the screen, and the width is half the width of the screen. The two viewports are combined to cover the entire rendering screen. When the virtual VR mode is turned off, the rendering camera is removed, and the logical camera is switched to the only rendering camera, which renders normally on the screen.

在本实施例中,首先获取三调地类图斑对应的矢量瓦片块数据,为加快数据处理效率,可对矢量瓦片块数据进行处理获得多个初始几何图形,然后获取各初始几何图形对应的地理类型,并根据地理类型对对应的初始几何图形进行颜色渲染,以获得便于区分地理类型的多个地类图斑,之后对地类图斑进行组合,获得二维纹理图,最后根据二维纹理图确定目标地类图斑,并对目标地类图斑进行拉伸,在提高工作效率的同时,以生成三维立体感较强、并支持虚拟VR展示的三调地类图斑立体图像。In this embodiment, the vector tile data corresponding to the three-tone ground pattern is obtained first. In order to speed up the data processing efficiency, the vector tile data can be processed to obtain a plurality of initial geometric figures, and then each initial geometric figure can be obtained. Corresponding geographic types, and color rendering the corresponding initial geometric figures according to the geographic types to obtain multiple geographic patches that are easy to distinguish geographic types, then combine the geographic patches to obtain a two-dimensional texture map, and finally according to The two-dimensional texture map determines the target ground pattern, and stretches the target ground pattern. While improving work efficiency, it can generate a three-dimensional ground pattern with strong three-dimensional sense and support for virtual VR display. image.

此外,参照图4,图4为基于上述支持虚拟VR的三调地类图斑立体图像获取方法第一实施例,提出本发明支持虚拟VR的三调地类图斑立体图像获取方法第二实施例。In addition, referring to FIG. 4 , FIG. 4 shows the first embodiment of the above-mentioned method for obtaining a stereoscopic image of a three-tone ground pattern supporting virtual VR, and a second implementation of the method for obtaining a three-tone ground pattern stereoscopic image supporting virtual VR according to the present invention is proposed. example.

在第二实施例中,支持虚拟VR的三调地类图斑立体图像获取方法中所述步骤S50,还包括:In the second embodiment, the step S50 described in the method for obtaining a stereoscopic image of a three-tone ground pattern that supports virtual VR further includes:

步骤S501:获取所述目标地类图斑的基准顶点像素坐标集合。Step S501: Acquire a reference vertex pixel coordinate set of the target ground type patch.

将所述地理类型作为键对象,并根据预设键值对获取所述键对象对应的目标样式标识,根据所述目标样式标识和所述二维纹理图确定目标地类图斑。The geographic type is used as a key object, and a target style identifier corresponding to the key object is obtained according to a preset key-value pair, and a target land type patch is determined according to the target style identifier and the two-dimensional texture map.

预先将初始几何图形对应的地理类型及样式标识存储在数据库中,并将地理类型与样式标识以键值对的形式进行一一对应,也就是说,每种地理类型都有对应的样式标识,假设初始几何图形为三角形,则对应的地理类型为山,则对应的样式标识为1,假设初始几何图形为矩形,则对应的地理类型为水,则对应的样式标识为2等。Pre-store the geographic types and style identifiers corresponding to the initial geometric figures in the database, and make a one-to-one correspondence between geographic types and style identifiers in the form of key-value pairs, that is, each geographic type has a corresponding style identifier. Assuming that the initial geometric figure is a triangle, the corresponding geographic type is mountain, and the corresponding style identifier is 1. If the initial geometric figure is a rectangle, the corresponding geographic type is water, and the corresponding style identifier is 2, etc.

根据所述二维纹理图中确定目标地类图斑的方式可以根据样式标识,也可以根据颜色来确定目标地类图斑,若用户筛选样式标识为1的目标地类图斑即为三角形对应的目标地类图斑,也可以利用颜色来确定目标地类图斑,若用户选定黄色,则将具有黄色的初始几何图形即地类图斑作为目标地类图斑等。The way to determine the target ground type patch according to the two-dimensional texture map can be based on the style identifier or the color. If the user selects the target ground type patch with the style identifier of 1, it corresponds to a triangle. If the user selects yellow, the initial geometric figure with yellow, that is, the terrain patch, will be used as the target terrain patch, etc.

矢量瓦片块数据坐标是以瓦片的左上角为原点的像素坐标集合即预设方位的顶点像素坐标集合,如图2所示。所述图2为本发明支持虚拟VR的三调地类图斑立体图像获取方法第一实施例的预设方位像素坐标散点图,其中预设方位像素坐标集合只能满足在二维底图中绘制使用,在三维场景中需要绘制带有景深效果,因此需要转换为真实的地理坐标。其中,坐标转换方式可以为,通过矢量瓦片块的层行列号,通过第一预设公式计算出该矢量瓦片块的东西南北对应的经纬度,再根据矢量瓦片块中每一个顶点像素坐标,可以内插得到每个顶点的经纬度坐标,再根据第二预设公式,将经纬度坐标转换为空间直角坐标,以使空间直角坐标用于三维场景渲染。也就是说,对所述第一预设方位的顶点像素坐标集合进行坐标转换,获得空间直角坐标集合,并根据所述空间直角坐标集合获取各初始几何图形对应的法线坐标集合。The vector tile block data coordinates are a set of pixel coordinates with the upper left corner of the tile as the origin, that is, a set of vertex pixel coordinates in a preset orientation, as shown in FIG. 2 . 2 is a scatter diagram of preset orientation pixel coordinates according to the first embodiment of the method for obtaining a three-tone ground-type stereoscopic image for virtual VR in accordance with the present invention. In the 3D scene, it needs to be drawn with a depth of field effect, so it needs to be converted to real geographic coordinates. Wherein, the coordinate conversion method may be, through the layer row and column number of the vector tile block, calculate the latitude and longitude corresponding to the east, west, north and south of the vector tile block through the first preset formula, and then according to the pixel coordinates of each vertex in the vector tile block , the latitude and longitude coordinates of each vertex can be obtained by interpolation, and then the latitude and longitude coordinates are converted into space rectangular coordinates according to the second preset formula, so that the space rectangular coordinates are used for three-dimensional scene rendering. That is, coordinate transformation is performed on the vertex pixel coordinate set of the first preset orientation to obtain a spatial rectangular coordinate set, and a normal coordinate set corresponding to each initial geometric figure is obtained according to the spatial rectangular coordinate set.

也就是说,根据所述顶点像素坐标集合获得所述目标地类图斑对应的法线坐标集合的步骤为,对所述顶点像素坐标集合进行坐标转换,获得空间直角坐标集合,根据所述空间直角坐标集合获取所述目标地类图斑对应的法线坐标集合。That is to say, the step of obtaining the normal coordinate set corresponding to the target ground type patch according to the vertex pixel coordinate set is to perform coordinate transformation on the vertex pixel coordinate set to obtain a space rectangular coordinate set, and according to the space The rectangular coordinate set obtains the normal coordinate set corresponding to the target ground type patch.

参考图3,所述图3为本发明支持虚拟VR的三调地类图斑立体图像获取方法第一实施例的侧面空洞图形区域图,所述基准顶点像素坐标集合为B0、B1、B2、B3、B4、B5、B6,也就是说,所述目标地类图斑为二维图斑,所述基准顶点像素坐标集合也是指目标地类图斑中对应的多边形顶点像素坐标。Referring to FIG. 3 , FIG. 3 is a side view of the hollow figure area of the first embodiment of the method for obtaining a stereoscopic image of three-tone ground-type spots supporting virtual VR according to the present invention, and the reference vertex pixel coordinate set is B0, B1, B2, B3, B4, B5, B6, that is to say, the target ground type patch is a two-dimensional patch, and the reference vertex pixel coordinate set also refers to the corresponding polygon vertex pixel coordinates in the target ground type patch.

步骤S502:根据预设坐标高度阈值对所述目标地类图斑进行纵向拉伸,获得拉伸后的目标地类图斑。Step S502 : longitudinally stretching the target terrain patch according to a preset coordinate height threshold to obtain a stretched target terrain patch.

根据预设坐标高度阈值对所述目标地类图斑进行拉伸,也就是说,对同一个矢量瓦片块中的不同地类图斑对应的多边形,分别设置顶点的不高程值,使得不同地类图斑能高低错开。由于只是对高程值做了修改,图斑多边形始终保持在通一个平面,因此法线信息不需要做调整,从而可以减少计算量,提高工作效率。最后在拉伸完成后,以获取拉伸后的目标地类图斑。The target terrain patch is stretched according to the preset coordinate height threshold, that is to say, for the polygons corresponding to different terrain patches in the same vector tile block, the non-elevation values of the vertices are set respectively, so that different Terrain patches can be staggered. Since only the elevation value is modified, the patch polygons are always kept in the same plane, so the normal information does not need to be adjusted, which can reduce the amount of calculation and improve the work efficiency. Finally, after the stretching is completed, the stretched target ground pattern patches are obtained.

步骤S503:获取拉伸后的所述目标地类图斑对应的拉伸顶点坐标集合。Step S503: Acquire a set of stretched vertex coordinates corresponding to the stretched target ground pattern.

进一步地,参考图3,所述拉伸顶点坐标集合为T0、T1、T2、T3、T4、T5和T6,也就是说,所述拉伸后的目标地类图斑由于改变了顶点的高程值,根据坐标B0、B1、B2、B3、B4、B5及B6以获得拉伸后的目标地类图斑对应的拉伸顶点坐标值T0、T1、T2、T3、T4、T5和T6。Further, referring to FIG. 3 , the stretched vertex coordinate sets are T0, T1, T2, T3, T4, T5 and T6, that is to say, the stretched target terrain patch has changed the elevation of the vertices. value, according to the coordinates B0, B1, B2, B3, B4, B5 and B6 to obtain the stretched vertex coordinate values T0, T1, T2, T3, T4, T5 and T6 corresponding to the stretched target terrain patch.

所述拉伸后的目标地类图斑与目标地类图斑为同一种图斑,只是高度位置发生了变化。The stretched target ground type patch and the target ground type patch are the same type of patch, but the height position has changed.

步骤S504:根据所述基准顶点坐标集合和所述拉伸顶点坐标集合生成三调地类图斑立体图像。Step S504: Generate a three-tone ground-type patch stereo image according to the reference vertex coordinate set and the stretched vertex coordinate set.

将所述基准顶点坐标和所述拉伸顶点坐标集合,也就是分别将坐标B0、B1、B2、B3、B4、B5及B6与坐标T0、T1、T2、T3、T4、T5和T6依次进行对应连接,以获得侧面空洞图形区域,之后将侧面空洞图形通过Delaunay三角网构建算法将矩形生成多个三角网,也可以是坐标交叉连接,B0分别与T0和T1进行连接、B1分别与T1和T2进行连接、B2分别与T2和T3进行连接、B3分别与T3和T4、B4分别与T4和T5进行连接、B5分别与T5和T6进行连接及B6与T6进行连接,之后根据得到的三角网形成侧面空洞图形区域对应的基础图形绘制单元,最后根据侧面空洞图形区域对应的样式配置文件和基础图形绘制单元对侧面空洞图形区域进行颜色渲染,以获得侧面纹理图,所述侧面空洞图形区域对应的样式配置文件中的颜色为了使三维图像的立体感更强,最后,根据拉伸后的所述目标地类图斑和所述侧面纹理图生成三调地类图斑立体图像。Set the reference vertex coordinates and the stretch vertex coordinates, that is, the coordinates B0, B1, B2, B3, B4, B5 and B6 and the coordinates T0, T1, T2, T3, T4, T5 and T6 in turn. Corresponding connections are made to obtain the side hole figure area, and then the side hole figure is generated by the Delaunay triangle network construction algorithm to generate multiple triangle nets, or it can be a coordinate cross connection, B0 is connected with T0 and T1 respectively, B1 is connected with T1 and T1 and T2 is connected, B2 is connected with T2 and T3 respectively, B3 is connected with T3 and T4, B4 is connected with T4 and T5 respectively, B5 is connected with T5 and T6 respectively, and B6 is connected with T6, and then according to the obtained triangular network forming a basic graphics drawing unit corresponding to the side cavity graphic area, and finally performing color rendering on the side hollow graphic area according to the style configuration file corresponding to the side hollow graphic area and the basic graphics drawing unit to obtain a side texture map, the side hollow graphic area corresponding to In order to make the three-dimensional image more stereoscopic, finally, according to the stretched target ground pattern and the side texture map, a three-tone ground pattern three-dimensional image is generated.

在本实施例中,首先获取所述目标地类图斑的基准顶点坐标集合,之后为了提高工作效率,根据预设坐标高度阈值对所述目标地类图斑进行拉伸以获得拉伸后的目标地类图斑,并获取拉伸后的所述目标地类图斑对应的拉伸顶点坐标集合,最后根据所述基准顶点坐标集合和所述拉伸顶点坐标集合生成并对目标地类图斑进行拉伸,以生成三维立体感较强的三调地类图斑立体图像。In this embodiment, first obtain the reference vertex coordinate set of the target ground pattern, and then in order to improve work efficiency, the target ground pattern is stretched according to a preset coordinate height threshold to obtain the stretched The target ground class map spot, and the stretched vertex coordinate set corresponding to the stretched target ground class map spot is obtained, and finally the target ground class map is generated according to the reference vertex coordinate set and the stretched vertex coordinate set. The patch is stretched to generate a three-tone ground-type patch stereo image with a strong three-dimensional sense.

此外,参照图5,图5为本发明支持虚拟VR的三调地类图斑立体图像获取装置第一实施例的结构框图。如图5所示,本发明实施例提出支持虚拟VR的三调地类图斑立体图像获取装置包括:获取模块5001,用于获取三调地类图斑对应的矢量瓦片块数据,并对所述矢量瓦片块数据进行处理获得初始几何图像,所述初始几何图像中包括多个初始几何图形;所述获取模块5001,还用于获取各初始几何图形对应的地理类型;渲染模块5002,用于分别根据所述地理类型对对应的初始几何图形进行颜色渲染,获得多个地类图斑;组合模块5003,用于对所述地类图斑进行组合,获得二维纹理图;生成模块5004,用于根据所述二维纹理图确定目标地类图斑,并对所述目标地类图斑进行拉伸,以生成三调地类图斑立体图像。In addition, referring to FIG. 5 , FIG. 5 is a structural block diagram of a first embodiment of an apparatus for obtaining a stereoscopic image of three-tone ground-type spots that supports virtual VR according to the present invention. As shown in FIG. 5 , an apparatus for obtaining a stereoscopic image of a three-tone ground patch that supports virtual VR according to an embodiment of the present invention includes: an acquisition module 5001, configured to acquire vector tile block data corresponding to the three-tone ground patch, and to The vector tile data is processed to obtain an initial geometric image, and the initial geometric image includes a plurality of initial geometric figures; the obtaining module 5001 is further configured to obtain the geographic type corresponding to each initial geometric figure; the rendering module 5002, It is used to perform color rendering on the corresponding initial geometric figures according to the geographic type respectively, and obtain a plurality of terrain patches; the combining module 5003 is used to combine the terrain patches to obtain a two-dimensional texture map; the generating module 5004, for determining a target ground patch according to the two-dimensional texture map, and stretching the target ground patch to generate a three-tone ground patch stereo image.

获取模块5001,用于获取三调地类图斑对应的矢量瓦片块数据,并对所述矢量瓦片块数据进行处理获得初始几何图像,所述初始几何图像中包括多个初始几何图形。The obtaining module 5001 is configured to obtain the vector tile data corresponding to the three-tone ground pattern, and process the vector tile data to obtain an initial geometric image, where the initial geometric image includes a plurality of initial geometric figures.

需要说明的是,本实施例的执行主体是支持虚拟VR的三调地类图斑立体图像获取设备,其中,该设备是具有图像处理、数据处理、网络通信及程序运行等功能的支持虚拟VR的三调地类图斑立体图像获取设备,也可为其他设备,本实施例对此不做限制。It should be noted that the execution body of this embodiment is a three-tone ground-type patch stereo image acquisition device that supports virtual VR, wherein the device is a virtual VR that supports functions such as image processing, data processing, network communication, and program running. The device for obtaining the stereoscopic image of the three-tone ground pattern spot can also be other devices, which is not limited in this embodiment.

其中,“国家第三次土地调查”简称“三调”,三调的成果数据之一是土地分类数据,即地类图斑,也就是说,国家第三次土地调查的土地分类数据称为三调地类图斑,之后根据三调地类图斑获取三调地类图斑数据,并将三调地类图斑数据以矢量数据形式存储于数据库中。Among them, "the third national land survey" is abbreviated as "three surveys". One of the results of the three surveys is the land classification data, that is, the land classification map. That is to say, the land classification data of the third national land survey is called the land classification data. The three-tone earth pattern pattern is then obtained according to the three-tone earth pattern pattern, and the three-tone earth pattern pattern data is stored in the database in the form of vector data.

为了加快数据的展示效率,将这些矢量数据按照一定的规则切块,形成矢量瓦片块。可以理解为,根据三维场景中相机视锥体裁剪以获得当前所需的矢量瓦片覆盖范围,根据矢量瓦片覆盖范围计算所需的矢量瓦片块行列号,并获取对应的矢量瓦片块,之后通过数据服务从所述数据库中请求到对应的矢量瓦片块数据,保存到系统中以进行缓存。In order to speed up the display efficiency of data, these vector data are cut into blocks according to certain rules to form vector tiles. It can be understood that, according to the camera frustum in the 3D scene to obtain the current required vector tile coverage, calculate the required vector tile block row and column number according to the vector tile coverage, and obtain the corresponding vector tile block , and then request the corresponding vector tile block data from the database through the data service, and save it to the system for caching.

此外,将所述矢量瓦片块数据转换成空间数据,所述空间数据包括点数据、线数据和面数据,之后对点数据、线数据和面数据进行组合,获得初始几何图像,也就是说,矢量瓦片块数据以json_encode形式存储在数据库中,客户端加载后需要对json_encode数据进行解析,将字符串转换成点、线和面的内存组织形式,之后将点、线和面进行组合以获取初始几何图像,所述初始几何图像中包括多个初始几何图形。In addition, the vector tile data is converted into spatial data, the spatial data includes point data, line data and area data, and then the point data, line data and area data are combined to obtain an initial geometric image, that is , the vector tile data is stored in the database in the form of json_encode, and the client needs to parse the json_encode data after loading, convert the string into the memory organization of points, lines and surfaces, and then combine the points, lines and surfaces to An initial geometric image is obtained, where the initial geometric image includes a plurality of initial geometric figures.

所述获取模块5001,还用于获取各初始几何图形对应的地理类型。The obtaining module 5001 is further configured to obtain the geographic type corresponding to each initial geometric figure.

各初始几何图形对应的地理类型可能相同,也可能不同,假设初始几何图像中包括多个初始几何图形,所述初始几何图形为三角形、菱形和矩形等,本方案中可以将三角形对应的地理类型设置为山,可以将菱形对应的地理类型为土地,也可以将矩形对应的地理类型为河流等,本方案中也可以将三角形对应的地理类型设置为山,也可以将菱形对应的地理类型设置为山等,本方案还可以为数据库中已预先设定好初始几何图形对应的地理类型,将初始几何图形在数据库中进行匹配,以获取对应的地理类型,本实施例并不加以限制。The geographic types corresponding to each initial geometric figure may be the same or different. Assuming that the initial geometric image includes multiple initial geometric figures, the initial geometric figures are triangles, diamonds, rectangles, etc. If it is set to mountain, the geographic type corresponding to the diamond can be set to land, or the geographic type corresponding to the rectangle can be set to river, etc. In this scheme, the geographic type corresponding to the triangle can also be set to mountain, or the geographic type corresponding to the diamond can be set to For mountains, etc., this solution can also pre-set the geographic type corresponding to the initial geometric figure in the database, and match the initial geometric figure in the database to obtain the corresponding geographic type, which is not limited in this embodiment.

渲染模块5002,用于分别根据所述地理类型对对应的初始几何图形进行颜色渲染,获得多个地类图斑。The rendering module 5002 is configured to perform color rendering on the corresponding initial geometric figures according to the geographic types, respectively, to obtain a plurality of geographic patches.

分别查找地理类型对应的样式配置文件,之后通过三角网构建算法获得各初始几何图形对应的三角网,然后根据三角网生成基础图形绘制单元,最后根据样式配置文件和基础图形绘制单元对对应的初始几何图形进行颜色渲染,以获得多个地类图斑。Find the style configuration file corresponding to the geographic type respectively, then obtain the triangulation corresponding to each initial geometric figure through the triangulation network construction algorithm, and then generate the basic graphics drawing unit according to the triangular net, and finally, according to the style configuration file and the basic graphics drawing unit, the corresponding initial Geometry is color-rendered to obtain multiple terrain patches.

也就是说,三调地类图斑是以多边形的形式来表达的,矢量瓦片块解析后的矢量瓦片块数据以点、线和面生成初始几何图形来进行存储,这些初始几何图形无法直接通过三维的应用程序编程接口(Application Programming Interface API)直接进行颜色渲染,因此需要通过狄洛尼(Delaunay)三角网构建算法将各初始几何图形生成对应的三角网,之后根据三角网形成对应的基础图形绘制单元,供三维绘制API调用以进行颜色渲染。That is to say, the three-tone ground pattern is expressed in the form of polygons, and the parsed vector tile data of the vector tiles is stored in the initial geometric figures generated by points, lines and surfaces. These initial geometric figures cannot be Color rendering is performed directly through the 3D Application Programming Interface API. Therefore, it is necessary to generate the corresponding triangular network for each initial geometric figure through the Delaunay triangulation network construction algorithm, and then form the corresponding triangular network according to the triangular network. Basic graphics drawing unit for 3D drawing API calls for color rendering.

可以理解为,假设初始几何图形为矩形,通过Delaunay三角网构建算法将矩形生成一个三角网,所述三角网中对应两个三角形,之后根据得到的三角网形成矩形对应的基础图形绘制单元,假设初始几何图形为三角形,通过Delaunay三角网构建算法将三角形生成一个三角网,之后根据得到的三角网形成三角形对应的基础图形绘制单元等,本实施例并不加以限制。It can be understood that, assuming that the initial geometric figure is a rectangle, a triangle network is generated from the rectangle through the Delaunay triangle network construction algorithm, and the triangle network corresponds to two triangles, and then the basic graphics drawing unit corresponding to the rectangle is formed according to the obtained triangle network. The initial geometric figure is a triangle, and a triangular net is generated from the triangle through the Delaunay triangular net construction algorithm, and then a basic figure drawing unit corresponding to the triangle is formed according to the obtained triangular net, which is not limited in this embodiment.

其中,初始几何图形对应的地理类型都具有对应的样式标识,样式标识有对应的样式配置文件,所述样式配置文件为用户自定义设置,其中可以包括需要渲染的颜色、符号和透明度等。The geographic types corresponding to the initial geometric figures all have corresponding style identifiers, and the style identifiers have corresponding style configuration files. The style configuration files are user-defined settings, which may include colors, symbols, and transparency that need to be rendered.

将初始几何图形对应的地理类型作为键对象,之后根据预设键值对获取所述键对象对应的样式标识,所述预设键值对包括地理类型和样式标识,所述地理类型与样式标识的对应关系以键值对的形式预先储存至数据库中,以便后续调取使用,假设初始几何图形对应的地理类型为山,所对应的样式标识为1,则获取数值1对应的样式配置文件,也就是说每种地理类型都有对应的样式配置文件,也就是关于山对应的渲染颜色及透明度等,也可以是假设初始几何图形对应的地理类型为水,所对应的样式标识为1,则根据样式标识从样式配置文件(所述样式配置文件中存在各种地理类型对应的配置信息)中选取水对应的渲染颜色等配置信息等,本实施例并不加以限制。The geographic type corresponding to the initial geometric figure is used as the key object, and then the style identifier corresponding to the key object is obtained according to a preset key-value pair, where the preset key-value pair includes a geographic type and a style identifier, and the geographic type and style identifier The corresponding relationship is stored in the database in the form of key-value pairs in advance for subsequent retrieval and use. Assuming that the geographic type corresponding to the initial geometric figure is mountain and the corresponding style identifier is 1, the style configuration file corresponding to the value 1 is obtained. That is to say, each geographic type has a corresponding style configuration file, that is, the rendering color and transparency corresponding to the mountain. It can also be assumed that the geographic type corresponding to the initial geometric figure is water, and the corresponding style identifier is 1, then Configuration information such as rendering colors corresponding to water is selected from a style configuration file (the style configuration file contains configuration information corresponding to various geographic types) according to the style identifier, which is not limited in this embodiment.

组合模块5003,用于对所述地类图斑进行组合,获得二维纹理图。The combining module 5003 is used for combining the ground type patches to obtain a two-dimensional texture map.

地类图斑为已经进行颜色渲染后的初始几何图形,将颜色渲染后的各初始几何图形进行图形组合,获得带有颜色的初始几何图像,之后将带有颜色的初始几何图像称为二维纹理图。The ground-type patch is the initial geometric figure that has been rendered in color. The initial geometric figures after color rendering are combined graphically to obtain the initial geometric image with color, and then the initial geometric image with color is called two-dimensional. texture map.

假设初始几何图像中包括三角形、矩形和菱形,三角形、矩形和菱形都为无色图形,之后将三角形渲染为黄色,以成黄色三角形、矩形渲染为蓝色,以生成蓝色矩形、菱形渲染为红色,以生成红色菱形,之后将黄色三角形、蓝色矩形及红色菱形进行图形组合,以获得二维纹理图,所述二维纹理图也就是最终完整的地类图斑图像。Assuming that the initial geometric image includes triangles, rectangles and rhombus, triangles, rectangles and rhombus are all colorless shapes, and then the triangles are rendered in yellow to form yellow triangles, and the rectangles are rendered in blue to generate blue rectangles, and the rhombus is rendered as red to generate a red rhombus, and then graphically combine the yellow triangle, the blue rectangle, and the red rhombus to obtain a two-dimensional texture map, which is the final complete land-type patch image.

生成模块5004,用于根据所述二维纹理图确定目标地类图斑,并对所述目标地类图斑进行拉伸,以生成三调地类图斑立体图像。A generating module 5004 is configured to determine a target ground patch according to the two-dimensional texture map, and stretch the target ground patch to generate a three-tone ground patch stereo image.

将所述地理类型作为键对象,并根据预设键值对获取所述键对象对应的目标样式标识,根据所述目标样式标识和所述二维纹理图确定目标地类图斑。The geographic type is used as a key object, and a target style identifier corresponding to the key object is obtained according to a preset key-value pair, and a target land type patch is determined according to the target style identifier and the two-dimensional texture map.

预先将初始几何图形对应的地理类型及样式标识存储在数据库中,并将地理类型与样式标识以键值对的形式进行一一对应,也就是说,每种地理类型都有对应的样式标识,假设初始几何图形为三角形,则对应的地理类型为山,则对应的样式标识为1,假设初始几何图形为矩形,则对应的地理类型为水,则对应的样式标识为2等。Pre-store the geographic types and style identifiers corresponding to the initial geometric figures in the database, and make a one-to-one correspondence between geographic types and style identifiers in the form of key-value pairs, that is, each geographic type has a corresponding style identifier. Assuming that the initial geometric figure is a triangle, the corresponding geographic type is mountain, and the corresponding style identifier is 1. If the initial geometric figure is a rectangle, the corresponding geographic type is water, and the corresponding style identifier is 2, etc.

根据所述二维纹理图中确定目标地类图斑的方式可以根据样式标识,也可以根据颜色来确定目标地类图斑,若用户筛选样式标识为1的目标地类图斑即为三角形对应的目标地类图斑,也可以利用颜色来确定目标地类图斑,若用户选定黄色,则将具有黄色的初始几何图形即地类图斑作为目标地类图斑等。The way to determine the target ground type patch according to the two-dimensional texture map can be based on the style identifier or the color. If the user selects the target ground type patch with the style identifier of 1, it corresponds to a triangle. If the user selects yellow, the initial geometric figure with yellow, that is, the terrain patch, will be used as the target terrain patch, etc.

根据所述矢量瓦片块数据获取各初始几何图形对应的预设方位的顶点像素坐标集合,并根据所述顶点像素坐标集合获得所述目标地类图斑对应的法线坐标集合,获取所述目标地类图斑的基准顶点坐标集合,根据预设坐标高度阈值对所述目标地类图斑进行拉伸,也就是说,对同一个矢量瓦片块中的不同地类图斑对应的多边形,分别设置顶点的不高程值,使得不同地类图斑能高低错开。由于只是对高程值做了修改,图斑多边形始终保持在通一个平面,因此法线信息不需要做调整,从而可以减少计算量,提高工作效率,获得拉伸后的目标地类图斑,获取拉伸后的所述目标地类图斑的拉伸顶点坐标集合,根据所述基准顶点坐标集合和所述拉伸顶点坐标集合生成三调地类图斑立体图像。Acquire the vertex pixel coordinate set of the preset orientation corresponding to each initial geometric figure according to the vector tile data, and obtain the normal coordinate set corresponding to the target ground type patch according to the vertex pixel coordinate set, and obtain the The reference vertex coordinate set of the target terrain patch, and the target terrain patch is stretched according to the preset coordinate height threshold, that is, the polygons corresponding to different terrain patches in the same vector tile block are stretched. , respectively set the non-elevation values of the vertices, so that the different types of patches can be staggered. Because only the elevation value is modified, the polygon of the patch is always kept in the same plane, so the normal information does not need to be adjusted, which can reduce the amount of calculation and improve the work efficiency. The stretched vertex coordinate set of the target ground pattern spot after being stretched, and a three-tone ground pattern three-dimensional image is generated according to the reference vertex coordinate set and the stretched vertex coordinate set.

进一步地,所述根据所述第一预设方位的顶点像素坐标集合获得各初始几何图形对应的法线坐标集合的步骤包括,矢量瓦片块数据坐标是以瓦片的左上角为原点的像素坐标集合即预设方位的顶点像素坐标集合,如图2所示。所述图2为本发明支持虚拟VR的三调地类图斑立体图像获取方法第一实施例的预设方位像素坐标集合散点图,其中预设方位像素坐标集合只能满足在二维底图中绘制使用,在三维场景中需要绘制带有景深效果,因此需要转换为真实的地理坐标。其中,坐标转换方式可以为,通过矢量瓦片块的层行列号,通过第一预设公式计算出该矢量瓦片块的东西南北对应的经纬度,再根据矢量瓦片块中每一个顶点像素坐标,可以内插得到每个顶点的经纬度坐标,再根据第二预设公式,将经纬度坐标转换为空间直角坐标,以使空间直角坐标用于三维场景渲染。也就是说,对所述第一预设方位的顶点像素坐标集合进行坐标转换,获得空间直角坐标集合,并根据所述空间直角坐标集合获取各初始几何图形对应的法线坐标集合。Further, the step of obtaining the normal coordinate set corresponding to each initial geometric figure according to the vertex pixel coordinate set of the first preset orientation includes: the vector tile block data coordinate is a pixel whose origin is the upper left corner of the tile. The coordinate set is the vertex pixel coordinate set of the preset orientation, as shown in FIG. 2 . 2 is a scatter diagram of a set of preset orientation pixel coordinates according to the first embodiment of the method for obtaining a stereoscopic image of three-tone ground-type spots supporting virtual VR according to the present invention, wherein the preset orientation pixel coordinate set can only satisfy the requirements of a two-dimensional base. It is used for drawing in the figure. In the three-dimensional scene, it needs to be drawn with a depth of field effect, so it needs to be converted into real geographic coordinates. Wherein, the coordinate conversion method may be, through the layer row and column number of the vector tile block, calculate the latitude and longitude corresponding to the east, west, north and south of the vector tile block through the first preset formula, and then according to the pixel coordinates of each vertex in the vector tile block , the latitude and longitude coordinates of each vertex can be obtained by interpolation, and then the latitude and longitude coordinates are converted into space rectangular coordinates according to the second preset formula, so that the space rectangular coordinates are used for three-dimensional scene rendering. That is, coordinate transformation is performed on the vertex pixel coordinate set of the first preset orientation to obtain a spatial rectangular coordinate set, and a normal coordinate set corresponding to each initial geometric figure is obtained according to the spatial rectangular coordinate set.

所述第一预设公式为:

Figure BDA0002616664050000171
The first preset formula is:
Figure BDA0002616664050000171

式中,L为矢量瓦片块的层级,Col为矢量瓦片块的列号,Row为矢量瓦片块的行号,TileSize为经纬度,West为西经,East为东经,South为南纬,North为北纬。In the formula, L is the level of the vector tile, Col is the column number of the vector tile, Row is the row number of the vector tile, TileSize is the longitude and latitude, West is the west longitude, East is the east longitude, South is the south latitude, North is the northern latitude.

所述第二预设公式为:

Figure BDA0002616664050000172
The second preset formula is:
Figure BDA0002616664050000172

式中,Latitude Degree为纬度坐标,Longitude Degree为经度坐标,x、y、z为笛卡尔空间直角坐标,radCosLat为定义的中间变量,radius为地球半径(可取值6378137)。In the formula, Latitude Degree is the latitude coordinate, Longitude Degree is the longitude coordinate, x, y, z are Cartesian space Cartesian coordinates, radCosLat is the defined intermediate variable, and radius is the radius of the earth (value 6378137).

根据所述顶点像素坐标集合获得所述目标地类图斑对应的法线坐标集合的步骤为,对所述顶点像素坐标集合进行坐标转换,获得空间直角坐标集合,根据所述空间直角坐标集合获取所述目标地类图斑对应的法线坐标集合。The step of obtaining the normal coordinate set corresponding to the target ground type patch according to the vertex pixel coordinate set is as follows: performing coordinate transformation on the vertex pixel coordinate set to obtain a space rectangular coordinate set, and obtaining a space rectangular coordinate set according to the spatial rectangular coordinate set. The set of normal coordinates corresponding to the target ground type patches.

为了使得纯色的矢量瓦片在三维场景中有立体感,需要加入光照信息,通过地形的起伏形成的亮度明暗变化,使得立体感更强。使用光照的前提是需要顶点具有法线信息。首先计算每个三角形的面法线信息,计算方法为选取三角形的两条边构建方向矢量,对这两个矢量进行叉积得到该面的面法线,其次,将该三角形的面法线赋值给该三角形的每个顶点,一个顶点可能被多个三角形共享,则该顶点的法线记录为所有共享三角形面法线的累加值,最后,将该顶点的累计法线值进行归一化,转为单位法线矢量传入GPU中供光照计算使用。In order to make the solid-color vector tiles have a three-dimensional sense in the three-dimensional scene, it is necessary to add lighting information, and the brightness and shade changes formed by the ups and downs of the terrain make the three-dimensional sense stronger. The premise of using lighting is that vertices need to have normal information. First, calculate the surface normal information of each triangle. The calculation method is to select two sides of the triangle to construct a direction vector, and perform the cross product of these two vectors to obtain the surface normal of the surface. Second, assign the value of the surface normal of the triangle. For each vertex of the triangle, a vertex may be shared by multiple triangles, then the normal of the vertex is recorded as the cumulative value of the normals of all shared triangle faces, and finally, the cumulative normal value of the vertex is normalized, Converted to a unit normal vector and passed to the GPU for use in lighting calculations.

参考图3,所述图3为本发明支持虚拟VR的三调地类图斑立体图像获取方法第一实施例的侧面空洞图形区域图,之后对所述侧面空洞图形区域进行颜色渲染,获得侧面纹理图,所述根据拉伸后的所述目标地类图斑和所述侧面纹理图生成三调地类图斑立体图像。Referring to FIG. 3 , said FIG. 3 is a side hole graphic area diagram of the first embodiment of the three-tone ground-type stereo image acquisition method supporting virtual VR of the present invention, and then color rendering is performed on the side side hole graphic area to obtain a side view A texture map, generating a three-tone three-dimensional image of the terrain patch according to the stretched target terrain patch and the side texture map.

对所述侧面空洞图形区域进行颜色渲染,获得侧面纹理图的步骤为将侧面空洞图形通过Delaunay三角网构建算法将矩形生成多个三角网,之后根据得到的三角网形成侧面空洞图形区域对应的基础图形绘制单元,最后根据侧面空洞图形区域对应的样式配置文件和基础图形绘制单元对侧面空洞图形区域进行颜色渲染,以获得侧面纹理图,所述侧面空洞图形区域对应的样式配置文件中的颜色为了使三维图像的立体感更强,可以设置为灰色等,本实施例并不加以限制。Color rendering is performed on the side cavity graphic area, and the step of obtaining the side texture map is to generate a plurality of triangular nets from the rectangle through the Delaunay triangulation network construction algorithm, and then form the basis corresponding to the side cavity graphic area according to the obtained triangular net. The graphics drawing unit finally performs color rendering on the side hollow graphic area according to the style configuration file corresponding to the side hollow graphic area and the basic graphics drawing unit to obtain a side texture map, and the color in the style configuration file corresponding to the side hollow graphic area is To make the three-dimensional image more three-dimensional, it can be set to gray, etc., which is not limited in this embodiment.

本方案中,还可以将每个瓦片块内的不同地类图斑生成阶梯状的立体三角网,需要对顶面和侧面分别贴图,为了加快渲染效率,可以使用了一体化贴图。具体的,在上述实施例描述的过程中,根据已经渲染生成的一张栅格纹理,将该纹理作为一个整体映射到高低起伏的三角网即可完成贴图,具体的映射关系需要计算出每个顶点的纹理坐标。也就是保留的以瓦片的左上角为原点的像素坐标值,除以矢量瓦片的尺寸大小,得到归一化后的坐标,将改坐标作为顶点的纹理坐标,即可完成纹理坐标和三角网的映射,之后通过过滤条件设置,能达到不同地类图斑抬升到不同的高度,但是突然的抬升显得突兀。因此,可以将过滤条件设置的高度值和地类图斑当前的高度值直接进行插值,在渲染的每一帧进行高度值的调整,逼近设置目标值,从而达到高度抬升或者下降的动画效果,使得地类图斑有个抬升动画过程,使得交互更为平滑。In this solution, a stepped three-dimensional triangular mesh can also be generated from different terrain patterns in each tile block, and the top and side surfaces need to be mapped separately. In order to speed up the rendering efficiency, an integrated map can be used. Specifically, in the process described in the above embodiment, according to a grid texture that has been generated by rendering, the texture can be mapped as a whole to the undulating triangle mesh to complete the mapping. The specific mapping relationship needs to be calculated for each The texture coordinates of the vertex. That is to say, the reserved pixel coordinate value with the upper left corner of the tile as the origin, divided by the size of the vector tile, to get the normalized coordinates, and the changed coordinates are used as the texture coordinates of the vertex to complete the texture coordinates and triangle. The mapping of the network, and then through the filter condition setting, can achieve the elevation of different types of patches to different heights, but the sudden elevation is abrupt. Therefore, the height value set by the filter condition and the current height value of the terrain patch can be directly interpolated, and the height value can be adjusted in each frame of rendering to approach the set target value, so as to achieve the animation effect of height rising or falling. Makes the terrain patch have a lifting animation process, making the interaction smoother.

此外,所述根据所述二维纹理图确定目标地类图斑,并对所述目标地类图斑进行拉伸,以生成三调地类图斑立体图像的步骤之后,获取逻辑相机对应的位置信息和三调地类图斑立体图像,根据所述位置信息确定渲染相机组的位置距离,所述渲染相机组包括第一渲染相机和第二渲染相机,根据所述位置距离分别设置所述第一渲染相机对应的第一渲染视口与所述第二渲染相机对应的第二渲染视口,将所述第一渲染视口与所述第二渲染视口作为目标渲染视口,也就是说通过所述目标渲染视口对所述三调地类图斑立体图像进行虚拟VR展示。本实施例的具体实现方式可以完成在三维场景中的正常渲染操作,但为了支持虚拟VR展示,另外,还需要扩展支持立体像对的渲染能力。因此,可以在三维场景中设置了三个相机,一个逻辑相机和两个渲染相机。在虚拟VR展示模式下,应用程序只能操控逻辑相机,在上述步骤中的三维交互以及动画过程都只和逻辑相机挂钩;两个渲染相机与逻辑相机在朝向上保持一致,位置上左右各偏移一定距离,模拟人眼的瞳距。渲染相机分别设置对应的渲染视口,其中渲染视口的高度为屏幕的高度,宽度为屏幕宽度的一半,两个视口合并覆盖整个渲染屏幕。当关闭虚拟VR模式,渲染相机被移除,逻辑相机切换为唯一的渲染相机,正常在屏幕中渲染。In addition, after the step of determining the target ground pattern according to the two-dimensional texture map, and stretching the target ground pattern to generate a three-tone ground pattern three-dimensional image, obtain the corresponding ground pattern of the logical camera. position information and a three-tone ground-like patch stereo image, determine the position distance of the rendering camera group according to the position information, the rendering camera group includes a first rendering camera and a second rendering camera, and set the said position and distance respectively according to the position distance The first rendering viewport corresponding to the first rendering camera and the second rendering viewport corresponding to the second rendering camera, the first rendering viewport and the second rendering viewport are used as the target rendering viewport, that is It is said that a virtual VR display is performed on the stereoscopic image of the three-tone ground-type patch through the target rendering viewport. The specific implementation manner of this embodiment can complete the normal rendering operation in the 3D scene, but in order to support the virtual VR display, in addition, the rendering capability of supporting stereo image pairs needs to be extended. Therefore, three cameras, one logical camera and two rendering cameras, can be set up in the 3D scene. In the virtual VR display mode, the application can only control the logical camera, and the 3D interaction and animation process in the above steps are only linked to the logical camera; the orientation of the two rendering cameras and the logical camera are consistent, and the positions are offset from left to right. Move a certain distance to simulate the interpupillary distance of the human eye. The rendering camera sets the corresponding rendering viewports, where the height of the rendering viewport is the height of the screen, and the width is half the width of the screen. The two viewports are combined to cover the entire rendering screen. When the virtual VR mode is turned off, the rendering camera is removed, and the logical camera is switched to the only rendering camera, which renders normally on the screen.

在本实施例中,首先获取三调地类图斑对应的矢量瓦片块数据,为加快数据处理效率,可对矢量瓦片块数据进行处理获得多个初始几何图形,然后获取各初始几何图形对应的地理类型,并根据地理类型对对应的初始几何图形进行颜色渲染,以获得便于区分地理类型的多个地类图斑,之后对地类图斑进行组合,获得二维纹理图,最后根据二维纹理图确定目标地类图斑,并对目标地类图斑进行拉伸,在提高工作效率的同时,以生成三维立体感较强、并支持虚拟VR展示的三调地类图斑立体图像。In this embodiment, the vector tile data corresponding to the three-tone ground pattern is obtained first. In order to speed up the data processing efficiency, the vector tile data can be processed to obtain a plurality of initial geometric figures, and then each initial geometric figure can be obtained. Corresponding geographic types, and color rendering the corresponding initial geometric figures according to the geographic types to obtain multiple geographic patches that are easy to distinguish geographic types, then combine the geographic patches to obtain a two-dimensional texture map, and finally according to The two-dimensional texture map determines the target ground pattern, and stretches the target ground pattern. While improving work efficiency, it can generate a three-dimensional ground pattern with strong three-dimensional sense and support for virtual VR display. image.

本发明支持虚拟VR的三调地类图斑立体图像获取装置的其他实施例或具体实现方式可参照上述各方法实施例,此处不再赘述。For other embodiments or specific implementation manners of the apparatus for obtaining a stereoscopic image of three-tone ground-like patches supporting virtual VR according to the present invention, reference may be made to the above method embodiments, which will not be repeated here.

需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者系统不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者系统中还存在另外的相同要素。It should be noted that, herein, the terms "comprising", "comprising" or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article or system comprising a series of elements includes not only those elements, It also includes other elements not expressly listed or inherent to such a process, method, article or system. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in the process, method, article or system that includes the element.

上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。词语第一、第二、以及第三等的使用不表示任何顺序,可将这些词语解释为名称。The above-mentioned serial numbers of the embodiments of the present invention are only for description, and do not represent the advantages or disadvantages of the embodiments. In a unit claim enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the words first, second, and third, etc. do not denote any order and may be interpreted as names.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如只读存储器镜像(Read Only Memory image,ROM)/随机存取存储器(Random AccessMemory,RAM)、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本发明各个实施例所述的方法。From the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general hardware platform, and of course hardware can also be used, but in many cases the former is better implementation. Based on this understanding, the technical solutions of the present invention essentially or the parts that contribute to the prior art can be embodied in the form of software products, and the computer software products are stored in a storage medium (such as a read-only memory image). Memory image, ROM)/random access memory (Random Access Memory, RAM, disk, CD), including several instructions to make a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc. ) to execute the methods described in the various embodiments of the present invention.

以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above are only preferred embodiments of the present invention, and are not intended to limit the scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the description and drawings of the present invention, or directly or indirectly applied in other related technical fields , are similarly included in the scope of patent protection of the present invention.

Claims (8)

1.一种支持虚拟VR的三调地类图斑立体图像获取方法,其特征在于,所述方法包括以下步骤:1. A method for obtaining a stereoscopic image of three-tone ground-type spots supporting virtual VR, wherein the method comprises the following steps: 获取三调地类图斑对应的矢量瓦片块数据,并对所述矢量瓦片块数据进行处理获得初始几何图像,所述初始几何图像中包括多个初始几何图形;Obtaining vector tile data corresponding to the three-tone ground pattern, and processing the vector tile data to obtain an initial geometric image, where the initial geometric image includes a plurality of initial geometric figures; 获取各初始几何图形对应的地理类型;Get the geographic type corresponding to each initial geometry; 分别根据所述地理类型对对应的初始几何图形进行颜色渲染,获得多个地类图斑;Color rendering is performed on the corresponding initial geometric figures according to the geographic types, respectively, to obtain a plurality of geographic map spots; 对所述地类图斑进行组合,获得二维纹理图;combining the ground pattern patches to obtain a two-dimensional texture map; 根据所述二维纹理图确定目标地类图斑,并对所述目标地类图斑进行拉伸,以生成三调地类图斑立体图像。The target ground pattern is determined according to the two-dimensional texture map, and the target ground pattern is stretched to generate a three-tone ground pattern three-dimensional image. 2.如权利要求1所述的方法,其特征在于,所述对所述矢量瓦片块数据进行处理获得初始几何图像的步骤,包括:2. The method of claim 1, wherein the step of processing the vector tile data to obtain an initial geometric image comprises: 将所述矢量瓦片块数据转换成空间数据,所述空间数据包括点数据、线数据和面数据;converting the vector tile data into spatial data, the spatial data including point data, line data and area data; 根据所述点数据、所述线数据和所述面数据生成初始几何图像。An initial geometric image is generated from the point data, the line data and the area data. 3.如权利要求1所述的方法,其特征在于,所述分别根据所述地理类型对对应的初始几何图形进行颜色渲染,获得多个地类图斑的步骤,包括:3. The method according to claim 1, wherein the step of performing color rendering on the corresponding initial geometric figures according to the geographical type respectively to obtain a plurality of geographical map spots, comprises: 通过三角网构建算法获得各初始几何图形对应的三角网;Obtain the triangulation corresponding to each initial geometric figure through the triangulation construction algorithm; 根据所述三角网生成基础图形绘制单元;generating a basic graphics drawing unit according to the triangulation; 分别查找所述地理类型对应的样式配置文件;Find the style configuration files corresponding to the geographic types respectively; 根据所述样式配置文件,通过所述基础图形绘制单元对初始几何图形进行颜色渲染,获得多个地类图斑。According to the style configuration file, color rendering is performed on the initial geometric figure by the basic figure drawing unit to obtain a plurality of terrain patches. 4.如权利要求1所述的方法,其特征在于,所述根据所述二维纹理图确定目标地类图斑的步骤,包括:4. The method according to claim 1, wherein the step of determining the target terrain pattern according to the two-dimensional texture map comprises: 将所述地理类型作为键对象在预设键值对中查找对应的目标样式标识,所述键值对中存放有地理类型和样式标识之间的对应关系;The geographic type is used as a key object to search for a corresponding target style identifier in a preset key-value pair, and the key-value pair stores the correspondence between the geographic type and the style identifier; 根据所述目标样式标识和所述二维纹理图确定目标地类图斑。Determine the target ground type patch according to the target style identifier and the two-dimensional texture map. 5.如权利要求1所述的方法,其特征在于,所述对所述目标地类图斑进行拉伸,以生成三调地类图斑立体图像的步骤,包括:5 . The method of claim 1 , wherein the step of stretching the target ground pattern to generate a three-tone ground pattern three-dimensional image comprises: 5 . 获取所述目标地类图斑的基准顶点坐标集合;Obtain the reference vertex coordinate set of the target ground pattern; 根据预设坐标高度阈值对所述目标地类图斑进行纵向拉伸,获得拉伸后的目标地类图斑;According to the preset coordinate height threshold, longitudinally stretch the target terrain patch to obtain the stretched target terrain patch; 获取拉伸后的所述目标地类图斑对应的拉伸顶点坐标集合;Obtain the stretched vertex coordinate set corresponding to the stretched target ground pattern; 根据所述基准顶点坐标集合和所述拉伸顶点坐标集合生成三调地类图斑立体图像。A three-tone ground-like patch stereo image is generated according to the reference vertex coordinate set and the stretched vertex coordinate set. 6.如权利要求5所述的方法,其特征在于,所述根据所述基准顶点坐标集合和所述拉伸顶点坐标集合生成三调地类图斑立体图像的步骤,包括:6. The method according to claim 5, wherein the step of generating a three-tone ground-type patch stereo image according to the reference vertex coordinate set and the stretched vertex coordinate set comprises: 根据所述基准顶点坐标集合和所述拉伸顶点坐标集合构建侧面空洞图形区域;Constructing a side hollow figure area according to the reference vertex coordinate set and the stretch vertex coordinate set; 对所述侧面空洞图形区域进行颜色渲染,获得侧面纹理图;performing color rendering on the side cavity graphic area to obtain a side texture map; 根据拉伸后的所述目标地类图斑和所述侧面纹理图生成三调地类图斑立体图像。According to the stretched target terrain patch and the side texture map, a three-tone terrain patch stereo image is generated. 7.如权利要求1所述的方法,其特征在于,所述根据所述二维纹理图确定目标地类图斑,并对所述目标地类图斑进行拉伸,以生成三调地类图斑立体图像的步骤之后,还包括:7 . The method according to claim 1 , wherein the target ground pattern is determined according to the two-dimensional texture map, and the target ground pattern is stretched to generate a three-tone ground pattern. 8 . After the step of spotting the stereoscopic image, the method further includes: 获取逻辑相机对应的位置信息和三调地类图斑立体图像;Obtain the position information corresponding to the logical camera and the stereo image of the three-tone ground pattern; 根据所述位置信息确定渲染相机组的位置距离,所述渲染相机组包括第一渲染相机和第二渲染相机;Determine the position distance of the rendering camera group according to the position information, the rendering camera group includes a first rendering camera and a second rendering camera; 根据所述位置距离分别设置所述第一渲染相机对应的第一渲染视口与所述第二渲染相机对应的第二渲染视口;respectively setting a first rendering viewport corresponding to the first rendering camera and a second rendering viewport corresponding to the second rendering camera according to the position distance; 将所述第一渲染视口与所述第二渲染视口作为目标渲染视口;using the first rendering viewport and the second rendering viewport as target rendering viewports; 通过所述目标渲染视口对所述三调地类图斑立体图像进行虚拟VR展示。A virtual VR display is performed on the three-tone ground-like patch stereoscopic image through the target rendering viewport. 8.一种支持虚拟VR的三调地类图斑立体图像获取装置,其特征在于,所述支持虚拟VR的三调地类图斑立体图像获取装置包括:8. A device for obtaining a stereoscopic image of a three-tone ground-type spot that supports virtual VR, wherein the device for obtaining a three-tone ground-type spot stereoscopic image supporting virtual VR comprises: 获取模块,用于获取三调地类图斑对应的矢量瓦片块数据,并对所述矢量瓦片块数据进行处理获得初始几何图像,所述初始几何图像中包括多个初始几何图形;an acquisition module, configured to acquire vector tile data corresponding to the three-tone ground pattern, and process the vector tile data to obtain an initial geometric image, where the initial geometric image includes a plurality of initial geometric figures; 所述获取模块,还用于获取各初始几何图形对应的地理类型;The obtaining module is also used to obtain the geographic type corresponding to each initial geometric figure; 渲染模块,用于分别根据所述地理类型对对应的初始几何图形进行颜色渲染,获得多个地类图斑;a rendering module, configured to perform color rendering on the corresponding initial geometric figures according to the geographic types, respectively, to obtain a plurality of geographic map spots; 组合模块,用于对所述地类图斑进行组合,获得二维纹理图;a combination module, used for combining the ground pattern patches to obtain a two-dimensional texture map; 生成模块,用于根据所述二维纹理图确定目标地类图斑,并对所述目标地类图斑进行拉伸,以生成三调地类图斑立体图像。The generating module is configured to determine the target ground pattern according to the two-dimensional texture map, and stretch the target ground pattern to generate a three-tone ground pattern three-dimensional image.
CN202010775261.6A 2020-08-04 2020-08-04 Method and device for obtaining stereoscopic images of three-level land classification spots supporting virtual VR Active CN111915711B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010775261.6A CN111915711B (en) 2020-08-04 2020-08-04 Method and device for obtaining stereoscopic images of three-level land classification spots supporting virtual VR

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010775261.6A CN111915711B (en) 2020-08-04 2020-08-04 Method and device for obtaining stereoscopic images of three-level land classification spots supporting virtual VR

Publications (2)

Publication Number Publication Date
CN111915711A true CN111915711A (en) 2020-11-10
CN111915711B CN111915711B (en) 2025-01-28

Family

ID=73288033

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010775261.6A Active CN111915711B (en) 2020-08-04 2020-08-04 Method and device for obtaining stereoscopic images of three-level land classification spots supporting virtual VR

Country Status (1)

Country Link
CN (1) CN111915711B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001202527A (en) * 2000-01-19 2001-07-27 Hitachi Ltd 3D graphic display method and 3D drawing apparatus
CN101887595A (en) * 2009-05-14 2010-11-17 武汉如临其境科技创意有限公司 Three-dimensional digital earth-space data organizing and rendering method based on quad-tree index
US20130300738A1 (en) * 2011-02-25 2013-11-14 Mitsubishi Electric Corporation Map rendering device
US20140267279A1 (en) * 2013-03-15 2014-09-18 Janne Kontkanen System and method for overlaying two-dimensional map data on a three-dimensional scene
CN105282532A (en) * 2014-06-03 2016-01-27 天津拓视科技有限公司 3D display method and device
CN105740256A (en) * 2014-12-09 2016-07-06 高德信息技术有限公司 Generation method and generation device of three-dimensional map
CN105825544A (en) * 2015-11-25 2016-08-03 维沃移动通信有限公司 Image processing method and mobile terminal
CN105913485A (en) * 2016-04-06 2016-08-31 北京小小牛创意科技有限公司 Three-dimensional virtual scene generation method and device
CN106133795A (en) * 2014-01-17 2016-11-16 诺基亚技术有限公司 For 3D being rendered the method and apparatus that in application, the media content of geo-location carries out visualization
US20190318536A1 (en) * 2016-06-20 2019-10-17 Ocean Maps GmbH Method for Generating 3D Data Relating to an Object
CN110738718A (en) * 2019-09-04 2020-01-31 中国国土勘测规划院 Three-dimensional visualization method for kinds of homeland data
CN110737737A (en) * 2019-09-19 2020-01-31 中国国土勘测规划院 territorial earth vector data rendering method and system

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001202527A (en) * 2000-01-19 2001-07-27 Hitachi Ltd 3D graphic display method and 3D drawing apparatus
CN101887595A (en) * 2009-05-14 2010-11-17 武汉如临其境科技创意有限公司 Three-dimensional digital earth-space data organizing and rendering method based on quad-tree index
US20130300738A1 (en) * 2011-02-25 2013-11-14 Mitsubishi Electric Corporation Map rendering device
US20140267279A1 (en) * 2013-03-15 2014-09-18 Janne Kontkanen System and method for overlaying two-dimensional map data on a three-dimensional scene
CN106133795A (en) * 2014-01-17 2016-11-16 诺基亚技术有限公司 For 3D being rendered the method and apparatus that in application, the media content of geo-location carries out visualization
CN105282532A (en) * 2014-06-03 2016-01-27 天津拓视科技有限公司 3D display method and device
CN105740256A (en) * 2014-12-09 2016-07-06 高德信息技术有限公司 Generation method and generation device of three-dimensional map
CN105825544A (en) * 2015-11-25 2016-08-03 维沃移动通信有限公司 Image processing method and mobile terminal
CN105913485A (en) * 2016-04-06 2016-08-31 北京小小牛创意科技有限公司 Three-dimensional virtual scene generation method and device
US20190318536A1 (en) * 2016-06-20 2019-10-17 Ocean Maps GmbH Method for Generating 3D Data Relating to an Object
CN110738718A (en) * 2019-09-04 2020-01-31 中国国土勘测规划院 Three-dimensional visualization method for kinds of homeland data
CN110737737A (en) * 2019-09-19 2020-01-31 中国国土勘测规划院 territorial earth vector data rendering method and system

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
HAXIANHE: "《VR入门系列教程》之13---相机与立体渲染", pages 1 - 2, Retrieved from the Internet <URL:https://www.cnblogs.com/haxianhe/p/9271168.html> *
程绵绵;李少梅;朱新铭;程见桥;: "基于规则格网DEM线状矢量要素三维可视化方法", 测绘工程, vol. 24, no. 02, 25 February 2015 (2015-02-25), pages 38 - 41 *
郭敬磊: "基于DEM数据的三维地形地类可视化研究", 中国优秀硕士学位论文全文数据库 基础科学辑, no. 3, 15 March 2017 (2017-03-15), pages 008 - 101 *

Also Published As

Publication number Publication date
CN111915711B (en) 2025-01-28

Similar Documents

Publication Publication Date Title
KR101085390B1 (en) Image representation method, apparatus for 3D navigation and mobile device including the apparatus
KR101591427B1 (en) Method for Adaptive LOD Rendering in 3-D Terrain Visualization System
CN111899323B (en) Three-dimensional earth drawing method and device
CN112169324A (en) Rendering method, device and equipment of game scene
US11100707B2 (en) Computer graphics method for terrain rendering
CN113592999B (en) Rendering method of virtual luminous body and related equipment
US20230033319A1 (en) Method, apparatus and device for processing shadow texture, computer-readable storage medium, and program product
CN108230430B (en) Cloud layer mask image processing method and device
CN115115800A (en) BIM model simplification method and device
EP3501012B1 (en) System and method for procedurally generated object distribution in regions of a three-dimensional virtual environment
CN116363324A (en) A 2D and 3D integrated rendering method for situation maps
CN114004842A (en) Three-dimensional model visualization method integrating fractal visual range texture compression and color polygon texture
CN110930509A (en) Linear quad-tree multilayer model driven DEM (digital elevation model) real-time visualization method
CN117557711B (en) Method, device, computer equipment and storage medium for determining visual field
CN111915711A (en) Method and device for acquiring stereoscopic images of three-tone ground-type patches supporting virtual VR
CN111506680B (en) Terrain data generation and rendering method and device, medium, server and terminal
Deng et al. Visualization of vector data on global scale terrain
CN114936960A (en) Batch watermarking method for live-action three-dimensional models
JP2006520050A (en) Visual simulation of dynamic moving body
CN113908542A (en) Method and device for processing terrain data in game
CN119478267B (en) Method and system for three-dimensional earth display based on threejs quadtree structure
CN114359456B (en) Picture pasting method and device, electronic equipment and readable storage medium
CN115423917B (en) Real-time drawing method and system for global three-dimensional wind field
AU2023274149B2 (en) Method for 3D visualization of sensor data
CN115239930B (en) Scene generation methods, apparatus, computer equipment, and storage media

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