本文将详细介绍如何在 Qt (C++) 应用程序中集成 osgEarth,加载三维数字地球,并在指定经纬度添加三维模型(如飞机、建筑等)。

osgEarth 加载三维地球与模型教程

目录

  1. 环境准备
  2. 项目结构
  3. 核心实现步骤
  4. 完整代码示例
  5. 关键技术点解析

环境准备

在开始之前,请确保开发环境已安装以下库:

  • Qt 5.12+ 或 Qt 6.0+
  • OpenSceneGraph (OSG) 3.6+
  • osgEarth 3.x
  • CMake 3.10+

注意

OSG和OSGEarth嵌入到qt窗口的几种方式 提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档 OSG和OSGEarth嵌入到qt窗口的几种方式前言一、pandas是什么?二、使用步骤1.引入库2.读入数据总结 前言 提示:这里可以添加本文要记录的大概内容: 例如:随着人工智能的不断发展,机器学习这门技术也越来越重要,很多人都开启了学习机器学习,本文就介绍了机器学习的基础内容。 提示:以下是本篇文章正文内容,下面案例可供参考 一、pandas是什么? 示例:pandas 是基于NumPy 的一种工具,该工具是为了解决数据分析任务而 阅读详情

相关推荐

【QT + OsgEarth】(一)-- 环境配置

OpenSceneGraph(简称OSG)使用OpenGL技术开发,是一套基于C++t平台的应用程序接口(API),它让程序员能够更加快速、便捷地创建高性能、跨平台的交互式图形程序。它作为中间件(middleware)为应用软件提供了各种高级渲染特性,IO,以及空间结构组织函数;而更低层次的OpenGL硬件抽象层(HAL)实现了底层硬件显示的驱动。

vhcjgc的博客 2935

OSGEARTH+QT 离线地图加载实例

前提,先编译OSG/OSGEARTH/OSGQT,我这边用的OSGEARTH 是3.6.4 OSG是3.4,采用的都是目前最新版本;OSGQT通过重新编译,设置头文件、库依赖即可。3 响应QLISTVIEW节点事件,进行视点的切换;// 显示 .earth 文件中的地球模型。1 自定义控件QMapWidget,加载全球地图。2 分别加载离线地图;

weixin_41125984的博客 2433

Qt+OSG/osgEarth跨平台编译(用Qt Creator组装各个库,实现一套代码、一套框架,跨平台编译)

Qt+OSG/osgEarth跨平台编译(Windows、linux、macos)。用Qt Creator组装各个库,实现一套代码、一套框架,完成跨平台编译第三方库;实现一套代码、一套框架,完成跨平台编译OSG核心库、工具库、插件库及内省库,osgEarth核心库及插件库。

LuckyHanMo的博客 8924

OsgEarth —— 笔记2 - Qt窗口加载earth地球(附源码)

效果         正文      1、准备环境           Vs 2017、Qt 5.12、Osg 3.5、OsgEarth 2.8        2、打开Vs 2017,创建Qt 工程,选择到x64、release模式下        3、将Osg、OsgEarth头文件、库加入      这里给大家列出来,直接拷贝 osgEarthUtil.lib osgEarthAnnotation.lib osg.lib osgAnimation.lib osgDB.lib osgdb_fbx.li

8103

Qt代码-Qt+OSGOSG Earth二三维地图态势

搜索关键词“Qt OSG Earth”,如`QtOSGEarthDemo`(基础集成示例)、`SituationMap`(简易态势地图项目),注意查看项目的开源协议(如MIT、Apache),确保可合法复用。- OSG官方示例:下载OSG源码后,在`examples`目录下有`osgviewerQt`(Qt+OSG集成)、`osgEarth_viewer`(OSG Earth基础使用)等示例,可直接编译运行。绘制点、线、面等态势符号,如目标点、航线、区域等,需结合Qt的交互事件(如鼠标点击)触发。

寒寒豆豆软件公司的博客 960

从仿真到部署:基于ROS2与Gazebo的UR5e机械臂全流程控制实践

本文详细介绍了基于ROS2与Gazebo的UR5e机械臂全流程控制实践,从环境准备、模型构建到控制器开发和仿真优化,最终实现真实机器人部署。通过实战案例和避坑指南,帮助开发者掌握机器人仿真与控制的关键技术,提升UR5e机械臂在物料分拣等任务中的性能与稳定性。

weixin_29184371的博客 294

XC7Z010-1CLG400C开发板ADC引脚配置全攻略(附完整引脚列表)

本文详细解析了XC7Z010-1CLG400C开发板的ADC引脚配置方法,涵盖XADC模块基础、CLG400封装的引脚布局、硬件设计规范及Vivado工程配置实战。特别提供了完整的引脚列表和性能优化技巧,帮助开发者高效实现模拟信号采集,适用于Zynq-7000系列开发。

weixin_29188043的博客 472

AI应用架构师干货:智能财务分析AI平台可视化模块设计(附最佳实践)

智能财务分析的价值,从来不是“AI模型有多准”,而是“财务人员能用上AI的结果”。可视化模块的设计,本质是**“站在业务用户的角度,重新定义技术的价值”**——它不需要复杂的动画,不需要华丽的特效,只需要“把AI的结果翻译成财务人员能看懂的语言”。作为AI应用架构师,我们的使命不是“打造最先进的技术”,而是“打造最有用的技术”。而可视化,就是连接技术与业务的那座“桥”。附录:实战项目GitHub仓库(注:此处可放置实际项目的GitHub链接,包含完整代码、数据样例、部署文档)作者简介。

SuperAGI2025 1159

从零到一:手把手部署用友T3标准版11.2及SQL Server 2008R2环境

本文详细介绍了从零开始部署用友T3标准版11.2及SQL Server 2008R2环境的完整流程,包括环境准备、SQL Server安装、环境检测与修复、T3标准版安装实战以及初始化配置与测试。通过手把手的步骤指导和常见问题解决方案,帮助用户顺利完成部署,确保系统稳定运行。

weixin_28339967的博客 471

【N32L40X】学习笔记12-规则组+注入组+外部触发启动

使用定时器触发规则通道开始采集数据,采集完成后使用dma传输数据,并启动注入通道转换数据,注入通道转换完成后产生中断,中断中读物注入通道数据。

Car12 425

AHB2APB_bridge 设计

此处研究AHB Slave到 APB master的桥接器,实现接口转化,例如下图之后是参数描述

Starry__的博客 2202

掌握RDMA核心:从同步构建到异步事件的连接艺术

本文深入解析RDMA编程中的双模式设计,揭示同步配置与异步事件机制的协作关系。第一部分阐述同步函数rdma_bind_addr和rdma_listen的本地化角色,强调它们仅完成本地端点配置。第二部分剖析异步事件模型,重点分析连接请求和建立事件的处理流程。通过完整生命周期序列图展示两种模式的交互过程,并提供错误处理、资源管理和性能调优的实用建议。文章指出,理解同步本地配置与异步网络响应这一责任划分,是掌握RDMA编程的关键所在。

数字人生 283

VB摄像头监控

该VB模块可对摄像头捕获的画面进行录像等,可在创建的窗口进行控制

廖雪峰Python教程[完整版]

廖雪峰的python教程整理的,已经排好版了,而且还是完整的,适合小白

WINCC7.3破解文件

WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

上一篇: 使用osgEarth C++加载三维地球模型完整教程
下一篇: OSGEarth 在 Qt C++ 中显示三维地球经纬度
姜姜zzz
博客等级 码龄7年 1835粉丝 40原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

姜姜zzz

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
⌂ 换网址