点云滤波Filtering

news2024/9/20 16:50:59

直通滤波

        就是设置一个x、y、z方向的一个取值范围,以过滤掉明显不在测试距离范围的点云;使用Intel RealSense或者激光雷达采集的数据,可设置一个x,y,z合理的范围,过滤掉我们不需要的点云。

  pcl::PassThrough 是点云库(PCL)中的一个滤波器类,用于通过设置阈值来过滤点云数据。在这个类中,你可以使用多个参数来控制滤波的行为。

以下是 pcl::PassThrough 类中常用的几个参数:

  1. setFilterFieldName:设置要过滤的字段名称。例如,pass.setFilterFieldName("z") 设置要过滤的字段为 z 坐标。
    以下是一些常见的字段名称,你可以使用 setFilterFieldName 方法对它们进行设置:
    1)"x":点云数据中的 x 坐标。
    2)"y":点云数据中的 y 坐标。
    3)"z":点云数据中的 z 坐标。
    4)"intensity":点云数据中的强度值(通常表示激光传感器返回的信号强度)。
    5)"rgb" 或 "rgba":点云数据中的颜色信息(通常是 RGB 或 RGBA 值)。

  2. setFilterLimits:设置过滤的阈值范围。使用该函数可以设置最小和最大允许的值。例如,pass.setFilterLimits(0.0, 1.0) 将只保留 z 坐标在 0 到 1 之间的点云数据。

  3. setFilterLimitsNegative:设置是否对过滤结果取反。当设置为 true 时,将保留在阈值之外的点云数据;当设置为 false 时,将保留在阈值之内的点云数据。默认值为 false。

  4. setInputCloud:设置输入的点云数据。你需要将待过滤的点云数据传递给该函数进行处理。

  5. filter:执行过滤操作。该函数将应用设定的过滤条件,并返回过滤后的点云数据。

以上是一些常用的参数,还有其他一些可选参数可以进一步调整滤波器的行为,例如设置滤波的坐标轴、输出点云数据类型等。 

#include <iostream>
#include <pcl/point_types.h>
#include <pcl/filters/passthrough.h>
#include <pcl/visualization/cloud_viewer.h>

typedef pcl::PointXYZ PointT;

int main(int argc, char** argv) {
    pcl::PointCloud<pcl::PointXYZ>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZ>);
    pcl::PointCloud<pcl::PointXYZ>::Ptr cloud_filtered(new pcl::PointCloud<pcl::PointXYZ>);

    // Fill in the cloud data
    cloud->width = 500;
    cloud->height = 1;
    cloud->points.resize(cloud->width * cloud->height);

    for (size_t i = 0; i < cloud->points.size(); ++i) {
        cloud->points[i].x = 1024 * rand() / (RAND_MAX + 1.0f);
        cloud->points[i].y = 1024 * rand() / (RAND_MAX + 1.0f);
        cloud->points[i].z = 1024 * rand() / (RAND_MAX + 1.0f);
    }

    std::cerr << "Cloud before filtering: " << std::endl;
    for (size_t i = 0; i < cloud->points.size(); ++i)
        std::cerr << "    " << cloud->points[i].x << " "
        << cloud->points[i].y << " "
        << cloud->points[i].z << std::endl;

    // Create the filtering object
    pcl::PassThrough<pcl::PointXYZ> pass;
    pass.setInputCloud(cloud);          // 1. 设置输入源
    pass.setFilterFieldName("z");       // 2. 设置过滤域名
    pass.setFilterLimits(10, 35);     // 3. 设置过滤范围
    //pass.setFilterLimitsNegative(true); // 设置获取Limits之外的内容
    pass.filter(*cloud_filtered);       // 4. 执行过滤,并将结果输出到cloud_filtered

    std::cerr << "Cloud after filtering: " << std::endl;
    for (size_t i = 0; i < cloud_filtered->points.size(); ++i)
        std::cerr << "    " << cloud_filtered->points[i].x << " "
        << cloud_filtered->points[i].y << " "
        << cloud_filtered->points[i].z << std::endl;

    pcl::visualization::CloudViewer viewer("Cloud Viewer");

    //这里会一直阻塞直到点云被渲染
    viewer.showCloud(cloud);
    while (!viewer.wasStopped()) {

    }

    return (0);
}

 体素滤波器

        如果使用高分辨率相机等设备对点云进行采集,往往点云会较为密集。过多的点云数量会对后续分割工作带来困难。体素格滤波器可以达到向下采样同时不破坏点云本身几何结构的功能。点云几何结构不仅是宏观的几何外形,也包括其微观的排列方式,比如横向相似的尺寸,纵向相同的距离。

        通过体素网格实现降采样,可以减少点数量的同时,保证点云的形状特征,可以提高配准、曲面重建、形状识别等算法的速度,并保证准确性。

