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

做转运网站工程造价信息价在什么网站查

做转运网站,工程造价信息价在什么网站查,开发一个app大概需要多少钱,天门seoRANSAC原理#xff1a;略。 其他博客大多都是介绍拟合单条直线或平面的代码案例#xff0c;本文介绍如何拟合多条直线或平面#xff0c;其实是在单个拟合的基础上接着拟合#xff0c;以此类推。 注意#xff1a;步骤中的直线模型是每次随机在点云中取点计算的。 步骤…RANSAC原理略。 其他博客大多都是介绍拟合单条直线或平面的代码案例本文介绍如何拟合多条直线或平面其实是在单个拟合的基础上接着拟合以此类推。 注意步骤中的直线模型是每次随机在点云中取点计算的。 步骤 1.根据所设参数点到直线模型的最大距离把点云分为了内点和外点对内点进行直线拟合得到第一次拟合的直线 2.提取上一步的外点按照步骤1再次进行内点和外点的划分对内点拟合直线得到第二次拟合的直线并将直线点云叠加到步骤1得到的直线点云中 3.设置循环终止的条件重复步骤1-2最终拟合出点云中所有直线。 多平面拟合的思想如出一辙概不赘述。 1.RANSAC拟合点云所有直线 //RANSAC拟合多条直线 pcl::PointCloudpcl::PointXYZ::Ptr LineFitting(pcl::PointCloudpcl::PointXYZ::Ptr cloud) {//内点点云合并pcl::PointCloudpcl::PointXYZ::Ptr cloud_lines(new pcl::PointCloudpcl::PointXYZ());while (cloud-size() 20)//循环条件{pcl::SampleConsensusModelLinepcl::PointXYZ::Ptr model_line(new pcl::SampleConsensusModelLinepcl::PointXYZ(cloud));pcl::RandomSampleConsensuspcl::PointXYZ ransac(model_line);ransac.setDistanceThreshold(0.05); //内点到模型的最大距离ransac.setMaxIterations(100); //最大迭代次数ransac.computeModel(); //直线拟合//根据索引提取内点std::vectorint inliers;ransac.getInliers(inliers);pcl::PointCloudpcl::PointXYZ::Ptr cloud_line(new pcl::PointCloudpcl::PointXYZ());pcl::copyPointCloudpcl::PointXYZ(*cloud, inliers, *cloud_line);//若内点尺寸过小不用继续拟合跳出循环if (cloud_line-width * cloud_line-height 20) {break;}*cloud_lines *cloud_lines *cloud_line;//pcl::io::savePCDFile(path1 strcount _ str .pcd, *cloud_line);//提取外点pcl::PointCloudpcl::PointXYZ::Ptr outliers(new pcl::PointCloudpcl::PointXYZ);pcl::PointIndices::Ptr inliersPtr(new pcl::PointIndices);inliersPtr-indices inliers;pcl::ExtractIndicespcl::PointXYZ extract;extract.setInputCloud(cloud);extract.setIndices(inliersPtr);extract.setNegative(true); // 设置为true表示提取外点extract.filter(*outliers);//pcl::io::savePCDFile(C:/pclpoint/data/cp1_lineoutstr.pcd, *outliers);//cout outliers-size() endl;cloud-clear();*cloud *outliers;}return cloud_lines; }2.RANSAC拟合点云所有平面 pcl::PointCloudpcl::PointXYZ::Ptr planeFitting(pcl::PointCloudpcl::PointXYZ::Ptr cloud) {//内点点云合并pcl::PointCloudpcl::PointXYZ::Ptr cloud_planes(new pcl::PointCloudpcl::PointXYZ());while (cloud-size() 100)//循环条件{//--------------------------RANSAC拟合平面--------------------------pcl::SampleConsensusModelPlanepcl::PointXYZ::Ptr model_plane(new pcl::SampleConsensusModelPlanepcl::PointXYZ(cloud));pcl::RandomSampleConsensuspcl::PointXYZ ransac(model_plane);ransac.setDistanceThreshold(0.01); //设置距离阈值与平面距离小于0.1的点作为内点//ransac.setMaxIterations(100); //最大迭代次数ransac.computeModel(); //执行模型估计//-------------------------根据索引提取内点--------------------------pcl::PointCloudpcl::PointXYZ::Ptr cloud_plane(new pcl::PointCloudpcl::PointXYZ);std::vectorint inplanes; //存储内点索引的容器ransac.getInliers(inplanes); //提取内点索引pcl::copyPointCloudpcl::PointXYZ(*cloud, inplanes, *cloud_plane);//若内点尺寸过小不用继续拟合跳出循环if (cloud_plane-width * cloud_plane-height 100) {break;}*cloud_planes *cloud_planes *cloud_plane;//提取外点pcl::PointCloudpcl::PointXYZ::Ptr outplanes(new pcl::PointCloudpcl::PointXYZ);pcl::PointIndices::Ptr inplanePtr(new pcl::PointIndices);inplanePtr-indices inplanes;pcl::ExtractIndicespcl::PointXYZ extract;extract.setInputCloud(cloud);extract.setIndices(inplanePtr);extract.setNegative(true); // 设置为true表示提取外点extract.filter(*outplanes);//pcl::io::savePCDFile(C:/pclpoint/data/cp1_lineoutstr.pcd, *outliers);//cout outliers-size() endl;cloud-clear();*cloud *outplanes;}//----------------------------输出模型参数---------------------------/* Eigen::VectorXf coefficient;ransac.getModelCoefficients(coefficient);cout 平面方程为\n coefficient[0] x coefficient[1] y coefficient[2] z coefficient[3] 0 endl;*///返回最终的拟合结果点云return cloud_planes; }
http://www.lakalapos1.cn/news/16518/

相关文章:

  • 在网站里怎么做图片超链接教育网站开发公司
  • 国外虚拟服务器网站与客户沟通网站建设的技巧
  • 河北网站建设多少钱长沙找工作哪个网站好
  • 建设银行信用卡中心网站潍坊城市建设官方网站
  • 网站建设开发决策怎样建个人网站
  • 专门做图片剪影的网站百度高搜
  • 门户网站是用户上网的第一入口番禺网站建设哪个好
  • 网站做好了前端 后端怎么做网站建设试题 jsp
  • 网站建设的相关技术方案h5动画用什么软件做
  • 重庆奉节网站建设公司哪家好贵阳建站模板搭建
  • 建立网站的平台可以在线编程的网站
  • 做乡村旅游的网站平面设计师的出路
  • 深圳多语言网站建设手机百度账号登录入口
  • 建设网站模式wordpress侧边悬浮联系方式插件
  • 南平摩托车罚款建设网站缴费赣州网站建设联系方式
  • 娄底营销型网站建设专业网页设计师
  • 济南机关建设网站三大框架网站开发
  • 天津网站设计诺亚科技怎么进入官方网站查询
  • 免费网站建设能做吗上海 网站开发 工作室
  • 做企业内部网站要多久重庆疾控最新通告今天
  • node.js 做网站设计师培训多久
  • 番禺网站开发设计wordpress免费主
  • 内网建设网站需要什么条件免费网站模板库
  • 在哪些网站上发外链好应用商店免费下载
  • 盐山做网站华为网络服务商
  • 做网站运营有前景么网站费用构成
  • 中国做民宿的网站wordpress 删除模板文件
  • 玉树市wap网站建设公司上海开公司
  • 网站建设开发技术类型龙中龙网站开发
  • 网站开发包括清苑网站建设