当前位置: 首页 > news >正文

PCL点云库入门——PCL库可视化之PCLVisualizer类显示复杂点云信息等(持续更新)

1、PCLVisualizer类可视化

        PCLVisualizer类作为PCL库可视化到的高级功能,不仅支持点云等数据的可视化,还提供了丰富的交互功能和自定义选项,如颜色调整、视角切换、标注添加等。用户可以通过PCLVisualizer类轻松实现复杂的数据分析和处理任务,如筛选特定点、可视化匹配对和法向量方向可视化等。PCLVisualizer类在文件中#include <pcl/visualization/pcl_visualizer.h> 中可以找到,下面先对类中的主要函数进行注释说明,然后进行代码示例,以便大家快速上手。

1.1 、主要成员函数

函数名称

简要说明

void addCoordinateSystem (double scale = 1.0, const std::string& id = "reference", int viewport = 0);

添加坐标系,参数:参考ID和可视化窗口ID。

 void setBackgroundColor (const double &r, const double &g, const double &b, int viewport = 0);

设置可视化背景颜色,参数:r,g,b颜色参数(0-1)、被设置的窗口ID。

 bool addText (const std::string &text, int xpos, int ypos, double r, double g, double b,const std::string &id = "", int viewport = 0);

可视化文字信息,参数:文字位置、颜色、索引ID和所显示窗口ID。

template <typename PointT> bool addText3D (const std::string &text,const PointT &position,double textScale = 1.0,double r = 1.0, double g = 1.0, double b = 1.0,const std::string &id = "", int viewport = 0);

可视化3D文字,参数:文字位置、大小、颜色、索引ID和所显示窗口ID。

template <typename PointNT> bool addPointCloudNormals (const typename pcl::PointCloud<PointNT>::ConstPtr &cloud,

int level = 100, float scale = 0.02f,

 const std::string &id = "cloud", int viewport = 0);

可视化点云和法向量,参数:有法向量的点云、可视化法向量长度、索引DI和所显示窗口ID。

 template <typename PointNT> bool addPointCloudPrincipalCurvatures (

  const typename pcl::PointCloud<PointNT>::ConstPtr &cloudconst typename pcl::PointCloud<pcl::PrincipalCurvatures>::ConstPtr &pcs,

 int level = 100, float scale = 1.0f, const std::string &id = "cloud", int viewport = 0);

 可视化点云和主曲率,参数:有法向量的点云、可视化法向量长度、索引DI和所显示窗口ID。

 template <typename PointT> bool addPointCloud (const typename pcl::PointCloud<PointT>::ConstPtr &cloud,

const std::string &id = "cloud", int viewport = 0);

 可视化点云,参数:点云、点云索引DI和所显示窗口ID。

template <typename PointT> bool addPointCloud (const typename pcl::PointCloud<PointT>::ConstPtr &cloudconst PointCloudGeometryHandler<PointT> &geometry_handler,const std::string &id = "cloud", int viewport = 0);

 可视化点云带相关几何属性,参数:点云、渲染几何属性、点云索引DI和所显示窗口ID。

template <typename PointT> bool addPointCloud (const typename pcl::PointCloud<PointT>::ConstPtr &cloud,  const GeometryHandlerConstPtr &geometry_handler,const ColorHandlerConstPtr &color_handler,const std::string &id = "cloud", int viewport = 0);

 可视化点云带相关几何和颜色,参数:点云、渲染几何属性、、颜色属性、点云索引DI和所显示窗口ID。

bool addPolygonMesh (const pcl::PolygonMesh &polymesh,const std::string &id = "polygon",

int viewport = 0);

 可视化网格,参数:网格、网格索引DI和所显示窗口ID。

 template <typename PointT> bool

 addCorrespondences (const typename pcl::PointCloud<PointT>::ConstPtr &source_points,const typename pcl::PointCloud<PointT>::ConstPtr &target_points,const std::vector<int> & correspondences,

const std::string &id = "correspondences",int viewport = 0);

  可视化匹配对,参数:源点云、目标点云、匹配对ID、匹配对索引DI和所显示窗口ID。

void createViewPort (double xmin, double ymin, double xmax, double ymax, int &viewport);

 

 创建可视化窗口,参数:窗口起始位置(xmin,ymain)、窗口对角位置(xmax,yamx)和窗口ID。

template <typename PointT> bool

addPolygon (const typename pcl::PointCloud<PointT>::ConstPtr &clouddouble r, double g, double b,

 const std::string &id = "polygon", int viewport = 0);

 可视化多边形,参数:多边形的点云集、多边形的颜色、多边形ID和所显示窗口ID。

 template <typename P1, typename P2> bool

addLine (const P1 &pt1, const P2 &pt2, const std::string &id = "line",

int viewport = 0);

 可视化线段,参数:起始点、终点、线段索引DI和所显示窗口ID。