#include <iostream>
#include <pcl/io/pcd_io.h>
#include <pcl/point_types.h>
#include <pcl/filters/voxel_grid.h>

int main(int argc, char** argv)
{
    pcl::PCLPointCloud2::Ptr cloud(new pcl::PCLPointCloud2());
    pcl::PCLPointCloud2::Ptr cloud_filtered(new pcl::PCLPointCloud2());

    // 从文件读取点云图
    // Fill in the cloud data
    pcl::PCDReader reader;
    // Replace the path below with the path where you saved your file
    reader.read("../data/table_scene_mug_stereo_textured.pcd", *cloud); // Remember to download the file first!

    std::cerr << "PointCloud before filtering: " << cloud->width * cloud->height
        << " data points (" << pcl::getFieldsList(*cloud) << ")." << std::endl;
        

    // 创建一个长宽高分别是1cm的体素过滤器,cloud作为输入数据,cloud_filtered作为输出数据
    float leftSize = 0.01f;
    // Create the filtering object
    pcl::VoxelGrid<pcl::PCLPointCloud2> sor;
    sor.setInputCloud(cloud);
    sor.setLeafSize(leftSize, leftSize, leftSize);
    sor.filter(*cloud_filtered);

    std::cerr << "PointCloud after filtering: " << cloud_filtered->width * cloud_filtered->height
        << " data points (" << pcl::getFieldsList(*cloud_filtered) << ")." << std::endl;

    // 将结果输出到文件
    pcl::PCDWriter writer;
    writer.write("../output_data/table_downsampled.pcd", *cloud_filtered);

    return (0);
}

原pcd文件降采样后pcd文件

 可以看到POINTS个数从原来的307200个减少为9389个

  • 双屏对比查看实现效果
    进入pcl的安装路径下的Bin文件夹
    pcl_viewer.exe -multiview 1 F:\DarkHorse\data\table_scene_mug_stereo_textured.pcd F:\DarkHorse\output_data\table_scene_lms40_downsampled.pcd
pcl::getFieldsList(*cloud)

pcl::getFieldsList 是一个函数,返回一个 std::string 对象,用于获取给定 pcl::PCLPointCloud2 对象中包含的字段列表。


统计滤波器

        用于去除明显离群点(离群点往往由测量噪声引入)。其特征是在空间中分布稀疏,可以理解为:每个点都表达一定信息量,某个区域点越密集则可能信息量越大。噪声信息属于无用信息,信息量较小。所以离群点表达的信息可以忽略不计。考虑到离群点的特征,则可以定义某处点云小于某个密度,既点云无效。计算每个点到其最近的k个点平均距离。则点云中所有点的距离应构成高斯分布。

        稀疏离群值的消除基于输入数据集中点到邻居距离的分布的计算。对于每个点,我们计算从它到所有相邻点的平均距离。通过假设结果分布是具有均值和标准差的高斯分布,可以将其平均距离在由全局距离均值和标准差定义的区间之外的所有点视为离群值并从数据集中进行修剪。 下图显示了稀疏离群值分析和删除的效果:原始数据集显示在左侧,结果数据集显示在右侧。数据集图显示了滤波前后每个点的邻域中平均K最近邻距离。

  • 创建过滤器,每个点分析计算时考虑的最近邻居个数为50个;
  • 设置标准差阈值为1,这意味着所有距离查询点的平均距离的标准偏差均大于1个标准偏差的所有点都将被标记为离群值并删除。
  • 计算输出并将其存储在cloud_filtered中
