本文整理汇总了C++中eigen::Matrix3f::sum方法的典型用法代码示例。如果您正苦于以下问题:C++ Matrix3f::sum方法的具体用法?C++ Matrix3f::sum怎么用?C++ Matrix3f::sum使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eigen::Matrix3f
的用法示例。
在下文中一共展示了Matrix3f::sum方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: rawCloudHandler
//.........这里部分代码省略.........
// Test set - calculate performance statistics
if (testdata == true)
{
std::cout << confMat << std::endl;
confMats.push_back(confMat);
if (true)//k==files.size()-1)
{
ofstream myfile;
string resultsFolder = "/home/mikkel/catkin_ws/src/Results/";
myfile.open ((resultsFolder + "run_number_here.txt").c_str());
// Distance threshold
myfile << "DistanceThreshold:" << distThr << ";\n";
// Neighborhood parameters
myfile << "Neighborhood:" << rmin << ";" << rmindist << ";" << rmax << ";" << rmaxdist << ";\n";
// Features
myfile << "Features:";
for (int d=0;d<dim;d++)
myfile << useFeatures[d] << ";";
myfile << "\n";
myfile << "ConfusionMatrix:";
for (size_t i=0;i<confMats.size();i++)
{
for (int r=0;r<confMats[i].rows();r++)
for (int c=0;c<confMats[i].cols();c++)
myfile << confMats[i](r,c) << ";";
myfile << "\n";
}
myfile << "Accuracy:" << confMat.diagonal().sum()/confMat.sum() << ";\n";
myfile.close();
}
}
featureCloudAcc->clear();
labels.clear();
#else
for (size_t i=0;i<transformedCloud->size();i++)
{
pcl::PointXYZI pTmp2 = transformedCloud->points[i];
pcl::PointXYZRGB pTmp;
pTmp.x = pTmp2.x;
pTmp.y = pTmp2.y;
pTmp.z = pTmp2.z;
pTmp.r = 255;
pTmp.g = 255;
if (pTmp.z > 0.1) // Object
{
classificationCloud->push_back(pTmp);
}
}
if (visualizationFlag)
{
pcl::visualization::PointCloudColorHandlerRGBField<pcl::PointXYZRGB> colorC(classificationCloud);
viewer->addPointCloud<pcl::PointXYZRGB>(classificationCloud,colorC,"Classification",viewP(Classification));
viewer->setPointCloudRenderingProperties (pcl::visualization::PCL_VISUALIZER_POINT_SIZE, 2, "Classification");
viewer->addText ("Classification", 10, 10, fontsize, 1, 1, 1, "Classification text", viewP(Classification));