template <typename P1, typename P2> bool

addArrow (const P1 &pt1, const P2 &pt2, double r, double g, double b,

 const std::string &id = "arrow", int viewport = 0);

 可视化带有箭头线段,参数:起始点、终点、颜色、箭头索引DI和所显示窗口ID。

template <typename PointT> bool addSphere (const PointT &center, double radius, const std::string &id = "sphere"int viewport = 0);

 可视化球体,参数:球心位置、球半径、球索引DI和所显示窗口ID。

bool addCylinder (const pcl::ModelCoefficients &coefficients,const std::string &id = "cylinder",

int viewport = 0);

 可视化圆柱体,参数:圆柱体参数、圆柱体索引DI和所显示窗口ID。

 bool addPlane (const pcl::ModelCoefficients &coefficients, double x, double y, double z,const std::string &id = "plane",

int viewport = 0);

  可视化平面,参数:平面参数、平面到坐标原点的位置、平面索引DI和所显示窗口ID。

 bool addCircle (const pcl::ModelCoefficients &coefficients,const std::string &id = "circle",

 int viewport = 0);

  可视化圆圈,参数:圆圈参数、圆圈索引DI和所显示窗口ID。

 bool addCone (const pcl::ModelCoefficients &coefficientsconst std::string &id = "cone",

int viewport = 0);

 可视化椎体,参数:椎体参数、椎体索引DI和所显示窗口ID。

 bool addCube (const pcl::ModelCoefficients &coefficients,const std::string &id = "cube",int viewport = 0);

  可视化立方体,参数:立方体参数、立方体索引DI和所显示窗口ID。

void saveScreenshot (const std::string &file);

 保存当前可视化窗口,参数:文件名

void setCameraParameters (const Camera &camera, int viewport = 0);

 设置相机参数,参数:相机和所要设置的窗口ID。

Float getFPS () const;

 获取当前可视化窗口的帧率

 bool addTextureMesh (const pcl::TextureMesh &polymesh,  const std::string &id = "texture"int viewport = 0);

可视化有纹理的网格,参数:网格纹理、纹理网格ID和所显示窗口ID。

inline bool contains(const std::string &id) const

检查给定ID的点云、模型或坐标是否已添加到此可视化窗口中。

bool updatePointCloudPose (const std::string &id, const Eigen::Affine3f& pose);

更新可视化点云的位置,参数:点云的ID和位置。

Bool updateShapePose (const std::string &id, const Eigen::Affine3f& pose);

 更新可视化模型的位置,参数:模型的ID和位置。

 void addOrientationMarkerWidgetAxes (vtkRenderWindowInteractor* interactor);

 添加部件,该部件用于方向的交互式轴显示,参数:VTK交互器对象的指针。

 void removeOrientationMarkerWidgetAxes ();

 移除部件。

 void setFullScreen (bool mode);

 设置全屏可视化窗口。

 void spin ();

 调用VKT交换器并执行循环

 Void spinOnce (int time = 1, bool force_redraw = false);

 调用VKT交换器并执行一次,参数:

执行一次时间(ms),刷新帧率是否需要重置。

        从上面的表中可知,PCLVisualizer类提供了丰富的对象可视化。下面将对常用的一些可视化进行示例。

1.2 、单框可视化点云

        1)、示例代码如下:

/*****************************************************************//**
* \file   PCLVismainV2.cpp
* \brief
*
* \author YZS
* \date   December 2024
*********************************************************************/
#include <iostream>              
#include <string>
#include <pcl/io/auto_io.h>
#include <pcl/visualization/pcl_visualizer.h>  //PCLVisualizer类的头文件
using namespace std;
void IndependentWindow()
{//点云对象pcl::PointCloud<pcl::PointXYZ>::Ptr cloud(new  pcl::PointCloud<pcl::PointXYZ>());// 读取点云数据std::string fileName = "E:/PCLlearnData/4/fragment.pcd";pcl::io::load(fileName, *cloud);// PCLVisualizer对象pcl::visualization::PCLVisualizer::Ptr viewer(new  pcl::visualization::PCLVisualizer("PCL_VIS"));// 设置点云颜色属性为绿色pcl::visualization::PointCloudColorHandlerCustom<pcl::PointXYZ>  single_color(cloud, 0, 255, 0);// 添加要可视化的点云,设置点云ID为"cloud"viewer->addPointCloud<pcl::PointXYZ>(cloud, single_color, "cloud");// 设置可视化窗口的背景颜色viewer->setBackgroundColor(0.4, 0.5, 0.5);// 设置PointCloud的渲染属性,点云的大小为1viewer->setPointCloudRenderingProperties(pcl::visualization::PCL_VISUALIZER_POINT_SIZE, 1, "cloud");// 可视化循环主体while (!viewer->wasStopped()){viewer->spinOnce();}
}int main(int argc, char* argv[])
{IndependentWindow();std::cout << "Hello PCL!" << std::endl;std::system("pause");return 0;
}