/* 使用StatisticalOutlierRemoval统计学离群点移除过滤器移除噪点 */
#include <iostream>
#include <pcl/io/pcd_io.h>
#include <pcl/point_types.h>
#include <pcl/filters/statistical_outlier_removal.h>

int main(int argc, char** argv)
{
    pcl::PointCloud<pcl::PointXYZ>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZ>);
    pcl::PointCloud<pcl::PointXYZ>::Ptr cloud_filtered(new pcl::PointCloud<pcl::PointXYZ>);

    // 从文件读取点云
    // Fill in the cloud data
    pcl::PCDReader reader;
    // Replace the path below with the path where you saved your file
    reader.read<pcl::PointXYZ>("../data/table_scene_lms400.pcd", *cloud);

    std::cerr << "Cloud before filtering: " << std::endl;
    std::cerr << *cloud << std::endl << std::endl;

    // Create the filtering object
    pcl::StatisticalOutlierRemoval<pcl::PointXYZ> sor;
    sor.setInputCloud(cloud);
    // 设置平均距离估计的最近邻居的数量K
    sor.setMeanK(50);
    // 设置标准差阈值系数
    sor.setStddevMulThresh(1.0);
    // 执行过滤
    sor.filter(*cloud_filtered);

    std::cerr << "Cloud after filtering: " << std::endl ;
    std::cerr << *cloud_filtered << std::endl;
    // 将留下来的点保存到后缀为_inliers.pcd的文件
    pcl::PCDWriter writer;
    writer.write<pcl::PointXYZ>("./output_data/table_scene_lms400_inliers.pcd", *cloud_filtered, false);

    // 使用个相同的过滤器,但是对输出结果取反,则得到那些被过滤掉的点,保存到_outliers.pcd文件
    sor.setNegative(true);
    sor.filter(*cloud_filtered);
    writer.write<pcl::PointXYZ>("./output_data/table_scene_lms400_outliers.pcd", *cloud_filtered, false);

    return (0);
}

 输出结果:

 实现效果

  • 单图对比:紫色部分为移除的离群点,橙绿色部分为保留的点
pcl_viewer.exe F:\DarkHorse\output_data\table_scene_lms400_inliers.pcd F:\DarkHorse\output_data\table_scene_lms400_outliers.pcd
  •  双图对比:左图为已处理群点后的点云,右图为被移除的点云
pcl_viewer.exe -multiview 1 F:\DarkHorse\output_data\table_scene_lms400_inliers.pcd F:\DarkHorse\output_data\table_scene_lms400_outliers.pcd

 条件滤波

        条件滤波(ConditionalRemoval)设置不同维度滤波规则进行滤波

#include <iostream>
#include <pcl/point_types.h>
#include <pcl/filters/radius_outlier_removal.h>
#include <pcl/filters/conditional_removal.h>
#include <pcl/visualization/pcl_visualizer.h>

typedef pcl::PointXYZ PointType;

void showPointClouds(const pcl::PointCloud<PointType>::Ptr& cloud, const pcl::PointCloud<PointType>::Ptr& cloud2) {// 创建PCLVisualizer
    pcl::visualization::PCLVisualizer::Ptr viewer(new pcl::visualization::PCLVisualizer("3D Viewer"));

    // 设置背景色为灰色
    viewer->setBackgroundColor(0.05, 0.05, 0.05, 0);

    // 添加一个普通点云 (可以设置指定颜色,也可以去掉single_color参数不设置)
    pcl::visualization::PointCloudColorHandlerCustom<PointType> single_color(cloud, 0, 255, 0); //红色
    viewer->addPointCloud<PointType>(cloud, single_color, "sample cloud");
    viewer->setPointCloudRenderingProperties(pcl::visualization::PCL_VISUALIZER_POINT_SIZE, 2, "sample cloud");

    // 添加一个第二个点云 (可以设置指定颜色,也可以去掉single_color2参数不设置)
    pcl::visualization::PointCloudColorHandlerCustom<PointType> single_color2(cloud, 255, 0, 0); //绿色
    viewer->addPointCloud<PointType>(cloud2, single_color2, "sample cloud 2");
    viewer->setPointCloudRenderingProperties(pcl::visualization::PCL_VISUALIZER_POINT_SIZE, 4, "sample cloud 2");
    viewer->addCoordinateSystem(1.0);

    while (!viewer->wasStopped()) {
        viewer->spinOnce();
    }
}

