本文整理汇总了C++中Mat_::names方法的典型用法代码示例。如果您正苦于以下问题:C++ Mat_::names方法的具体用法?C++ Mat_::names怎么用?C++ Mat_::names使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mat_
的用法示例。
在下文中一共展示了Mat_::names方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(const int argc, const char *argv[])
{
cliini_args *args = cliini_parsopts(argc, argv, &group);
cliini_arg *input = cliargs_get(args, "input");
cliini_arg *camsel = cliargs_get(args, "cam");
if (!input || cliarg_sum(input) != 1)
errorexit("need exactly on input file");
string name(cliarg_str(input));
ClifFile f(name, H5F_ACC_RDONLY);
Dataset *set = f.openDataset(0);
Mat_<double> extrinsics;
Mat_<double> extrinsics_rel;
Mat_<double> lines;
set->get(set->getSubGroup("calibration/intrinsics")/"extrinsics", extrinsics);
set->get(set->getSubGroup("calibration/intrinsics")/"extrinsics_cams", extrinsics_rel);
Datastore *line_store = set->getStore(set->getSubGroup("calibration/intrinsics")/"lines");
line_store->read(lines);
extrinsics.names({"extrinsics","views"});
extrinsics_rel.names({"extrinsics","channels","cams"});
lines.names({"lines","x","y","channels","cams"});
#ifdef CLIF_WITH_LIBIGL
Mesh cams;
if (camsel) {
int channel = cliarg_nth_int(camsel, 0);
int cam = cliarg_nth_int(camsel, 1);
single_cam_lines(cams, lines, channel, cam);
}
else
update_cams_mesh(cams, extrinsics, extrinsics_rel, lines);
cams.writeOBJ("cams.obj");
#endif
#ifdef CLIF_WITH_LIBIGL_VIEWER
igl::viewer::Viewer viewer;
viewer.core.set_rotation_type(igl::viewer::ViewerCore::RotationType::ROTATION_TYPE_TRACKBALL);
viewer.data.set_mesh(cams.V, cams.F);
viewer.launch();
#endif
return EXIT_SUCCESS;
}