- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在做一个注册项目,我有一把椅子,上面有一些物体在 kinect 前旋转。
我可以成功进行成对注册,但正如预期的那样有一些漂移(导致图像)。
我想使用 LUM,以便对累积误差进行全局最小化(然后将其“传播”到帧中),但最终我让帧漂浮在空中。 (图片下方的代码)
这在LUM的使用上有什么明显的错误吗?
---我使用关键点+特征,而不是盲目地用完整的点云来喂养LUM
为什么所有示例都添加单向边而不是双向边?
PARAM_LUM_centroidDistTHRESH = 0.30;
PARAM_LUM_MaxIterations = 100;
PARAM_LUM_ConvergenceThreshold = 0.0f;
int NeighborhoodNUMB = 2;
int FrameDistLOOPCLOSURE = 5;
PARAM_CORR_REJ_InlierThreshold = 0.020;
pcl::registration::LUM<pcl::PointXYZRGBNormal> lum;
lum.setMaxIterations( PARAM_LUM_MaxIterations );
lum.setConvergenceThreshold( PARAM_LUM_ConvergenceThreshold );
QVector< pcl::PointCloud<pcl::PointXYZRGB>::Ptr > cloudVector_ORGan_P_;
for (int iii=0; iii<totalClouds; iii++)
{
// read - iii_cloud_ORGan_P_
// transform it with pairwise registration result
cloudVector_ORGan_P_.append( iii_cloud_ORGan_P_ );
}
for (size_t iii=0; iii<totalClouds; iii++)
{
pcl::compute3DCentroid( *cloudVector_ORGan_P_[iii], centrVector[iii] );
pcl::IntegralImageNormalEstimation<pcl::PointXYZRGB,pcl::Normal> ne;
//blah blah parameters
//compute normals with *ne*
//pcl::removeNaNFromPointCloud
//pcl::removeNaNNormalsFromPointCloud
pcl::ISSKeypoint3D< pcl::PointXYZRGBNormal, pcl::PointXYZRGBNormal> keyPointDetector;
//blah balh parameters;
//keyPointDetector.compute
//then remove NAN keypoints
pcl::SHOTColorEstimationOMP< pcl::PointXYZRGBNormal,pcl::PointXYZRGBNormal,pcl::SHOT1344 > featureDescriptor;
//featureDescriptor.setSearchSurface( **ful_unorganized_cloud_in_here** );
//featureDescriptor.setInputNormals( **normals_from_above____in_here** );
//featureDescriptor.setInputCloud( **keypoints_from_above__in_here** );
//blah blah parameters
//featureDescriptor.compute
//delete NAN *Feature* + corresp. *Keypoints* with *.erase*
}
for (size_t iii=0; iii<totalClouds; iii++)
{
lum.addPointCloud( KEYptVector_UNorg_P_[iii] );
}
for (size_t iii=1; iii<totalClouds; iii++)
{
for (size_t jjj=0; jjj<iii; jjj++)
{
double cloudCentrDISTANCE = ( centrVector[iii] - centrVector[jjj] ).norm();
if ( (cloudCentrDISTANCE<PARAM_LUM_centroidDistTHRESH && qAbs(iii-jjj)<=NeighborhoodNUMB) ||
(cloudCentrDISTANCE<PARAM_LUM_centroidDistTHRESH && qAbs(iii-jjj)> FrameDistLOOPCLOSURE) )
{
int sourceID;
int targetID;
if (qAbs(iii-jjj)<=NeighborhoodNUMB) // so that connection are e.g. 0->1, 1->2, 2->3, 3->4, 4->5, 5->0
{ // not sure if it helps
sourceID = jjj;
targetID = iii;
}
else
{
sourceID = iii;
targetID = jjj;
}
*source_cloud_KEYpt_P_ = *lum.getPointCloud(sourceID);
*target_cloud_KEYpt_P_ = *lum.getPointCloud(targetID);
*source_cloud_FEATures = *FEATtVector_UNorg_P_[sourceID];
*target_cloud_FEATures = *FEATtVector_UNorg_P_[targetID];
// KeyPoint Estimation
pcl::registration::CorrespondenceEstimation<keyPointTYPE,keyPointTYPE> corrEst;
corrEst.setInputSource( source_cloud_FEATures );
corrEst.setInputTarget( target_cloud_FEATures );
corrEst.determineCorrespondences( *corrAll );
// KeyPoint Rejection
pcl::registration::CorrespondenceRejectorSampleConsensus<pcl::PointXYZRGBNormal> corrRej;
corrRej.setInputSource( source_cloud_KEYpt_P_ );
corrRej.setInputTarget( target_cloud_KEYpt_P_ );
corrRej.setInlierThreshold( PARAM_CORR_REJ_InlierThreshold );
corrRej.setMaximumIterations( 10000 );
corrRej.setRefineModel( true );
corrRej.setInputCorrespondences( corrAll );
corrRej.getCorrespondences( *corrFilt );
lum.setCorrespondences( sourceID, targetID, corrFilt );
} // if
} // jjj
} // iii
lum.compute();
// PCLVisualizer - show this - lum.getConcatenatedCloud()
最佳答案
在对 LUM 进行了多天的试验后,我决定转向另一个用于图优化的工具,即 g2o .您可以在图像中看到结果,它并不完美(请参阅小平移漂移@正面 View ),但它合理且比简单的成对增量配准(没有非常明显的旋转漂移!),
如果您有兴趣,我建议您下载 github version !它是最新的,而其他版本 - like this - 已经过时了,而且我个人在编译 library itself 时遇到了一些编译问题。或 my source code )
关于point-cloud-library - PCL - 使用 LUM 进行全局注册,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19186411/
我正在做一个注册项目,我有一把椅子,上面有一些物体在 kinect 前旋转。 我可以成功进行成对注册,但正如预期的那样有一些漂移(导致图像)。 我想使用 LUM,以便对累积误差进行全局最小化(然后将其
我有一个用 yuv420p 像素格式编码的视频,我想替换它的像素。我正在使用 ffmpeg 及其新的置换过滤器。过滤器将 X 轴和 Y 轴分别作为输入(要置换的视频和)两个置换图。我决定使用 null
我有来自 C++ 的引用代码: typedef unsigned char UC; std::vector > lum; int h; int w; 这行代码: lum.assign(h,w); 我编
我是一名优秀的程序员,十分优秀!