int main() {
    pcl::PointCloud<pcl::PointXYZ>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZ>);
    pcl::PointCloud<pcl::PointXYZ>::Ptr cloud_filtered(new pcl::PointCloud<pcl::PointXYZ>);

    // Fill in the cloud data
    cloud->width = 10;
    cloud->height = 1;
    cloud->points.resize(cloud->width * cloud->height);

    for (size_t i = 0; i < cloud->points.size(); ++i) {
        cloud->points[i].x = 1024 * rand() / (RAND_MAX + 1.0f);
        cloud->points[i].y = 1024 * rand() / (RAND_MAX + 1.0f);
        cloud->points[i].z = 1024 * rand() / (RAND_MAX + 1.0f);
    }

    std::cerr << "Cloud before filtering: "<< cloud->points.size() << std::endl;
    for (size_t i = 0; i < cloud->points.size(); ++i)
        std::cerr << "    " << cloud->points[i].x << " "
        << cloud->points[i].y << " "
        << cloud->points[i].z << std::endl;

    pcl::ConditionAnd<pcl::PointXYZ>::Ptr range_cond(new pcl::ConditionAnd<pcl::PointXYZ>());
    range_cond->addComparison(pcl::FieldComparison<pcl::PointXYZ>::ConstPtr(
        new pcl::FieldComparison<pcl::PointXYZ>("z", pcl::ComparisonOps::GT, 50))); //大于50
    range_cond->addComparison(pcl::FieldComparison<pcl::PointXYZ>::ConstPtr(
        new pcl::FieldComparison<pcl::PointXYZ>("z", pcl::ComparisonOps::LT, 500))); //小于500

    // build the filter
    pcl::ConditionalRemoval<pcl::PointXYZ> condrem;
    condrem.setCondition(range_cond);
    condrem.setInputCloud(cloud);
    // apply filter
    condrem.filter(*cloud_filtered); //50<z<500的保留

    
    // display pointcloud after filtering
    std::cerr << "Cloud after filtering: " << cloud_filtered->points.size() << std::endl;
    for (size_t i = 0; i < cloud_filtered->points.size(); ++i)

        {
            std::cerr << "    " << cloud_filtered->points[i].x << " "
            << cloud_filtered->points[i].y << " "
            << cloud_filtered->points[i].z << std::endl;
        }

    showPointClouds(cloud, cloud_filtered);
   
    return 0;
}

     红色的保留的结果,绿色是被滤掉的点云

   

半径离群值滤波

        半径滤波器(RadiusOutlierRemoval)与统计滤波器相比更加简单粗暴。以某点为中心画一个圆计算落在该圆中点的数量,当数量大于给定值时,则保留该点,数量小于给定值则剔除该点。此算法运行速度快,依序迭代留下的点一定是最密集的,但是圆的半径和圆内点的数目都需要人工指定。

#include <iostream>
#include <pcl/point_types.h>
#include <pcl/filters/radius_outlier_removal.h>
#include <pcl/filters/conditional_removal.h>
#include <pcl/visualization/pcl_visualizer.h>

typedef pcl::PointXYZ PointType;

