Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions CMake/telesculptor-external-fletch.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ endif()
ExternalProject_Add(fletch
PREFIX ${TELESCULPTOR_BINARY_DIR}
GIT_REPOSITORY "https://github.com/Kitware/fletch.git"
GIT_TAG 94870a290a06db845e80816863bb6d1b9cb12085
# Latest master, Source tarballs from data.kitware.com
GIT_TAG dc3d1e5acd226c5d68757bd60d81466bc71873e3
#GIT_SHALLOW 1
SOURCE_DIR ${TELESCULPTOR_EXTERNAL_DIR}/fletch
BINARY_DIR ${TELESCULPTOR_EXTERNAL_DIR}/fletch-build
Expand All @@ -59,7 +60,7 @@ ExternalProject_Add(fletch
-Dfletch_BUILD_CXX11:BOOL=ON
-Dfletch_BUILD_WITH_PYTHON:BOOL=${TELESCULPTOR_ENABLE_PYTHON}
-Dfletch_ENABLE_Boost:BOOL=${TELESCULPTOR_ENABLE_FLETCH_BOOST}
-DBoost_SELECT_VERSION:STRING=1.65.1
-DBoost_SELECT_VERSION:STRING=1.78.0
-Dfletch_ENABLE_Caffe:BOOL=OFF
-Dfletch_ENABLE_Caffe_Segnet:BOOL=OFF
-Dfletch_ENABLE_Ceres:BOOL=${TELESCULPTOR_ENABLE_FLETCH_CERES}
Expand All @@ -68,8 +69,9 @@ ExternalProject_Add(fletch
-Dfletch_ENABLE_Darknet_OpenCV:BOOL=OFF
-Dfletch_ENABLE_Eigen:BOOL=${TELESCULPTOR_ENABLE_FLETCH_EIGEN}
-Dfletch_ENABLE_FFmpeg:BOOL=${TELESCULPTOR_ENABLE_FLETCH_FFMPEG}
-DFFmpeg_SELECT_VERSION:STRING=3.3.3
-DFFmpeg_SELECT_VERSION:STRING=5.1.2
-Dfletch_ENABLE_GDAL:BOOL=${TELESCULPTOR_ENABLE_FLETCH_GDAL}
-DGDAL_SELECT_VERSION:STRING=2.4.4
-Dfletch_ENABLE_GEOS:BOOL=${TELESCULPTOR_ENABLE_FLETCH_GEOS}
-Dfletch_ENABLE_GFlags:BOOL=OFF
-Dfletch_ENABLE_GLog:BOOL=${TELESCULPTOR_ENABLE_FLETCH_CERES}
Expand All @@ -81,7 +83,7 @@ ExternalProject_Add(fletch
-Dfletch_ENABLE_LevelDB:BOOL=OFF
-Dfletch_ENABLE_OpenBLAS:BOOL=OFF
-Dfletch_ENABLE_OpenCV:BOOL=${TELESCULPTOR_ENABLE_FLETCH_OPENCV}
-DOpenCV_SELECT_VERSION:STRING=4.5.1
-DOpenCV_SELECT_VERSION:STRING=4.9.0
-Dfletch_ENABLE_OpenCV_FFmpeg:BOOL=ON
-Dfletch_ENABLE_OpenCV_contrib:BOOL=ON
-Dfletch_ENABLE_OpenCV_highgui:BOOL=ON
Expand All @@ -97,9 +99,10 @@ ExternalProject_Add(fletch
-Dfletch_ENABLE_Snappy:BOOL=OFF
-Dfletch_ENABLE_SQLite3:BOOL=${TELESCULPTOR_ENABLE_FLETCH_PROJ}
-Dfletch_ENABLE_SuiteSparse:BOOL=${TELESCULPTOR_ENABLE_FLETCH_CERES}
-DBUILD_CXSPARSE_ONLY:BOOL=ON
-Dfletch_ENABLE_TinyXML:BOOL=OFF
-Dfletch_ENABLE_VTK:BOOL=${TELESCULPTOR_ENABLE_FLETCH_VTK}
-DVTK_SELECT_VERSION:STRING=9.0
-DVTK_SELECT_VERSION:STRING=9.1
-Dfletch_ENABLE_VXL:BOOL=ON
-Dfletch_ENABLE_YAMLcpp:BOOL=OFF
-Dfletch_ENABLE_ZLib:BOOL=${TELESCULPTOR_ENABLE_FLETCH_ZLIB}
Expand All @@ -112,6 +115,7 @@ ExternalProject_Add(fletch
-Dfletch_ENABLE_openjpeg:BOOL=OFF
-Dfletch_ENABLE_qtExtensions:BOOL=ON
-Dfletch_ENABLE_pybind11:BOOL=${TELESCULPTOR_ENABLE_PYTHON}
-Dpybind11_SELECT_VERSION:STRING=2.10.3
-Dfletch_ENABLE_shapelib:BOOL=OFF
-Dfletch_BUILD_WITH_CUDA:BOOL=${TELESCULPTOR_ENABLE_CUDA}
-DCUDA_TOOLKIT_ROOT_DIR:PATH=${CUDA_TOOLKIT_ROOT_DIR}
Expand Down
10 changes: 6 additions & 4 deletions CMake/telesculptor-external-kwiver.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ ExternalProject_Add(kwiver
SOURCE_DIR ${TELESCULPTOR_EXTERNAL_DIR}/kwiver
BINARY_DIR ${TELESCULPTOR_EXTERNAL_DIR}/kwiver-build
STAMP_DIR ${TELESCULPTOR_STAMP_DIR}
GIT_REPOSITORY "https://github.com/Kitware/kwiver.git"
GIT_TAG 08dbcd8a59a6930ac6f1639c2db8a94c12dfd96e
GIT_REPOSITORY "https://gitlab.kitware.com/kwiver/kwiver.git"
# Most recent available "main" commit, update Readme.rst
GIT_TAG 30f6a83eabe7491a770748b66435d008fe7e6b1f
#GIT_SHALLOW 1
CMAKE_CACHE_ARGS
-DBUILD_SHARED_LIBS:BOOL=ON
Expand All @@ -32,8 +33,9 @@ ExternalProject_Add(kwiver
-DKWIVER_ENABLE_DLL_WARNINGS:BOOL=OFF
-DKWIVER_ENABLE_DOCS:BOOL=OFF
-DKWIVER_ENABLE_EXAMPLES:BOOL=OFF
-DKWIVER_ENABLE_EXTRAS:BOOL=ON
-DKWIVER_ENABLE_EXTRAS:BOOL=OFF
-DKWIVER_ENABLE_FFMPEG:BOOL=ON
-DKWIVER_ENABLE_FFMPEG_CUDA:BOOL=OFF
-DKWIVER_ENABLE_KPF:BOOL=OFF
-DKWIVER_ENABLE_GDAL:BOOL=ON
-DKWIVER_ENABLE_LOG4CPLUS:BOOL=ON
Expand All @@ -48,7 +50,7 @@ ExternalProject_Add(kwiver
-DKWIVER_ENABLE_QT:BOOL=ON
-DKWIVER_ENABLE_QT_EXT:BOOL=ON
-DKWIVER_ENABLE_RightTrack:BOOL=OFF
-DKWIVER_ENABLE_SPROKIT:BOOL=ON
-DKWIVER_ENABLE_SPROKIT:BOOL=OFF
-DKWIVER_ENABLE_SUPER3D:BOOL=ON
-DKWIVER_ENABLE_TESTS:BOOL=${TELESCULPTOR_ENABLE_TESTING}
-DKWIVER_ENABLE_TOOLS:BOOL=${TELESCULPTOR_ENABLE_TOOLS}
Expand Down
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ set(TELESCULPTOR_BINARY_DIR "${CMAKE_BINARY_DIR}")
set(TELESCULPTOR_EXTERNAL_DIR "${TELESCULPTOR_BINARY_DIR}/external")
set(TELESCULPTOR_STAMP_DIR ${TELESCULPTOR_EXTERNAL_DIR}/stamps)

set(CMAKE_CXX_STANDARD 17)

if(NOT CMAKE_BUILD_TYPE)
message(STATUS "Setting build type to 'Release' as none was specified.")
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build." FORCE)
Expand Down
7 changes: 4 additions & 3 deletions gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ set(gui_sources
tools/RunAllTool.cxx
tools/SaveFrameTool.cxx
tools/SaveKeyFrameTool.cxx
tools/TrackFeaturesSprokitTool.cxx
# sprokit disabled for kwiver v2, until sprokit is ported.
# tools/TrackFeaturesSprokitTool.cxx
tools/TrackFeaturesTool.cxx
tools/TrackFilterTool.cxx
tools/TriangulateTool.cxx
Expand Down Expand Up @@ -159,11 +160,11 @@ unset(no_install)

target_link_libraries(TeleSculptor
maptk
kwiver::kwiver_adapter
# kwiver::kwiver_adapter
kwiver::kwiver_algo_core
kwiver::kwiver_algo_mvg
kwiver::kwiver_algo_qt_widgets
kwiver::sprokit_pipeline
# kwiver::sprokit_pipeline
kwiver::vital_vpm
kwiver::kwiver_algo_vtk
qtExtensions
Expand Down
5 changes: 2 additions & 3 deletions gui/ColorizeSurfaceOptions.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -348,11 +348,10 @@ void ColorizeSurfaceOptions::colorize()
d->cameras);

coloration->set_input(volume);
coloration->set_output(volume);
coloration->set_frame_sampling(d->UI.spinBoxFrameSampling->value());
coloration->set_occlusion_threshold(d->occlusionThreshold);
coloration->set_remove_occluded(d->removeOccluded);
coloration->set_remove_masked(d->removeMasked);
coloration->set_color_occluded(!d->removeOccluded);
coloration->set_color_masked(!d->removeMasked);
coloration->set_frame(d->lastColorizedFrame);
coloration->set_all_frames(false);
connect(coloration, &MeshColoration::resultReady,
Expand Down
15 changes: 8 additions & 7 deletions gui/MainWindow.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@
#include <arrows/core/track_set_impl.h>
#include <arrows/mvg/transform.h>
#include "arrows/vtk/vtkKwiverCamera.h"
#include <vital/algo/algorithm_factory.h>
#include <vital/algo/algorithm.txx>
#include <vital/algo/estimate_similarity_transform.h>
#include <vital/algo/integrate_depth_maps.h>
#include <vital/algo/pointcloud_io.h>
#include <vital/algo/resection_camera.h>
#include <vital/algo/video_input.h>
Expand Down Expand Up @@ -613,7 +614,7 @@ void MainWindowPrivate::addVideoSource(
this->videoSource->close();
}

kv::algo::video_input::set_nested_algo_configuration(
kv::set_nested_algo_configuration<kv::algo::video_input>(
"video_reader", config, this->videoSource);

try
Expand Down Expand Up @@ -1729,7 +1730,7 @@ MainWindow::MainWindow(QWidget* parent, Qt::WindowFlags flags)

// check if the application has the CUDA plugin
bool has_cuda =
kwiver::vital::has_algorithm_impl_name("integrate_depth_maps", "cuda");
kwiver::vital::has_algorithm_impl_name<kv::algo::integrate_depth_maps>("cuda");
if (!has_cuda)
{
d->UI.actionUseGPU->setChecked(false);
Expand Down Expand Up @@ -2395,7 +2396,7 @@ void MainWindow::saveLandmarks(QString const& path, bool writeToProject)
if (QFileInfo(path).suffix() == "las")
{
auto lgcs = d->sfmConstraints->get_local_geo_cs();
auto pc_io = kv::algo::pointcloud_io::create("pdal");
auto pc_io = kv::create_algorithm<kv::algo::pointcloud_io>("pdal");
if (!pc_io)
{
LOG_ERROR(kv::get_logger("telesculptor.mainwindow"),
Expand Down Expand Up @@ -3455,7 +3456,7 @@ void MainWindow::applySimilarityTransform()
}

config->merge_config(d->project->config);
if (!kv::algo::estimate_similarity_transform::check_nested_algo_configuration("st_estimator", config))
if (!kv::check_nested_algo_configuration<kv::algo::estimate_similarity_transform>("st_estimator", config))
{
QMessageBox::critical(
this, "Configuration error",
Expand All @@ -3465,7 +3466,7 @@ void MainWindow::applySimilarityTransform()

// Create the similarity transform from the ground control points
kv::algo::estimate_similarity_transform_sptr st_estimator;
kv::algo::estimate_similarity_transform::set_nested_algo_configuration(
kv::set_nested_algo_configuration<kv::algo::estimate_similarity_transform>(
"st_estimator", config, st_estimator);

// initialize identity transform
Expand Down Expand Up @@ -3596,7 +3597,7 @@ void MainWindow::computeCamera()
{
// Create algorithm to write detections
kv::algo::resection_camera_sptr algorithm;
kv::algo::resection_camera::set_nested_algo_configuration(
kv::set_nested_algo_configuration<kv::algo::resection_camera>(
"resection", config, algorithm);

if (!algorithm)
Expand Down
5 changes: 3 additions & 2 deletions gui/VideoImport.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include "VideoImport.h"

#include <vital/algo/algorithm.txx>
#include <vital/algo/video_input.h>

#include <qtStlUtil.h>
Expand Down Expand Up @@ -85,15 +86,15 @@ void VideoImport::run()
try
{

if (!video_input::check_nested_algo_configuration(
if (!kwiver::vital::check_nested_algo_configuration<video_input>(
BLOCK_VR, d->config))
{
LOG_WARN(d->logger,
"An error was found in the video source algorithm configuration.");
return;
}

video_input::set_nested_algo_configuration(
kwiver::vital::set_nested_algo_configuration<video_input>(
BLOCK_VR, d->config, d->video_reader);

kwiver::vital::timestamp currentTimestamp;
Expand Down
10 changes: 4 additions & 6 deletions gui/WorldView.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "vtkMaptkScalarDataFilter.h"

#include "arrows/vtk/vtkKwiverCamera.h"
#include <vital/algo/algorithm.txx>
#include <vital/algo/pointcloud_io.h>
#include <vital/types/camera.h>
#include <vital/types/landmark_map.h>
Expand Down Expand Up @@ -1627,7 +1628,7 @@ bool WorldView::saveDepthPoints(QString const& path,
std::vector<kv::rgb_color> colors;
d->vtkToPointList(data, DepthMapArrays::TrueColor, points, colors);

kv::algo::pointcloud_io_sptr pc_io = kv::algo::pointcloud_io::create("pdal");
kv::algo::pointcloud_io_sptr pc_io = kv::create_algorithm<kv::algo::pointcloud_io>("pdal");
if(!pc_io)
{
LOG_ERROR(d->logger,
Expand Down Expand Up @@ -1749,7 +1750,7 @@ bool WorldView::saveFusedMesh(const QString &path,
std::vector<kv::rgb_color> colors;
d->vtkToPointList(d->mesh, d->mesh->GetPointData()->GetScalars()->GetName(),
points, colors);
kv::algo::pointcloud_io_sptr pc_io = kv::algo::pointcloud_io::create("pdal");
kv::algo::pointcloud_io_sptr pc_io = kv::create_algorithm<kv::algo::pointcloud_io>("pdal");
if(!pc_io)
{
LOG_ERROR(d->logger,
Expand Down Expand Up @@ -1811,10 +1812,7 @@ void WorldView::saveFusedMeshFrameColors(const QString &path, bool occlusion)
coloration->set_frame_sampling(d->volumeOptions->getFrameSampling());
double occlusionThreshold = d->volumeOptions->getOcclusionThreshold();
coloration->set_occlusion_threshold(occlusionThreshold);
coloration->set_remove_occluded(occlusion);
vtkSmartPointer<vtkPolyData> meshFrameColors = vtkSmartPointer<vtkPolyData>::New();
meshFrameColors->CopyStructure(d->mesh);
coloration->set_output(meshFrameColors);
coloration->set_color_occluded(!occlusion);
coloration->set_frame(-1);
coloration->set_all_frames(true);
connect(coloration, &MeshColoration::resultReady,
Expand Down
2 changes: 1 addition & 1 deletion gui/main.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <maptk/version.h>

#include <kwiversys/SystemTools.hxx>
#include <vital/plugin_loader/plugin_manager.h>
#include <vital/plugin_management/plugin_manager.h>

#include <qtCliArgs.h>
#include <qtStlUtil.h>
Expand Down
5 changes: 3 additions & 2 deletions gui/tools/BundleAdjustTool.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "BundleAdjustTool.h"
#include "GuiCommon.h"

#include <vital/algo/algorithm.txx>
#include <vital/algo/bundle_adjust.h>

#include <QMessageBox>
Expand Down Expand Up @@ -74,7 +75,7 @@ bool BundleAdjustTool::execute(QWidget* window)
}

config->merge_config(this->data()->config);
if (!bundle_adjust::check_nested_algo_configuration(BLOCK, config))
if (!kwiver::vital::check_nested_algo_configuration<bundle_adjust>(BLOCK, config))
{
QMessageBox::critical(
window, "Configuration error",
Expand All @@ -83,7 +84,7 @@ bool BundleAdjustTool::execute(QWidget* window)
}

// Create algorithm from configuration
bundle_adjust::set_nested_algo_configuration(BLOCK, config, d->algorithm);
kwiver::vital::set_nested_algo_configuration<bundle_adjust>(BLOCK, config, d->algorithm);

// Set the callback to receive updates
using std::placeholders::_1;
Expand Down
5 changes: 3 additions & 2 deletions gui/tools/CanonicalTransformTool.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "CanonicalTransformTool.h"
#include "GuiCommon.h"

#include <vital/algo/algorithm.txx>
#include <vital/algo/estimate_canonical_transform.h>

#include <arrows/mvg/transform.h>
Expand Down Expand Up @@ -76,7 +77,7 @@ bool CanonicalTransformTool::execute(QWidget* window)
}

config->merge_config(this->data()->config);
if (!estimate_canonical_transform::check_nested_algo_configuration(BLOCK, config))
if (!kwiver::vital::check_nested_algo_configuration<estimate_canonical_transform>(BLOCK, config))
{
QMessageBox::critical(
window, "Configuration error",
Expand All @@ -85,7 +86,7 @@ bool CanonicalTransformTool::execute(QWidget* window)
}

// Create algorithm from configuration
estimate_canonical_transform::set_nested_algo_configuration(
kwiver::vital::set_nested_algo_configuration<estimate_canonical_transform>(
BLOCK, config, d->algorithm);

return AbstractTool::execute(window);
Expand Down
13 changes: 7 additions & 6 deletions gui/tools/ComputeAllDepthTool.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "GuiCommon.h"

#include <arrows/core/depth_utils.h>
#include <vital/algo/algorithm.txx>
#include <vital/algo/compute_depth.h>
#include <vital/algo/image_io.h>
#include <vital/algo/video_input.h>
Expand Down Expand Up @@ -111,15 +112,15 @@ bool ComputeAllDepthTool::execute(QWidget* window)
}

config->merge_config(this->data()->config);
if (!video_input::check_nested_algo_configuration(BLOCK_VR, config))
if (!kwiver::vital::check_nested_algo_configuration<video_input>(BLOCK_VR, config))
{
QMessageBox::critical(
window, "Configuration error",
"An error was found in the video_input configuration.");
return false;
}

if (!compute_depth::check_nested_algo_configuration(BLOCK_CD, config))
if (!kwiver::vital::check_nested_algo_configuration<compute_depth>(BLOCK_CD, config))
{
QMessageBox::critical(
window, "Configuration error",
Expand All @@ -128,7 +129,7 @@ bool ComputeAllDepthTool::execute(QWidget* window)
}

auto const hasMask = !this->data()->maskPath.empty();
if (hasMask && !video_input::check_nested_algo_configuration(BLOCK_MR, config))
if (hasMask && !kwiver::vital::check_nested_algo_configuration<video_input>(BLOCK_MR, config))
{
QMessageBox::critical(
window, "Configuration error",
Expand All @@ -138,9 +139,9 @@ bool ComputeAllDepthTool::execute(QWidget* window)

// Create algorithm from configuration
config->merge_config(this->data()->config);
video_input::set_nested_algo_configuration(BLOCK_VR, config, d->video_reader);
compute_depth::set_nested_algo_configuration(BLOCK_CD, config, d->depth_algo);
video_input::set_nested_algo_configuration(BLOCK_MR, config, d->mask_reader);
kwiver::vital::set_nested_algo_configuration<video_input>(BLOCK_VR, config, d->video_reader);
kwiver::vital::set_nested_algo_configuration<compute_depth>(BLOCK_CD, config, d->depth_algo);
kwiver::vital::set_nested_algo_configuration<video_input>(BLOCK_MR, config, d->mask_reader);

d->start_frame = config->get_value<int>("batch_depth:first_frame", 0);
d->end_frame = config->get_value<int>("batch_depth:end_frame", -1);
Expand Down
Loading