2)、结果展示

1.3、双框可视化点云 

        1)、示例代码如下:

/*****************************************************************//**
* \file   PCLVismainV2.cpp
* \brief
*
* \author YZS
* \date   December 2024
*********************************************************************/
#include <iostream>              
#include <string>
#include <pcl/io/auto_io.h>
#include <pcl/visualization/pcl_visualizer.h>  //PCLVisualizer类的头文件
using namespace std;void DoubleWindow()
{//两个点云对象pcl::PointCloud<pcl::PointXYZ>::Ptr cloud1(new pcl::PointCloud<pcl::PointXYZ>);pcl::PointCloud<pcl::PointXYZ>::Ptr cloud2(new pcl::PointCloud<pcl::PointXYZ>);// 填入点云数据std::string fileName1 = "E:/PCLlearnData/5/fragment.pcd";std::string fileName2 = "E:/PCLlearnData/5/fragment2.pcd";pcl::io::load(fileName1, *cloud1);pcl::io::load(fileName2, *cloud2);// PCLVisualizer对象pcl::visualization::PCLVisualizer viewer("DoubleVIS");//创建左右窗口的ID v1和v2int v1(0);int v2(1);//设置V1窗口尺寸和背景颜色viewer.createViewPort(0.0, 0.0, 0.5, 1, v1);viewer.setBackgroundColor(0, 0, 0, v1);//设置V2窗口尺寸和背景颜色viewer.createViewPort(0.5, 0.0, 1, 1, v2);viewer.setBackgroundColor(0.1, 0.1, 0.1, v2);//设置cloud1的渲染颜色,点云的ID和指定可视化窗口v1pcl::visualization::PointCloudColorHandlerCustom<pcl::PointXYZ>  cloud1_color(cloud1, 255,193,37);viewer.addPointCloud(cloud1, cloud1_color, "cloud1", v1);//设置cloud2的渲染颜色,点云的ID和指定可视化窗口v2pcl::visualization::PointCloudColorHandlerCustom<pcl::PointXYZ>  cloud2_color(cloud2, 250, 128,114);viewer.addPointCloud(cloud2, cloud2_color, "cloud2", v2);// 可视化循环主体while (!viewer.wasStopped()){viewer.spinOnce();}
}int main(int argc, char* argv[])
{DoubleWindow();std::cout << "Hello PCL!" << std::endl;std::system("pause");return 0;
}

2)、结果展示

 1.4、连续多帧数据显示

        1)、代码示例如下:

/*****************************************************************//**
* \file   PCLVismainV2.cpp
* \brief
*
* \author YZS
* \date   December 2024
*********************************************************************/
#include <iostream>              
#include <string>
#include <pcl/io/auto_io.h>
#include <pcl/visualization/pcl_visualizer.h>  //PCLVisualizer类的头文件void VISContinuousMultiframe()
{// PCLVisualizer对象pcl::visualization::PCLVisualizer::Ptr viewer(new  pcl::visualization::PCLVisualizer("PCLMultiframe"));// 循环可视主体size_t  num_frames = 10;for (size_t frame = 0; frame < num_frames; frame++){// 点云对象pcl::PointCloud<pcl::PointXYZ>::Ptr cloud(new  pcl::PointCloud<pcl::PointXYZ>);std::string filePath = "E:/PCLlearnData/5/multiFrame/";std::string fileName = filePath + "scene_PointCloud_00_000" +  std::to_string(frame) + ".pcd";// 加载点云数据pcl::io::load(fileName, *cloud);//添加渲染的点云、颜色和点云的IDpcl::visualization::PointCloudColorHandlerCustom<pcl::PointXYZ>  cloud_color(cloud, 255, 193, 37);viewer->addPointCloud<pcl::PointXYZ>(cloud, cloud_color, "cloud_" +  std::to_string(frame));// 设置渲染点云属性,点云大小viewer->setPointCloudRenderingProperties(pcl::visualization::PCL_VISUALIZER_POINT_SIZE, 1, "cloud_" + std::to_string(frame));// 设置可视化背景颜色viewer->setBackgroundColor(0.1, 0.1, 0.1);// 每帧渲染时间间隔viewer->spinOnce(500);//500ms// 清除点云数据,根据点云的IDviewer->removePointCloud("cloud_" + std::to_string(frame));}// 可视化循环主体while (!viewer->wasStopped()){viewer->spinOnce();}
}
int main(int argc, char* argv[])
{VISContinuousMultiframe();std::cout << "Hello PCL!" << std::endl;std::system("pause");return 0;
}

        2)、结果展示