void showPointClouds(const pcl::PointCloud<PointType>::Ptr& cloud, const pcl::PointCloud<PointType>::Ptr& cloud2) {// 创建PCLVisualizer
    pcl::visualization::PCLVisualizer::Ptr viewer(new pcl::visualization::PCLVisualizer("3D Viewer"));

    // 设置背景色为灰色
    viewer->setBackgroundColor(0.05, 0.05, 0.05, 0);

    // 添加一个普通点云 (可以设置指定颜色,也可以去掉single_color参数不设置)
    pcl::visualization::PointCloudColorHandlerCustom<PointType> single_color(cloud, 0, 255, 0);
    viewer->addPointCloud<PointType>(cloud, single_color, "sample cloud");
    viewer->setPointCloudRenderingProperties(pcl::visualization::PCL_VISUALIZER_POINT_SIZE, 2, "sample cloud");

    // 添加一个第二个点云 (可以设置指定颜色,也可以去掉single_color2参数不设置)
    pcl::visualization::PointCloudColorHandlerCustom<PointType> single_color2(cloud, 255, 0, 0);
    viewer->addPointCloud<PointType>(cloud2, single_color2, "sample cloud 2");
    viewer->setPointCloudRenderingProperties(pcl::visualization::PCL_VISUALIZER_POINT_SIZE, 4, "sample cloud 2");
    viewer->addCoordinateSystem(1.0);

    while (!viewer->wasStopped()) {
        viewer->spinOnce();
    }
}

int main() {
    pcl::PointCloud<pcl::PointXYZ>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZ>);
    pcl::PointCloud<pcl::PointXYZ>::Ptr cloud_filtered(new pcl::PointCloud<pcl::PointXYZ>);

    // Fill in the cloud data
    cloud->width = 1000;
    cloud->height = 1;
    cloud->points.resize(cloud->width * cloud->height);

    for (size_t i = 0; i < cloud->points.size(); ++i) {
        cloud->points[i].x = 1024 * rand() / (RAND_MAX + 1.0f);
        cloud->points[i].y = 1024 * rand() / (RAND_MAX + 1.0f);
        cloud->points[i].z = 1024 * rand() / (RAND_MAX + 1.0f);
    }

    pcl::RadiusOutlierRemoval<pcl::PointXYZ> outrem;
    // build the filter
    outrem.setInputCloud(cloud);
    outrem.setRadiusSearch(30);
    outrem.setMinNeighborsInRadius(2);
    // apply filter
    outrem.filter(*cloud_filtered);

    std::cerr << "Cloud before filtering: " << cloud->points.size() << std::endl;
#if 0
    for (size_t i = 0; i < cloud->points.size(); ++i)
        std::cerr << "    " << cloud->points[i].x << " "
        << cloud->points[i].y << " "
        << cloud->points[i].z << std::endl;
#endif
    // display pointcloud after filtering
    std::cerr << "Cloud after filtering: " << cloud_filtered->points.size() << std::endl;
    for (size_t i = 0; i < cloud_filtered->points.size(); ++i)
        std::cerr << "    " << cloud_filtered->points[i].x << " "
        << cloud_filtered->points[i].y << " "
        << cloud_filtered->points[i].z << std::endl;

    showPointClouds(cloud, cloud_filtered);

    return 0;
}

 相关工具使用

对一个点云进行降采样:在pcl安装目录的Bin文件夹下找到pcl_voxel_grid.exe

pcl_voxel_grid F:\pcl_tests\input_cloud\20230605_132512.pcd F:\pcl_tests\output_cloud\pcl_voxel_grid_test.pcd -leaf 3 3 3

 参考:点云数据滤波处理(PCL实现)

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/715241.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

4通道AD采集子卡模块有哪些推荐?

FMC134是一款4通道3.2GSPS&#xff08;2通道6.4GSPS&#xff09;采样率12位AD采集FMC子卡模块&#xff0c;该板卡为FMC标准&#xff0c;符合VITA57.4规范&#xff0c;可以作为一个理想的IO模块耦合至FPGA前端&#xff0c;16通道的JESD204B接口通过FMC连接器连接至FPGA的高速串行…

IDEA在已有项目中新建module

