資源簡介
matlab開發-CSF批次模擬過濾器。基于布料模擬的激光雷達點云地面濾波/分割(裸地提取)方法。

代碼片段和文件信息
//?======================================================================================
//?Copyright?2017?State?Key?Laboratory?of?Remote?Sensing?Science?
//?Institute?of?Remote?Sensing?Science?and?Engineering?Beijing?Normal?University
//?Licensed?under?the?Apache?License?Version?2.0?(the?“License“);
//?you?may?not?use?this?file?except?in?compliance?with?the?License.
//?You?may?obtain?a?copy?of?the?License?at
//?????http://www.apache.org/licenses/LICENSE-2.0
//?Unless?required?by?applicable?law?or?agreed?to?in?writing?software
//?distributed?under?the?License?is?distributed?on?an?“AS?IS“?BASIS
//?WITHOUT?WARRANTIES?OR?CONDITIONS?OF?ANY?KIND?either?express?or?implied.
//?See?the?License?for?the?specific?language?governing?permissions?and
//?limitations?under?the?License.
//?======================================================================================
#include?
#include?“Cfg.h“
#include?“../src/CSF.h“?
#include?
#include?
#include?
#include?
using?namespace?std;
int?main(int?argcchar*?argv[])
{
//讀取文本參數,僅用于調試
Cfg?cfg;
string?slop_smooth;
cfg.readConfigFile(“params.cfg“?“slop_smooth“?slop_smooth);
bool?ss?=?false;
if?(slop_smooth?==?“true“?||?slop_smooth?==?“True“)
{
ss?=?true;
}
else?if?(slop_smooth?==?“false“?||?slop_smooth?==?“False“)
{
ss?=?false;
}
else{
if?(atoi(slop_smooth.c_str())?==?0){
ss?=?false;
}
else
{
ss?=?true;
}
}
string?class_threshold;
cfg.readConfigFile(“params.cfg“?“class_threshold“?class_threshold);
string?cloth_resolution;
cfg.readConfigFile(“params.cfg“?“cloth_resolution“?cloth_resolution);
string?iterations;
cfg.readConfigFile(“params.cfg“?“iterations“?iterations);
string?rigidness;
cfg.readConfigFile(“params.cfg“?“rigidness“?rigidness);
string?time_step;
cfg.readConfigFile(“params.cfg“?“time_step“?time_step);
string?terr_pointClouds_filepath;
cfg.readConfigFile(“params.cfg“?“terr_pointClouds_filepath“?terr_pointClouds_filepath);
CSF?csf;
//step?1?輸入點云
csf.readPointsFromFile(terr_pointClouds_filepath);
clock_t?start?end;
start?=?clock();
//備注:在實際使用過程中,點云數據由主程序提供,調用函數為
//csf.setPointCloud(pc);//pc為PointCloud類
//step?2?設置參數
csf.params.bSloopSmooth?=?ss;
csf.params.class_threshold?=?atof(class_threshold.c_str());
csf.params.cloth_resolution?=?atof(cloth_resolution.c_str());
csf.params.interations?=?atoi(iterations.c_str());
csf.params.rigidness?=?atoi(rigidness.c_str());
csf.params.time_step?=?atof(time_step.c_str());
//step3?執行濾波result中儲存的是地面點的索引?
std::vector?groundIndexes?offGroundIndexes;
if?(argc?==?2?&&?strcmp(argv[1]?“-c“)==0)
{
cout?<“Export?cloth?enabled.“?< csf.do_filtering(groundIndexes?offGroundIndexes?true);
}
else
{
csf.do_filtering(groundIndexes?offGroundIndexes?false);
}
end?=?clock();
double?dur?=?(double)(end?-?start);
printf(“Use?Time:%f\n“?(dur?/?CLOCKS_PER_SEC));
csf.savePoints(groundIndexes“ground.txt“);
csf.savePoin
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2019-05-30?06:29??jianboqi-CSF-b4cac09\
?????文件??????????96??2019-05-30?06:29??jianboqi-CSF-b4cac09\CMakeLists.txt
?????目錄???????????0??2019-05-30?06:29??jianboqi-CSF-b4cac09\CSFDemo\
?????文件?????????235??2019-05-30?06:29??jianboqi-CSF-b4cac09\CSFDemo\CMakeLists.txt
?????文件??????391218??2019-05-30?06:29??jianboqi-CSF-b4cac09\CSFDemo\CSF1.png
?????文件??????462606??2019-05-30?06:29??jianboqi-CSF-b4cac09\CSFDemo\CSF2.png
?????文件????????3118??2019-05-30?06:29??jianboqi-CSF-b4cac09\CSFDemo\CSFDemo.cpp
?????文件????????1727??2019-05-30?06:29??jianboqi-CSF-b4cac09\CSFDemo\Cfg.h
?????文件???????11357??2019-05-30?06:29??jianboqi-CSF-b4cac09\LICENSE.txt
?????文件????????3891??2019-05-30?06:29??jianboqi-CSF-b4cac09\README.md
?????目錄???????????0??2019-05-30?06:29??jianboqi-CSF-b4cac09\matlab\
?????文件????????2624??2019-05-30?06:29??jianboqi-CSF-b4cac09\matlab\csf_filtering.cpp
?????文件????????1991??2019-05-30?06:29??jianboqi-CSF-b4cac09\matlab\demo_mex.m
?????文件????????3369??2019-05-30?06:29??jianboqi-CSF-b4cac09\matlab\demo_with_toolbox.m
?????文件????????3565??2019-05-30?06:29??jianboqi-CSF-b4cac09\matlab\demo_without_toolbox.m
?????文件????????2857??2019-05-30?06:29??jianboqi-CSF-b4cac09\matlab\readme.txt
?????文件?????2400216??2019-05-30?06:29??jianboqi-CSF-b4cac09\matlab\sample.ply
?????文件?????4500000??2019-05-30?06:29??jianboqi-CSF-b4cac09\matlab\sample.txt
?????目錄???????????0??2019-05-30?06:29??jianboqi-CSF-b4cac09\python\
?????文件?????????293??2019-05-30?06:29??jianboqi-CSF-b4cac09\python\CSF.i
?????文件???????17277??2019-05-30?06:29??jianboqi-CSF-b4cac09\python\CSF.py
?????文件??????504704??2019-05-30?06:29??jianboqi-CSF-b4cac09\python\CSF_wrap.cxx
?????文件?????????209??2019-05-30?06:29??jianboqi-CSF-b4cac09\python\Makefile
?????目錄???????????0??2019-05-30?06:29??jianboqi-CSF-b4cac09\python\PrecompiledForAnaconda2\
?????文件?????????217??2019-05-30?06:29??jianboqi-CSF-b4cac09\python\PrecompiledForAnaconda2\CSF-1.1-py2.7.egg-info
?????文件???????16748??2019-05-30?06:29??jianboqi-CSF-b4cac09\python\PrecompiledForAnaconda2\CSF.py
?????文件???????30774??2019-05-30?06:29??jianboqi-CSF-b4cac09\python\PrecompiledForAnaconda2\CSF.pyc
?????文件??????299520??2019-05-30?06:29??jianboqi-CSF-b4cac09\python\PrecompiledForAnaconda2\_CSF.pyd
?????文件??????????50??2019-05-30?06:29??jianboqi-CSF-b4cac09\python\PrecompiledForAnaconda2\readme.txt
?????文件?????????289??2019-05-30?06:29??jianboqi-CSF-b4cac09\python\notes.txt
?????文件?????????965??2019-05-30?06:29??jianboqi-CSF-b4cac09\python\setup.py
............此處省略19個文件信息
評論
共有 條評論