| 455 | } |
| 456 | |
| 457 | std::vector<int> SMRFilter::createObjMask(std::vector<double> const& ZImin) |
| 458 | { |
| 459 | // "The second stage of the ground identification algorithm involves the |
| 460 | // application of a progressive morphological filter to the minimum surface |
| 461 | // grid (ZImin)." |
| 462 | std::vector<int> ObjV = |
| 463 | progressiveFilter(ZImin, m_args->m_slope, m_args->m_window); |
| 464 | |
| 465 | if (!m_args->m_dir.empty()) |
| 466 | { |
| 467 | std::string fname = |
| 468 | FileUtils::toAbsolutePath("ziobj.tif", m_args->m_dir); |
| 469 | MatrixXi Obj = Map<MatrixXi>(ObjV.data(), m_rows, m_cols); |
| 470 | math::writeMatrix(Obj.cast<double>(), fname, "GTiff", m_args->m_cell, m_bounds, m_srs); |
| 471 | } |
| 472 | |
| 473 | return ObjV; |
| 474 | } |
| 475 | |
| 476 | std::vector<double> SMRFilter::createZImin(PointViewPtr view) |
| 477 | { |
nothing calls this directly
no test coverage detected