1.在已经新建的项目名上右击&#xff0c;选择New->Module。 2.Location选择项目地址&#xff0c;Type选择Maven&#xff0c;Language选择Java&#xff0c;Group输入com.组名&#xff08;包名&#xff09;&#xff0c;Artifact输入项目名&#xff0c;Java选择8&#xff0c;Pa…

Java中字符串与byte数组之间的相互转换

前言 java与其他语言编写的程序进行tcp/ip socket通讯时&#xff0c;通讯内容一般都转换成byte数组型&#xff0c;java在字符与数组转换也是非常方便的。下面跟我一起来了解一下字符串与byte之间转换的原理 原理 我们都知道&#xff0c;在Java里byte类型是占用1个字节&#…

【每日随笔】摩托车驾驶 ③ ( 科目三教学 | 起步 | 人行横道 | 掉头 | 停车 )

文章目录 一、科目三教学1、推车 ( 找准车辆停放位置 )2、上车前检查 ( 开始考试前准备 )3、科目三考试开始4、科目三路线介绍5、起步6、人行横道7、掉头8、停车 一、科目三教学 进去后 , ① 先起步 , ② 然后遇到人行横道 , ③ 再后掉头 , ④ 最后靠边停车 ; 1、推车 ( 找准车…

SpringSecurity_day3_授权管理

SpringSecurity和JWT SpingSecurity用于保护web安全,实现访问控制的功能,身份认证和授权操作,账号密码校验,使用token授权 JWT:可以实现跨域身份验证和授权,安全和方便 集成授权的操作流程 1.重写UserDetails中的方法getAuthorities 2.查询当前用户所有的权限信息,并返回Gr…

科技项目验收测试报告有什么注意事项和疑惑?

科技项目验收测试报告是一份重要的文件&#xff0c;用于评估科技项目的质量和可靠性&#xff0c;对项目的成功交付具有关键作用。在项目完成的最后阶段&#xff0c;通过对项目进行全面测试和评估&#xff0c;以确保项目符合预期的目标和需求&#xff0c;并满足用户的期望。 一…

π221N61 低功耗5.0kVrms 双向I²C隔离器 兼容Si8602AD-B-IS

π221N61荣湃深力科兼容IC接口的低功耗双 向隔离器&#xff0c;IC隔离器输入和输出采用二氧化硅(SiO2) 介质隔离&#xff0c;可阻断高电压并防止噪声电流进入控制侧&#xff0c;避 免电路干扰和损坏敏感器件。π221N61 是基于荣湃智能分压专利技术设计 的产品&#xff0c;与光电…

环卫工人儿子高考687分被多校争抢 父亲:就算贷款、卖房也会让他读下去

大家好&#xff01;我是老洪。 今天一早看到一则资讯。 广州一名环卫工人的儿子高考取得了687分的优异成绩&#xff0c;考入了上海交通大学。 真优秀。 据报道&#xff0c;清华大学、浙江大学、复旦大学、中科大等多所中国知名高校都曾亲自打电话向这位环卫父亲的儿子表示祝贺并…

【MySQL】不允许你不会使用子查询

&#x1f3ac; 博客主页&#xff1a;博主链接 &#x1f3a5; 本文由 M malloc 原创&#xff0c;首发于 CSDN&#x1f649; &#x1f384; 学习专栏推荐&#xff1a;LeetCode刷题集&#xff01; &#x1f3c5; 欢迎点赞 &#x1f44d; 收藏 ⭐留言 &#x1f4dd; 如有错误敬请指…

Web_php_unserialize

源码解析 依旧是反序化漏洞&#xff0c;本源码定义了一个Demo的类&#xff0c;里包含了__construct、__destruct()、__wakeup三个方法 简介&#xff1a; __construct()方法是在创建对象时&#xff0c;调用赋初值 __destruct()方法是在对象不再使用时自动调用&#xff0c;这里的…

Jest单元测试Vue项目实践

​ 做单元测试的优点&#xff1a; 1.减少bug避免低级错误 2.提高代码运行质量 3.快速定位问题 4.减少调试时间&#xff0c;提高开发效率 5.便于重构 Jest安装&#xff1a; npm install babel-jest jest jest-serializer-vue vue/test-utils vue/cli-plugin-unit-jest -D…

好用到飞起的新项目「GitHub 热点速览」

作者&#xff1a;HelloGitHub-小鱼干 虽然本周 GitHub 热榜都是一些熟悉的面孔&#xff0c;但还是有不少新开源的项目&#xff0c;比如受启发于 Stripe IDs 的 UUIDv7 扩展 typeid&#xff0c;相信有了它&#xff0c;数据标识问题就迎刃而解了。此外&#xff0c;还有刚开源就获…

Linux--自动化的构建项目:make、Makefile

make是一个命令 Makefile是一个文件 Makefile的构成&#xff1a; ①依赖关系 ②依赖方法 编写Malefile文件的最终目标是生成项目&#xff0c;换句话说就是&#xff0c;想让Makefile把我的源代码编译&#xff0c;自动形成可执行文件 示例&#xff1a; 注&#xff1a;.PHONY…

c++11 标准模板(STL)(std::basic_ostream)(五)

定义于头文件 <ostream> template< class CharT, class Traits std::char_traits<CharT> > class basic_ostream : virtual public std::basic_ios<CharT, Traits> 类模板 basic_ostream 提供字符流上的高层输出操作。受支持操作包含有格式…

C++动态库使用

个人博客地址: https://cxx001.gitee.io 前言 Windows与Linux下面的动态链接库区别 1. 文件后缀不同 Linux动态库的后缀是 .so 文件&#xff0c;而window则是 .dll 文件。 2. 文件格式不同 &#xff08;a&#xff09;Linux下是ELF格式&#xff0c;即Executable and Linkab…

数据结构--字符串的朴素模式匹配算法

数据结构–字符串的朴素模式匹配算法 主串&#xff1a; \color{purple}主串&#xff1a; 主串&#xff1a; ‘嘿嘿嘿红红火火恍恍惚惚嗨皮开森猴开森 笑出猪叫 \color{red}笑出猪叫 笑出猪叫哈哈哈哈嗨森哈哈哈哈哈哈嗝’ 模式串&#xff1a; \color{purple}模式串&#xff1a…

计算机毕业论文内容参考|基于Python的城乡低保信息管理系统的设计和实现

文章目录 导文摘要课题背景国内外现状与趋势课题内容相关技术与方法介绍系统分析系统设计系统实现系统测试总结与展望1本文总结2后续工作展望导文 计算机毕业论文内容参考|基于Python的城乡低保信息管理系统的设计和实现 摘要 本文介绍了基于Python的城乡低保信息管理系统的设…

【电路原理学习笔记】第2章:电压、电流和电阻:2.2 电荷

第2章&#xff1a;电压、电流和电阻 2.2 电荷 电子是最小的带负电荷的粒子。当物质中存在过量的电子时&#xff0c;该物质就带负的电荷&#xff1b;当电子不足时&#xff0c;就带正的净电荷。电子和质子的电荷量相等&#xff0c;但极性相反。 电荷&#xff1a;电荷是由于物质…

企业电子名片小程序哪家?市面上哪一款名片小程序更好用?

市面上名片小程序很多&#xff0c;但是选择一款真正好用的功能强大的小程序名片就不是很多&#xff0c; 推荐你看看开利网络的链企来名片功能&#xff0c;不但具有人物的基础信息&#xff0c;还有云展厅可以上传企业信息展示企业&#xff0c;链接打通了活动&#xff0c;展会&am…

7DGroup性能实施项目日记9

好多天没写实施日记了&#xff0c;这段时间&#xff0c;我也有些其他事情要做&#xff0c;因为前阵子答应了写些东西&#xff0c;所以这几天晚上弄到两三点&#xff0c;终于写完了五万字的东西交了差。 这一段时间是培训的课程关键内容&#xff0c;基本都是分析的关键环节。主…