Repository: torrvision/spaint Branch: master Commit: 9cac8100323e Files: 841 Total size: 12.1 MB Directory structure: gitextract_o6q4pygz/ ├── .clang-format ├── .gitignore ├── CMakeLists.txt ├── LICENCE ├── README ├── README.md ├── apps/ │ ├── CMakeLists.txt │ ├── combineglobalposes/ │ │ ├── CMakeLists.txt │ │ └── main.cpp │ ├── forestmodevis/ │ │ ├── CMakeLists.txt │ │ └── main.cpp │ ├── prepare_7scenes/ │ │ ├── CMakeLists.txt │ │ └── main.cpp │ ├── raflperf/ │ │ ├── CMakeLists.txt │ │ └── main.cpp │ ├── raflvis/ │ │ ├── CMakeLists.txt │ │ ├── TestDecisionFunctionGenerator.h │ │ └── main.cpp │ ├── relocconverter/ │ │ ├── CMakeLists.txt │ │ └── main.cpp │ ├── relocgui/ │ │ ├── CMakeLists.txt │ │ ├── RelocaliserApplication.cpp │ │ ├── RelocaliserApplication.h │ │ ├── main.cpp │ │ └── resources/ │ │ └── DefaultRelocalisationForest.rf │ ├── relocicpeval/ │ │ ├── CMakeLists.txt │ │ └── main.cpp │ ├── relocnovelposes/ │ │ ├── CMakeLists.txt │ │ └── main.cpp │ ├── relocopt/ │ │ ├── CMakeLists.txt │ │ ├── main.cpp │ │ └── resources/ │ │ ├── default_parameters.ini │ │ └── evaluate_relocaliser.sh │ ├── relocperf/ │ │ ├── CMakeLists.txt │ │ ├── main.cpp │ │ └── resources/ │ │ ├── 12scenes_batch.sh │ │ ├── 7scenes_batch.sh │ │ ├── 7scenes_urls.txt │ │ ├── Cascade_Fast-Intermediate_050.ini │ │ ├── Cascade_Fast-Slow_050.ini │ │ ├── Cascade_Fast-Slow_075.ini │ │ ├── Cascade_Full_050_075.ini │ │ ├── Default_NoRank.ini │ │ ├── Default_Rank16.ini │ │ ├── Fast_NoRank.ini │ │ ├── Intermediate_NoRank.ini │ │ └── Slow_Rank16.ini │ ├── relocvis/ │ │ ├── CMakeLists.txt │ │ ├── main.cpp │ │ └── resources/ │ │ └── frustum.ply │ ├── spaintgui/ │ │ ├── Application.cpp │ │ ├── Application.h │ │ ├── CMakeLists.txt │ │ ├── CPUInstantiations.cpp │ │ ├── CUDAInstantiations.cu │ │ ├── commands/ │ │ │ ├── MarkVoxelsCommand.cpp │ │ │ └── MarkVoxelsCommand.h │ │ ├── core/ │ │ │ ├── CollaborativePipeline.cpp │ │ │ ├── CollaborativePipeline.h │ │ │ ├── Model.cpp │ │ │ ├── Model.h │ │ │ ├── MultiScenePipeline.cpp │ │ │ ├── MultiScenePipeline.h │ │ │ ├── ObjectivePipeline.cpp │ │ │ ├── ObjectivePipeline.h │ │ │ ├── SLAMPipeline.cpp │ │ │ ├── SLAMPipeline.h │ │ │ ├── SemanticPipeline.cpp │ │ │ └── SemanticPipeline.h │ │ ├── debugging/ │ │ │ ├── RelocaliserFiguresGenerator.cpp │ │ │ └── RelocaliserFiguresGenerator.h │ │ ├── main.cpp │ │ ├── renderers/ │ │ │ ├── HeadlessRenderer.cpp │ │ │ ├── HeadlessRenderer.h │ │ │ ├── Renderer.cpp │ │ │ ├── Renderer.h │ │ │ ├── RiftRenderer.cpp │ │ │ ├── RiftRenderer.h │ │ │ ├── WindowedRenderer.cpp │ │ │ └── WindowedRenderer.h │ │ ├── resources/ │ │ │ ├── DefaultCalibration.txt │ │ │ ├── DefaultRandomForest.rf │ │ │ ├── DefaultRelocalisationForest.rf │ │ │ ├── Labels.txt │ │ │ ├── RaflSettings.xml │ │ │ ├── TouchSettings.xml │ │ │ ├── XtionCalibrationSMG.txt │ │ │ ├── scripts/ │ │ │ │ ├── 7scenes.ini │ │ │ │ ├── 7scenes_calib.txt │ │ │ │ ├── 7scenes_convert_to_itm.m │ │ │ │ ├── 7scenes_urls.txt │ │ │ │ ├── 7scenes_validation_convert_to_itm.m │ │ │ │ ├── 7scenes_validation_process_sequence.m │ │ │ │ └── spaint_batch.sh │ │ │ ├── spaint-pre.gram │ │ │ └── trackerconfigs/ │ │ │ ├── ForceFail.xml │ │ │ ├── Rift.xml │ │ │ ├── ViconAbsolute.xml │ │ │ ├── ViconRelative.xml │ │ │ └── Zed.xml │ │ ├── sequences/ │ │ │ ├── Sequence.cpp │ │ │ ├── Sequence.h │ │ │ ├── SpaintSequence.cpp │ │ │ └── SpaintSequence.h │ │ └── subwindows/ │ │ ├── Subwindow.cpp │ │ ├── Subwindow.h │ │ ├── SubwindowConfiguration.cpp │ │ └── SubwindowConfiguration.h │ └── touchtrain/ │ ├── CMakeLists.txt │ ├── LabelledPath.h │ ├── TouchTrainDataset.h │ └── main.cpp ├── build-nix.sh ├── build-win.sh ├── clean.sh ├── cmake/ │ ├── CUDACheckCompute.cmake │ ├── FindLibRoyale.cmake │ ├── Flags.cmake │ ├── InstallApp.cmake │ ├── LinkALGLIB.cmake │ ├── LinkArrayFire.cmake │ ├── LinkBoost.cmake │ ├── LinkCUDA.cmake │ ├── LinkGLEW.cmake │ ├── LinkGLUT.cmake │ ├── LinkGrove.cmake │ ├── LinkInfiniTAM.cmake │ ├── LinkLeap.cmake │ ├── LinkLibRoyale.cmake │ ├── LinkLodePNG.cmake │ ├── LinkOVR.cmake │ ├── LinkOpenCV.cmake │ ├── LinkOpenGL.cmake │ ├── LinkOpenNI.cmake │ ├── LinkRealSense.cmake │ ├── LinkSDL.cmake │ ├── LinkScoreForests.cmake │ ├── LinkTBB.cmake │ ├── LinkTorch.cmake │ ├── LinkVTK.cmake │ ├── LinkVicon.cmake │ ├── LinkZed.cmake │ ├── OfferC++11Support.cmake │ ├── OfferFocusReacquisition.cmake │ ├── OfferLowPowerSupport.cmake │ ├── OfferLowUSBBandwidthSupport.cmake │ ├── OfferPixelDebugging.cmake │ ├── SetAppTarget.cmake │ ├── SetCUDAAppTarget.cmake │ ├── SetCUDALibTarget.cmake │ ├── SetCUDAScratchTestTarget.cmake │ ├── SetCUDAUnitTestTarget.cmake │ ├── SetLibTarget.cmake │ ├── SetScratchTestTarget.cmake │ ├── SetUnitTestTarget.cmake │ ├── UseALGLIB.cmake │ ├── UseArrayFire.cmake │ ├── UseBoost.cmake │ ├── UseCUDA.cmake │ ├── UseEigen.cmake │ ├── UseGLEW.cmake │ ├── UseGLUT.cmake │ ├── UseGraphviz.cmake │ ├── UseGrove.cmake │ ├── UseInfiniTAM.cmake │ ├── UseLeap.cmake │ ├── UseLibRoyale.cmake │ ├── UseLodePNG.cmake │ ├── UseOVR.cmake │ ├── UseOpenCV.cmake │ ├── UseOpenGL.cmake │ ├── UseOpenMP.cmake │ ├── UseOpenNI.cmake │ ├── UseRealSense.cmake │ ├── UseSDL.cmake │ ├── UseScoreForests.cmake │ ├── UseTBB.cmake │ ├── UseTorch.cmake │ ├── UseVTK.cmake │ ├── UseVicon.cmake │ ├── UseZed.cmake │ ├── VCLibraryHack.cmake │ └── cuda_compute_capability.cpp ├── detect-osxversion.sh ├── detect-platform.sh ├── determine-cmakegenerator.sh ├── determine-vstoolsetstring.sh ├── helpers/ │ ├── GL/ │ │ ├── freeglut.h │ │ ├── freeglut_ext.h │ │ ├── freeglut_std.h │ │ ├── glew.h │ │ ├── glext.h │ │ ├── glut.h │ │ ├── glxew.h │ │ ├── glxext.h │ │ └── wglew.h │ ├── cuda_drvapi_dynlink.c │ ├── drvapi_error_string.h │ ├── dynlink/ │ │ ├── cuda_drvapi_dynlink.h │ │ ├── cuda_drvapi_dynlink_cuda.h │ │ ├── cuda_drvapi_dynlink_d3d.h │ │ └── cuda_drvapi_dynlink_gl.h │ ├── dynlink_d3d10.h │ ├── dynlink_d3d11.h │ ├── exception.h │ ├── helper_cuda.h │ ├── helper_cuda_drvapi.h │ ├── helper_cuda_gl.h │ ├── helper_functions.h │ ├── helper_image.h │ ├── helper_math.h │ ├── helper_string.h │ ├── helper_timer.h │ ├── multithreading.h │ ├── nvMath.h │ ├── nvMatrix.h │ ├── nvQuaternion.h │ ├── nvShaderUtils.h │ ├── nvVector.h │ ├── param.h │ ├── paramgl.h │ ├── rendercheck_d3d10.h │ ├── rendercheck_d3d11.h │ ├── rendercheck_d3d9.h │ ├── rendercheck_gl.h │ └── timer.h ├── libraries/ │ ├── build-SDL2-2.0.3-nix.sh │ ├── build-SDL2-2.0.7-nix.sh │ ├── build-SDL2-2.0.7-win.sh │ ├── build-alglib-nix.sh │ ├── build-alglib-win.sh │ ├── build-boost_1_58_0-nix.sh │ ├── build-boost_1_58_0-win.sh │ ├── build-glew-1.12.0-nix.sh │ ├── build-glew-1.12.0-win.sh │ ├── build-lodepng-20160501-nix.sh │ ├── build-lodepng-20160501-win.sh │ ├── build-opencv-3.1.0-nix.sh │ ├── build-opencv-3.1.0-win.sh │ ├── extract-Eigen-3.2.2.sh │ ├── extract-vicon-nix.sh │ ├── extract-vicon-win.sh │ ├── install-dependencies-nix.sh │ └── setup/ │ └── glew-1.12.0/ │ └── glew-1.12.0.tgz ├── modules/ │ ├── CMakeLists.txt │ ├── evaluation/ │ │ ├── CMakeLists.txt │ │ ├── include/ │ │ │ └── evaluation/ │ │ │ ├── core/ │ │ │ │ ├── LearnerEvaluator.h │ │ │ │ ├── ParamSetUtil.h │ │ │ │ ├── PerformanceMeasure.h │ │ │ │ ├── PerformanceMeasureUtil.h │ │ │ │ ├── PerformanceResult.h │ │ │ │ └── PerformanceTable.h │ │ │ ├── splitgenerators/ │ │ │ │ ├── CrossValidationSplitGenerator.h │ │ │ │ ├── RNGFunctor.h │ │ │ │ ├── RandomPermutationAndDivisionSplitGenerator.h │ │ │ │ └── SplitGenerator.h │ │ │ └── util/ │ │ │ ├── CartesianProductParameterSetGenerator.h │ │ │ ├── ConfusionMatrixUtil.h │ │ │ ├── CoordinateDescentParameterOptimiser.h │ │ │ ├── EpochBasedParameterOptimiser.h │ │ │ └── RandomParameterOptimiser.h │ │ └── src/ │ │ ├── core/ │ │ │ ├── ParamSetUtil.cpp │ │ │ ├── PerformanceMeasure.cpp │ │ │ ├── PerformanceMeasureUtil.cpp │ │ │ └── PerformanceTable.cpp │ │ ├── splitgenerators/ │ │ │ ├── CrossValidationSplitGenerator.cpp │ │ │ ├── RNGFunctor.cpp │ │ │ └── RandomPermutationAndDivisionSplitGenerator.cpp │ │ └── util/ │ │ ├── CartesianProductParameterSetGenerator.cpp │ │ ├── ConfusionMatrixUtil.cpp │ │ ├── CoordinateDescentParameterOptimiser.cpp │ │ ├── EpochBasedParameterOptimiser.cpp │ │ └── RandomParameterOptimiser.cpp │ ├── grove/ │ │ ├── CMakeLists.txt │ │ ├── include/ │ │ │ └── grove/ │ │ │ ├── clustering/ │ │ │ │ ├── ExampleClustererFactory.h │ │ │ │ ├── ExampleClustererFactory.tpp │ │ │ │ ├── cpu/ │ │ │ │ │ ├── ExampleClusterer_CPU.h │ │ │ │ │ └── ExampleClusterer_CPU.tpp │ │ │ │ ├── cuda/ │ │ │ │ │ ├── ExampleClusterer_CUDA.h │ │ │ │ │ └── ExampleClusterer_CUDA.tcu │ │ │ │ ├── interface/ │ │ │ │ │ ├── ExampleClusterer.h │ │ │ │ │ └── ExampleClusterer.tpp │ │ │ │ └── shared/ │ │ │ │ └── ExampleClusterer_Shared.h │ │ │ ├── features/ │ │ │ │ ├── FeatureCalculatorFactory.h │ │ │ │ ├── FeatureCalculatorFactory.tpp │ │ │ │ ├── base/ │ │ │ │ │ ├── Descriptor.h │ │ │ │ │ └── RGBDPatchFeatureDifferenceType.h │ │ │ │ ├── cpu/ │ │ │ │ │ ├── RGBDPatchFeatureCalculator_CPU.h │ │ │ │ │ └── RGBDPatchFeatureCalculator_CPU.tpp │ │ │ │ ├── cuda/ │ │ │ │ │ ├── RGBDPatchFeatureCalculator_CUDA.h │ │ │ │ │ └── RGBDPatchFeatureCalculator_CUDA.tcu │ │ │ │ ├── interface/ │ │ │ │ │ ├── RGBDPatchFeatureCalculator.h │ │ │ │ │ └── RGBDPatchFeatureCalculator.tpp │ │ │ │ └── shared/ │ │ │ │ └── RGBDPatchFeatureCalculator_Shared.h │ │ │ ├── forests/ │ │ │ │ ├── DecisionForestFactory.h │ │ │ │ ├── DecisionForestFactory.tpp │ │ │ │ ├── cpu/ │ │ │ │ │ ├── DecisionForest_CPU.h │ │ │ │ │ └── DecisionForest_CPU.tpp │ │ │ │ ├── cuda/ │ │ │ │ │ ├── DecisionForest_CUDA.h │ │ │ │ │ └── DecisionForest_CUDA.tcu │ │ │ │ ├── interface/ │ │ │ │ │ ├── DecisionForest.h │ │ │ │ │ └── DecisionForest.tpp │ │ │ │ └── shared/ │ │ │ │ └── DecisionForest_Shared.h │ │ │ ├── keypoints/ │ │ │ │ ├── Keypoint2D.h │ │ │ │ └── Keypoint3DColour.h │ │ │ ├── numbers/ │ │ │ │ ├── CPURNG.h │ │ │ │ └── CUDARNG.h │ │ │ ├── ransac/ │ │ │ │ ├── PreemptiveRansacFactory.h │ │ │ │ ├── cpu/ │ │ │ │ │ └── PreemptiveRansac_CPU.h │ │ │ │ ├── cuda/ │ │ │ │ │ └── PreemptiveRansac_CUDA.h │ │ │ │ ├── interface/ │ │ │ │ │ └── PreemptiveRansac.h │ │ │ │ └── shared/ │ │ │ │ ├── PoseCandidate.h │ │ │ │ └── PreemptiveRansac_Shared.h │ │ │ ├── relocalisation/ │ │ │ │ ├── ScoreRelocaliserFactory.h │ │ │ │ ├── base/ │ │ │ │ │ └── ScoreRelocaliserState.h │ │ │ │ ├── cpu/ │ │ │ │ │ ├── ScoreForestRelocaliser_CPU.h │ │ │ │ │ ├── ScoreGTRelocaliser_CPU.h │ │ │ │ │ └── ScoreNetRelocaliser_CPU.h │ │ │ │ ├── cuda/ │ │ │ │ │ ├── ScoreForestRelocaliser_CUDA.h │ │ │ │ │ ├── ScoreGTRelocaliser_CUDA.h │ │ │ │ │ └── ScoreNetRelocaliser_CUDA.h │ │ │ │ ├── interface/ │ │ │ │ │ ├── ScoreForestRelocaliser.h │ │ │ │ │ ├── ScoreGTRelocaliser.h │ │ │ │ │ ├── ScoreNetRelocaliser.h │ │ │ │ │ └── ScoreRelocaliser.h │ │ │ │ └── shared/ │ │ │ │ ├── ScoreForestRelocaliser_Shared.h │ │ │ │ ├── ScoreGTRelocaliser_Shared.h │ │ │ │ └── ScoreNetRelocaliser_Shared.h │ │ │ ├── reservoirs/ │ │ │ │ ├── ExampleReservoirsFactory.h │ │ │ │ ├── ExampleReservoirsFactory.tpp │ │ │ │ ├── cpu/ │ │ │ │ │ ├── ExampleReservoirs_CPU.h │ │ │ │ │ └── ExampleReservoirs_CPU.tpp │ │ │ │ ├── cuda/ │ │ │ │ │ ├── ExampleReservoirs_CUDA.h │ │ │ │ │ └── ExampleReservoirs_CUDA.tcu │ │ │ │ ├── interface/ │ │ │ │ │ ├── ExampleReservoirs.h │ │ │ │ │ └── ExampleReservoirs.tpp │ │ │ │ └── shared/ │ │ │ │ └── ExampleReservoirs_Shared.h │ │ │ ├── scoreforests/ │ │ │ │ ├── Keypoint3DColourCluster.h │ │ │ │ └── ScorePrediction.h │ │ │ └── util/ │ │ │ └── Array.h │ │ └── src/ │ │ ├── CPUInstantiations.cpp │ │ ├── CUDAInstantiations.cu │ │ ├── features/ │ │ │ └── FeatureCalculatorFactory.cpp │ │ ├── numbers/ │ │ │ └── CPURNG.cpp │ │ ├── ransac/ │ │ │ ├── PreemptiveRansacFactory.cpp │ │ │ ├── cpu/ │ │ │ │ └── PreemptiveRansac_CPU.cpp │ │ │ ├── cuda/ │ │ │ │ └── PreemptiveRansac_CUDA.cu │ │ │ └── interface/ │ │ │ └── PreemptiveRansac.cpp │ │ └── relocalisation/ │ │ ├── ScoreRelocaliserFactory.cpp │ │ ├── base/ │ │ │ └── ScoreRelocaliserState.cpp │ │ ├── cpu/ │ │ │ ├── ScoreForestRelocaliser_CPU.cpp │ │ │ ├── ScoreGTRelocaliser_CPU.cpp │ │ │ └── ScoreNetRelocaliser_CPU.cpp │ │ ├── cuda/ │ │ │ ├── ScoreForestRelocaliser_CUDA.cu │ │ │ ├── ScoreGTRelocaliser_CUDA.cu │ │ │ └── ScoreNetRelocaliser_CUDA.cu │ │ └── interface/ │ │ ├── ScoreForestRelocaliser.cpp │ │ ├── ScoreGTRelocaliser.cpp │ │ ├── ScoreNetRelocaliser.cpp │ │ └── ScoreRelocaliser.cpp │ ├── infermous/ │ │ ├── CMakeLists.txt │ │ ├── include/ │ │ │ └── infermous/ │ │ │ ├── base/ │ │ │ │ ├── CRF2D.h │ │ │ │ ├── CRFUtil.h │ │ │ │ ├── Grids.h │ │ │ │ └── PairwisePotentialCalculator.h │ │ │ └── engines/ │ │ │ └── MeanFieldInferenceEngine.h │ │ └── src/ │ │ └── Dummy.cpp │ ├── itmx/ │ │ ├── CMakeLists.txt │ │ ├── include/ │ │ │ └── itmx/ │ │ │ ├── base/ │ │ │ │ ├── ITMObjectPtrTypes.h │ │ │ │ └── Settings.h │ │ │ ├── graphviz/ │ │ │ │ └── GraphVisualiser.h │ │ │ ├── imagesources/ │ │ │ │ ├── AsyncImageSourceEngine.h │ │ │ │ ├── DepthCorruptingImageSourceEngine.h │ │ │ │ ├── RemoteImageSourceEngine.h │ │ │ │ ├── SemanticMaskingImageSourceEngine.h │ │ │ │ ├── SingleRGBDImagePipe.h │ │ │ │ └── ZedImageSourceEngine.h │ │ │ ├── ocv/ │ │ │ │ └── OpenCVUtil.h │ │ │ ├── picking/ │ │ │ │ ├── PickerFactory.h │ │ │ │ ├── cpu/ │ │ │ │ │ └── Picker_CPU.h │ │ │ │ ├── cuda/ │ │ │ │ │ └── Picker_CUDA.h │ │ │ │ ├── interface/ │ │ │ │ │ └── Picker.h │ │ │ │ └── shared/ │ │ │ │ └── Picker_Shared.h │ │ │ ├── relocalisation/ │ │ │ │ ├── FernRelocaliser.h │ │ │ │ ├── ICPRefiningRelocaliser.h │ │ │ │ └── ICPRefiningRelocaliser.tpp │ │ │ ├── remotemapping/ │ │ │ │ ├── BaseRGBDFrameMessage.h │ │ │ │ ├── CompressedRGBDFrameHeaderMessage.h │ │ │ │ ├── CompressedRGBDFrameMessage.h │ │ │ │ ├── DepthCompressionType.h │ │ │ │ ├── InteractionTypeMessage.h │ │ │ │ ├── MappingClient.h │ │ │ │ ├── MappingClientHandler.h │ │ │ │ ├── MappingMessage.h │ │ │ │ ├── MappingServer.h │ │ │ │ ├── RGBCompressionType.h │ │ │ │ ├── RGBDCalibrationMessage.h │ │ │ │ ├── RGBDFrameCompressor.h │ │ │ │ ├── RGBDFrameMessage.h │ │ │ │ └── RenderingRequestMessage.h │ │ │ ├── trackers/ │ │ │ │ ├── FallibleTracker.h │ │ │ │ ├── GlobalTracker.h │ │ │ │ ├── RemoteTracker.h │ │ │ │ ├── RiftTracker.h │ │ │ │ ├── TrackerFactory.h │ │ │ │ ├── ViconTracker.h │ │ │ │ └── ZedTracker.h │ │ │ ├── util/ │ │ │ │ ├── CameraPoseConverter.h │ │ │ │ ├── ColourConversion_Shared.h │ │ │ │ ├── RGBDUtil.h │ │ │ │ ├── ViconInterface.h │ │ │ │ └── ZedCamera.h │ │ │ └── visualisation/ │ │ │ ├── DepthVisualisationUtil.h │ │ │ ├── DepthVisualisationUtil.tpp │ │ │ ├── DepthVisualiserFactory.h │ │ │ ├── cpu/ │ │ │ │ └── DepthVisualiser_CPU.h │ │ │ ├── cuda/ │ │ │ │ └── DepthVisualiser_CUDA.h │ │ │ ├── interface/ │ │ │ │ └── DepthVisualiser.h │ │ │ └── shared/ │ │ │ └── DepthVisualiser_Shared.h │ │ └── src/ │ │ ├── graphviz/ │ │ │ └── GraphVisualiser.cpp │ │ ├── imagesources/ │ │ │ ├── AsyncImageSourceEngine.cpp │ │ │ ├── DepthCorruptingImageSourceEngine.cpp │ │ │ ├── RemoteImageSourceEngine.cpp │ │ │ ├── SemanticMaskingImageSourceEngine.cpp │ │ │ ├── SingleRGBDImagePipe.cpp │ │ │ └── ZedImageSourceEngine.cpp │ │ ├── ocv/ │ │ │ └── OpenCVUtil.cpp │ │ ├── picking/ │ │ │ ├── PickerFactory.cpp │ │ │ ├── cpu/ │ │ │ │ └── Picker_CPU.cpp │ │ │ └── cuda/ │ │ │ └── Picker_CUDA.cu │ │ ├── relocalisation/ │ │ │ └── FernRelocaliser.cpp │ │ ├── remotemapping/ │ │ │ ├── BaseRGBDFrameMessage.cpp │ │ │ ├── CompressedRGBDFrameHeaderMessage.cpp │ │ │ ├── CompressedRGBDFrameMessage.cpp │ │ │ ├── MappingClient.cpp │ │ │ ├── MappingClientHandler.cpp │ │ │ ├── MappingMessage.cpp │ │ │ ├── MappingServer.cpp │ │ │ ├── RGBDCalibrationMessage.cpp │ │ │ ├── RGBDFrameCompressor.cpp │ │ │ ├── RGBDFrameMessage.cpp │ │ │ └── RenderingRequestMessage.cpp │ │ ├── trackers/ │ │ │ ├── GlobalTracker.cpp │ │ │ ├── RemoteTracker.cpp │ │ │ ├── RiftTracker.cpp │ │ │ ├── TrackerFactory.cpp │ │ │ ├── ViconTracker.cpp │ │ │ └── ZedTracker.cpp │ │ ├── util/ │ │ │ ├── CameraPoseConverter.cpp │ │ │ ├── RGBDUtil.cpp │ │ │ ├── ViconInterface.cpp │ │ │ └── ZedCamera.cpp │ │ └── visualisation/ │ │ ├── DepthVisualiserFactory.cpp │ │ ├── cpu/ │ │ │ └── DepthVisualiser_CPU.cpp │ │ └── cuda/ │ │ └── DepthVisualiser_CUDA.cu │ ├── oglx/ │ │ ├── CMakeLists.txt │ │ ├── include/ │ │ │ └── oglx/ │ │ │ ├── FrameBuffer.h │ │ │ ├── OpenGLUtil.h │ │ │ ├── QuadricRenderer.h │ │ │ ├── WrappedGL.h │ │ │ └── WrappedGLUT.h │ │ └── src/ │ │ ├── FrameBuffer.cpp │ │ ├── OpenGLUtil.cpp │ │ └── QuadricRenderer.cpp │ ├── orx/ │ │ ├── CMakeLists.txt │ │ ├── include/ │ │ │ └── orx/ │ │ │ ├── base/ │ │ │ │ ├── MemoryBlockFactory.h │ │ │ │ ├── ORImagePtrTypes.h │ │ │ │ └── ORMemoryBlockPtrTypes.h │ │ │ ├── geometry/ │ │ │ │ ├── DualNumber.h │ │ │ │ ├── DualQuaternion.h │ │ │ │ ├── GeometryUtil.h │ │ │ │ └── Screw.h │ │ │ ├── persistence/ │ │ │ │ ├── ImagePersister.h │ │ │ │ └── PosePersister.h │ │ │ └── relocalisation/ │ │ │ ├── BackgroundRelocaliser.h │ │ │ ├── CascadeRelocaliser.h │ │ │ ├── EnsembleRelocaliser.h │ │ │ ├── NullRelocaliser.h │ │ │ ├── RefiningRelocaliser.h │ │ │ └── Relocaliser.h │ │ └── src/ │ │ ├── base/ │ │ │ └── MemoryBlockFactory.cpp │ │ ├── geometry/ │ │ │ └── GeometryUtil.cpp │ │ ├── persistence/ │ │ │ ├── ImagePersister.cpp │ │ │ └── PosePersister.cpp │ │ └── relocalisation/ │ │ ├── BackgroundRelocaliser.cpp │ │ ├── CascadeRelocaliser.cpp │ │ ├── EnsembleRelocaliser.cpp │ │ ├── NullRelocaliser.cpp │ │ ├── RefiningRelocaliser.cpp │ │ └── Relocaliser.cpp │ ├── rafl/ │ │ ├── CMakeLists.txt │ │ ├── README.txt │ │ ├── include/ │ │ │ └── rafl/ │ │ │ ├── base/ │ │ │ │ └── Descriptor.h │ │ │ ├── choppers/ │ │ │ │ ├── CyclicTreeChopper.h │ │ │ │ ├── HeightLimitingTreeChopper.h │ │ │ │ ├── RandomTreeChopper.h │ │ │ │ ├── TimeBasedTreeChopper.h │ │ │ │ └── TreeChopper.h │ │ │ ├── core/ │ │ │ │ ├── DecisionTree.h │ │ │ │ └── RandomForest.h │ │ │ ├── decisionfunctions/ │ │ │ │ ├── CompositeDecisionFunctionGenerator.h │ │ │ │ ├── DecisionFunction.h │ │ │ │ ├── DecisionFunctionGenerator.h │ │ │ │ ├── DecisionFunctionGeneratorFactory.h │ │ │ │ ├── FeatureBasedDecisionFunctionGenerator.h │ │ │ │ ├── FeatureThresholdingDecisionFunction.h │ │ │ │ ├── FeatureThresholdingDecisionFunctionGenerator.h │ │ │ │ ├── PairwiseOpAndThresholdDecisionFunction.h │ │ │ │ └── PairwiseOpAndThresholdDecisionFunctionGenerator.h │ │ │ └── examples/ │ │ │ ├── Example.h │ │ │ ├── ExampleReservoir.h │ │ │ ├── ExampleUtil.h │ │ │ └── UnitCircleExampleGenerator.h │ │ └── src/ │ │ └── decisionfunctions/ │ │ ├── FeatureThresholdingDecisionFunction.cpp │ │ └── PairwiseOpAndThresholdDecisionFunction.cpp │ ├── raflevaluation/ │ │ ├── CMakeLists.txt │ │ ├── include/ │ │ │ └── raflevaluation/ │ │ │ └── RandomForestEvaluator.h │ │ └── src/ │ │ └── Dummy.cpp │ ├── rigging/ │ │ ├── CMakeLists.txt │ │ ├── include/ │ │ │ └── rigging/ │ │ │ ├── Camera.h │ │ │ ├── CompositeCamera.h │ │ │ ├── DerivedCamera.h │ │ │ ├── MoveableCamera.h │ │ │ └── SimpleCamera.h │ │ └── src/ │ │ ├── CompositeCamera.cpp │ │ ├── DerivedCamera.cpp │ │ └── SimpleCamera.cpp │ ├── spaint/ │ │ ├── CMakeLists.txt │ │ ├── include/ │ │ │ └── spaint/ │ │ │ ├── collaboration/ │ │ │ │ ├── CollaborationMode.h │ │ │ │ ├── CollaborativePoseOptimiser.h │ │ │ │ └── CollaborativeRelocalisation.h │ │ │ ├── features/ │ │ │ │ ├── FeatureCalculatorFactory.h │ │ │ │ ├── cpu/ │ │ │ │ │ └── VOPFeatureCalculator_CPU.h │ │ │ │ ├── cuda/ │ │ │ │ │ └── VOPFeatureCalculator_CUDA.h │ │ │ │ ├── interface/ │ │ │ │ │ ├── FeatureCalculator.h │ │ │ │ │ └── VOPFeatureCalculator.h │ │ │ │ └── shared/ │ │ │ │ └── VOPFeatureCalculator_Shared.h │ │ │ ├── fiducials/ │ │ │ │ ├── ArUcoFiducialDetector.h │ │ │ │ ├── AveragingFiducial.h │ │ │ │ ├── Fiducial.h │ │ │ │ ├── FiducialDetector.h │ │ │ │ ├── FiducialMeasurement.h │ │ │ │ ├── FiducialPoseEstimator.h │ │ │ │ ├── SimpleFiducial.h │ │ │ │ └── ViconFiducialDetector.h │ │ │ ├── imageprocessing/ │ │ │ │ ├── ImageProcessorFactory.h │ │ │ │ ├── MedianFilterer.h │ │ │ │ ├── cpu/ │ │ │ │ │ └── ImageProcessor_CPU.h │ │ │ │ ├── cuda/ │ │ │ │ │ └── ImageProcessor_CUDA.h │ │ │ │ ├── interface/ │ │ │ │ │ └── ImageProcessor.h │ │ │ │ └── shared/ │ │ │ │ └── ImageProcessor_Shared.h │ │ │ ├── markers/ │ │ │ │ ├── VoxelMarkerFactory.h │ │ │ │ ├── cpu/ │ │ │ │ │ └── VoxelMarker_CPU.h │ │ │ │ ├── cuda/ │ │ │ │ │ └── VoxelMarker_CUDA.h │ │ │ │ ├── interface/ │ │ │ │ │ └── VoxelMarker.h │ │ │ │ └── shared/ │ │ │ │ ├── VoxelMarker_Settings.h │ │ │ │ └── VoxelMarker_Shared.h │ │ │ ├── ogl/ │ │ │ │ └── CameraRenderer.h │ │ │ ├── pipelinecomponents/ │ │ │ │ ├── CollaborativeComponent.h │ │ │ │ ├── CollaborativeContext.h │ │ │ │ ├── ObjectSegmentationComponent.h │ │ │ │ ├── ObjectSegmentationContext.h │ │ │ │ ├── PropagationComponent.h │ │ │ │ ├── PropagationContext.h │ │ │ │ ├── SLAMComponent.h │ │ │ │ ├── SLAMContext.h │ │ │ │ ├── SemanticSegmentationComponent.h │ │ │ │ ├── SemanticSegmentationContext.h │ │ │ │ ├── SmoothingComponent.h │ │ │ │ └── SmoothingContext.h │ │ │ ├── propagation/ │ │ │ │ ├── LabelPropagatorFactory.h │ │ │ │ ├── cpu/ │ │ │ │ │ └── LabelPropagator_CPU.h │ │ │ │ ├── cuda/ │ │ │ │ │ └── LabelPropagator_CUDA.h │ │ │ │ ├── interface/ │ │ │ │ │ └── LabelPropagator.h │ │ │ │ └── shared/ │ │ │ │ └── LabelPropagator_Shared.h │ │ │ ├── randomforest/ │ │ │ │ ├── ForestUtil.h │ │ │ │ └── SpaintDecisionFunctionGenerator.h │ │ │ ├── relocalisation/ │ │ │ │ └── RelocaliserFactory.h │ │ │ ├── sampling/ │ │ │ │ ├── VoxelSamplerFactory.h │ │ │ │ ├── cpu/ │ │ │ │ │ ├── PerLabelVoxelSampler_CPU.h │ │ │ │ │ └── UniformVoxelSampler_CPU.h │ │ │ │ ├── cuda/ │ │ │ │ │ ├── PerLabelVoxelSampler_CUDA.h │ │ │ │ │ └── UniformVoxelSampler_CUDA.h │ │ │ │ ├── interface/ │ │ │ │ │ ├── PerLabelVoxelSampler.h │ │ │ │ │ └── UniformVoxelSampler.h │ │ │ │ └── shared/ │ │ │ │ ├── PerLabelVoxelSampler_Shared.h │ │ │ │ └── UniformVoxelSampler_Shared.h │ │ │ ├── segmentation/ │ │ │ │ ├── BackgroundSubtractingObjectSegmenter.h │ │ │ │ ├── ColourAppearanceModel.h │ │ │ │ ├── SegmentationUtil.h │ │ │ │ └── Segmenter.h │ │ │ ├── selectiontransformers/ │ │ │ │ ├── SelectionTransformerFactory.h │ │ │ │ ├── cpu/ │ │ │ │ │ └── VoxelToCubeSelectionTransformer_CPU.h │ │ │ │ ├── cuda/ │ │ │ │ │ └── VoxelToCubeSelectionTransformer_CUDA.h │ │ │ │ ├── interface/ │ │ │ │ │ ├── SelectionTransformer.h │ │ │ │ │ ├── SelectionTransformerVisitor.h │ │ │ │ │ └── VoxelToCubeSelectionTransformer.h │ │ │ │ └── shared/ │ │ │ │ └── VoxelToCubeSelectionTransformer_Shared.h │ │ │ ├── selectors/ │ │ │ │ ├── LeapSelector.h │ │ │ │ ├── NullSelector.h │ │ │ │ ├── PickingSelector.h │ │ │ │ ├── Selector.h │ │ │ │ ├── SelectorVisitor.h │ │ │ │ └── TouchSelector.h │ │ │ ├── slamstate/ │ │ │ │ └── SLAMState.h │ │ │ ├── smoothing/ │ │ │ │ ├── LabelSmootherFactory.h │ │ │ │ ├── cpu/ │ │ │ │ │ └── LabelSmoother_CPU.h │ │ │ │ ├── cuda/ │ │ │ │ │ └── LabelSmoother_CUDA.h │ │ │ │ ├── interface/ │ │ │ │ │ └── LabelSmoother.h │ │ │ │ └── shared/ │ │ │ │ └── LabelSmoother_Shared.h │ │ │ ├── touch/ │ │ │ │ ├── TouchDescriptorCalculator.h │ │ │ │ ├── TouchDetector.h │ │ │ │ └── TouchSettings.h │ │ │ ├── util/ │ │ │ │ ├── CameraFactory.h │ │ │ │ ├── LabelManager.h │ │ │ │ ├── SpaintSurfel.h │ │ │ │ ├── SpaintSurfelScene.h │ │ │ │ ├── SpaintVoxel.h │ │ │ │ └── SpaintVoxelScene.h │ │ │ └── visualisation/ │ │ │ ├── SemanticVisualiserFactory.h │ │ │ ├── VisualisationGenerator.h │ │ │ ├── cpu/ │ │ │ │ └── SemanticVisualiser_CPU.h │ │ │ ├── cuda/ │ │ │ │ └── SemanticVisualiser_CUDA.h │ │ │ ├── interface/ │ │ │ │ └── SemanticVisualiser.h │ │ │ └── shared/ │ │ │ ├── SemanticVisualiser_Settings.h │ │ │ └── SemanticVisualiser_Shared.h │ │ └── src/ │ │ ├── collaboration/ │ │ │ └── CollaborativePoseOptimiser.cpp │ │ ├── features/ │ │ │ ├── FeatureCalculatorFactory.cpp │ │ │ ├── cpu/ │ │ │ │ └── VOPFeatureCalculator_CPU.cpp │ │ │ ├── cuda/ │ │ │ │ └── VOPFeatureCalculator_CUDA.cu │ │ │ └── interface/ │ │ │ └── VOPFeatureCalculator.cpp │ │ ├── fiducials/ │ │ │ ├── ArUcoFiducialDetector.cpp │ │ │ ├── AveragingFiducial.cpp │ │ │ ├── Fiducial.cpp │ │ │ ├── FiducialDetector.cpp │ │ │ ├── FiducialMeasurement.cpp │ │ │ ├── FiducialPoseEstimator.cpp │ │ │ ├── SimpleFiducial.cpp │ │ │ └── ViconFiducialDetector.cpp │ │ ├── imageprocessing/ │ │ │ ├── ImageProcessorFactory.cpp │ │ │ ├── MedianFilterer.cpp │ │ │ ├── cpu/ │ │ │ │ └── ImageProcessor_CPU.cpp │ │ │ ├── cuda/ │ │ │ │ └── ImageProcessor_CUDA.cu │ │ │ └── interface/ │ │ │ └── ImageProcessor.cpp │ │ ├── markers/ │ │ │ ├── VoxelMarkerFactory.cpp │ │ │ ├── cpu/ │ │ │ │ └── VoxelMarker_CPU.cpp │ │ │ └── cuda/ │ │ │ └── VoxelMarker_CUDA.cu │ │ ├── ogl/ │ │ │ └── CameraRenderer.cpp │ │ ├── pipelinecomponents/ │ │ │ ├── CollaborativeComponent.cpp │ │ │ ├── CollaborativeContext.cpp │ │ │ ├── ObjectSegmentationComponent.cpp │ │ │ ├── ObjectSegmentationContext.cpp │ │ │ ├── PropagationComponent.cpp │ │ │ ├── SLAMComponent.cpp │ │ │ ├── SLAMContext.cpp │ │ │ ├── SemanticSegmentationComponent.cpp │ │ │ └── SmoothingComponent.cpp │ │ ├── propagation/ │ │ │ ├── LabelPropagatorFactory.cpp │ │ │ ├── cpu/ │ │ │ │ └── LabelPropagator_CPU.cpp │ │ │ ├── cuda/ │ │ │ │ └── LabelPropagator_CUDA.cu │ │ │ └── interface/ │ │ │ └── LabelPropagator.cpp │ │ ├── randomforest/ │ │ │ ├── ForestUtil.cpp │ │ │ └── SpaintDecisionFunctionGenerator.cpp │ │ ├── relocalisation/ │ │ │ └── RelocaliserFactory.cpp │ │ ├── sampling/ │ │ │ ├── VoxelSamplerFactory.cpp │ │ │ ├── cpu/ │ │ │ │ ├── PerLabelVoxelSampler_CPU.cpp │ │ │ │ └── UniformVoxelSampler_CPU.cpp │ │ │ ├── cuda/ │ │ │ │ ├── PerLabelVoxelSampler_CUDA.cu │ │ │ │ └── UniformVoxelSampler_CUDA.cu │ │ │ └── interface/ │ │ │ ├── PerLabelVoxelSampler.cpp │ │ │ └── UniformVoxelSampler.cpp │ │ ├── segmentation/ │ │ │ ├── BackgroundSubtractingObjectSegmenter.cpp │ │ │ ├── ColourAppearanceModel.cpp │ │ │ ├── SegmentationUtil.cpp │ │ │ └── Segmenter.cpp │ │ ├── selectiontransformers/ │ │ │ ├── SelectionTransformerFactory.cpp │ │ │ ├── cpu/ │ │ │ │ └── VoxelToCubeSelectionTransformer_CPU.cpp │ │ │ ├── cuda/ │ │ │ │ └── VoxelToCubeSelectionTransformer_CUDA.cu │ │ │ └── interface/ │ │ │ ├── SelectionTransformer.cpp │ │ │ ├── SelectionTransformerVisitor.cpp │ │ │ └── VoxelToCubeSelectionTransformer.cpp │ │ ├── selectors/ │ │ │ ├── LeapSelector.cpp │ │ │ ├── NullSelector.cpp │ │ │ ├── PickingSelector.cpp │ │ │ ├── SelectorVisitor.cpp │ │ │ └── TouchSelector.cpp │ │ ├── slamstate/ │ │ │ └── SLAMState.cpp │ │ ├── smoothing/ │ │ │ ├── LabelSmootherFactory.cpp │ │ │ ├── cpu/ │ │ │ │ └── LabelSmoother_CPU.cpp │ │ │ ├── cuda/ │ │ │ │ └── LabelSmoother_CUDA.cu │ │ │ └── interface/ │ │ │ └── LabelSmoother.cpp │ │ ├── touch/ │ │ │ ├── TouchDescriptorCalculator.cpp │ │ │ ├── TouchDetector.cpp │ │ │ └── TouchSettings.cpp │ │ ├── util/ │ │ │ └── LabelManager.cpp │ │ └── visualisation/ │ │ ├── SemanticVisualiserFactory.cpp │ │ ├── VisualisationGenerator.cpp │ │ ├── cpu/ │ │ │ └── SemanticVisualiser_CPU.cpp │ │ ├── cuda/ │ │ │ └── SemanticVisualiser_CUDA.cu │ │ └── interface/ │ │ └── SemanticVisualiser.cpp │ ├── tvginput/ │ │ ├── CMakeLists.txt │ │ ├── include/ │ │ │ └── tvginput/ │ │ │ ├── InputState.h │ │ │ ├── JoystickAxis.h │ │ │ ├── JoystickButton.h │ │ │ ├── Keycode.h │ │ │ └── MouseButton.h │ │ └── src/ │ │ └── InputState.cpp │ ├── tvgplot/ │ │ ├── CMakeLists.txt │ │ ├── include/ │ │ │ └── tvgplot/ │ │ │ ├── PaletteGenerator.h │ │ │ └── PlotWindow.h │ │ └── src/ │ │ ├── PaletteGenerator.cpp │ │ └── PlotWindow.cpp │ └── tvgutil/ │ ├── CMakeLists.txt │ ├── include/ │ │ └── tvgutil/ │ │ ├── boost/ │ │ │ └── WrappedAsio.h │ │ ├── commands/ │ │ │ ├── Command.h │ │ │ ├── CommandManager.h │ │ │ ├── NoOpCommand.h │ │ │ └── SeqCommand.h │ │ ├── containers/ │ │ │ ├── LimitedContainer.h │ │ │ ├── MapUtil.h │ │ │ ├── PooledQueue.h │ │ │ └── PriorityQueue.h │ │ ├── filesystem/ │ │ │ ├── FilesystemUtil.h │ │ │ ├── PathFinder.h │ │ │ └── SequentialPathGenerator.h │ │ ├── misc/ │ │ │ ├── ArgUtil.h │ │ │ ├── ConversionUtil.h │ │ │ ├── ExclusiveHandle.h │ │ │ ├── IDAllocator.h │ │ │ ├── SettingsContainer.h │ │ │ └── ThreadPool.h │ │ ├── net/ │ │ │ ├── AckMessage.h │ │ │ ├── ClientHandler.h │ │ │ ├── Message.h │ │ │ ├── Server.h │ │ │ └── SimpleMessage.h │ │ ├── numbers/ │ │ │ ├── NumberSequenceGenerator.h │ │ │ └── RandomNumberGenerator.h │ │ ├── persistence/ │ │ │ ├── LineUtil.h │ │ │ ├── PropertyUtil.h │ │ │ └── SerializationUtil.h │ │ ├── statistics/ │ │ │ ├── Histogram.h │ │ │ └── ProbabilityMassFunction.h │ │ └── timing/ │ │ ├── AverageTimer.h │ │ ├── TimeUtil.h │ │ └── Timer.h │ └── src/ │ ├── commands/ │ │ ├── Command.cpp │ │ ├── CommandManager.cpp │ │ ├── NoOpCommand.cpp │ │ └── SeqCommand.cpp │ ├── filesystem/ │ │ ├── FilesystemUtil.cpp │ │ ├── PathFinder.cpp │ │ └── SequentialPathGenerator.cpp │ ├── misc/ │ │ ├── IDAllocator.cpp │ │ ├── SettingsContainer.cpp │ │ └── ThreadPool.cpp │ ├── net/ │ │ ├── AckMessage.cpp │ │ ├── ClientHandler.cpp │ │ └── Message.cpp │ ├── numbers/ │ │ └── RandomNumberGenerator.cpp │ └── persistence/ │ ├── LineUtil.cpp │ └── PropertyUtil.cpp ├── pages/ │ └── mainpage.dox ├── require-devenv.sh ├── require-msbuild.sh ├── require-vsdevcmd.sh ├── run-spaintgui.sh ├── spaintdocs ├── tests/ │ ├── CMakeLists.txt │ ├── scratch/ │ │ ├── CMakeLists.txt │ │ ├── alglib/ │ │ │ ├── CMakeLists.txt │ │ │ └── main.cpp │ │ ├── arrayfire/ │ │ │ ├── CMakeLists.txt │ │ │ └── main.cpp │ │ ├── boost/ │ │ │ ├── CMakeLists.txt │ │ │ └── main.cpp │ │ ├── cuda/ │ │ │ ├── CMakeLists.txt │ │ │ ├── main.cpp │ │ │ ├── multiply.cu │ │ │ ├── multiply.cuh │ │ │ ├── test.cu │ │ │ └── test.h │ │ ├── eigen/ │ │ │ ├── CMakeLists.txt │ │ │ └── main.cpp │ │ ├── infermous/ │ │ │ ├── CMakeLists.txt │ │ │ └── main.cpp │ │ ├── infinitam/ │ │ │ ├── CMakeLists.txt │ │ │ └── main.cpp │ │ ├── leap/ │ │ │ ├── CMakeLists.txt │ │ │ └── main.cpp │ │ ├── lodepng/ │ │ │ ├── CMakeLists.txt │ │ │ └── main.cpp │ │ ├── opencv/ │ │ │ ├── CMakeLists.txt │ │ │ └── main.cpp │ │ ├── ovr/ │ │ │ ├── CMakeLists.txt │ │ │ └── main.cpp │ │ ├── rafl/ │ │ │ ├── CMakeLists.txt │ │ │ └── main.cpp │ │ ├── sdl/ │ │ │ ├── CMakeLists.txt │ │ │ └── main.cpp │ │ ├── tbb/ │ │ │ ├── CMakeLists.txt │ │ │ └── main.cpp │ │ ├── tvgutil/ │ │ │ ├── CMakeLists.txt │ │ │ └── main.cpp │ │ ├── vicon/ │ │ │ ├── CMakeLists.txt │ │ │ └── main.cpp │ │ ├── voice/ │ │ │ ├── CMakeLists.txt │ │ │ └── main.cpp │ │ └── zed/ │ │ ├── CMakeLists.txt │ │ └── main.cpp │ └── unit/ │ ├── CMakeLists.txt │ ├── evaluation/ │ │ ├── CMakeLists.txt │ │ ├── test_CartesianProductParameterSetGenerator.cpp │ │ ├── test_ConfusionMatrixUtil.cpp │ │ ├── test_CoordinateDescentParameterOptimiser.cpp │ │ ├── test_CrossValidationSplitGenerator.cpp │ │ ├── test_PerformanceMeasureUtil.cpp │ │ └── test_RandomPermutationAndDivisionSplitGenerator.cpp │ ├── infermous/ │ │ ├── CMakeLists.txt │ │ └── test_CRFUtil.cpp │ ├── itmx/ │ │ ├── CMakeLists.txt │ │ └── test_ColourConversion.cpp │ ├── orx/ │ │ ├── CMakeLists.txt │ │ ├── HelperFunctions.h │ │ ├── test_DualNumber.cpp │ │ ├── test_DualQuaternion.cpp │ │ └── test_GeometryUtil.cpp │ ├── rafl/ │ │ ├── CMakeLists.txt │ │ └── test_UnitCircleExampleGenerator.cpp │ ├── rigging/ │ │ ├── CMakeLists.txt │ │ └── test_CompositeCamera.cpp │ ├── spaint/ │ │ ├── CMakeLists.txt │ │ └── test_ImageProcessor.cpp │ └── tvgutil/ │ ├── CMakeLists.txt │ ├── test_ArgUtil.cpp │ ├── test_CommandManager.cpp │ ├── test_LimitedContainer.cpp │ ├── test_MapUtil.cpp │ ├── test_PriorityQueue.cpp │ └── test_RandomNumberGenerator.cpp └── update-voice-grammar.sh ================================================ FILE CONTENTS ================================================ ================================================ FILE: .clang-format ================================================ BasedOnStyle: LLVM AccessModifierOffset: -2 AlignAfterOpenBracket: true AlignEscapedNewlinesLeft: false AlignOperands: true AlignTrailingComments: true AllowAllParametersOfDeclarationOnNextLine: true AllowShortBlocksOnASingleLine: false AllowShortCaseLabelsOnASingleLine: false AllowShortFunctionsOnASingleLine: All AllowShortIfStatementsOnASingleLine: true AllowShortLoopsOnASingleLine: true AlwaysBreakAfterDefinitionReturnType: false AlwaysBreakBeforeMultilineStrings: false AlwaysBreakTemplateDeclarations: true BinPackArguments: false BinPackParameters: false BraceWrapping: { AfterClass: true, AfterControlStatement: true, AfterFunction: true, AfterNamespace: false, AfterStruct: true, AfterUnion: true, BeforeCatch: true, BeforeElse: true, } BreakBeforeBinaryOperators: None BreakBeforeBraces: Custom BreakBeforeTernaryOperators: true BreakConstructorInitializersBeforeComma: true ColumnLimit: 120 CommentPragmas: '^ IWYU pragma:' ConstructorInitializerAllOnOneLineOrOnePerLine: true ConstructorInitializerIndentWidth: 2 ContinuationIndentWidth: 4 Cpp11BracedListStyle: true DerivePointerAlignment: false DisableFormat: false ExperimentalAutoDetectBinPacking: false IndentCaseLabels: false IndentWidth: 2 IndentWrappedFunctionNames: true KeepEmptyLinesAtTheStartOfBlocks: true MaxEmptyLinesToKeep: 1 NamespaceIndentation: None ObjCBlockIndentWidth: 2 ObjCSpaceAfterProperty: false ObjCSpaceBeforeProtocolList: true PointerAlignment: Right ReflowComments: true SortIncludes: true SpaceAfterCStyleCast: false SpaceBeforeAssignmentOperators: true SpaceBeforeParens: Never SpaceInEmptyParentheses: false SpacesBeforeTrailingComments: 1 SpacesInAngles: false SpacesInCStyleCastParentheses: false SpacesInContainerLiterals: true SpacesInParentheses: false SpacesInSquareBrackets: false Standard: Cpp11 TabWidth: 2 UseTab: Never ================================================ FILE: .gitignore ================================================ build*/ compile_commands.json docs/ install/ libraries/alglib/ libraries/arrayfire*/ libraries/boost_1_*/ libraries/boost-setup/ libraries/ceres-solver-1.11.0/ libraries/Eigen-3.2.2/ libraries/glew-1.12.0/ libraries/glog-0.3.4/ libraries/lodepng*/ libraries/opencv*/ libraries/SDL2-2.0.*/ libraries/setup/boost_1_58_0/ libraries/tbb43_20150611oss/ libraries/vicon/ libraries/*.log *.tags tags tests/mike/ *.swp # QtCreator CMake CMakeLists.txt.user* # CLion \.idea/ ================================================ FILE: CMakeLists.txt ================================================ ####################################### # Top-level CMakeLists.txt for spaint # ####################################### cmake_minimum_required(VERSION 2.8) PROJECT(spaint) ############################# # Enable C++11 if requested # ############################# INCLUDE(cmake/OfferC++11Support.cmake) ################################# # Add additional compiler flags # ################################# IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-unused-local-typedefs") ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Linux") # If on Mac OS X 10.9 (Mavericks), disable the annoying deprecation warnings (e.g. for GLU). IF(${CMAKE_SYSTEM} MATCHES "Darwin-13.") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations") ENDIF() ######################################### # Specify the default install directory # ######################################### IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) SET(CMAKE_INSTALL_PREFIX ${PROJECT_SOURCE_DIR}/install CACHE PATH "" FORCE) ENDIF() ########################## # Specify subdirectories # ########################## ADD_SUBDIRECTORY(modules) OPTION(BUILD_APPS "Build the applications?" ON) OPTION(BUILD_AUXILIARY_APPS "Build the auxiliary applications?" ON) OPTION(BUILD_EVALUATION_MODULES "Build the evaluation modules?" ON) OPTION(BUILD_GROVE "Build grove?" OFF) OPTION(BUILD_GROVE_APPS "Build the applications associated with grove?" OFF) OPTION(BUILD_INFERMOUS "Build infermous?" OFF) OPTION(BUILD_RAFL_APPS "Build the applications associated with rafl?" OFF) OPTION(BUILD_RELOCVIS "Build relocvis?" OFF) OPTION(BUILD_SPAINT "Build spaint?" ON) OPTION(BUILD_SPAINT_APPS "Build the applications associated with spaint?" ON) OPTION(BUILD_SPAINTGUI_DEBUGHOOKS "Build the debug hooks in spaintgui?" OFF) OPTION(BUILD_TESTS "Build the tests?" ON) IF(BUILD_APPS) ADD_SUBDIRECTORY(apps) ENDIF(BUILD_APPS) IF(BUILD_TESTS) ENABLE_TESTING() ADD_SUBDIRECTORY(tests) ENDIF() ================================================ FILE: LICENCE ================================================ LICENCE SemanticPaint © 2015-2018, Torr Vision Group, The University of Oxford (the "Software") The Software remains the property of the University of Oxford ("the University"). The Software is distributed "AS IS" under this Licence solely for non-commercial use in the hope that it will be useful, but in order that the University as a charitable foundation protects its assets for the benefit of its educational and research purposes, the University makes clear that no condition is made or to be implied, nor is any warranty given or to be implied, as to the accuracy of the Software, or that it will be suitable for any particular purpose or for use under any specific conditions. Furthermore, the University disclaims all responsibility for the use which is made of the Software. It further disclaims any liability for the outcomes arising from using the Software. The Licensee agrees to indemnify the University and hold the University harmless from and against any and all claims, damages and liabilities asserted by third parties (including claims for negligence), which arise directly or indirectly from the use of the Software or the sale of any products based on the Software. No part of the Software may be reproduced, modified, transmitted or transferred in any form or by any means, electronic or mechanical, without the express permission of the University. The permission of the University is not required if the said reproduction, modification, transmission or transference is done without financial return, the conditions of this Licence are imposed upon the receiver of the product, and all original and amended source code is included in any transmitted product. You may be held legally responsible for any copyright infringement that is caused or encouraged by your failure to abide by these terms and conditions. You are not permitted under this Licence to use this Software commercially. Use for which any financial return is received shall be defined as commercial use, and includes: (1) integration of all or part of the source code or the Software into a product for sale or license by or on behalf of Licensee to third parties or (2) use of the Software or any derivative of it for research with the final aim of developing software products for sale or license to a third party or (3) use of the Software or any derivative of it for research with the final aim of developing non-software products for sale or license to a third party, or (4) use of the Software to provide any service to an external organisation for which payment is received. If you are interested in using the Software commercially, please contact Torr Vision Group directly to negotiate a licence. Contact details are: philip.torr@eng.ox.ac.uk. ================================================ FILE: README ================================================ This is the software bundle "SemanticPaint", created by: Stuart Golodetz Michael Sapienza Tommaso Cavallari Nicholas A Lord Julien Valentin Vibhav Vineet Ming-Ming Cheng Anurag Arnab Stephen Hicks Shahram Izadi Philip H S Torr It is built on top of InfiniTAM v3.5, a highly-efficient, open-source 3D reconstruction engine developed by Oxford's Active Vision Group. For more details about InfiniTAM v3.5, please get in touch with one of the following people: Victor Adrian Prisacariu Olaf Kaehler Stuart Golodetz Tommaso Cavallari 1. Building the System ---------------------- 1.1 Overview SemanticPaint builds with CMake 3.8.2 and above on Windows, Ubuntu and Mac OS X. It has been tested on recent versions of all three operating systems, but may require additional work to build on older versions. 1.2 Dependencies SemanticPaint depends on various 3rd party libraries. Some of these are required, in the sense that SemanticPaint will not function without them; others are optional, but skipping them will reduce functionality. Suitable versions of the required dependencies and some of the optional dependencies have been included in the repository, so SemanticPaint should build "out of the box". However, most users will probably want to install the remaining optional libraries in order to enable full functionality. - ArrayFire (version 3.3.2) Status: Optional (needed for touch interaction and median filtering) Default: Disabled Flag: WITH_ARRAYFIRE - Boost (version 1.58.0) Status: Required - CUDA (version 7.5 or above) Status: Optional (needed for GPU acceleration) Default: Enabled Flag: WITH_CUDA - Eigen (version 3.2.2) Status: Required - GLEW (version 1.12.0) Status: Required on Windows/Ubuntu - InfiniTAM (version 3.5) Status: Required - Leap Motion SDK (version 2.2.1.24116) Status: Optional (needed for experimental Leap Motion support) Default: Disabled Flag: WITH_LEAP - Oculus SDK (version 0.5.0.1) Status: Optional (needed for Oculus Rift support) Default: Disabled Flag: WITH_OVR - OpenCV (version 3.1.0) Status: Optional (needed for feature inspection mode) Default: Disabled Flag: WITH_OPENCV - OpenGL Status: Required - OpenMP Status: Optional, but recommended (needed for faster training/prediction) Default: Disabled Flag: WITH_OPENMP Notes: Doesn't work on Mac OS X - OpenNI (version 2) Status: Optional, but recommended (needed for live reconstruction) Default: Disabled Flag: WITH_OPENNI - SDL (version 2-2.0.7) Status: Required - Vicon SDK Status: Optional (needed for the Vicon tracker) Default: Disabled Flag: WITH_VICON 1.3 Build Process Common steps on all platforms: a) Choose a root directory, hereafter referred to as . b) Clone the InfiniTAM repository into /InfiniTAM. c) Build the infinitam_v3.5 branch of InfiniTAM using CMake (using /InfiniTAM/InfiniTAM/build as your build directory). d) Clone SemanticPaint into /spaint, e.g. $ git clone git@github.com:torrvision/spaint.git spaint e) Change to the spaint directory: $ cd spaint 1.3.1 Build Process (Windows) f) Using a Bash shell (e.g. Git Bash, provided with msysgit), run the top-level build script, e.g. for VS2013: $ ./build-win.sh 12 Release g) Run the CMake GUI and specify /spaint/build as the build directory. h) Enable any optional libraries you want and supply the paths. i) Reconfigure and regenerate the Visual Studio solution. j) Build with the optional libraries enabled (just run the above build command again). 1.3.2 Build Process (Unix) f) Run the top-level build script: $ ./build-nix.sh "Unix Makefiles" Release g) Change to the build directory and run ccmake: $ cd build $ ccmake .. h) Enable any optional libraries you want and supply the paths. i) Reconfigure and regenerate the makefile. j) Build with the optional libraries enabled, e.g. $ make -j4 2. Running the System --------------------- The build process will build various applications, libraries and test programs in /build. The main application can be found at: /build/bin/apps/spaintgui/spaintgui It can be run "out of the box" from any working directory for live reconstruction, provided you have built with OpenNI support. If you want to reconstruct from data stored on disk (e.g. the Teddy sequence that is used in InfiniTAM), you can call the application as follows: $ ./spaintgui -c /Teddy/calib.txt -r /Teddy/Frames/%04i.ppm -d /Teddy/Frames/%04i.pgm The arguments specify a text file containing calibration parameters, and masks for the RGB and depth images in the input sequence. Note that spaintgui also supports its own saving/loading of sequences to/from the /build/bin/apps/spaintgui/sequences subdirectory. These can be loaded straightforwardly via: $ ./spaintgui -s 3. Additional Documentation --------------------------- Further details about the original concept for SemanticPaint can be found in the following paper: SemanticPaint: Interactive 3D Labeling and Learning at your Fingertips. ACM Transactions on Graphics, 34(5), August 2015. There is also a technical report that describes this implementation of the SemanticPaint concept: SemanticPaint: A Framework for the Interactive Segmentation of 3D Scenes. arXiv e-print 1510.03727, October 2015. 4. Troubleshooting Tips ----------------------- If you have any trouble with the build, here are some of the likely causes: * The CMake executable is not on your path. * The MSBuild executable is not on your path. (Windows) * The Visual C++ compiler (cl.exe) is not on your path. (Windows) * The latest Visual Studio updates have not been installed. (Windows) * You're using a version of CMake that has a CUDA compilation bug (e.g. an early version of 3.11). Try CMake 3.9 instead. (Windows) * You built Boost other than with the build script (which contains some bug fixes). Please use the build script :) History: 2017-AUG-08: second public release 2015-SEP-26: first public release 2015-JUL-23: initial draft ================================================ FILE: README.md ================================================ # SemanticPaint: A Framework for Interactive, Real-Time 3D Scene Segmentation ![teaser](teaser.png) *Project page:* [http://www.robots.ox.ac.uk/~tvg/projects/SemanticPaint/index.php](http://www.robots.ox.ac.uk/~tvg/projects/SemanticPaint/index.php) This is an open-source, real-time implementation of the interactive *SemanticPaint* system for geometric reconstruction, object-class segmentation and learning of 3D scenes, originally published in [Valentin15]. Using our system, a user can walk into a room wearing a depth camera and a virtual reality headset, and both densely reconstruct the 3D scene [Newcombe11,Niessner13,Kaehler15] and interactively segment the environment into object classes such as 'chair', 'floor' and 'table'. The user interacts *physically* with the real-world scene, touching objects and using voice commands to assign them appropriate labels. These user-generated labels are leveraged by an online random forest-based machine learning algorithm, which is used to predict labels for previously unseen parts of the scene. The entire pipeline runs in real time, and the user stays 'in the loop' throughout the process, receiving immediate feedback about the progress of the labelling and interacting with the scene as necessary to refine the predicted segmentation. This version of the *SemanticPaint* concept was implemented by [Stuart Golodetz](http://research.gxstudios.net) and [Michael Sapienza](http://sites.google.com/site/mikesapi), under the supervision of [Professor Philip Torr](http://www.robots.ox.ac.uk/~tvg). More recently, it has been significantly extended by Tommaso Cavallari, Stuart Golodetz and Nick Lord, with the most significant change being the addition of our [Grove relocaliser](http://www.robots.ox.ac.uk/~tvg/projects/RFAdaptation/index.php), as described in [Cavallari17]. Our framework is built on top of [InfiniTAM v3.5](http://www.robots.ox.ac.uk/~victor/infinitam/index.html), a highly efficient, open-source 3D reconstruction engine developed by Oxford's [Active Vision Group](http://www.robots.ox.ac.uk/OxVisionLib). Anyone interested in InfiniTAM should contact [Victor Adrian Prisacariu](mailto:victor@viprad.net). The original concept for *SemanticPaint* was developed by a large number of people both at the University of Oxford and at Microsoft Research: Julien Valentin, Vibhav Vineet, Ming-Ming Cheng, David Kim, Shahram Izadi, Jamie Shotton, Pushmeet Kohli, Matthias Niessner, Antonio Criminisi and Philip H S Torr. ## Acknowledgements We gratefully acknowledge the help of Julien Valentin, for his help in getting us up to speed with the project, of Victor Adrian Prisacariu and Olaf Kaehler, for implementing the 3D reconstruction engine on which our work is based, without which our work would not be possible, of Anurag Arnab, for his help with the saving and loading of scenes, and of Stephen Hicks and Joram van Rheede, for helping us to exhibit our work at SIGGRAPH 2015. ## Context Scene understanding has many applications both within Computer Vision and beyond, but our primary motivation comes from a project led by [Stephen Hicks](http://www.ndcn.ox.ac.uk/team/stephen-hicks) to build augmented-reality glasses for the partially-sighted. Please read about it [here](http://www.va-st.com/smart-specs/). ## Publications If you build on this framework for your research, please consider citing both our technical report that describes this implementation of the *SemanticPaint* concept, and the original research paper by Valentin *et al.*: ``` @techreport{Golodetz2015, author = {Stuart Golodetz* and Michael Sapienza* and Julien P C Valentin and Vibhav Vineet and Ming-Ming Cheng and Anurag Arnab and Victor A Prisacariu and Olaf K{\"a}hler and Carl Yuheng Ren and David W Murray and Shahram Izadi and Philip H S Torr}, title = {{SemanticPaint: A Framework for the Interactive Segmentation of 3D Scenes}}, institution = {Department of Engineering Science, University of Oxford}, number = {TVG-2015-1}, note = {Released as arXiv e-print 1510.03727}, month = {October}, year = {2015} } ``` ``` @article{Valentin2015, author = {Julien Valentin and Vibhav Vineet and Ming-Ming Cheng and David Kim and Jamie Shotton and Pushmeet Kohli and Matthias Niessner and Antonio Criminisi and Shahram Izadi and Philip H S Torr}, title = {{SemanticPaint: Interactive 3D Labeling and Learning at your Fingertips}}, journal = {ACM Transactions on Graphics}, volume = {34}, number = {5}, year = {2015} } ``` If you make use of or build on our Grove relocaliser, please consider citing: ``` @inproceedings{Cavallari2017, author = {Tommaso Cavallari and Stuart Golodetz* and Nicholas A Lord* and Julien Valentin and Luigi Di Stefano and Philip H S Torr}, title = {{On-the-Fly Adaptation of Regression Forests for Online Camera Relocalisation}}, booktitle = {Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR)}, year = {2017} } @article{Cavallari2019PAMI, author = {Tommaso Cavallari* and Stuart Golodetz* and Nicholas A Lord* and Julien Valentin* and Victor A Prisacariu and Luigi Di Stefano and Philip H S Torr}, title = {{Real-Time RGB-D Camera Pose Estimation in Novel Scenes using a Relocalisation Cascade}}, journal = {IEEE Transactions on Pattern Analysis and Machine Intelligence}, volume = {Early Access}, year = {2019} } @inproceedings{Cavallari20193DV, author = {Tommaso Cavallari* and Luca Bertinetto and Jishnu Mukhoti and Philip Torr and Stuart Golodetz*}, title = {{Let's Take This Online: Adapting Scene Coordinate Regression Network Predictions for Online RGB-D Camera Relocalisation}}, booktitle = {Proceedings of the International Conference on 3D Vision (3DV)}, year = {2019} } ``` If you make use of or build on our Collaborative SLAM approach, please consider citing: ``` @article{Golodetz2018, author = {Stuart Golodetz* and Tommaso Cavallari* and Nicholas A Lord* and Victor A Prisacariu and David W Murray and Philip H S Torr}, title = {{Collaborative Large-Scale Dense 3D Reconstruction with Online Inter-Agent Pose Optimisation}}, journal = {IEEE Transactions on Visualization and Computer Graphics}, volume = {24}, number = {11}, pages = {2895-2905}, month = {November}, year = {2018} } ``` # Installation Guide ## 1. Building the System ### 1.1 Overview SemanticPaint builds with CMake 3.8.2 and above on Windows, Ubuntu and Mac OS X. It has been tested on recent versions of all three operating systems, but may require additional work to build on older versions. ### 1.2 Dependencies SemanticPaint depends on various 3rd party libraries. Some of these are required, in the sense that SemanticPaint will not function without them; others are optional, but skipping them will reduce functionality. Suitable versions of the required dependencies and some of the optional dependencies have been included in the repository, so SemanticPaint should build "out of the box". However, most users will probably want to install the remaining optional libraries in order to enable full functionality. ``` - ArrayFire (version 3.3.2) Status: Optional (needed for touch interaction and median filtering) Default: Disabled Flag: WITH_ARRAYFIRE - Boost (version 1.58.0) Status: Required - CUDA (version 7.5 or above) Status: Optional (needed for GPU acceleration) Default: Enabled Flag: WITH_CUDA - Eigen (version 3.2.2) Status: Required - GLEW (version 1.12.0) Status: Required on Windows/Ubuntu - InfiniTAM (version 3.5) Status: Required - Leap Motion SDK (version 2.2.1.24116) Status: Optional (needed for experimental Leap Motion support) Default: Disabled Flag: WITH_LEAP - Oculus SDK (version 0.5.0.1) Status: Optional (needed for Oculus Rift support) Default: Disabled Flag: WITH_OVR - OpenCV (version 3.1.0) Status: Optional (needed for feature inspection mode) Default: Disabled Flag: WITH_OPENCV - OpenGL Status: Required - OpenMP Status: Optional, but recommended (needed for faster training/prediction) Default: Disabled Flag: WITH_OPENMP Notes: Doesn't work on Mac OS X - OpenNI (version 2) Status: Optional, but recommended (needed for live reconstruction) Default: Disabled Flag: WITH_OPENNI - SDL (version 2-2.0.7) Status: Required - Vicon SDK Status: Optional (needed for the Vicon tracker) Default: Disabled Flag: WITH_VICON ``` ### 1.3 Build Process Common steps on all platforms: 1. Choose a root directory, hereafter referred to as ``. 2. Clone the InfiniTAM repository into `/InfiniTAM`. 3. Build the infinitam_v3.5 branch of InfiniTAM using CMake (using `/InfiniTAM/InfiniTAM/build` as your build directory). 4. Clone SemanticPaint into `/spaint`, e.g. ``` $ git clone git@github.com:torrvision/spaint.git spaint ``` 5. Change to the spaint directory: ``` $ cd spaint ``` #### 1.3.1 Build Process (Windows) 1. Using a Bash shell (e.g. Git Bash, provided with msysgit), run the top-level build script, e.g. for VS2013: ``` $ ./build-win.sh 12 Release ``` 2. Run the CMake GUI and specify `/spaint/build` as the build directory. 3. Enable any optional libraries you want and supply the paths. 4. Reconfigure and regenerate the Visual Studio solution. 5. Build with the optional libraries enabled (just run the above build command again). #### 1.3.2 Build Process (Unix) 1. Run the top-level build script: ``` $ ./build-nix.sh "Unix Makefiles" Release ``` 2. Change to the build directory and run ccmake: ``` $ cd build ``` ``` $ ccmake .. ``` 3. Enable any optional libraries you want and supply the paths. 4. Reconfigure and regenerate the makefile. 5. Build with the optional libraries enabled, e.g. ``` $ make -j4 ``` ## 2. Running the System The build process will build various applications, libraries and test programs in `/build`. The main application can be found at: ``` /build/bin/apps/spaintgui/spaintgui ``` It can be run "out of the box" from any working directory for live reconstruction, provided you have built with OpenNI support. If you want to reconstruct from data stored on disk (e.g. the Teddy sequence that is used in InfiniTAM), you can call the application as follows: ``` $ ./spaintgui -c Teddy/calib.txt -r Teddy/Frames/%04i.ppm -d Teddy/Frames/%04i.pgm ``` The arguments specify a text file containing calibration parameters, and masks for the RGB and depth images in the input sequence. Note that spaintgui also supports its own saving/loading of sequences to/from the `/build/bin/apps/spaintgui/sequences` subdirectory. These can be loaded straightforwardly via: ``` $ ./spaintgui -s ``` ## 3. Troubleshooting Tips If you have any trouble with the build, here are some of the likely causes: * The CMake executable is not on your path. * The MSBuild executable is not on your path. (Windows) * The Visual C++ compiler (cl.exe) is not on your path. (Windows) * The latest Visual Studio updates have not been installed. (Windows) * You're using a version of CMake that has a CUDA compilation bug (e.g. an early version of 3.11). Try CMake 3.9 instead. (Windows) * You built Boost other than with the build script (which contains some bug fixes). Please use the build script :) # Licence SemanticPaint © 2015-2018, Torr Vision Group, The University of Oxford (the "Software") The Software remains the property of the University of Oxford ("the University"). The Software is distributed "AS IS" under this Licence solely for non-commercial use in the hope that it will be useful, but in order that the University as a charitable foundation protects its assets for the benefit of its educational and research purposes, the University makes clear that no condition is made or to be implied, nor is any warranty given or to be implied, as to the accuracy of the Software, or that it will be suitable for any particular purpose or for use under any specific conditions. Furthermore, the University disclaims all responsibility for the use which is made of the Software. It further disclaims any liability for the outcomes arising from using the Software. The Licensee agrees to indemnify the University and hold the University harmless from and against any and all claims, damages and liabilities asserted by third parties (including claims for negligence), which arise directly or indirectly from the use of the Software or the sale of any products based on the Software. No part of the Software may be reproduced, modified, transmitted or transferred in any form or by any means, electronic or mechanical, without the express permission of the University. The permission of the University is not required if the said reproduction, modification, transmission or transference is done without financial return, the conditions of this Licence are imposed upon the receiver of the product, and all original and amended source code is included in any transmitted product. You may be held legally responsible for any copyright infringement that is caused or encouraged by your failure to abide by these terms and conditions. You are not permitted under this Licence to use this Software commercially. Use for which any financial return is received shall be defined as commercial use, and includes: 1. integration of all or part of the source code or the Software into a product for sale or license by or on behalf of Licensee to third parties or 2. use of the Software or any derivative of it for research with the final aim of developing software products for sale or license to a third party or 3. use of the Software or any derivative of it for research with the final aim of developing non-software products for sale or license to a third party, or 4. use of the Software to provide any service to an external organisation for which payment is received. If you are interested in using the Software commercially, please contact Torr Vision Group directly to negotiate a licence. Contact details are: [philip.torr@eng.ox.ac.uk](mailto:philip.torr@eng.ox.ac.uk). # History * 2018-OCT-17: third public release * 2017-AUG-08: second public release * 2015-SEP-26: first public release * 2015-JUL-23: initial draft # References * [Cavallari17] Tommaso Cavallari, Stuart Golodetz*, Nicholas Lord*, Julien Valentin, Luigi Di Stefano and Philip Torr. On-the-Fly Adaptation of Regression Forests for Online Camera Relocalisation. CVPR, 2017. * [Kaehler15] Olaf Kaehler, Victor Adrian Prisacariu, Carl Yuheng Ren, Xin Sun, Philip Torr and David Murray. Very High Frame Rate Volumetric Integration of Depth Images on Mobile Devices. IEEE Transactions on Visualization and Computer Graphics, 21(11), November 2015. * [Newcombe11] Richard Newcombe, Shahram Izadi, Otmar Hilliges, David Molyneaux, David Kim, Andrew Davison, Pushmeet Kohli, Jamie Shotton, Steve Hodges and Andrew Fitzgibbon. KinectFusion: Real-Time Dense Surface Mapping and Tracking. ISMAR, 2011. * [Niessner13] Matthias Niessner, Michael Zollhoefer, Shahram Izadi, and Marc Stamminger. Real-time 3D Reconstruction at Scale using Voxel Hashing. ACM Transactions on Graphics, 32(6):169, 2013. * [Valentin15] Julien Valentin, Vibhav Vineet, Ming-Ming Cheng, David Kim, Shahram Izadi, Jamie Shotton, Pushmeet Kohli, Matthias Niessner, Antonio Criminisi, and Philip H S Torr. SemanticPaint: Interactive 3D Labeling and Learning at your Fingertips. ACM Transactions on Graphics, 34(5), August 2015. ================================================ FILE: apps/CMakeLists.txt ================================================ ################################## # CMakeLists.txt for spaint/apps # ################################## IF(BUILD_AUXILIARY_APPS) ADD_SUBDIRECTORY(combineglobalposes) IF(BUILD_EVALUATION_MODULES AND BUILD_SPAINT AND WITH_ARRAYFIRE AND WITH_OPENCV) ADD_SUBDIRECTORY(touchtrain) ENDIF() IF(BUILD_GROVE AND BUILD_GROVE_APPS) IF(WITH_SCOREFORESTS) ADD_SUBDIRECTORY(relocconverter) ENDIF() IF(WITH_OPENCV) IF(WITH_VTK) ADD_SUBDIRECTORY(forestmodevis) ENDIF() IF(BUILD_RELOCVIS) ADD_SUBDIRECTORY(relocvis) ENDIF() ENDIF() IF(BUILD_EVALUATION_MODULES) IF(WITH_OPENCV) ADD_SUBDIRECTORY(prepare_7scenes) ENDIF() ADD_SUBDIRECTORY(relocicpeval) ADD_SUBDIRECTORY(relocnovelposes) ADD_SUBDIRECTORY(relocopt) ADD_SUBDIRECTORY(relocperf) ENDIF() ENDIF() IF(BUILD_RAFL_APPS) IF(BUILD_EVALUATION_MODULES) ADD_SUBDIRECTORY(raflperf) IF(WITH_OPENCV) ADD_SUBDIRECTORY(raflvis) ENDIF() ENDIF() ENDIF() ENDIF() IF(BUILD_GROVE AND BUILD_GROVE_APPS AND WITH_OPENCV) ADD_SUBDIRECTORY(relocgui) ENDIF() IF(BUILD_SPAINT AND BUILD_SPAINT_APPS) ADD_SUBDIRECTORY(spaintgui) ENDIF() ================================================ FILE: apps/combineglobalposes/CMakeLists.txt ================================================ ############################################## # CMakeLists.txt for apps/combineglobalposes # ############################################## ########################### # Specify the target name # ########################### SET(targetname combineglobalposes) ################################ # Specify the libraries to use # ################################ INCLUDE(${PROJECT_SOURCE_DIR}/cmake/UseBoost.cmake) INCLUDE(${PROJECT_SOURCE_DIR}/cmake/UseEigen.cmake) INCLUDE(${PROJECT_SOURCE_DIR}/cmake/UseInfiniTAM.cmake) INCLUDE(${PROJECT_SOURCE_DIR}/cmake/UseOpenMP.cmake) ############################# # Specify the project files # ############################# ## SET(sources main.cpp ) ############################# # Specify the source groups # ############################# SOURCE_GROUP(sources FILES ${sources}) ########################################## # Specify additional include directories # ########################################## INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/modules/itmx/include) INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/modules/orx/include) INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/modules/spaint/include) INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/modules/tvgutil/include) ########################################## # Specify the target and where to put it # ########################################## INCLUDE(${PROJECT_SOURCE_DIR}/cmake/SetCUDAAppTarget.cmake) ################################# # Specify the libraries to link # ################################# TARGET_LINK_LIBRARIES(${targetname} spaint itmx orx tvgutil) INCLUDE(${PROJECT_SOURCE_DIR}/cmake/LinkBoost.cmake) INCLUDE(${PROJECT_SOURCE_DIR}/cmake/LinkInfiniTAM.cmake) ############################# # Specify things to install # ############################# INCLUDE(${PROJECT_SOURCE_DIR}/cmake/InstallApp.cmake) ================================================ FILE: apps/combineglobalposes/main.cpp ================================================ /** * combineglobalposes: main.cpp * Copyright (c) Torr Vision Group, University of Oxford, 2017. All rights reserved. */ #include #include #include #include using namespace orx; #include using namespace spaint; #include using namespace tvgutil; namespace bf = boost::filesystem; int main(int argc, char *argv[]) { // This application can be used to combine a set of global pose files produced by our collaborative mapping approach. std::vector args(argv, argv + argc); if(args.size() < 4) { std::cout << "Usage: combineglobalposes [ ...]\n"; return EXIT_FAILURE; } // Start a collaborative pose optimiser that aims to find the poses of all scenes relative to the specified primary scene. const std::string primarySceneID = args[1]; CollaborativePoseOptimiser_Ptr poseOptimiser(new CollaborativePoseOptimiser(primarySceneID)); poseOptimiser->start("Output"); // For each global pose file specified: for(int i = 2; i < argc; ++i) { // Determine the path to the file. If the file doesn't exist, print a warning and skip it. bf::path p = find_subdir_from_executable("..") / "spaintgui" / "global_poses" / (args[i] + ".txt"); if(!bf::exists(p)) { std::cout << "Warning: " << p.string() << " not found\n"; continue; } // Otherwise, read in all of the poses from the file, which are specified relative to the file's primary scene. std::cout << "Processing " << p << "\n\n"; std::string filePrimarySceneID; std::vector > fileRelativePoses; std::ifstream fs(p.string().c_str()); std::string id; DualQuatd dq; while(fs >> id >> dq) { std::cout << "Read " << id << ' ' << dq << '\n'; fileRelativePoses.push_back(std::make_pair(id, dq)); // If this scene's pose relative to the file's primary scene is the identity, this is almost certainly the file's primary scene, so record that fact. if(DualQuatd::close(dq, DualQuatd::identity())) { std::cout << "Found file's primary scene: " << id << '\n'; filePrimarySceneID = id; } } std::cout << '\n'; // If we were unable to find the file's primary scene, print a warning and continue to the next global pose file. if(filePrimarySceneID == "") { std::cout << "Warning: Could not find file's primary scene, skipping poses in file\n"; continue; } // Otherwise, add to the pose optimiser a relative transform from the coordinate system of the file's primary scene to that of each non-primary scene in the file. // FIXME: Currently, we are forced to add each relative transform multiple times, since the pose optimiser only works with confident edges. for(size_t i = 0, size = fileRelativePoses.size(); i < size; ++i) { if(fileRelativePoses[i].first == filePrimarySceneID) continue; for(int j = 0; j < CollaborativePoseOptimiser::confidence_threshold(); ++j) { poseOptimiser->add_relative_transform_sample( fileRelativePoses[i].first, filePrimarySceneID, GeometryUtil::dual_quat_to_pose(fileRelativePoses[i].second), CM_BATCH ); } } } // Make sure the pose optimiser finishes running before we exit. The computed poses will be saved to disk automatically when the pose optimiser's destructor runs. boost::this_thread::sleep_for(boost::chrono::seconds(2)); return 0; } ================================================ FILE: apps/forestmodevis/CMakeLists.txt ================================================ #################################### # CMakeLists.txt for apps/relocvis # #################################### ########################### # Specify the target name # ########################### SET(targetname forestmodevis) ################################ # Specify the libraries to use # ################################ INCLUDE(${PROJECT_SOURCE_DIR}/cmake/UseBoost.cmake) INCLUDE(${PROJECT_SOURCE_DIR}/cmake/UseEigen.cmake) INCLUDE(${PROJECT_SOURCE_DIR}/cmake/UseOpenCV.cmake) INCLUDE(${PROJECT_SOURCE_DIR}/cmake/UseOpenMP.cmake) INCLUDE(${PROJECT_SOURCE_DIR}/cmake/UseVTK.cmake) ############################# # Specify the project files # ############################# ## SET(sources main.cpp ) ############################# # Specify the source groups # ############################# SOURCE_GROUP(sources FILES ${sources}) ########################################## # Specify additional include directories # ########################################## INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/modules/tvgutil/include) ########################################## # Specify the target and where to put it # ########################################## INCLUDE(${PROJECT_SOURCE_DIR}/cmake/SetAppTarget.cmake) ################################# # Specify the libraries to link # ################################# TARGET_LINK_LIBRARIES(${targetname} tvgutil) INCLUDE(${PROJECT_SOURCE_DIR}/cmake/LinkBoost.cmake) INCLUDE(${PROJECT_SOURCE_DIR}/cmake/LinkOpenCV.cmake) INCLUDE(${PROJECT_SOURCE_DIR}/cmake/LinkVTK.cmake) ############################# # Specify things to install # ############################# INCLUDE(${PROJECT_SOURCE_DIR}/cmake/InstallApp.cmake) ================================================ FILE: apps/forestmodevis/main.cpp ================================================ /** * forestmodevis: main.cpp * Copyright (c) Torr Vision Group, University of Oxford, 2016. All rights reserved. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "tvgutil/filesystem/PathFinder.h" #include "tvgutil/filesystem/SequentialPathGenerator.h" #include "tvgutil/timing/TimeUtil.h" namespace fs = boost::filesystem; using namespace cv::viz; using namespace tvgutil; static const int NTREES = 5; struct Mode { cv::Vec3f position; cv::Matx33f covariance; }; void readModes(const std::string &modesFile, std::vector> &modes) { modes.clear(); modes.resize(NTREES); std::ifstream inModes(modesFile); for(int treeIdx = 0; treeIdx < NTREES; ++treeIdx) { int nbModes, leafIdx; inModes >> nbModes >> leafIdx; for(int modeIdx = 0; modeIdx < nbModes; ++modeIdx) { int nbInliers; Mode mode; inModes >> nbInliers; for(int i = 0; i < 3; ++i) inModes >> mode.position.val[i]; for(int i = 0; i < 9; ++i) inModes >> mode.covariance.val[i]; modes[treeIdx].push_back(mode); } } } void readExamples(const std::string &examplesFile, std::vector> &examples) { examples.clear(); examples.resize(NTREES); std::ifstream inExamples(examplesFile); for(int treeIdx = 0; treeIdx < NTREES; ++treeIdx) { int nbExamples; inExamples >> nbExamples; // std::cout << examplesFile << " - Nb examples for tree " << treeIdx << ": " << nbExamples << '\n'; for(int exampleIdx = 0; exampleIdx < nbExamples; ++exampleIdx) { cv::Point3d example; inExamples >> example.x >> example.y >> example.z; // std::cout << example << '\n'; examples[treeIdx].push_back(example); } } } class WCovarianceEllipsoid : public Widget3D { public: WCovarianceEllipsoid(const cv::Vec3f &position, const cv::Matx33f &covariance, Color color = Color::white()) { // Compute the transformation parameters cv::Mat eVals; cv::Mat eVecs; cv::eigen(covariance, eVals, eVecs); cv::sqrt(eVals, eVals); auto scalingTransform = Eigen::Scaling(std::sqrt(covariance.val[0]) * 2.0f, std::sqrt(covariance.val[4]) * 2.0f, std::sqrt(covariance.val[8]) * 2.0f); // auto scalingTransform = Eigen::Scaling( // Eigen::Map(eVals.ptr())); auto rotation = Eigen::AngleAxisf(Eigen::Map(eVecs.ptr())); auto translation = Eigen::Translation3f(Eigen::Map(position.val)); Eigen::Affine3f affineTransform = translation * scalingTransform * rotation; // row major Eigen::Matrix4d transformMat = affineTransform.matrix().transpose().cast(); vtkSmartPointer sphereSource = vtkSmartPointer::New(); sphereSource->SetCenter(0.0, 0.0, 0.0); sphereSource->SetPhiResolution(180); sphereSource->SetThetaResolution(360); sphereSource->SetRadius(1.0); vtkSmartPointer transform = vtkSmartPointer::New(); transform->SetMatrix(transformMat.data()); vtkSmartPointer transformFilter = vtkSmartPointer::New(); transformFilter->SetInputConnection(sphereSource->GetOutputPort()); transformFilter->SetTransform(transform); transformFilter->Update(); // Set up the actor to display the transformed polydata vtkSmartPointer transformedMapper = vtkSmartPointer::New(); transformedMapper->SetInputConnection(transformFilter->GetOutputPort()); vtkSmartPointer actor = vtkSmartPointer::New(); actor->SetMapper(transformedMapper); actor->GetProperty()->SetColor(color.val[2] / 255, color.val[1] / 255, color.val[0] / 255); WidgetAccessor::setProp(*this, actor); } }; struct VisualizationCookie { Viz3d *visualizer; std::vector treeColours; std::vector> modesByTree; SequentialPathGenerator *pathGenerator; WMesh *mesh; std::string baseName; std::vector widgetNames; std::string animationModesBaseName; std::string animationExamplesBaseName; }; std::vector drawModes(const std::vector &modes, const std::string &nameBase, const Color &color, Viz3d &visualizer) { std::vector widgetNames; for(size_t modeIdx = 0; modeIdx < modes.size(); ++modeIdx) { const Mode &mode = modes[modeIdx]; const std::string modeName = nameBase + '_' + boost::lexical_cast(modeIdx); widgetNames.push_back(modeName); WCovarianceEllipsoid ellipsoid(mode.position, mode.covariance, color); visualizer.showWidget(modeName, ellipsoid); } return widgetNames; } std::vector drawExamples(const std::vector &examples, const std::string &nameBase, const Color &color, Viz3d &visualizer) { std::vector widgetNames; for(size_t exampleIdx = 0; exampleIdx < examples.size(); ++exampleIdx) { const cv::Point3d &example = examples[exampleIdx]; const std::string exampleName = nameBase + '_' + boost::lexical_cast(exampleIdx); widgetNames.push_back(exampleName); WSphere sphere(example, 0.01, 10, color); visualizer.showWidget(exampleName, sphere); } return widgetNames; } static void vizCallbackSingleModes(const KeyboardEvent &event, void *c) { const VisualizationCookie *cookie = static_cast(c); if(event.action == KeyboardEvent::KEY_UP && event.code == 't') { std::cout << "Saving screenshots from current viewpoint.\n"; Viz3d &visualizer = *cookie->visualizer; // Clean the visualizer for(const auto &x : cookie->widgetNames) { visualizer.removeWidget(x); } for(size_t treeIdx = 2; treeIdx < cookie->modesByTree.size(); ++treeIdx) { std::vector modeNames = drawModes(cookie->modesByTree[treeIdx], "wModes_", cookie->treeColours[treeIdx], visualizer); visualizer.saveScreenshot(cookie->baseName + "_" + boost::lexical_cast(treeIdx) + ".png"); for(const auto &x : modeNames) { visualizer.removeWidget(x); } } } } static void vizCallbackAnimation(const KeyboardEvent &event, void *c) { const VisualizationCookie *cookie = static_cast(c); if(event.action == KeyboardEvent::KEY_UP && event.code == 't') { std::cout << "Saving screenshots from current viewpoint.\n"; Viz3d &visualizer = *cookie->visualizer; // Clean the visualizer for(const auto &x : cookie->widgetNames) { visualizer.removeWidget(x); } fs::path currentModeFileName = cookie->pathGenerator->make_path(cookie->animationModesBaseName); fs::path currentExamplesFileName = cookie->pathGenerator->make_path(cookie->animationExamplesBaseName); while(fs::is_regular_file(currentModeFileName)) { std::vector> currentModes; readModes(currentModeFileName.string(), currentModes); std::vector> currentExamples; readExamples(currentExamplesFileName.string(), currentExamples); for(size_t treeIdx = 2; treeIdx < currentModes.size(); ++treeIdx) { // // Draw modes // { // std::vector modeNames = // drawModes(currentModes[treeIdx], "wModes_", cookie->treeColours[treeIdx], visualizer); // fs::path screenshotPath = cookie->pathGenerator->make_path( // "modes_" + boost::lexical_cast(treeIdx) + '_' + cookie->animationModesBaseName + ".png"); // std::cout << "Saving screenshot: " << screenshotPath << '\n'; // visualizer.saveScreenshot(screenshotPath.string()); // for(const auto &x : modeNames) // { // visualizer.removeWidget(x); // } // } // // Draw examples // { // std::vector exampleNames = drawExamples(currentExamples[treeIdx], "wExamples_", cookie->treeColours[treeIdx], visualizer); // fs::path screenshotPath = cookie->pathGenerator->make_path( // "examples_" + boost::lexical_cast(treeIdx) + '_' + cookie->animationModesBaseName + ".png"); // std::cout << "Saving screenshot: " << screenshotPath << '\n'; // visualizer.saveScreenshot(screenshotPath.string()); // for(const auto &x : exampleNames) // { // visualizer.removeWidget(x); // } // } // Draw combined { std::vector exampleNames = drawExamples(currentExamples[treeIdx], "wExamples_", cookie->treeColours[treeIdx], visualizer); std::vector modeNames = drawModes(currentModes[treeIdx], "wModes_", Color::gold(), visualizer); fs::path screenshotPath = cookie->pathGenerator->make_path( "combined_" + boost::lexical_cast(treeIdx) + '_' + cookie->animationModesBaseName + ".png"); std::cout << "Saving screenshot: " << screenshotPath << '\n'; visualizer.saveScreenshot(screenshotPath.string()); for(const auto &x : exampleNames) { visualizer.removeWidget(x); } for(const auto &x : modeNames) { visualizer.removeWidget(x); } } } cookie->pathGenerator->increment_index(); currentModeFileName = cookie->pathGenerator->make_path(cookie->animationModesBaseName); currentExamplesFileName = cookie->pathGenerator->make_path(cookie->animationExamplesBaseName); } } } int main(int argc, char *argv[]) { if(argc < 3) { std::cout << "Usage: " << argv[0] << " mesh.obj modes.txt\n"; return 1; } const std::string meshFile = argv[1]; const std::string modesFile = argv[2]; VisualizationCookie cookie; if(argc > 3) { cookie.animationModesBaseName = argv[3]; cookie.animationExamplesBaseName = argv[4]; } // Load mesh Mesh mesh = Mesh::load(meshFile, Mesh::LOAD_OBJ); WMesh wMesh(mesh); // Load modes // To visualize Kabsch modes // static const int NTREES = 3; readModes(modesFile, cookie.modesByTree); // Show everything Viz3d visualizer("Modes Visualizer"); visualizer.showWidget("wMesh", wMesh); // std::vector treeColors { Color::red(), Color::green(), Color::blue(), Color::magenta(), Color::cyan() }; cookie.treeColours.push_back(Color::blue()); cookie.treeColours.push_back(Color::green()); cookie.treeColours.push_back(Color::red()); cookie.treeColours.push_back(Color::magenta()); cookie.treeColours.push_back(Color::cyan()); // Here we draw all modes for visualization purpose. static const int INITIAL_TREE = 2; for(int treeIdx = INITIAL_TREE; treeIdx < NTREES; ++treeIdx) { Color color = cookie.treeColours[treeIdx]; for(size_t modeIdx = 0; modeIdx < cookie.modesByTree[treeIdx].size(); ++modeIdx) { const Mode &mode = cookie.modesByTree[treeIdx][modeIdx]; const std::string modeName = "wMode_" + boost::lexical_cast(treeIdx) + '_' + boost::lexical_cast(modeIdx); cookie.widgetNames.push_back(modeName); WCovarianceEllipsoid ellipsoid(mode.position, mode.covariance, color); visualizer.showWidget(modeName, ellipsoid); } } SequentialPathGenerator spg("./clusters"); cookie.visualizer = &visualizer; cookie.pathGenerator = &spg; cookie.mesh = &wMesh; cookie.baseName = fs::path(modesFile).stem().string(); // visualizer.registerKeyboardCallback(vizCallbackSingleModes, &cookie); visualizer.registerKeyboardCallback(vizCallbackAnimation, &cookie); // WCovarianceEllipsoid test(cv::Vec3f(), cv::Matx33f(), Color::bluberry()); // visualizer.showWidget("test", test); visualizer.spin(); return 0; } ================================================ FILE: apps/prepare_7scenes/CMakeLists.txt ================================================ ########################################### # CMakeLists.txt for apps/prepare_7scenes # ########################################### ########################### # Specify the target name # ########################### SET(targetname prepare_7scenes) ################################ # Specify the libraries to use # ################################ INCLUDE(${PROJECT_SOURCE_DIR}/cmake/UseBoost.cmake) INCLUDE(${PROJECT_SOURCE_DIR}/cmake/UseOpenCV.cmake) ############################# # Specify the project files # ############################# ## SET(toplevel_sources main.cpp) SET(toplevel_headers) ################################################################# # Collect the project files into sources, headers and templates # ################################################################# SET(sources ${toplevel_sources} ) SET(headers ${toplevel_headers} ) ############################# # Specify the source groups # ############################# SOURCE_GROUP("" FILES ${toplevel_sources} ${toplevel_headers}) ########################################## # Specify additional include directories # ########################################## INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/modules/tvgutil/include) ########################################## # Specify the target and where to put it # ########################################## INCLUDE(${PROJECT_SOURCE_DIR}/cmake/SetAppTarget.cmake) ################################# # Specify the libraries to link # ################################# TARGET_LINK_LIBRARIES(${targetname} tvgutil) INCLUDE(${PROJECT_SOURCE_DIR}/cmake/LinkBoost.cmake) INCLUDE(${PROJECT_SOURCE_DIR}/cmake/LinkOpenCV.cmake) ############################# # Specify things to install # ############################# INCLUDE(${PROJECT_SOURCE_DIR}/cmake/InstallApp.cmake) ================================================ FILE: apps/prepare_7scenes/main.cpp ================================================ /** * prepare_7scenes: main.cpp * Copyright (c) Torr Vision Group, University of Oxford, 2017. All rights reserved. */ #include #include #include #include #include #include using boost::assign::list_of; #include #include using namespace tvgutil; //#################### NAMESPACE ALIASES #################### namespace bf = boost::filesystem; //#################### FUNCTIONS #################### void copy_rgbd_pose_frame(const SequentialPathGenerator &inputPathGenerator, const SequentialPathGenerator &outputPathGenerator, const std::string &depthMask, const std::string &rgbMask, const std::string &poseMask) { // The colour image can just be copied. bf::copy_file(inputPathGenerator.make_path(rgbMask), outputPathGenerator.make_path(rgbMask)); // Same as the pose file. bf::copy_file(inputPathGenerator.make_path(poseMask), outputPathGenerator.make_path(poseMask)); // The depth image needs extra care (need to set pixels with value == 65535 to 0). cv::Mat depthImage = cv::imread(inputPathGenerator.make_path(depthMask).string(), cv::IMREAD_ANYDEPTH); cv::Mat invalidMask = depthImage == 65535; depthImage.setTo(0, invalidMask); cv::imwrite(outputPathGenerator.make_path(depthMask).string(), depthImage); } void process_splits(const bf::path &sequencePath, const std::vector &splitNames, const bf::path &outputPath, int singleSplitLength, const std::string &depthMask, const std::string &rgbMask, const std::string &poseMask) { SequentialPathGenerator outputPathGenerator(outputPath); for(size_t splitIdx = 0; splitIdx < splitNames.size(); ++splitIdx) { const bf::path splitFolder = sequencePath / splitNames[splitIdx]; SequentialPathGenerator splitPathGenerator(splitFolder); std::cout << "Processing images from: " << splitFolder << '\n'; for(int i = 0; i < singleSplitLength; ++i) { copy_rgbd_pose_frame(splitPathGenerator, outputPathGenerator, depthMask, rgbMask, poseMask); // Increment indices. splitPathGenerator.increment_index(); outputPathGenerator.increment_index(); } } } /** * \brief Outputs the specified error message and terminates the program with the specified exit code. * * \param message The error message. * \param code The exit code. */ void quit(const std::string &message, int code = EXIT_FAILURE) { std::cerr << message << '\n'; exit(code); } //#################### MAIN #################### int main(int argc, char *argv[]) try { if(argc != 2) { quit(std::string("Usage: ") + argv[0] + " 7scenes_root."); } const bf::path datasetRoot = argv[1]; if(!bf::is_directory(datasetRoot)) { quit("The specified root folder does not exist."); } std::cout << "Preparing 7scenes dataset in: " << datasetRoot << '\n'; // Filaname masks. const std::string depthFileMask = "frame-%06d.depth.png"; const std::string poseFileMask = "frame-%06d.pose.txt"; const std::string rgbFileMask = "frame-%06d.color.png"; const std::string trainingFolderName = "train"; const std::string testingFolderName = "test"; // Dataset-specific informations. std::vector sequenceNames = list_of()("chess")("fire")("heads")("office")("pumpkin")("redkitchen")("stairs"); std::vector sequenceSplitLengths = list_of(1000)(1000)(1000)(1000)(1000)(1000)(500); std::map > trainingSplits; std::map > testingSplits; // Chess trainingSplits[sequenceNames[0]].push_back("seq-01"); trainingSplits[sequenceNames[0]].push_back("seq-02"); trainingSplits[sequenceNames[0]].push_back("seq-04"); trainingSplits[sequenceNames[0]].push_back("seq-06"); testingSplits[sequenceNames[0]].push_back("seq-03"); testingSplits[sequenceNames[0]].push_back("seq-05"); // Fire trainingSplits[sequenceNames[1]].push_back("seq-01"); trainingSplits[sequenceNames[1]].push_back("seq-02"); testingSplits[sequenceNames[1]].push_back("seq-03"); testingSplits[sequenceNames[1]].push_back("seq-04"); // Heads trainingSplits[sequenceNames[2]].push_back("seq-02"); testingSplits[sequenceNames[2]].push_back("seq-01"); // Office trainingSplits[sequenceNames[3]].push_back("seq-01"); trainingSplits[sequenceNames[3]].push_back("seq-03"); trainingSplits[sequenceNames[3]].push_back("seq-04"); trainingSplits[sequenceNames[3]].push_back("seq-05"); trainingSplits[sequenceNames[3]].push_back("seq-08"); trainingSplits[sequenceNames[3]].push_back("seq-10"); testingSplits[sequenceNames[3]].push_back("seq-02"); testingSplits[sequenceNames[3]].push_back("seq-06"); testingSplits[sequenceNames[3]].push_back("seq-07"); testingSplits[sequenceNames[3]].push_back("seq-09"); // Pumpkin trainingSplits[sequenceNames[4]].push_back("seq-02"); trainingSplits[sequenceNames[4]].push_back("seq-03"); trainingSplits[sequenceNames[4]].push_back("seq-06"); trainingSplits[sequenceNames[4]].push_back("seq-08"); testingSplits[sequenceNames[4]].push_back("seq-01"); testingSplits[sequenceNames[4]].push_back("seq-07"); // Redkitchen trainingSplits[sequenceNames[5]].push_back("seq-01"); trainingSplits[sequenceNames[5]].push_back("seq-02"); trainingSplits[sequenceNames[5]].push_back("seq-05"); trainingSplits[sequenceNames[5]].push_back("seq-07"); trainingSplits[sequenceNames[5]].push_back("seq-08"); trainingSplits[sequenceNames[5]].push_back("seq-11"); trainingSplits[sequenceNames[5]].push_back("seq-13"); testingSplits[sequenceNames[5]].push_back("seq-03"); testingSplits[sequenceNames[5]].push_back("seq-04"); testingSplits[sequenceNames[5]].push_back("seq-06"); testingSplits[sequenceNames[5]].push_back("seq-12"); testingSplits[sequenceNames[5]].push_back("seq-14"); // Stairs trainingSplits[sequenceNames[6]].push_back("seq-02"); trainingSplits[sequenceNames[6]].push_back("seq-03"); trainingSplits[sequenceNames[6]].push_back("seq-05"); trainingSplits[sequenceNames[6]].push_back("seq-06"); testingSplits[sequenceNames[6]].push_back("seq-01"); testingSplits[sequenceNames[6]].push_back("seq-04"); // First of all, check that every folder exists and create training and testing subfolders. for(size_t sequenceIdx = 0; sequenceIdx < sequenceNames.size(); ++sequenceIdx) { const std::string &sequenceName = sequenceNames[sequenceIdx]; const bf::path sequenceRoot = datasetRoot / sequenceName; std::cout << "Checking folder structure for sequence " << sequenceName << " in: " << sequenceRoot << '\n'; // Check for the root. if(!bf::is_directory(sequenceRoot)) { quit(sequenceRoot.string() + " does not exist."); } // Check for the subfolders. const std::vector &sequenceTrainingSplits = trainingSplits[sequenceName]; for(size_t splitIdx = 0; splitIdx < sequenceTrainingSplits.size(); ++splitIdx) { const bf::path splitFolder = sequenceRoot / sequenceTrainingSplits[splitIdx]; if(!bf::is_directory(splitFolder)) { quit(splitFolder.string() + " does not exist."); } } const std::vector &sequenceTestingSplits = testingSplits[sequenceName]; for(size_t splitIdx = 0; splitIdx < sequenceTestingSplits.size(); ++splitIdx) { const bf::path splitFolder = sequenceRoot / sequenceTestingSplits[splitIdx]; if(!bf::is_directory(splitFolder)) { quit(splitFolder.string() + " does not exist."); } } // Create train and test subfolders. std::cout << "Creating train and test subfolders.\n"; bf::create_directory(sequenceRoot / trainingFolderName); bf::create_directory(sequenceRoot / testingFolderName); } // Create calibration file. const std::string calibrationFile = "calib.txt"; const bf::path calibrationFileName = datasetRoot / calibrationFile; { std::cout << "Creating calibration file: " << calibrationFileName << '\n'; std::ofstream calibrationFile(calibrationFileName.string().c_str()); calibrationFile << "640 480\n" << "585 585\n" << "320 240\n" << '\n' << "640 480\n" << "585 585\n" << "320 240\n" << '\n' << "1 0 0 0\n" << "0 1 0 0\n" << "0 0 1 0\n" << '\n' << "affine 0.001 0\n"; } // Now prepare each sequence. for(size_t sequenceIdx = 0; sequenceIdx < sequenceNames.size(); ++sequenceIdx) { const std::string &sequenceName = sequenceNames[sequenceIdx]; const bf::path sequenceRoot = datasetRoot / sequenceName; // Training splits. const bf::path trainingPath = sequenceRoot / trainingFolderName; std::cout << "Preparing training sequence: " << trainingPath << '\n'; bf::copy_file(calibrationFileName, trainingPath / calibrationFile); process_splits(sequenceRoot, trainingSplits[sequenceName], trainingPath, sequenceSplitLengths[sequenceIdx], depthFileMask, rgbFileMask, poseFileMask); // Testing splits. const bf::path testingPath = sequenceRoot / testingFolderName; std::cout << "Preparing testing sequence: " << testingPath << '\n'; bf::copy_file(calibrationFileName, testingPath / calibrationFile); process_splits(sequenceRoot, testingSplits[sequenceName], testingPath, sequenceSplitLengths[sequenceIdx], depthFileMask, rgbFileMask, poseFileMask); } return EXIT_SUCCESS; } catch(std::exception &e) { std::cerr << e.what() << '\n'; return EXIT_FAILURE; } ================================================ FILE: apps/raflperf/CMakeLists.txt ================================================ #################################### # CMakeLists.txt for apps/raflperf # #################################### ########################### # Specify the target name # ########################### SET(targetname raflperf) ################################ # Specify the libraries to use # ################################ INCLUDE(${PROJECT_SOURCE_DIR}/cmake/UseBoost.cmake) INCLUDE(${PROJECT_SOURCE_DIR}/cmake/UseEigen.cmake) INCLUDE(${PROJECT_SOURCE_DIR}/cmake/UseOpenMP.cmake) ############################# # Specify the project files # ############################# ## SET(sources main.cpp ) ############################# # Specify the source groups # ############################# SOURCE_GROUP(sources FILES ${sources}) ########################################## # Specify additional include directories # ########################################## INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/modules/evaluation/include) INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/modules/rafl/include) INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/modules/raflevaluation/include) INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/modules/tvgutil/include) ########################################## # Specify the target and where to put it # ########################################## INCLUDE(${PROJECT_SOURCE_DIR}/cmake/SetAppTarget.cmake) ################################# # Specify the libraries to link # ################################# TARGET_LINK_LIBRARIES(${targetname} evaluation rafl raflevaluation tvgutil) INCLUDE(${PROJECT_SOURCE_DIR}/cmake/LinkBoost.cmake) ############################# # Specify things to install # ############################# INCLUDE(${PROJECT_SOURCE_DIR}/cmake/InstallApp.cmake) ================================================ FILE: apps/raflperf/main.cpp ================================================ /** * raflperf: main.cpp * Copyright (c) Torr Vision Group, University of Oxford, 2015. All rights reserved. */ #include #include using boost::assign::list_of; using boost::assign::map_list_of; #include #include #include #include #include using namespace evaluation; #include #include using namespace rafl; #include using namespace raflevaluation; #include #include using namespace tvgutil; //#################### TYPEDEFS #################### typedef int Label; typedef boost::shared_ptr > Example_CPtr; //#################### FUNCTIONS #################### int main(int argc, char *argv[]) { #if WITH_OPENMP omp_set_nested(1); #endif const unsigned int seed = 12345; if(argc != 1 && argc != 4) { std::cerr << "Usage: raflperf [ ]\n"; return EXIT_FAILURE; } std::vector examples; std::vector params; std::string outputResultPath; if(argc == 1) { #define CLASS_IMBALANCE_TEST // Generate a set of labels. std::set