1.5、单击选点可视化

        1)、代码示例如下,代码中的定义可参考第4节内容。

struct callback_args {pcl::PointCloud<pcl::PointXYZ>::Ptr clicked_points_3d;pcl::visualization::PCLVisualizer::Ptr viewerPtr;
};
void pp_callback(const pcl::visualization::PointPickingEvent& event, void* args)
{struct callback_args* data = (struct callback_args*)args;if (event.getPointIndex() == -1)return;//获取事件点的IDint index = event.getPointIndex();std::cout << "index: " << index << std::endl;//获取点的三维坐标pcl::PointXYZ current_point;event.getPoint(current_point.x, current_point.y, current_point.z);data->clicked_points_3d->points.push_back(current_point);//设置可视点的颜色信息pcl::visualization::PointCloudColorHandlerCustom<pcl::PointXYZ>  red(data->clicked_points_3d, 255, 0, 0);data->viewerPtr->removePointCloud("clicked_points");//添加可视点data->viewerPtr->addPointCloud(data->clicked_points_3d, red, "clicked_points");//设置可视点的大小data->viewerPtr->setPointCloudRenderingProperties(pcl::visualization::PCL_VISUALIZER_POINT_SIZE, 10, "clicked_points");//输出点的信息std::cout << current_point.x << " " << current_point.y << " " <<  current_point.z << std::endl;
}
void PCLVisPickPoints()
{pcl::PointCloud<pcl::PointXYZ>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZ>);std::string fileName = "E:/PCLlearnData/5/fragment.pcd";pcl::io::loadPCDFile(fileName, *cloud);pcl::console::print_highlight("load cloud !\n");pcl::visualization::PCLVisualizer viewer;pcl::visualization::PointCloudColorHandlerCustom<pcl::PointXYZ> green(cloud, 0,  255, 0);viewer.addPointCloud(cloud, green, "cloud");// Add point picking callback to viewer:struct callback_args cb_args;pcl::PointCloud<pcl::PointXYZ>::Ptr clicked_points_3d(new  pcl::PointCloud<pcl::PointXYZ>);cb_args.clicked_points_3d = clicked_points_3d;cb_args.viewerPtr = pcl::visualization::PCLVisualizer::Ptr(&viewer);viewer.registerPointPickingCallback(pp_callback, (void*)&cb_args);pcl::console::print_highlight("Shift+click on three floor points, then press  'Q'...\n");// Spin until 'Q' is pressed:viewer.spin();
}
int main(int argc, char* argv[])
{PCLVisPickPoints();std::cout << "Hello PCL!" << std::endl;std::system("pause");return 0;
}

        2)、结果展示

至此完成第五节PCL库可视化之PCLVisualizer类复杂点云信息显示学习,本节可视化涉及的内容较多,后序还会持续更新相关信息可视化。下一节我们将进入《PCL库中Eigen数据工具库的基本使用》的学习。  

示例中的数据下载地址:链接: https://pan.baidu.com/s/1it7tFU9hiRppmAZCCiNJdQ 提取码: ka59 ,​​​​​​​文件夹中的数据集会不断更新。

相关文章:

PCL点云库入门——PCL库可视化之PCLVisualizer类显示复杂点云信息等(持续更新)

1、PCLVisualizer类可视化 PCLVisualizer类作为PCL库可视化到的高级功能&#xff0c;不仅支持点云等数据的可视化&#xff0c;还提供了丰富的交互功能和自定义选项&#xff0c;如颜色调整、视角切换、标注添加等。用户可以通过PCLVisualizer类轻松实现复杂的数据分析和处理任务…...

Hugface国内镜像

问题&#xff1a; urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(hosthuggingface.co, port443): Max retries exceeded with url: /Salesforce/blip-image-captioning-base/resolve/main/preprocessor_config.json (Caused by ProxyError(Cannot connect to proxy.,…...

Vue3 重置ref或者reactive属性值

需要重新定义一个对象绑定复制给原对象 。 实例代码: const data () > ({groupId: ,groupCode: ,groupName: ,groupType: ,});const formData ref(data());//重置对象值 const reset()>{Object.assign(formData, data()…...

前端的Python入门指南(完):错误和异常处理策略及最佳实践

《前端的 Python 入门指南》系列文章&#xff1a; &#xff08;一&#xff09;&#xff1a;常用语法和关键字对比&#xff08;二&#xff09;&#xff1a;函数的定义、参数、作用域对比&#xff08;三&#xff09;&#xff1a;数据类型对比 - 彻底的一切皆对象实现和包装对象异…...

c++:std::map下标运算符的不合理使用

