当前位置:网站首页>3d点云txt文件中删减nan点
3d点云txt文件中删减nan点
2022-07-22 01:55:00 【小铁匠的剑】
在点云txt文件中,会有很多nan点,如下图所示:
为了删减掉nan点,使用vs控制台程序进行删减
#include "stdafx.h"
#include <fstream>
#include <iostream>
#include <string>
using namespace std;
int main()
{
fstream in("E:\\3d\\hancon3d\\taotong.txt", ios::in);//原始点云文件
fstream out("E:\\3d\\hancon3d\\taotong4.txt", ios::out);//处理后文件
string str, estr;
str = "nan nan nan";
while (getline(in, estr))//得到 原始点云.txt中一行的内容
{
if (!estr.compare(str))//比较 原始点云.txt每一行的内容和要删除的是否一致,一致就跳过
continue;
out << estr << "\n";//不一致的内容写到 处理后文件.txt中,注意换行
}
in.close();//关闭流
out.close();
return 0;
}
执行过程中,首先建立一个新的txt文档用于保存无nan点的文件。执行完毕后,文件截图如下:
边栏推荐
- Graffiti Wi Fi & ble SoC development slide strip (5) -- burning authorization
- Pytorch Deep Learning Practice - 1 - Overview
- Release time test
- Study on the secretory enzymes of Worthington fungi -- galactose oxidase scheme
- PMP Exam agile proportion soared, how to prepare for the exam?
- Worthington脱氧核糖核酸及相关研究工具
- 硅谷课堂笔记(中)
- 等保合规2022系列 | 今年,关于等保你该了解什么?
- 2022-07-19 mysql/stonedb sub query hashjoin logic processing
- pdf转图片以及内容读取
猜你喜欢
Two people line up to install locally & x360ce simulation handle Tutorial & xpadder handle simulation keyboard and mouse
Redis' expansion plan
NAT技术
分布式链路追踪-skywalking实战
Redis主从复制
Notes de classe de la Silicon Valley (Partie 2)
Analysis sample of a video app
架构设计方案(持续更新ing)
How to operate around users' digitalization?
Introduction to relevant matters of PMP preparation guide
随机推荐
92.(leaflet篇)leaflet态势标绘-进攻方向采集
How to solve the "last mile of delivery" of community group purchase
分布式链路追踪-skywalking基础
PMP Exam agile proportion soared, how to prepare for the exam?
Equal protection compliance 2022 series | one center + triple protection, helping the construction of enterprise level protection to be more scientific
Paper reading | point voxel CNN for efficient 3D deep learning
MySQL Exercise one database Knowledge
某视频app分析样本
Release time test
Time of regular release under test
2022-07-19 mysql/stonedb sub query hashjoin logic processing
滑环的分类以及用途
细胞分离研究丨Worthington梭菌蛋白酶方案
Wechat applet Decompilation
2022-07-13 mysql的查询优化分析
等保合规2022系列 | 20余年来,等级保护在如何“与时俱进”?
How to operate around users' digitalization?
2022-07-18 Jenkins pipeline use and create your own pipeline
JVM (I) -- Introduction to JVM
Worthington脱氧核糖核酸及相关研究工具