这是我分析之前遗留代码时发现的一个隐藏点&#xff1b;不过我并不认为这样使用std::map是合理的。 看看简化后的代码&#xff0c;v1、v2的值应该是多少呢&#xff1f; #include <map>std::map<int, int> cm[2];int get_cm_value(int device, int ctrl) { auto …...

音频数据采样入门详解 - 给Python初学者的简单解释

音频数据采样入门详解 - 给Python初学者的简单解释 声音是如何变成数字的&#xff1f;什么是采样率&#xff1f;为什么要懂这个&#xff1f;Python小例子总结 大家好&#xff01;今天我们来聊一个有趣的话题&#xff1a;音频数据是如何在计算机中处理的。让我用最简单的方式来解…...

vue el-dialog实现可拖拉

el-dialog实现拖拉&#xff0c;每次点击度居中显示&#xff0c;以下贴出代码具体实现&#xff0c;我是可以正常拖拉并且每次度显示在中间&#xff0c;效果还可以&#xff0c;需要的可以丢上去跑跑 组件部分&#xff1a; <el-dialog:visible.sync"dialogVisible"…...

iOS在项目中设置 Dev、Staging 和 Prod 三个不同的环境

在 Objective-C 项目中设置 Dev、Staging 和 Prod 三个不同的环境&#xff0c;并为每个环境使用不同的 Bundle ID&#xff0c;可以通过以下步骤实现&#xff1a; 步骤 1: 创建不同的 Build Configuration 打开项目&#xff1a; 启动 Xcode 并打开你的项目。 选择项目文件&…...

开源实时多模态AI Agent,搭载Gemini多模态API(在线体验)

今天发现一个惊艳的开源项目&#xff0c;利用多模态大模型API进行多智能体交互。支持RAG、搜索等。 TEN Agent 是一款由 TEN 提供支持的对​​话式 AI&#xff0c;集成了 Gemini 2.0 Multimodal Live API、OpenAI Realtime API、RTC 等。它提供实时的看、听和说功能&#xff0…...

【持续更新】Github实用命令

Intro 最近高强度使用github&#xff0c;遂小计于此作为备忘。 Basic github是一个代码管理软件&#xff0c;能够track文件变动并且管理版本&#xff0c;是当代coding必不可少的工具。当你安装好github在本地以后&#xff0c;你可以通过以下命令初始化当前文件夹&#xff08…...

B树的性质和插入过程

性质 平衡性&#xff1a;所有叶子节点都在同一层多路&#xff1a;m 阶 B 树 最多&#xff1a; m 个分支&#xff0c;m-1 个元素 最少&#xff1a; 根节点 2 个分支 1个元素 其他节点 ⌈ m / 2 ⌉ \lceil m/2\rceil ⌈m/2⌉ 个分支 ⌈ m / 2 ⌉ \lceil m/2\rceil ⌈m/2⌉ −…...

分布式链路追踪-02-Dapper 论文介绍

开源项目 auto-log 自动日志输出 概要 现代互联网服务通常被实现为复杂的、大规模的分布式系统。 这些应用程序是由软件模块的集合构建的&#xff0c;这些模块可能由不同的团队使用不同的编程语言开发&#xff0c;并且可以跨越多个物理设施的数千台机器。 在这样的环境中&…...

python:用 sklearn 构建线性回归模型,并评价

编写 test_sklearn_6.py 如下 # -*- coding: utf-8 -*- """ 使用 sklearn 估计器构建线性回归模型 """ import numpy as np import pandas as pd import matplotlib.pyplot as plt from matplotlib import rcParamsfrom sklearn import dataset…...

CTFHUB 信息泄露 备份文件下载-网站源码

根据提示应是猜测网站源码的备份文件&#xff0c;可以采用bp拼接文件名和后缀 开启bp抓包后设置第一个攻击点导入文件名 第二个攻击点导入后缀 开始暴力破解&#xff0c;有成功响应的 拼接到网站后缀后可以直接下载 解压缩后记事本的名字就是flag 总结&#xff1a; …...

Java String详解(三)

上一篇博客&#xff1a;Java String详解&#xff08;二&#xff09; 写在前面&#xff1a;大家好&#xff01;我是晴空๓。如果博客中有不足或者的错误的地方欢迎在评论区或者私信我指正&#xff0c;感谢大家的不吝赐教。我的唯一博客更新地址是&#xff1a;https://ac-fun.blo…...

在pycharm2024.3.1中配置anaconda3-2024-06环境

version: anaconda3-2024.06-1 pycharm-community-2024.3.1 1、安装anaconda和pycharm 最新版最详细Anaconda新手安装配置环境创建教程_anaconda配置-CSDN博客 【2024最新版】超详细Pycharm安装保姆级教程&#xff0c;Pycharm环境配置和使用指南&#xff0c;看完这一篇就够了…...

从0到1实现vue3+vite++elementuiPlus+ts的后台管理系统(一)

前言&#xff1a;从这篇文章开始实现vue3vite的后台管理系统&#xff0c;记录下自己搭建后台系统图的过程。 这篇文章完成项目的初始化和基本配置&#xff0c;这一步可以直接跟着vue3官网进行。整个系列只有前端部分&#xff0c;不涉及后端。 vue3官网&#xff1a;https://cn.…...

升级thinkphp8最新版本,升级后发现版本不变

升级thinkphp8.0.3最新版本8.1.1&#xff0c;升级后发现版本不变&#xff0c; 更新TP有两个方法 1 全部更新(所有插件都一起更新) composer update 2 只更新TP框架核心 composer update topthink/framework 造成可能有两个原因&#xff0c;一是缓存问题&#xff0c;二是更新…...

PPP协议

PPP是一种常见的广域网数据链路层协议&#xff0c;主要用于在全双工的链路上进行点到点的数据传输封装&#xff0c;支持同步传输和异步传输&#xff0c;通常用于VPN和拨号上网 PPP 概述 PPP一般运行在serial串口上&#xff0c;是一种广域网协议&#xff0c;PPP建立分为LCP&a…...

JAVA基础:数据类型

JAVA基础:数据类型 强类型语言 强类型语言(Strongly Typed Language)是指在编程语言中,每个变量都必须有一个明确的类型,并且在编译时会进行类型检查。 JAVA是强类型语言,所有变量必须先定义后使用。 弱类型语言 弱类型语言(Weakly Typed Language)是指在编程中类…...

ElasticSearch 数据聚合与运算

1、数据聚合 聚合&#xff08;aggregations&#xff09;可以让我们极其方便的实现数据的统计、分析和运算。实现这些统计功能的比数据库的 SQL 要方便的多&#xff0c;而且查询速度非常快&#xff0c;可以实现近实时搜索效果。 注意&#xff1a; 参加聚合的字段必须是 keywor…...

Nacos 3.0 Alpha 发布,在安全、泛用、云原生更进一步

自 2021 年发布以来&#xff0c;Nacos 2.0 在社区的支持下已走过近三年&#xff0c;期间取得了诸多成就。在高性能与易扩展性方面&#xff0c;Nacos 2.0 取得了显著进展&#xff0c;同时在易用性和安全性上也不断提升。想了解更多详细信息&#xff0c;欢迎阅读我们之前发布的回…...

GeoIP介绍

文章目录 GeoIP1. GeoIP的详细介绍2. 在Go语言中使用GeoIP GeoIP GeoIP是一种技术&#xff0c;它允许通过IP地址来查询地理位置信息&#xff0c;如国家、地区、城市等。这种技术在网络安全、内容分发、市场分析等领域有着广泛的应用。 1. GeoIP的详细介绍 原理&#xff1a; …...

详述 BigDecimal 的错误计算

摘要 详细阐述在使用 Java 的 BigDecimal 类时&#xff0c;可能产生的错误计算。 据 java中BigDecimal的介绍及使用&#xff0c;BigDecimal格式化&#xff0c;BigDecimal常见问题-CSDN博客 介绍&#xff1a;“BigDecimal 的执行顺序不能调换&#xff08;乘法交换律失效&am…...

3D Gaussian Splatting for Real-Time Radiance Field Rendering-简洁版

1. 研究背景与问题 传统的3D场景表示方法&#xff0c;如网格和点云&#xff0c;适合GPU加速的光栅化操作&#xff0c;但缺乏灵活性。而基于神经辐射场&#xff08;NeRF&#xff09;的表示方式&#xff0c;尽管质量高&#xff0c;但需要高成本的训练和渲染时间。此外&#xff0…...

(三)PyQT5+QGIS+python使用经验——解决各版本不兼容问题

一、问题描述 基础环境&#xff1a;Windows10&#xff08;64&#xff09; PyCharm2024 QGIS 3.22。 目的&#xff1a;解决之前python版本多&#xff0c;pyqt5以及QT Designer交互使用存在环境变量冲突矛盾&#xff0c;以及QGIS安装时自带python、pyqt5等问题。 尤其是在QT …...

uniapp navigateTo、redirectTo、reLaunch等页面路由跳转方法的区别

uni.switchTab 跳转到 tabBar 页面&#xff0c;并关闭其他所有非 tabBar 页面 // app.json {"tabBar": {"list": [{"pagePath": "index","text": "首页"},{"pagePath": "other","text&…...

[创业之路-198]:华为的成立发展与新中国的建立与发展路径的相似性比较

目录 一、公司比较 1、创业初期的艰难与挑战 2、坚持自主创新与研发 3、市场拓展与国际化战略 4、企业文化与社会责任 5、面临的挑战与应对策略 二、任正非管理企业的思想大量借鉴了毛泽东建国的思想 1、矛盾论与企业管理 2、群众路线与企业文化 3、战略思维与长远发…...

[Unity Shader]【图形渲染】【游戏开发】 Unity Shader与原始Shader的区别

在Unity中,Shader是用于控制如何渲染图形的程序,通常涉及到对图形管线的自定义操作。尽管所有的着色器都遵循基本的图形渲染流程,但Unity Shader和原始Shader(通常指OpenGL/DirectX等底层API的Shader)之间存在显著差异。理解这些区别能帮助开发者更好地在Unity环境下进行图…...

JAVA学习日记(二十七)反射

一、反射的概述 二、获取Class对象的三种方式 import testpackage.Student;public class Main {public static void main(String[] args) throws ClassNotFoundException {//获取.class对象的三种方式//1. Class.forName("全类名")//2. 类名.class//3. 对象.getClas…...

PyTorch中apex的安装方式

apex是NVIDIA开发的基于PyTorch的混合精度训练加速神器&#xff0c;能够增加运算速度&#xff0c;并且减少显存的占用。 Github地址&#xff1a;https://github.com/NVIDIA/apex官方教程&#xff1a;https://nvidia.github.io/apex/ 安装方式 需要注意的是apex的安装不能通过…...

JavaScript网络请求( XMLHttpRequest 对象,进度事件, 跨源资源共享)

一、 XMLHttpRequest 对象 IE5 是第一个引入 XHR 对象的浏览器。这个对象是通过 ActiveX 对象实现并包含在 MSXML 库中 的。为此&#xff0c; XHR 对象的 3 个版本在浏览器中分别被暴露为 MSXML2.XMLHttp 、 MSXML2.XMLHttp.3.0 和 MXSML2.XMLHttp.6.0 。 所有现代…...

Android Studio、JDK、AGP、Gradle、kotlin-gradle-plugin 兼容性问题

文章目录 问题&#xff1a;解决办法&#xff1a;gradle与 java的版本兼容AGP与Gradle的版本兼容kotlin 与 jvm 的版本兼容KGP、Gradle、AGP兼容关系kotlin 与 java 的编译版本配置 问题&#xff1a; 你从githb上clone了一个项目&#xff0c;本地跑的时候&#xff0c;各种报错。…...

滑动窗口(定长窗口)

题目一&#xff1a;找到字符串中所有字母异位词 438. 找到字符串中所有字母异位词 - 力扣&#xff08;LeetCode&#xff09; ​ ​ 分析 异位次&#xff0c;就是通过排序之后可以跟哪个单词一样&#xff0c;例如 hello 跟 lleho 这是定长窗口&#xff0c; 窗口维护在p的…...

Vue Web开发(九)

1. 用户管理 1.1. user页面下的diolog表单 本节课完成user页面下的diolog表单&#xff0c;表单里的元素都是动态渲染&#xff0c;以一个CommonForm组件的形式放入user页面。 运用Element ui Form表单。 1.1.1. CommonForm组件 在src/components下新建CommonForm.vue组件&am…...

go语言zero框架下的日志记录的sdk实战案例

在 Go 语言中&#xff0c;构建一个日志 SDK 是常见的开发任务&#xff0c;尤其是当你希望将日志记录集中管理时。一个好的日志 SDK 可以帮助你规范化日志记录的方式&#xff0c;并将日志存储到不同的地方&#xff08;例如&#xff1a;控制台、文件、数据库、远程日志服务等&…...

【Unity基础】Unity中拖拽3D物体的过程分析和实现方法

我们先来分析一下Unity中拖拽物体的过程&#xff1a; 第一步&#xff1a;先检测拖拽的输入方式&#xff0c;可以鼠标&#xff0c;触摸&#xff0c;可以用InputManager输入&#xff0c;也可以 使用InputSystem输入 第二步&#xff1a;获取触碰点的位置&#xff0c;并计算offse…...

深入了解Spring

目录 Spring基础 什么是Spring框架&#xff1f; Spring 包含的模块有哪些&#xff1f; Core Container AOP Data Access/Integration Spring Web Messaging Spring Test Spring,Spring MVC,Spring Boot 之间什么关系? Spring基础 什么是Spring框架&#xff1f; Sp…...

vue3修改elementui-plus的默认样式的几种方法

#创作灵感 今天写vue的前端项目&#xff0c;因为需要去修改elementui-plus中drawer的默认样式&#xff0c;所以刚好将修改步骤记录下来。 一共提供了三种方法&#xff0c;但亲测第二种最好用。 使用第二种是可以无视自己的代码中是否定义了该盒子&#xff0c;因为有时候盒子的…...

免费开源!推荐一款网页版数据库管理工具!

免费开源&#xff01;推荐一款网页版数据库管理工具&#xff01; DBGate 是一个开源的数据库管理工具&#xff0c;DBGate 的最大特点是可以 Web 访问&#xff01;&#xff0c;轻松实现一台机器部署&#xff0c;所有人使用&#xff01; 无论是 MySQL、PostgreSQL、SQLite 还是…...

Ubuntu22.04切换gcc版本教程

在编译安装程序的时候,由于gcc版本过高,导致编译无法通过,需要降低gcc版本。 一、安装gcc版本 根据自己的需求安装gcc版本。 sudo apt update sudo apt install gcc-10 g++-10二、切换gcc版本 sudo update-alternatives --install /usr/bin/gcc gcc...

OpenCV相机标定与3D重建(24)计算两个二维点集之间的最佳仿射变换矩阵(2x3)函数estimateAffine2D()的使用

操作系统&#xff1a;ubuntu22.04 OpenCV版本&#xff1a;OpenCV4.9 IDE:Visual Studio Code 编程语言&#xff1a;C11 算法描述 计算两个二维点集之间的最优仿射变换&#xff0c;它计算 [ x y ] [ a 11 a 12 a 21 a 22 ] [ X Y ] [ b 1 b 2 ] \begin{bmatrix} x\\ y\\ \en…...

并发修改导致MVCC脏写问题

并发修改导致MVCC脏写问题 一、概要 1.1 业务场景 数据库表结构设计&#xff1a; 一个主档数据&#xff0c;通过一个字段&#xff0c;逗号分隔的方式去关联其他明细信息的id。 如主档数据A&#xff0c;有3条明细数据与A关联&#xff0c;其id分别是1,2,3&#xff0c;那么其存…...

webSokect安卓和web适配的Bug 适用实时语音场景

❌BUG&#xff1a; Failed to construct WebSocket: The URLs scheme must be either ws or wss. https is not allowed.WebSocket 协议在创建连接时&#xff0c;规定其 URL 的协议头&#xff08;scheme&#xff09;必须是 ws&#xff08;用于非加密的普通 WebSocket 连接&…...

Linux系列之如何更换Centos yum源?

环境 Centos7Xshell7 问题描述 最近安装了一个虚拟机&#xff0c;准备用来学习&#xff0c;不过使用yum命令安装一些软件&#xff0c;不过使用这个命令时候&#xff0c;提示 Cannot find a valid baseurl for repo: base/7/x86_64&#xff0c;Could not retrieve mirrorlis…...

微知-C语言如何指定弱符号?(#define WEAK __attribute__((weak)); WEAK int foo(void))

背景 在C语言中&#xff0c;弱符号是一种特殊的符号&#xff0c;它可以被重定义&#xff0c;但在链接时&#xff0c;只会使用被重定义的符号。 在某些情况下&#xff0c;我们需要在多个文件中定义相同的函数&#xff0c;但只使用其中一个函数。本文将介绍如何在C语言中实现弱符…...

三极管功能

1 三极管的结构 2 三极管开关电路设计注意事项 1 三极管进入饱和状态 电机&#xff1a;500毫安 2 判断三级什么状态&#xff1a;电压法 3 判断三级什么状态&#xff1a;电流法 4 求IB的电阻 5 当三极管用作开关时&#xff0c;通常N型三极管控制负载的gnd端&#xff0c;P型…...

Python的3D可视化库【vedo】2-5 (plotter模块) 坐标转换、场景导出、添加控件

文章目录 4 Plotter类的方法4.7 屏幕和场景中的坐标点转换4.7.1 屏幕坐标转为世界坐标4.7.2 世界坐标转为屏幕坐标4.7.3 屏幕坐标取颜色 4.8 导出4.8.1 导出2D图片4.8.2 导出3D文件 4.9 添加控件4.9.1 添加内嵌子窗口4.9.2 添加选择区4.9.3 添加比例尺4.9.4 为对象添加弹出提示…...

定时/延时任务-万字解析Spring定时任务原理

文章目录 1. 概要2. EnableScheduling 注解3. Scheduled 注解4. postProcessAfterInitialization 解析4.1 createRunnable 5. 任务 Task 和子类6. ScheduledTaskRegistrar6.1 添加任务的逻辑6.2 调度器初始化6.3 调用时机 7. taskScheduler 类型7.1 ConcurrentTaskScheduler7.2…...

Android上传到Minio本地存储

Minio简介 MinIO是一个对象存储解决方案&#xff0c;它提供了与Amazon Web Services S3兼容的API&#xff0c;并支持所有核心S3功能。 MinIO有能力在任何地方部署 - 公有云或私有云&#xff0c;裸金属基础设施&#xff0c;编排环境&#xff0c;以及边缘基础设施。author: https…...