├── .gitignore ├── CMakeLists.txt ├── License.txt ├── Readme.txt ├── cmake └── FindEigen3.cmake ├── data ├── fisheyeCamera │ ├── left │ │ ├── calib.txt │ │ ├── images.txt │ │ ├── mono_left_1342626147554042.png │ │ ├── mono_left_1342626147634042.png │ │ ├── mono_left_1342626147714042.png │ │ ├── mono_left_1342626147794042.png │ │ ├── mono_left_1342626147874042.png │ │ ├── mono_left_1342626147954042.png │ │ ├── mono_left_1342626148034042.png │ │ ├── mono_left_1342626148114042.png │ │ ├── mono_left_1342626148194042.png │ │ ├── mono_left_1342626148274042.png │ │ ├── mono_left_1342626148354042.png │ │ ├── mono_left_1342626148434042.png │ │ ├── mono_left_1342626148514042.png │ │ ├── mono_left_1342626148594042.png │ │ ├── mono_left_1342626148674042.png │ │ ├── mono_left_1342626148754042.png │ │ ├── mono_left_1342626148834042.png │ │ ├── mono_left_1342626148914042.png │ │ ├── mono_left_1342626148994042.png │ │ ├── mono_left_1342626149074042.png │ │ ├── mono_left_1342626149154042.png │ │ ├── mono_left_1342626149234042.png │ │ ├── mono_left_1342626149314042.png │ │ ├── mono_left_1342626149394042.png │ │ ├── mono_left_1342626149474042.png │ │ └── system_poses.txt │ └── right │ │ ├── calib.txt │ │ ├── images.txt │ │ ├── mono_right_1342626157474042.png │ │ ├── mono_right_1342626157554042.png │ │ ├── mono_right_1342626157634042.png │ │ ├── mono_right_1342626157714042.png │ │ ├── mono_right_1342626157794042.png │ │ ├── mono_right_1342626157874042.png │ │ ├── mono_right_1342626157954042.png │ │ ├── mono_right_1342626158114042.png │ │ ├── mono_right_1342626158274042.png │ │ ├── mono_right_1342626158434042.png │ │ ├── mono_right_1342626158514042.png │ │ ├── mono_right_1342626158674042.png │ │ ├── mono_right_1342626158834042.png │ │ ├── mono_right_1342626158994042.png │ │ ├── mono_right_1342626159154042.png │ │ ├── mono_right_1342626159314042.png │ │ ├── mono_right_1342626159474042.png │ │ ├── mono_right_1342626159634042.png │ │ ├── mono_right_1342626159794042.png │ │ ├── mono_right_1342626159954042.png │ │ ├── mono_right_1342626160114042.png │ │ ├── mono_right_1342626160274042.png │ │ ├── mono_right_1342626160434042.png │ │ ├── mono_right_1342626160594042.png │ │ ├── mono_right_1342626160754042.png │ │ └── system_poses.txt └── pinholeCamera │ ├── niederdorf1 │ ├── DSC00533.JPG │ ├── DSC00534.JPG │ ├── DSC00535.JPG │ ├── DSC00536.JPG │ ├── DSC00537.JPG │ ├── DSC00538.JPG │ ├── DSC00539.JPG │ ├── DSC00540.JPG │ ├── DSC00541.JPG │ ├── DSC00542.JPG │ ├── DSC00543.JPG │ ├── DSC00544.JPG │ ├── DSC00545.JPG │ ├── DSC00546.JPG │ ├── DSC00547.JPG │ ├── DSC00548.JPG │ ├── DSC00549.JPG │ ├── DSC00550.JPG │ ├── DSC00551.JPG │ ├── DSC00552.JPG │ ├── DSC00553.JPG │ ├── DSC00554.JPG │ ├── DSC00555.JPG │ ├── DSC00556.JPG │ ├── DSC00557.JPG │ ├── K.txt │ ├── ba-points3d-0.wrl │ ├── images.txt │ ├── model-0-cams.txt │ └── model-0-points.txt │ ├── niederdorf2 │ ├── DSC00608.JPG │ ├── DSC00609.JPG │ ├── DSC00610.JPG │ ├── DSC00611.JPG │ ├── DSC00612.JPG │ ├── DSC00613.JPG │ ├── DSC00614.JPG │ ├── DSC00615.JPG │ ├── DSC00616.JPG │ ├── DSC00617.JPG │ ├── DSC00618.JPG │ ├── DSC00619.JPG │ ├── DSC00620.JPG │ ├── DSC00621.JPG │ ├── DSC00622.JPG │ ├── DSC00623.JPG │ ├── DSC00624.JPG │ ├── DSC00625.JPG │ ├── DSC00626.JPG │ ├── DSC00627.JPG │ ├── DSC00628.JPG │ ├── DSC00629.JPG │ ├── DSC00630.JPG │ ├── DSC00631.JPG │ ├── DSC00632.JPG │ ├── K.txt │ ├── ba-points3d-0.wrl │ ├── images.txt │ ├── model-0-cams.txt │ └── model-0-points.txt │ └── niederdorf3 │ ├── DSC00558.JPG │ ├── DSC00559.JPG │ ├── DSC00560.JPG │ ├── DSC00561.JPG │ ├── DSC00562.JPG │ ├── DSC00563.JPG │ ├── DSC00564.JPG │ ├── DSC00565.JPG │ ├── DSC00566.JPG │ ├── DSC00567.JPG │ ├── DSC00568.JPG │ ├── DSC00569.JPG │ ├── DSC00570.JPG │ ├── DSC00571.JPG │ ├── DSC00572.JPG │ ├── DSC00573.JPG │ ├── DSC00574.JPG │ ├── DSC00575.JPG │ ├── DSC00576.JPG │ ├── DSC00577.JPG │ ├── DSC00578.JPG │ ├── DSC00579.JPG │ ├── DSC00580.JPG │ ├── DSC00581.JPG │ ├── DSC00582.JPG │ ├── K.txt │ ├── ba-points3d-0.wrl │ ├── images.txt │ ├── model-0-cams.txt │ └── model-0-points.txt ├── referenceTestResults ├── fisheyeCamera │ ├── left │ │ ├── grayscaleSAD │ │ │ ├── BestK │ │ │ │ ├── invDepthCol.png │ │ │ │ └── refImg.png │ │ │ ├── NoOcclusionHandling │ │ │ │ ├── invDepthCol.png │ │ │ │ └── refImg.png │ │ │ └── RefSplit │ │ │ │ ├── invDepthCol.png │ │ │ │ └── refImg.png │ │ └── grayscaleZNCC │ │ │ ├── BestK │ │ │ ├── invDepthCol.png │ │ │ └── refImg.png │ │ │ ├── NoOcclusionHandling │ │ │ ├── invDepthCol.png │ │ │ └── refImg.png │ │ │ └── RefSplit │ │ │ ├── invDepthCol.png │ │ │ └── refImg.png │ └── right │ │ ├── grayscaleSAD │ │ ├── BestK │ │ │ ├── invDepthCol.png │ │ │ └── refImg.png │ │ ├── NoOcclusionHandling │ │ │ ├── invDepthCol.png │ │ │ └── refImg.png │ │ └── RefSplit │ │ │ ├── invDepthCol.png │ │ │ └── refImg.png │ │ └── grayscaleZNCC │ │ ├── BestK │ │ ├── invDepthCol.png │ │ └── refImg.png │ │ ├── NoOcclusionHandling │ │ ├── invDepthCol.png │ │ └── refImg.png │ │ └── RefSplit │ │ ├── invDepthCol.png │ │ └── refImg.png └── pinholeCamera │ ├── niederdorf1 │ ├── colorSAD │ │ ├── BestK │ │ │ ├── invDepthCol.png │ │ │ └── refImg.png │ │ ├── NoOcclusionHandling │ │ │ ├── invDepthCol.png │ │ │ └── refImg.png │ │ └── RefSplit │ │ │ ├── invDepthCol.png │ │ │ └── refImg.png │ ├── grayscaleSAD │ │ ├── BestK │ │ │ ├── invDepthCol.png │ │ │ └── refImg.png │ │ ├── NoOcclusionHandling │ │ │ ├── invDepthCol.png │ │ │ └── refImg.png │ │ └── RefSplit │ │ │ ├── invDepthCol.png │ │ │ └── refImg.png │ └── grayscaleZNCC │ │ ├── BestK │ │ ├── invDepthCol.png │ │ └── refImg.png │ │ ├── NoOcclusionHandling │ │ ├── invDepthCol.png │ │ └── refImg.png │ │ └── RefSplit │ │ ├── invDepthCol.png │ │ └── refImg.png │ ├── niederdorf2 │ ├── colorSAD │ │ ├── BestK │ │ │ ├── invDepthCol.png │ │ │ └── refImg.png │ │ ├── NoOcclusionHandling │ │ │ ├── invDepthCol.png │ │ │ └── refImg.png │ │ └── RefSplit │ │ │ ├── invDepthCol.png │ │ │ └── refImg.png │ ├── grayscaleSAD │ │ ├── BestK │ │ │ ├── invDepthCol.png │ │ │ └── refImg.png │ │ ├── NoOcclusionHandling │ │ │ ├── invDepthCol.png │ │ │ └── refImg.png │ │ └── RefSplit │ │ │ ├── invDepthCol.png │ │ │ └── refImg.png │ └── grayscaleZNCC │ │ ├── BestK │ │ ├── invDepthCol.png │ │ └── refImg.png │ │ ├── NoOcclusionHandling │ │ ├── invDepthCol.png │ │ └── refImg.png │ │ └── RefSplit │ │ ├── invDepthCol.png │ │ └── refImg.png │ └── niederdorf3 │ ├── colorSAD │ ├── BestK │ │ ├── invDepthCol.png │ │ └── refImg.png │ ├── NoOcclusionHandling │ │ ├── invDepthCol.png │ │ └── refImg.png │ └── RefSplit │ │ ├── invDepthCol.png │ │ └── refImg.png │ ├── grayscaleSAD │ ├── BestK │ │ ├── invDepthCol.png │ │ └── refImg.png │ ├── NoOcclusionHandling │ │ ├── invDepthCol.png │ │ └── refImg.png │ └── RefSplit │ │ ├── invDepthCol.png │ │ └── refImg.png │ └── grayscaleZNCC │ ├── BestK │ ├── invDepthCol.png │ └── refImg.png │ ├── NoOcclusionHandling │ ├── invDepthCol.png │ └── refImg.png │ └── RefSplit │ ├── invDepthCol.png │ └── refImg.png ├── runFisheyePlanesweepTestsLinux.sh ├── runFisheyePlanesweepTestsWindows.bat ├── runPinholePlanesweepTestsLinux.sh ├── runPinholePlanesweepTestsWindows.bat └── src ├── Apps ├── CMakeLists.txt └── cudaPlanesweepMAPTk.cpp ├── CMakeLists.txt ├── PSL ├── CMakeLists.txt ├── psl_base │ ├── cameraMatrix.cpp │ ├── cameraMatrix.h │ ├── colorMapJet.cpp │ ├── colorMapJet.h │ ├── common.h │ ├── configFile.cpp │ ├── configFile.h │ ├── depthMap.cpp │ ├── depthMap.h │ ├── exception.h │ ├── fishEyeCameraMatrix.cpp │ ├── fishEyeCameraMatrix.h │ ├── fishEyeDepthMap.cpp │ ├── fishEyeDepthMap.h │ ├── grid.cpp │ └── grid.h ├── psl_cudaBase │ ├── cudaCommon.h │ ├── cudaFishEyeImageProcessor.cpp │ ├── cudaFishEyeImageProcessor.cu │ ├── cudaFishEyeImageProcessor.h │ ├── deviceBuffer.cpp │ ├── deviceBuffer.cu │ ├── deviceBuffer.cuh │ ├── deviceBuffer.h │ ├── deviceImage.cpp │ ├── deviceImage.cu │ ├── deviceImage.cuh │ └── deviceImage.h ├── psl_io │ ├── ioTools.cpp │ └── ioTools.h └── psl_stereo │ ├── cudaFishEyePlaneSweep.cpp │ ├── cudaFishEyePlaneSweep.cu │ ├── cudaFishEyePlaneSweep.h │ ├── cudaPlaneSweep.cpp │ ├── cudaPlaneSweep.cu │ └── cudaPlaneSweep.h └── PSLTests ├── CMakeLists.txt ├── fisheyePlanesweepTest.cpp └── pinholePlanesweepTest.cpp /.gitignore: -------------------------------------------------------------------------------- 1 | build/* 2 | testResults/* 3 | CMakeLists.txt.user 4 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required (VERSION 2.6) 2 | 3 | set(CMAKE_BUILD_TYPE Release) 4 | set(CMAKE_CONFIGURATION_TYPES ${CMAKE_BUILD_TYPE} CACHE STRING "" FORCE) 5 | 6 | project(PSL) 7 | 8 | 9 | set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/") 10 | 11 | set( EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin ) 12 | 13 | find_package(Eigen3 REQUIRED) 14 | include_directories(${EIGEN3_INCLUDE_DIR}) 15 | find_package(OpenCV REQUIRED) 16 | include_directories(${OpenCV_INCLUDE_DIRS}) 17 | find_package(CUDA REQUIRED) 18 | set(CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE OFF) 19 | include_directories(${CUDA_INCLUDE_DIRS}) 20 | set(Boost_USE_STATIC_LIBS ON) 21 | find_package(Boost REQUIRED COMPONENTS system filesystem program_options) 22 | include_directories(${Boost_INCLUDE_DIRS}) 23 | 24 | 25 | include_directories("src/PSL") 26 | 27 | add_subdirectory(src) 28 | -------------------------------------------------------------------------------- /Readme.txt: -------------------------------------------------------------------------------- 1 | Content and Copyright 2 | -------------------------------- 3 | 4 | This software package PlaneSweepLib (PSL) contains a C++/CUDA implementation of plane sweeping stereo matching for pinhole and fisheye images. 5 | The package comes with test data and scripts to run the software on the test data. 6 | It was tested on Linux using the GCC Toolchain and on Windows using Visual Studio. 7 | 8 | Copyright 2016 Christian Haene (ETH Zuerich) 9 | Copyright 2016 Bastien Jacquet, Louis Amore (Kitware) [for src/Apps/cudaPlanesweepMAPTk.cpp] 10 | 11 | PSL is free software: you can redistribute it and/or modify 12 | it under the terms of the GNU General Public License as published by 13 | the Free Software Foundation, either version 3 of the License, or 14 | (at your option) any later version. 15 | 16 | PSL is distributed in the hope that it will be useful, 17 | but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | GNU General Public License for more details. 20 | 21 | You should have received a copy of the GNU General Public License 22 | along with PSL. If not, see . 23 | 24 | 25 | Version 26 | -------------------------------- 27 | 28 | 1.0 - February 24 2016 29 | 30 | 31 | Citation 32 | -------------------------------- 33 | 34 | If you use this software package please cite the relevant publications. 35 | 36 | For using the plane sweep code please cite: 37 | 38 | Christian Häne, Lionel Heng, Gim Hee Lee, Alexey Sizov, Marc Pollefeys, 39 | Real-Time Direct Dense Matching on Fisheye Images Using Plane-Sweeping Stereo, 40 | Proc Int. Conf. on 3D Vison (3DV) 2014 41 | 42 | The datasets provided with the pinhole version of the code were initially published in: 43 | 44 | Christian Häne, Christopher Zach, Bernhard Zeisl, Marc Pollefeys, 45 | A Patch Prior for Dense 3D Reconstruction in Man-Made Environments, 46 | Proc. Int. Conf. on 3D Data, Imaging, Modeling, Processing, Visualization and Transmission (3DIMPVT) 2012 47 | 48 | 49 | Furthermore this code served as a basis for the papers: 50 | 51 | Christian Häne, Torsten Sattler, Marc Pollefeys, 52 | Obstacle Detection for Self-Driving Cars Using Only Monocular Cameras and Wheel Odometry, 53 | Proc. IEEE/RSJ Int. Conf. on Intelligent Robots and Systems (IROS) 2015 54 | 55 | Thomas Schöps, Torsten Sattler, Christin Häne, Marc Pollefeys, 56 | 3D Modeling on the Go: Interactive 3D Reconstruction of Large-Scale Scenes on Mobile Devices, 57 | Proc Int. Conf. on 3D Vison (3DV) 2015 58 | 59 | 60 | Prerequisites 61 | -------------------------------- 62 | 63 | The code is written in C++ and CUDA. To use it you need a CUDA compatible Nvidia GPU. 64 | The following libraries are required: 65 | 66 | GCC Toolchain on Linux 67 | Visual Studio C++ on Windows 68 | CMake 69 | Nvidia CUDA 70 | Boost (system filesystem program_options) 71 | OpenCV 72 | Eigen3 73 | 74 | 75 | Instructions Linux 76 | ----------------------------- 77 | 78 | To compile the code open a terminal and cd to the root directory PlaneSweepLib of the package and run: 79 | 80 | mkdir build 81 | cd build 82 | cmake .. 83 | make 84 | 85 | The package comes with test data and applications that show how to use the plane sweep code. 86 | To run the tests on the provided data cd to the root directory PlaneSweepLib of the package and run: 87 | 88 | sh runPinholePlanesweepTestsLinux.sh 89 | sh runFisheyePlanesweepTestsLinux.sh 90 | 91 | The results are written to the folder PlaneSweepLib/testResults. 92 | To check if the code runs correctly reference results are provided in the folder PlaneSweepLib/referenceTestResults 93 | 94 | 95 | Instructions Windows 96 | --------------------------------- 97 | 98 | Open a command prompt and cd to the root directory PlaneSweepLib of the package and run: 99 | 100 | mkdir build 101 | cd build 102 | cmake -G "Visual Studio 10 Win64" .. (Replace "Visual Studio 10 Win64" with your version, cmake without arguments provides a list. 103 | Alternatively use cmake-gui to generate the project files.) 104 | 105 | Open the project file PlaneSweepLib/build/PSL.sln with Visual Studio and compile the whole solution in Release mode. 106 | 107 | 108 | The package comes with test data and applications that show how to use the plane sweep code. 109 | To run the tests on the provided data go to the command prompt and cd to the root directory PlaneSweepLib of the package and run: 110 | 111 | runPinholePlanesweepTestsWindows.bat 112 | runFisheyePlanesweepTestsWindows.bat 113 | 114 | The results are written to the folder PlaneSweepLib/testResults. 115 | To check if the code runs correctly reference results are provided in the folder PlaneSweepLib/referenceTestResults 116 | 117 | 118 | Acknowledgements 119 | ---------------------------------- 120 | 121 | This code was written in the Computer Vision and Geometry Group (CVG) led by Prof. Marc Pollefeys. 122 | Helpful discussions and suggestions from Thomas Schöps helped to improve the quality and performance of the code. 123 | The code was written as part of the V-Charge project, grant #269916 under the European Community’s Seventh Framework Programme (FP7/2007-2013) 124 | 125 | 126 | 127 | -------------------------------------------------------------------------------- /cmake/FindEigen3.cmake: -------------------------------------------------------------------------------- 1 | # - Try to find Eigen3 lib 2 | # 3 | # This module supports requiring a minimum version, e.g. you can do 4 | # find_package(Eigen3 3.1.2) 5 | # to require version 3.1.2 or newer of Eigen3. 6 | # 7 | # Once done this will define 8 | # 9 | # EIGEN3_FOUND - system has eigen lib with correct version 10 | # EIGEN3_INCLUDE_DIR - the eigen include directory 11 | # EIGEN3_VERSION - eigen version 12 | 13 | # Copyright (c) 2006, 2007 Montel Laurent, 14 | # Copyright (c) 2008, 2009 Gael Guennebaud, 15 | # Copyright (c) 2009 Benoit Jacob 16 | # Redistribution and use is allowed according to the terms of the 2-clause BSD license. 17 | 18 | if(NOT Eigen3_FIND_VERSION) 19 | if(NOT Eigen3_FIND_VERSION_MAJOR) 20 | set(Eigen3_FIND_VERSION_MAJOR 2) 21 | endif(NOT Eigen3_FIND_VERSION_MAJOR) 22 | if(NOT Eigen3_FIND_VERSION_MINOR) 23 | set(Eigen3_FIND_VERSION_MINOR 91) 24 | endif(NOT Eigen3_FIND_VERSION_MINOR) 25 | if(NOT Eigen3_FIND_VERSION_PATCH) 26 | set(Eigen3_FIND_VERSION_PATCH 0) 27 | endif(NOT Eigen3_FIND_VERSION_PATCH) 28 | 29 | set(Eigen3_FIND_VERSION "${Eigen3_FIND_VERSION_MAJOR}.${Eigen3_FIND_VERSION_MINOR}.${Eigen3_FIND_VERSION_PATCH}") 30 | endif(NOT Eigen3_FIND_VERSION) 31 | 32 | macro(_eigen3_check_version) 33 | file(READ "${EIGEN3_INCLUDE_DIR}/Eigen/src/Core/util/Macros.h" _eigen3_version_header) 34 | 35 | string(REGEX MATCH "define[ \t]+EIGEN_WORLD_VERSION[ \t]+([0-9]+)" _eigen3_world_version_match "${_eigen3_version_header}") 36 | set(EIGEN3_WORLD_VERSION "${CMAKE_MATCH_1}") 37 | string(REGEX MATCH "define[ \t]+EIGEN_MAJOR_VERSION[ \t]+([0-9]+)" _eigen3_major_version_match "${_eigen3_version_header}") 38 | set(EIGEN3_MAJOR_VERSION "${CMAKE_MATCH_1}") 39 | string(REGEX MATCH "define[ \t]+EIGEN_MINOR_VERSION[ \t]+([0-9]+)" _eigen3_minor_version_match "${_eigen3_version_header}") 40 | set(EIGEN3_MINOR_VERSION "${CMAKE_MATCH_1}") 41 | 42 | set(EIGEN3_VERSION ${EIGEN3_WORLD_VERSION}.${EIGEN3_MAJOR_VERSION}.${EIGEN3_MINOR_VERSION}) 43 | if(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION}) 44 | set(EIGEN3_VERSION_OK FALSE) 45 | else(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION}) 46 | set(EIGEN3_VERSION_OK TRUE) 47 | endif(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION}) 48 | 49 | if(NOT EIGEN3_VERSION_OK) 50 | 51 | message(STATUS "Eigen3 version ${EIGEN3_VERSION} found in ${EIGEN3_INCLUDE_DIR}, " 52 | "but at least version ${Eigen3_FIND_VERSION} is required") 53 | endif(NOT EIGEN3_VERSION_OK) 54 | endmacro(_eigen3_check_version) 55 | 56 | if (EIGEN3_INCLUDE_DIR) 57 | 58 | # in cache already 59 | _eigen3_check_version() 60 | set(EIGEN3_FOUND ${EIGEN3_VERSION_OK}) 61 | 62 | else (EIGEN3_INCLUDE_DIR) 63 | 64 | find_path(EIGEN3_INCLUDE_DIR NAMES signature_of_eigen3_matrix_library 65 | PATHS 66 | ${CMAKE_INSTALL_PREFIX}/include 67 | ${KDE4_INCLUDE_DIR} 68 | PATH_SUFFIXES eigen3 eigen 69 | ) 70 | 71 | if(EIGEN3_INCLUDE_DIR) 72 | _eigen3_check_version() 73 | endif(EIGEN3_INCLUDE_DIR) 74 | 75 | include(FindPackageHandleStandardArgs) 76 | find_package_handle_standard_args(Eigen3 DEFAULT_MSG EIGEN3_INCLUDE_DIR EIGEN3_VERSION_OK) 77 | 78 | mark_as_advanced(EIGEN3_INCLUDE_DIR) 79 | 80 | endif(EIGEN3_INCLUDE_DIR) 81 | 82 | -------------------------------------------------------------------------------- /data/fisheyeCamera/left/calib.txt: -------------------------------------------------------------------------------- 1 | 8.9554818314068166e+02 0 6.4962356964542516e+02 8.9474426130897348e+02 3.9871903485692013e+02 1.1584422115726898e+00 -3.3084335078197569e-01 8.6519827528324378e-02 -6.7678740380559344e-04 -3.6412961593787842e-05 2 | 3 | 0.9971696119 0.0174865783 0.0731230786 1.9070741295 4 | -0.0428662883 -0.6667851656 0.7440161452 1.3975064583 5 | 0.0617676807 -0.7450448058 -0.6641483201 0.0673496602 6 | 7 | -------------------------------------------------------------------------------- /data/fisheyeCamera/left/images.txt: -------------------------------------------------------------------------------- 1 | mono_left_1342626147554042.png 2 | mono_left_1342626147634042.png 3 | mono_left_1342626147714042.png 4 | mono_left_1342626147794042.png 5 | mono_left_1342626147874042.png 6 | mono_left_1342626147954042.png 7 | mono_left_1342626148034042.png 8 | mono_left_1342626148114042.png 9 | mono_left_1342626148194042.png 10 | mono_left_1342626148274042.png 11 | mono_left_1342626148354042.png 12 | mono_left_1342626148434042.png 13 | mono_left_1342626148514042.png 14 | mono_left_1342626148594042.png 15 | mono_left_1342626148674042.png 16 | mono_left_1342626148754042.png 17 | mono_left_1342626148834042.png 18 | mono_left_1342626148914042.png 19 | mono_left_1342626148994042.png 20 | mono_left_1342626149074042.png 21 | mono_left_1342626149154042.png 22 | mono_left_1342626149234042.png 23 | mono_left_1342626149314042.png 24 | mono_left_1342626149394042.png 25 | mono_left_1342626149474042.png 26 | -------------------------------------------------------------------------------- /data/fisheyeCamera/left/mono_left_1342626147554042.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/fisheyeCamera/left/mono_left_1342626147554042.png -------------------------------------------------------------------------------- /data/fisheyeCamera/left/mono_left_1342626147634042.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/fisheyeCamera/left/mono_left_1342626147634042.png -------------------------------------------------------------------------------- /data/fisheyeCamera/left/mono_left_1342626147714042.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/fisheyeCamera/left/mono_left_1342626147714042.png -------------------------------------------------------------------------------- /data/fisheyeCamera/left/mono_left_1342626147794042.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/fisheyeCamera/left/mono_left_1342626147794042.png -------------------------------------------------------------------------------- /data/fisheyeCamera/left/mono_left_1342626147874042.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/fisheyeCamera/left/mono_left_1342626147874042.png -------------------------------------------------------------------------------- /data/fisheyeCamera/left/mono_left_1342626147954042.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/fisheyeCamera/left/mono_left_1342626147954042.png -------------------------------------------------------------------------------- /data/fisheyeCamera/left/mono_left_1342626148034042.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/fisheyeCamera/left/mono_left_1342626148034042.png -------------------------------------------------------------------------------- /data/fisheyeCamera/left/mono_left_1342626148114042.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/fisheyeCamera/left/mono_left_1342626148114042.png -------------------------------------------------------------------------------- /data/fisheyeCamera/left/mono_left_1342626148194042.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/fisheyeCamera/left/mono_left_1342626148194042.png -------------------------------------------------------------------------------- /data/fisheyeCamera/left/mono_left_1342626148274042.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/fisheyeCamera/left/mono_left_1342626148274042.png -------------------------------------------------------------------------------- /data/fisheyeCamera/left/mono_left_1342626148354042.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/fisheyeCamera/left/mono_left_1342626148354042.png -------------------------------------------------------------------------------- /data/fisheyeCamera/left/mono_left_1342626148434042.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/fisheyeCamera/left/mono_left_1342626148434042.png -------------------------------------------------------------------------------- /data/fisheyeCamera/left/mono_left_1342626148514042.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/fisheyeCamera/left/mono_left_1342626148514042.png -------------------------------------------------------------------------------- /data/fisheyeCamera/left/mono_left_1342626148594042.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/fisheyeCamera/left/mono_left_1342626148594042.png -------------------------------------------------------------------------------- /data/fisheyeCamera/left/mono_left_1342626148674042.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/fisheyeCamera/left/mono_left_1342626148674042.png -------------------------------------------------------------------------------- /data/fisheyeCamera/left/mono_left_1342626148754042.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/fisheyeCamera/left/mono_left_1342626148754042.png -------------------------------------------------------------------------------- /data/fisheyeCamera/left/mono_left_1342626148834042.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/fisheyeCamera/left/mono_left_1342626148834042.png -------------------------------------------------------------------------------- /data/fisheyeCamera/left/mono_left_1342626148914042.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/fisheyeCamera/left/mono_left_1342626148914042.png -------------------------------------------------------------------------------- /data/fisheyeCamera/left/mono_left_1342626148994042.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/fisheyeCamera/left/mono_left_1342626148994042.png -------------------------------------------------------------------------------- /data/fisheyeCamera/left/mono_left_1342626149074042.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/fisheyeCamera/left/mono_left_1342626149074042.png -------------------------------------------------------------------------------- /data/fisheyeCamera/left/mono_left_1342626149154042.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/fisheyeCamera/left/mono_left_1342626149154042.png -------------------------------------------------------------------------------- /data/fisheyeCamera/left/mono_left_1342626149234042.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/fisheyeCamera/left/mono_left_1342626149234042.png -------------------------------------------------------------------------------- /data/fisheyeCamera/left/mono_left_1342626149314042.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/fisheyeCamera/left/mono_left_1342626149314042.png -------------------------------------------------------------------------------- /data/fisheyeCamera/left/mono_left_1342626149394042.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/fisheyeCamera/left/mono_left_1342626149394042.png -------------------------------------------------------------------------------- /data/fisheyeCamera/left/mono_left_1342626149474042.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/fisheyeCamera/left/mono_left_1342626149474042.png -------------------------------------------------------------------------------- /data/fisheyeCamera/right/calib.txt: -------------------------------------------------------------------------------- 1 | 8.9801472420341690e+02 0 6.5434378701722733e+02 8.9716486765268405e+02 3.8865000309690311e+02 1.1540763266352720e+00 -3.4150534804282473e-01 9.6297877148580555e-02 -6.2090259214094804e-04 -1.4921992243507848e-04 2 | 3 | -0.9961476463 -0.0480687286 0.0733434667 1.9342814492 4 | -0.0869181892 0.6520822847 -0.7531493361 -0.5825692986 5 | -0.0116230444 -0.7566228197 -0.6537482799 0.0499972786 6 | -------------------------------------------------------------------------------- /data/fisheyeCamera/right/images.txt: -------------------------------------------------------------------------------- 1 | mono_right_1342626157474042.png 2 | mono_right_1342626157554042.png 3 | mono_right_1342626157634042.png 4 | mono_right_1342626157714042.png 5 | mono_right_1342626157794042.png 6 | mono_right_1342626157874042.png 7 | mono_right_1342626157954042.png 8 | mono_right_1342626158114042.png 9 | mono_right_1342626158274042.png 10 | mono_right_1342626158434042.png 11 | mono_right_1342626158514042.png 12 | mono_right_1342626158674042.png 13 | mono_right_1342626158834042.png 14 | mono_right_1342626158994042.png 15 | mono_right_1342626159154042.png 16 | mono_right_1342626159314042.png 17 | mono_right_1342626159474042.png 18 | mono_right_1342626159634042.png 19 | mono_right_1342626159794042.png 20 | mono_right_1342626159954042.png 21 | mono_right_1342626160114042.png 22 | mono_right_1342626160274042.png 23 | mono_right_1342626160434042.png 24 | mono_right_1342626160594042.png 25 | mono_right_1342626160754042.png 26 | -------------------------------------------------------------------------------- /data/fisheyeCamera/right/mono_right_1342626157474042.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/fisheyeCamera/right/mono_right_1342626157474042.png -------------------------------------------------------------------------------- /data/fisheyeCamera/right/mono_right_1342626157554042.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/fisheyeCamera/right/mono_right_1342626157554042.png -------------------------------------------------------------------------------- /data/fisheyeCamera/right/mono_right_1342626157634042.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/fisheyeCamera/right/mono_right_1342626157634042.png -------------------------------------------------------------------------------- /data/fisheyeCamera/right/mono_right_1342626157714042.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/fisheyeCamera/right/mono_right_1342626157714042.png -------------------------------------------------------------------------------- /data/fisheyeCamera/right/mono_right_1342626157794042.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/fisheyeCamera/right/mono_right_1342626157794042.png -------------------------------------------------------------------------------- /data/fisheyeCamera/right/mono_right_1342626157874042.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/fisheyeCamera/right/mono_right_1342626157874042.png -------------------------------------------------------------------------------- /data/fisheyeCamera/right/mono_right_1342626157954042.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/fisheyeCamera/right/mono_right_1342626157954042.png -------------------------------------------------------------------------------- /data/fisheyeCamera/right/mono_right_1342626158114042.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/fisheyeCamera/right/mono_right_1342626158114042.png -------------------------------------------------------------------------------- /data/fisheyeCamera/right/mono_right_1342626158274042.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/fisheyeCamera/right/mono_right_1342626158274042.png -------------------------------------------------------------------------------- /data/fisheyeCamera/right/mono_right_1342626158434042.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/fisheyeCamera/right/mono_right_1342626158434042.png -------------------------------------------------------------------------------- /data/fisheyeCamera/right/mono_right_1342626158514042.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/fisheyeCamera/right/mono_right_1342626158514042.png -------------------------------------------------------------------------------- /data/fisheyeCamera/right/mono_right_1342626158674042.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/fisheyeCamera/right/mono_right_1342626158674042.png -------------------------------------------------------------------------------- /data/fisheyeCamera/right/mono_right_1342626158834042.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/fisheyeCamera/right/mono_right_1342626158834042.png -------------------------------------------------------------------------------- /data/fisheyeCamera/right/mono_right_1342626158994042.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/fisheyeCamera/right/mono_right_1342626158994042.png -------------------------------------------------------------------------------- /data/fisheyeCamera/right/mono_right_1342626159154042.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/fisheyeCamera/right/mono_right_1342626159154042.png -------------------------------------------------------------------------------- /data/fisheyeCamera/right/mono_right_1342626159314042.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/fisheyeCamera/right/mono_right_1342626159314042.png -------------------------------------------------------------------------------- /data/fisheyeCamera/right/mono_right_1342626159474042.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/fisheyeCamera/right/mono_right_1342626159474042.png -------------------------------------------------------------------------------- /data/fisheyeCamera/right/mono_right_1342626159634042.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/fisheyeCamera/right/mono_right_1342626159634042.png -------------------------------------------------------------------------------- /data/fisheyeCamera/right/mono_right_1342626159794042.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/fisheyeCamera/right/mono_right_1342626159794042.png -------------------------------------------------------------------------------- /data/fisheyeCamera/right/mono_right_1342626159954042.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/fisheyeCamera/right/mono_right_1342626159954042.png -------------------------------------------------------------------------------- /data/fisheyeCamera/right/mono_right_1342626160114042.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/fisheyeCamera/right/mono_right_1342626160114042.png -------------------------------------------------------------------------------- /data/fisheyeCamera/right/mono_right_1342626160274042.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/fisheyeCamera/right/mono_right_1342626160274042.png -------------------------------------------------------------------------------- /data/fisheyeCamera/right/mono_right_1342626160434042.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/fisheyeCamera/right/mono_right_1342626160434042.png -------------------------------------------------------------------------------- /data/fisheyeCamera/right/mono_right_1342626160594042.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/fisheyeCamera/right/mono_right_1342626160594042.png -------------------------------------------------------------------------------- /data/fisheyeCamera/right/mono_right_1342626160754042.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/fisheyeCamera/right/mono_right_1342626160754042.png -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf1/DSC00533.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf1/DSC00533.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf1/DSC00534.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf1/DSC00534.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf1/DSC00535.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf1/DSC00535.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf1/DSC00536.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf1/DSC00536.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf1/DSC00537.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf1/DSC00537.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf1/DSC00538.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf1/DSC00538.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf1/DSC00539.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf1/DSC00539.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf1/DSC00540.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf1/DSC00540.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf1/DSC00541.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf1/DSC00541.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf1/DSC00542.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf1/DSC00542.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf1/DSC00543.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf1/DSC00543.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf1/DSC00544.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf1/DSC00544.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf1/DSC00545.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf1/DSC00545.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf1/DSC00546.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf1/DSC00546.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf1/DSC00547.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf1/DSC00547.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf1/DSC00548.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf1/DSC00548.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf1/DSC00549.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf1/DSC00549.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf1/DSC00550.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf1/DSC00550.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf1/DSC00551.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf1/DSC00551.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf1/DSC00552.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf1/DSC00552.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf1/DSC00553.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf1/DSC00553.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf1/DSC00554.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf1/DSC00554.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf1/DSC00555.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf1/DSC00555.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf1/DSC00556.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf1/DSC00556.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf1/DSC00557.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf1/DSC00557.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf1/K.txt: -------------------------------------------------------------------------------- 1 | 4409.08 0 2005.06 4409.08 1302.86 2 | -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf1/images.txt: -------------------------------------------------------------------------------- 1 | DSC00533.JPG 2 | DSC00534.JPG 3 | DSC00535.JPG 4 | DSC00536.JPG 5 | DSC00537.JPG 6 | DSC00538.JPG 7 | DSC00539.JPG 8 | DSC00540.JPG 9 | DSC00541.JPG 10 | DSC00542.JPG 11 | DSC00543.JPG 12 | DSC00544.JPG 13 | DSC00545.JPG 14 | DSC00546.JPG 15 | DSC00547.JPG 16 | DSC00548.JPG 17 | DSC00549.JPG 18 | DSC00550.JPG 19 | DSC00551.JPG 20 | DSC00552.JPG 21 | DSC00553.JPG 22 | DSC00554.JPG 23 | DSC00555.JPG 24 | DSC00556.JPG 25 | DSC00557.JPG 26 | -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf1/model-0-cams.txt: -------------------------------------------------------------------------------- 1 | 25 2 | 0 1 -0.000527659 9.79682e-05 0.00982233 3 | 0.000527658 1 1.38021e-05 -0.0571081 4 | -9.79755e-05 -1.37504e-05 1 -0.769115 5 | 1 0.999722 0.0132898 -0.0194701 0.0118868 6 | -0.0134169 0.999889 -0.00640982 -0.0528649 7 | 0.0193828 0.00666927 0.99979 -0.767196 8 | 2 0.999907 0.00461772 -0.0128026 -0.00810011 9 | -0.00462181 0.999989 -0.000289998 -0.0577669 10 | 0.0128011 0.000349143 0.999918 -0.764506 11 | 3 0.999956 -0.00704102 -0.00626131 -0.0265648 12 | 0.00707262 0.999962 0.00503937 -0.0624823 13 | 0.00622559 -0.00508343 0.999968 -0.762111 14 | 4 0.999873 0.00161993 -0.0158233 -0.035257 15 | -0.00177399 0.999951 -0.00972722 -0.0513991 16 | 0.0158068 0.00975406 0.999827 -0.762509 17 | 5 0.999723 0.0207014 -0.01117 0.0179645 18 | -0.0207685 0.999767 -0.00592659 -0.0537476 19 | 0.0110447 0.00615694 0.99992 -0.786101 20 | 6 0.999494 0.00820549 -0.030725 0.0201414 21 | -0.00793271 0.999928 0.00898964 -0.0663414 22 | 0.0307965 -0.00874136 0.999487 -0.78592 23 | 7 0.999674 0.00787267 -0.0242999 0.000952457 24 | -0.00822833 0.99986 -0.0145711 -0.048337 25 | 0.0241817 0.0147663 0.999599 -0.787013 26 | 8 0.999182 0.0151611 -0.0374944 -0.00200569 27 | -0.0152985 0.999877 -0.00338007 -0.0573105 28 | 0.0374386 0.00395091 0.999291 -0.785723 29 | 9 0.999746 0.00898669 -0.0206736 -0.0303077 30 | -0.00893618 0.999957 0.00253467 -0.0623504 31 | 0.0206955 -0.00234928 0.999783 -0.785094 32 | 10 0.999343 0.0135323 -0.0336165 0.0362899 33 | -0.0142851 0.99965 -0.0222552 -0.0433676 34 | 0.0333035 0.0227208 0.999187 -0.806695 35 | 11 0.999837 0.0164409 0.00741066 -0.0135153 36 | -0.0163381 0.999772 -0.013721 -0.0505741 37 | -0.00763456 0.0135977 0.999878 -0.805965 38 | 12 0.999881 0.0152591 -0.00236692 -0.0197171 39 | -0.015278 0.99985 -0.00819667 -0.0550816 40 | 0.00224149 0.00823185 0.999964 -0.805358 41 | 13 0.999937 0.0112362 -0.000821495 -0.0343059 42 | -0.0112531 0.99963 -0.0247487 -0.0429035 43 | 0.00054311 0.0247563 0.999693 -0.806729 44 | 14 0.999713 0.0236842 -0.00364271 -0.0530257 45 | -0.023722 0.999661 -0.0107149 -0.0528631 46 | 0.0033877 0.0107983 0.999936 -0.803288 47 | 15 0.999254 0.0223075 -0.0315119 0.0322523 48 | -0.0233481 0.999181 -0.0330526 -0.0356528 49 | 0.0307487 0.0337637 0.998957 -0.82351 50 | 16 0.99941 0.0104948 -0.0327026 0.0175283 51 | -0.0111842 0.999718 -0.02097 -0.0456559 52 | 0.0324732 0.0213234 0.999245 -0.81973 53 | 17 0.999635 0.0269756 0.00151532 -0.0273973 54 | -0.0269674 0.999623 -0.00519342 -0.0584581 55 | -0.00165485 0.00515066 0.999985 -0.8179 56 | 18 0.999713 0.0091499 -0.0221621 -0.0226737 57 | -0.00958785 0.999759 -0.0197362 -0.0478275 58 | 0.0219762 0.019943 0.99956 -0.818268 59 | 19 0.999836 0.0178726 -0.00277344 -0.0580262 60 | -0.0179293 0.999598 -0.0219562 -0.0453031 61 | 0.00237991 0.0220023 0.999755 -0.817882 62 | 20 0.99994 0.00953635 -0.00543954 0.011258 63 | -0.00974596 0.999156 -0.0399074 -0.0298429 64 | 0.00505438 0.039958 0.999189 -0.837798 65 | 21 0.999685 0.0105613 -0.0227881 0.00804142 66 | -0.0110403 0.999719 -0.0210006 -0.04613 67 | 0.0225599 0.0212455 0.99952 -0.835811 68 | 22 0.999857 0.0168326 -0.00137648 -0.0259314 69 | -0.0168613 0.999557 -0.0245323 -0.043606 70 | 0.000962924 0.024552 0.999698 -0.835705 71 | 23 0.999922 0.000927544 -0.0124489 -0.0322289 72 | -0.00128306 0.999591 -0.0285808 -0.0414043 73 | 0.0124173 0.0285945 0.999514 -0.834351 74 | 24 0.999846 0.00462471 -0.0169291 -0.0468714 75 | -0.00459637 0.999988 0.00171302 -0.0658885 76 | 0.0169368 -0.00163494 0.999855 -0.83292 77 | -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf2/DSC00608.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf2/DSC00608.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf2/DSC00609.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf2/DSC00609.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf2/DSC00610.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf2/DSC00610.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf2/DSC00611.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf2/DSC00611.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf2/DSC00612.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf2/DSC00612.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf2/DSC00613.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf2/DSC00613.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf2/DSC00614.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf2/DSC00614.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf2/DSC00615.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf2/DSC00615.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf2/DSC00616.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf2/DSC00616.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf2/DSC00617.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf2/DSC00617.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf2/DSC00618.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf2/DSC00618.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf2/DSC00619.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf2/DSC00619.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf2/DSC00620.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf2/DSC00620.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf2/DSC00621.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf2/DSC00621.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf2/DSC00622.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf2/DSC00622.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf2/DSC00623.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf2/DSC00623.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf2/DSC00624.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf2/DSC00624.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf2/DSC00625.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf2/DSC00625.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf2/DSC00626.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf2/DSC00626.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf2/DSC00627.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf2/DSC00627.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf2/DSC00628.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf2/DSC00628.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf2/DSC00629.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf2/DSC00629.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf2/DSC00630.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf2/DSC00630.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf2/DSC00631.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf2/DSC00631.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf2/DSC00632.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf2/DSC00632.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf2/K.txt: -------------------------------------------------------------------------------- 1 | 4409.08 0 2005.06 4409.08 1302.86 2 | -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf2/images.txt: -------------------------------------------------------------------------------- 1 | DSC00608.JPG 2 | DSC00609.JPG 3 | DSC00610.JPG 4 | DSC00611.JPG 5 | DSC00612.JPG 6 | DSC00613.JPG 7 | DSC00614.JPG 8 | DSC00615.JPG 9 | DSC00616.JPG 10 | DSC00617.JPG 11 | DSC00618.JPG 12 | DSC00619.JPG 13 | DSC00620.JPG 14 | DSC00621.JPG 15 | DSC00622.JPG 16 | DSC00623.JPG 17 | DSC00624.JPG 18 | DSC00625.JPG 19 | DSC00626.JPG 20 | DSC00627.JPG 21 | DSC00628.JPG 22 | DSC00629.JPG 23 | DSC00630.JPG 24 | DSC00631.JPG 25 | DSC00632.JPG 26 | -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf2/model-0-cams.txt: -------------------------------------------------------------------------------- 1 | 25 2 | 0 1 -0.000198702 0.000679828 4.61737 3 | 0.000198607 1 0.000139247 1.37448 4 | -0.000679855 -0.000139111 1 82.0487 5 | 1 0.999937 -0.00842884 0.00742316 3.15897 6 | 0.00850706 0.999908 -0.0105699 0.52052 7 | -0.00733339 0.0106324 0.999917 81.8549 8 | 2 0.998958 -0.0165368 0.0425389 4.02326 9 | 0.0171976 0.999736 -0.0152164 0.155915 10 | -0.0422761 0.0159322 0.998979 81.6869 11 | 3 0.999878 -0.0141012 0.00679134 -1.43091 12 | 0.0141616 0.99986 -0.00892905 0.656706 13 | -0.00666448 0.00902413 0.999937 81.6396 14 | 4 0.99917 -0.00614063 0.0402775 -1.27493 15 | 0.00632234 0.99997 -0.00438565 0.983288 16 | -0.0402494 0.00463665 0.999179 81.7209 17 | 5 0.999909 -0.00253796 0.0132438 5.98908 18 | 0.00251165 0.999995 0.00200244 1.27323 19 | -0.0132488 -0.001969 0.99991 78.8438 20 | 6 0.999936 0.000971797 -0.0112973 2.29142 21 | -0.000888427 0.999972 0.00738228 1.70063 22 | 0.0113042 -0.00737177 0.999909 78.9065 23 | 7 0.999966 -0.0041154 0.00718447 1.65019 24 | 0.00416845 0.999964 -0.00738485 0.549658 25 | -0.00715382 0.00741455 0.999947 78.7755 26 | 8 0.999933 0.00817412 0.00824103 -0.869814 27 | -0.00822348 0.999948 0.00597327 1.69473 28 | -0.00819178 -0.00604064 0.999948 78.7743 29 | 9 0.999402 -0.00349748 0.0344016 -1.57018 30 | 0.0033442 0.999984 0.00451226 1.55998 31 | -0.0344168 -0.00439451 0.999398 79.0857 32 | 10 0.999948 0.000399306 0.010146 7.19935 33 | -0.000485828 0.999964 0.00852661 1.48154 34 | -0.0101423 -0.0085311 0.999912 75.475 35 | 11 0.999559 0.000853969 -0.0296739 1.21344 36 | -0.000765316 0.999995 0.00299879 1.10046 37 | 0.0296763 -0.00297476 0.999555 75.5975 38 | 12 0.999941 -0.00958339 0.00510917 1.93325 39 | 0.0094948 0.999809 0.0170897 2.2367 40 | -0.00527197 -0.0170402 0.999841 75.236 41 | 13 0.999985 -0.00505961 -0.00206954 -0.780481 42 | 0.00507647 0.999953 0.00822437 1.59917 43 | 0.00202783 -0.00823475 0.999964 74.7765 44 | 14 0.999984 0.00300921 -0.0047046 -3.62959 45 | -0.00299393 0.99999 0.00325187 1.2219 46 | 0.00471434 -0.00323773 0.999984 74.6053 47 | 15 0.999947 -0.00750043 -0.00706998 6.22092 48 | 0.00774317 0.999359 0.0349572 3.11806 49 | 0.00680326 -0.0350101 0.999364 71.5181 50 | 16 0.999403 -0.0114485 -0.0326058 2.07778 51 | 0.0116656 0.999911 0.00647449 1.05384 52 | 0.0325288 -0.00685098 0.999447 71.2059 53 | 17 0.999683 -0.0150251 -0.0202262 0.432415 54 | 0.0151375 0.999871 0.00541232 0.99053 55 | 0.0201422 -0.00571677 0.999781 70.875 56 | 18 0.999665 -0.0256862 0.00315502 -0.397317 57 | 0.0257023 0.999656 -0.00516849 0.177816 58 | -0.00302118 0.00524785 0.999982 70.3865 59 | 19 0.999987 0.000262136 0.00500378 -3.03968 60 | -0.000273201 0.999998 0.00221076 0.697822 61 | -0.00500319 -0.0022121 0.999985 70.0698 62 | 20 0.999972 -0.00737327 -0.00137796 6.76775 63 | 0.00736931 0.999969 -0.00285564 0.128172 64 | 0.00139898 0.00284541 0.999995 67.4879 65 | 21 0.999103 -0.0105404 -0.0410155 1.47084 66 | 0.010926 0.999898 0.00918806 0.91697 67 | 0.0409145 -0.00962795 0.999116 67.1291 68 | 22 0.99912 -0.0108588 -0.0405036 -0.480015 69 | 0.0105617 0.999916 -0.0075417 -0.20619 70 | 0.0405821 0.00710727 0.999151 66.7839 71 | 23 0.999529 -0.00408108 -0.0304071 -2.15518 72 | 0.00398314 0.999987 -0.00328076 0.0725605 73 | 0.0304201 0.0031581 0.999532 66.2824 74 | 24 0.999943 0.00189294 -0.0105446 -3.2023 75 | -0.00201971 0.999926 -0.0120247 -0.522911 76 | 0.0105211 0.0120453 0.999872 65.9078 77 | -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf3/DSC00558.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf3/DSC00558.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf3/DSC00559.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf3/DSC00559.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf3/DSC00560.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf3/DSC00560.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf3/DSC00561.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf3/DSC00561.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf3/DSC00562.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf3/DSC00562.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf3/DSC00563.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf3/DSC00563.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf3/DSC00564.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf3/DSC00564.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf3/DSC00565.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf3/DSC00565.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf3/DSC00566.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf3/DSC00566.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf3/DSC00567.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf3/DSC00567.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf3/DSC00568.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf3/DSC00568.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf3/DSC00569.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf3/DSC00569.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf3/DSC00570.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf3/DSC00570.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf3/DSC00571.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf3/DSC00571.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf3/DSC00572.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf3/DSC00572.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf3/DSC00573.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf3/DSC00573.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf3/DSC00574.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf3/DSC00574.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf3/DSC00575.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf3/DSC00575.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf3/DSC00576.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf3/DSC00576.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf3/DSC00577.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf3/DSC00577.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf3/DSC00578.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf3/DSC00578.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf3/DSC00579.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf3/DSC00579.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf3/DSC00580.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf3/DSC00580.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf3/DSC00581.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf3/DSC00581.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf3/DSC00582.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/data/pinholeCamera/niederdorf3/DSC00582.JPG -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf3/K.txt: -------------------------------------------------------------------------------- 1 | 4409.08 0 2005.06 4409.08 1302.86 2 | -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf3/images.txt: -------------------------------------------------------------------------------- 1 | DSC00558.JPG 2 | DSC00559.JPG 3 | DSC00560.JPG 4 | DSC00561.JPG 5 | DSC00562.JPG 6 | DSC00563.JPG 7 | DSC00564.JPG 8 | DSC00565.JPG 9 | DSC00566.JPG 10 | DSC00567.JPG 11 | DSC00568.JPG 12 | DSC00569.JPG 13 | DSC00570.JPG 14 | DSC00571.JPG 15 | DSC00572.JPG 16 | DSC00573.JPG 17 | DSC00574.JPG 18 | DSC00575.JPG 19 | DSC00576.JPG 20 | DSC00577.JPG 21 | DSC00578.JPG 22 | DSC00579.JPG 23 | DSC00580.JPG 24 | DSC00581.JPG 25 | DSC00582.JPG 26 | -------------------------------------------------------------------------------- /data/pinholeCamera/niederdorf3/model-0-cams.txt: -------------------------------------------------------------------------------- 1 | 25 2 | 0 0.999998 -0.000681437 0.00200286 13.5599 3 | 0.000681029 1 0.000204489 3.72265 4 | -0.002003 -0.000203124 0.999998 94.5337 5 | 1 0.999977 0.00389278 0.00557673 10.5704 6 | -0.00395851 0.999922 0.0118249 4.68372 7 | -0.00553027 -0.0118467 0.999915 94.9872 8 | 2 0.999944 -0.00936251 -0.00494251 6.14182 9 | 0.00941097 0.999907 0.00987523 4.40411 10 | 0.0048496 -0.00992119 0.999939 95.38 11 | 3 0.999995 0.000800102 -0.00296423 3.00033 12 | -0.00080646 0.999997 -0.00214425 3.13366 13 | 0.00296251 0.00214663 0.999993 95.3011 14 | 4 0.999857 0.00333831 -0.0165781 -1.88198 15 | -0.00339287 0.999989 -0.0032641 3.11107 16 | 0.016567 0.00331988 0.999857 95.3718 17 | 5 0.999987 0.00513836 -0.000415133 12.5641 18 | -0.00513036 0.999835 0.0174005 4.94146 19 | 0.000504475 -0.0173981 0.999849 88.7109 20 | 6 0.99974 0.00831168 -0.021216 6.87902 21 | -0.00780082 0.99968 0.0240492 5.36617 22 | 0.0214091 -0.0238775 0.999486 89.3658 23 | 7 0.999978 -0.00576437 0.00334395 5.69983 24 | 0.00568948 0.999742 0.0219881 5.19437 25 | -0.00346984 -0.0219686 0.999753 89.9198 26 | 8 0.999915 -0.00436184 -0.0122575 0.493388 27 | 0.00447789 0.999945 0.0094555 4.02495 28 | 0.0122156 -0.00950959 0.99988 90.0336 29 | 9 0.999768 -0.00757538 -0.0201475 -3.13592 30 | 0.00768315 0.999957 0.0052769 3.68208 31 | 0.0201067 -0.00543048 0.999783 90.0174 32 | 10 0.999883 0.00892956 -0.0124261 11.2637 33 | -0.00891222 0.999959 0.00145054 3.15138 34 | 0.0124386 -0.00133963 0.999922 84.0173 35 | 11 0.998876 0.00473166 -0.0471689 5.26275 36 | -0.00503767 0.999967 -0.00637072 2.36719 37 | 0.0471372 0.00660118 0.998867 84.3481 38 | 12 0.999058 0.00700666 -0.0428232 2.63233 39 | -0.00662494 0.999937 0.0090494 3.6512 40 | 0.042884 -0.00875718 0.999042 84.7899 41 | 13 0.99905 -0.00330611 -0.0434422 -0.733805 42 | 0.00452196 0.9996 0.0279193 5.23533 43 | 0.0433325 -0.0280892 0.998666 84.7132 44 | 14 0.999348 -0.0084586 -0.0350951 -3.22473 45 | 0.00929096 0.999678 0.0236224 4.92631 46 | 0.0348839 -0.023933 0.999105 84.469 47 | 15 0.999996 -0.002476 0.00142681 12.3442 48 | 0.00243623 0.999626 0.0272282 5.2255 49 | -0.0014937 -0.0272246 0.999628 80.5999 50 | 16 0.998907 0.0208575 -0.0418399 5.18994 51 | -0.0204874 0.999747 0.00925591 3.41133 52 | 0.0420224 -0.0083886 0.999081 81.2283 53 | 17 0.999463 0.00512499 -0.0323585 2.78388 54 | -0.00519489 0.999984 -0.00207649 2.43772 55 | 0.0323473 0.00224348 0.999474 81.1892 56 | 18 0.999908 0.0119002 -0.00650318 1.84492 57 | -0.0118564 0.999907 0.00673507 3.23092 58 | 0.00658272 -0.00665735 0.999956 81.417 59 | 19 0.999831 0.00945842 -0.0157522 -2.34477 60 | -0.00934752 0.999931 0.00709939 3.36085 61 | 0.0158183 -0.00695095 0.999851 81.4994 62 | 20 0.998517 0.0118926 -0.0531273 8.59603 63 | -0.0116512 0.99992 0.00485179 3.03671 64 | 0.0531807 -0.0042256 0.998576 77.2499 65 | 21 0.998748 0.00312711 -0.0499167 6.27411 66 | -0.00374898 0.999916 -0.0123694 1.61528 67 | 0.0498739 0.0125411 0.998677 76.8836 68 | 22 0.998159 0.00973752 -0.0598582 2.83566 69 | -0.00963663 0.999952 0.00197392 2.64889 70 | 0.0598745 -0.00139345 0.998205 77.1481 71 | 23 0.999931 -0.00382147 -0.011121 3.41581 72 | 0.0038929 0.999972 0.00640892 2.92552 73 | 0.0110962 -0.00645177 0.999918 76.6853 74 | 24 0.999387 -0.00117203 -0.0350013 -2.46397 75 | 0.00138237 0.999981 0.00598564 2.89993 76 | 0.0349936 -0.00603035 0.999369 76.6395 77 | -------------------------------------------------------------------------------- /referenceTestResults/fisheyeCamera/left/grayscaleSAD/BestK/invDepthCol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/fisheyeCamera/left/grayscaleSAD/BestK/invDepthCol.png -------------------------------------------------------------------------------- /referenceTestResults/fisheyeCamera/left/grayscaleSAD/BestK/refImg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/fisheyeCamera/left/grayscaleSAD/BestK/refImg.png -------------------------------------------------------------------------------- /referenceTestResults/fisheyeCamera/left/grayscaleSAD/NoOcclusionHandling/invDepthCol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/fisheyeCamera/left/grayscaleSAD/NoOcclusionHandling/invDepthCol.png -------------------------------------------------------------------------------- /referenceTestResults/fisheyeCamera/left/grayscaleSAD/NoOcclusionHandling/refImg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/fisheyeCamera/left/grayscaleSAD/NoOcclusionHandling/refImg.png -------------------------------------------------------------------------------- /referenceTestResults/fisheyeCamera/left/grayscaleSAD/RefSplit/invDepthCol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/fisheyeCamera/left/grayscaleSAD/RefSplit/invDepthCol.png -------------------------------------------------------------------------------- /referenceTestResults/fisheyeCamera/left/grayscaleSAD/RefSplit/refImg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/fisheyeCamera/left/grayscaleSAD/RefSplit/refImg.png -------------------------------------------------------------------------------- /referenceTestResults/fisheyeCamera/left/grayscaleZNCC/BestK/invDepthCol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/fisheyeCamera/left/grayscaleZNCC/BestK/invDepthCol.png -------------------------------------------------------------------------------- /referenceTestResults/fisheyeCamera/left/grayscaleZNCC/BestK/refImg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/fisheyeCamera/left/grayscaleZNCC/BestK/refImg.png -------------------------------------------------------------------------------- /referenceTestResults/fisheyeCamera/left/grayscaleZNCC/NoOcclusionHandling/invDepthCol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/fisheyeCamera/left/grayscaleZNCC/NoOcclusionHandling/invDepthCol.png -------------------------------------------------------------------------------- /referenceTestResults/fisheyeCamera/left/grayscaleZNCC/NoOcclusionHandling/refImg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/fisheyeCamera/left/grayscaleZNCC/NoOcclusionHandling/refImg.png -------------------------------------------------------------------------------- /referenceTestResults/fisheyeCamera/left/grayscaleZNCC/RefSplit/invDepthCol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/fisheyeCamera/left/grayscaleZNCC/RefSplit/invDepthCol.png -------------------------------------------------------------------------------- /referenceTestResults/fisheyeCamera/left/grayscaleZNCC/RefSplit/refImg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/fisheyeCamera/left/grayscaleZNCC/RefSplit/refImg.png -------------------------------------------------------------------------------- /referenceTestResults/fisheyeCamera/right/grayscaleSAD/BestK/invDepthCol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/fisheyeCamera/right/grayscaleSAD/BestK/invDepthCol.png -------------------------------------------------------------------------------- /referenceTestResults/fisheyeCamera/right/grayscaleSAD/BestK/refImg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/fisheyeCamera/right/grayscaleSAD/BestK/refImg.png -------------------------------------------------------------------------------- /referenceTestResults/fisheyeCamera/right/grayscaleSAD/NoOcclusionHandling/invDepthCol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/fisheyeCamera/right/grayscaleSAD/NoOcclusionHandling/invDepthCol.png -------------------------------------------------------------------------------- /referenceTestResults/fisheyeCamera/right/grayscaleSAD/NoOcclusionHandling/refImg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/fisheyeCamera/right/grayscaleSAD/NoOcclusionHandling/refImg.png -------------------------------------------------------------------------------- /referenceTestResults/fisheyeCamera/right/grayscaleSAD/RefSplit/invDepthCol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/fisheyeCamera/right/grayscaleSAD/RefSplit/invDepthCol.png -------------------------------------------------------------------------------- /referenceTestResults/fisheyeCamera/right/grayscaleSAD/RefSplit/refImg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/fisheyeCamera/right/grayscaleSAD/RefSplit/refImg.png -------------------------------------------------------------------------------- /referenceTestResults/fisheyeCamera/right/grayscaleZNCC/BestK/invDepthCol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/fisheyeCamera/right/grayscaleZNCC/BestK/invDepthCol.png -------------------------------------------------------------------------------- /referenceTestResults/fisheyeCamera/right/grayscaleZNCC/BestK/refImg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/fisheyeCamera/right/grayscaleZNCC/BestK/refImg.png -------------------------------------------------------------------------------- /referenceTestResults/fisheyeCamera/right/grayscaleZNCC/NoOcclusionHandling/invDepthCol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/fisheyeCamera/right/grayscaleZNCC/NoOcclusionHandling/invDepthCol.png -------------------------------------------------------------------------------- /referenceTestResults/fisheyeCamera/right/grayscaleZNCC/NoOcclusionHandling/refImg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/fisheyeCamera/right/grayscaleZNCC/NoOcclusionHandling/refImg.png -------------------------------------------------------------------------------- /referenceTestResults/fisheyeCamera/right/grayscaleZNCC/RefSplit/invDepthCol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/fisheyeCamera/right/grayscaleZNCC/RefSplit/invDepthCol.png -------------------------------------------------------------------------------- /referenceTestResults/fisheyeCamera/right/grayscaleZNCC/RefSplit/refImg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/fisheyeCamera/right/grayscaleZNCC/RefSplit/refImg.png -------------------------------------------------------------------------------- /referenceTestResults/pinholeCamera/niederdorf1/colorSAD/BestK/invDepthCol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/pinholeCamera/niederdorf1/colorSAD/BestK/invDepthCol.png -------------------------------------------------------------------------------- /referenceTestResults/pinholeCamera/niederdorf1/colorSAD/BestK/refImg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/pinholeCamera/niederdorf1/colorSAD/BestK/refImg.png -------------------------------------------------------------------------------- /referenceTestResults/pinholeCamera/niederdorf1/colorSAD/NoOcclusionHandling/invDepthCol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/pinholeCamera/niederdorf1/colorSAD/NoOcclusionHandling/invDepthCol.png -------------------------------------------------------------------------------- /referenceTestResults/pinholeCamera/niederdorf1/colorSAD/NoOcclusionHandling/refImg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/pinholeCamera/niederdorf1/colorSAD/NoOcclusionHandling/refImg.png -------------------------------------------------------------------------------- /referenceTestResults/pinholeCamera/niederdorf1/colorSAD/RefSplit/invDepthCol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/pinholeCamera/niederdorf1/colorSAD/RefSplit/invDepthCol.png -------------------------------------------------------------------------------- /referenceTestResults/pinholeCamera/niederdorf1/colorSAD/RefSplit/refImg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/pinholeCamera/niederdorf1/colorSAD/RefSplit/refImg.png -------------------------------------------------------------------------------- /referenceTestResults/pinholeCamera/niederdorf1/grayscaleSAD/BestK/invDepthCol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/pinholeCamera/niederdorf1/grayscaleSAD/BestK/invDepthCol.png -------------------------------------------------------------------------------- /referenceTestResults/pinholeCamera/niederdorf1/grayscaleSAD/BestK/refImg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/pinholeCamera/niederdorf1/grayscaleSAD/BestK/refImg.png -------------------------------------------------------------------------------- /referenceTestResults/pinholeCamera/niederdorf1/grayscaleSAD/NoOcclusionHandling/invDepthCol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/pinholeCamera/niederdorf1/grayscaleSAD/NoOcclusionHandling/invDepthCol.png -------------------------------------------------------------------------------- /referenceTestResults/pinholeCamera/niederdorf1/grayscaleSAD/NoOcclusionHandling/refImg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/pinholeCamera/niederdorf1/grayscaleSAD/NoOcclusionHandling/refImg.png -------------------------------------------------------------------------------- /referenceTestResults/pinholeCamera/niederdorf1/grayscaleSAD/RefSplit/invDepthCol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/pinholeCamera/niederdorf1/grayscaleSAD/RefSplit/invDepthCol.png -------------------------------------------------------------------------------- /referenceTestResults/pinholeCamera/niederdorf1/grayscaleSAD/RefSplit/refImg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/pinholeCamera/niederdorf1/grayscaleSAD/RefSplit/refImg.png -------------------------------------------------------------------------------- /referenceTestResults/pinholeCamera/niederdorf1/grayscaleZNCC/BestK/invDepthCol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/pinholeCamera/niederdorf1/grayscaleZNCC/BestK/invDepthCol.png -------------------------------------------------------------------------------- /referenceTestResults/pinholeCamera/niederdorf1/grayscaleZNCC/BestK/refImg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/pinholeCamera/niederdorf1/grayscaleZNCC/BestK/refImg.png -------------------------------------------------------------------------------- /referenceTestResults/pinholeCamera/niederdorf1/grayscaleZNCC/NoOcclusionHandling/invDepthCol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/pinholeCamera/niederdorf1/grayscaleZNCC/NoOcclusionHandling/invDepthCol.png -------------------------------------------------------------------------------- /referenceTestResults/pinholeCamera/niederdorf1/grayscaleZNCC/NoOcclusionHandling/refImg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/pinholeCamera/niederdorf1/grayscaleZNCC/NoOcclusionHandling/refImg.png -------------------------------------------------------------------------------- /referenceTestResults/pinholeCamera/niederdorf1/grayscaleZNCC/RefSplit/invDepthCol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/pinholeCamera/niederdorf1/grayscaleZNCC/RefSplit/invDepthCol.png -------------------------------------------------------------------------------- /referenceTestResults/pinholeCamera/niederdorf1/grayscaleZNCC/RefSplit/refImg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/pinholeCamera/niederdorf1/grayscaleZNCC/RefSplit/refImg.png -------------------------------------------------------------------------------- /referenceTestResults/pinholeCamera/niederdorf2/colorSAD/BestK/invDepthCol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/pinholeCamera/niederdorf2/colorSAD/BestK/invDepthCol.png -------------------------------------------------------------------------------- /referenceTestResults/pinholeCamera/niederdorf2/colorSAD/BestK/refImg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/pinholeCamera/niederdorf2/colorSAD/BestK/refImg.png -------------------------------------------------------------------------------- /referenceTestResults/pinholeCamera/niederdorf2/colorSAD/NoOcclusionHandling/invDepthCol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/pinholeCamera/niederdorf2/colorSAD/NoOcclusionHandling/invDepthCol.png -------------------------------------------------------------------------------- /referenceTestResults/pinholeCamera/niederdorf2/colorSAD/NoOcclusionHandling/refImg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/pinholeCamera/niederdorf2/colorSAD/NoOcclusionHandling/refImg.png -------------------------------------------------------------------------------- /referenceTestResults/pinholeCamera/niederdorf2/colorSAD/RefSplit/invDepthCol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/pinholeCamera/niederdorf2/colorSAD/RefSplit/invDepthCol.png -------------------------------------------------------------------------------- /referenceTestResults/pinholeCamera/niederdorf2/colorSAD/RefSplit/refImg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/pinholeCamera/niederdorf2/colorSAD/RefSplit/refImg.png -------------------------------------------------------------------------------- /referenceTestResults/pinholeCamera/niederdorf2/grayscaleSAD/BestK/invDepthCol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/pinholeCamera/niederdorf2/grayscaleSAD/BestK/invDepthCol.png -------------------------------------------------------------------------------- /referenceTestResults/pinholeCamera/niederdorf2/grayscaleSAD/BestK/refImg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/pinholeCamera/niederdorf2/grayscaleSAD/BestK/refImg.png -------------------------------------------------------------------------------- /referenceTestResults/pinholeCamera/niederdorf2/grayscaleSAD/NoOcclusionHandling/invDepthCol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/pinholeCamera/niederdorf2/grayscaleSAD/NoOcclusionHandling/invDepthCol.png -------------------------------------------------------------------------------- /referenceTestResults/pinholeCamera/niederdorf2/grayscaleSAD/NoOcclusionHandling/refImg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/pinholeCamera/niederdorf2/grayscaleSAD/NoOcclusionHandling/refImg.png -------------------------------------------------------------------------------- /referenceTestResults/pinholeCamera/niederdorf2/grayscaleSAD/RefSplit/invDepthCol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/pinholeCamera/niederdorf2/grayscaleSAD/RefSplit/invDepthCol.png -------------------------------------------------------------------------------- /referenceTestResults/pinholeCamera/niederdorf2/grayscaleSAD/RefSplit/refImg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/pinholeCamera/niederdorf2/grayscaleSAD/RefSplit/refImg.png -------------------------------------------------------------------------------- /referenceTestResults/pinholeCamera/niederdorf2/grayscaleZNCC/BestK/invDepthCol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/pinholeCamera/niederdorf2/grayscaleZNCC/BestK/invDepthCol.png -------------------------------------------------------------------------------- /referenceTestResults/pinholeCamera/niederdorf2/grayscaleZNCC/BestK/refImg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/pinholeCamera/niederdorf2/grayscaleZNCC/BestK/refImg.png -------------------------------------------------------------------------------- /referenceTestResults/pinholeCamera/niederdorf2/grayscaleZNCC/NoOcclusionHandling/invDepthCol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/pinholeCamera/niederdorf2/grayscaleZNCC/NoOcclusionHandling/invDepthCol.png -------------------------------------------------------------------------------- /referenceTestResults/pinholeCamera/niederdorf2/grayscaleZNCC/NoOcclusionHandling/refImg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/pinholeCamera/niederdorf2/grayscaleZNCC/NoOcclusionHandling/refImg.png -------------------------------------------------------------------------------- /referenceTestResults/pinholeCamera/niederdorf2/grayscaleZNCC/RefSplit/invDepthCol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/pinholeCamera/niederdorf2/grayscaleZNCC/RefSplit/invDepthCol.png -------------------------------------------------------------------------------- /referenceTestResults/pinholeCamera/niederdorf2/grayscaleZNCC/RefSplit/refImg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/pinholeCamera/niederdorf2/grayscaleZNCC/RefSplit/refImg.png -------------------------------------------------------------------------------- /referenceTestResults/pinholeCamera/niederdorf3/colorSAD/BestK/invDepthCol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/pinholeCamera/niederdorf3/colorSAD/BestK/invDepthCol.png -------------------------------------------------------------------------------- /referenceTestResults/pinholeCamera/niederdorf3/colorSAD/BestK/refImg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/pinholeCamera/niederdorf3/colorSAD/BestK/refImg.png -------------------------------------------------------------------------------- /referenceTestResults/pinholeCamera/niederdorf3/colorSAD/NoOcclusionHandling/invDepthCol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/pinholeCamera/niederdorf3/colorSAD/NoOcclusionHandling/invDepthCol.png -------------------------------------------------------------------------------- /referenceTestResults/pinholeCamera/niederdorf3/colorSAD/NoOcclusionHandling/refImg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/pinholeCamera/niederdorf3/colorSAD/NoOcclusionHandling/refImg.png -------------------------------------------------------------------------------- /referenceTestResults/pinholeCamera/niederdorf3/colorSAD/RefSplit/invDepthCol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/pinholeCamera/niederdorf3/colorSAD/RefSplit/invDepthCol.png -------------------------------------------------------------------------------- /referenceTestResults/pinholeCamera/niederdorf3/colorSAD/RefSplit/refImg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/pinholeCamera/niederdorf3/colorSAD/RefSplit/refImg.png -------------------------------------------------------------------------------- /referenceTestResults/pinholeCamera/niederdorf3/grayscaleSAD/BestK/invDepthCol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/pinholeCamera/niederdorf3/grayscaleSAD/BestK/invDepthCol.png -------------------------------------------------------------------------------- /referenceTestResults/pinholeCamera/niederdorf3/grayscaleSAD/BestK/refImg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/pinholeCamera/niederdorf3/grayscaleSAD/BestK/refImg.png -------------------------------------------------------------------------------- /referenceTestResults/pinholeCamera/niederdorf3/grayscaleSAD/NoOcclusionHandling/invDepthCol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/pinholeCamera/niederdorf3/grayscaleSAD/NoOcclusionHandling/invDepthCol.png -------------------------------------------------------------------------------- /referenceTestResults/pinholeCamera/niederdorf3/grayscaleSAD/NoOcclusionHandling/refImg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/pinholeCamera/niederdorf3/grayscaleSAD/NoOcclusionHandling/refImg.png -------------------------------------------------------------------------------- /referenceTestResults/pinholeCamera/niederdorf3/grayscaleSAD/RefSplit/invDepthCol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/pinholeCamera/niederdorf3/grayscaleSAD/RefSplit/invDepthCol.png -------------------------------------------------------------------------------- /referenceTestResults/pinholeCamera/niederdorf3/grayscaleSAD/RefSplit/refImg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/pinholeCamera/niederdorf3/grayscaleSAD/RefSplit/refImg.png -------------------------------------------------------------------------------- /referenceTestResults/pinholeCamera/niederdorf3/grayscaleZNCC/BestK/invDepthCol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/pinholeCamera/niederdorf3/grayscaleZNCC/BestK/invDepthCol.png -------------------------------------------------------------------------------- /referenceTestResults/pinholeCamera/niederdorf3/grayscaleZNCC/BestK/refImg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/pinholeCamera/niederdorf3/grayscaleZNCC/BestK/refImg.png -------------------------------------------------------------------------------- /referenceTestResults/pinholeCamera/niederdorf3/grayscaleZNCC/NoOcclusionHandling/invDepthCol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/pinholeCamera/niederdorf3/grayscaleZNCC/NoOcclusionHandling/invDepthCol.png -------------------------------------------------------------------------------- /referenceTestResults/pinholeCamera/niederdorf3/grayscaleZNCC/NoOcclusionHandling/refImg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/pinholeCamera/niederdorf3/grayscaleZNCC/NoOcclusionHandling/refImg.png -------------------------------------------------------------------------------- /referenceTestResults/pinholeCamera/niederdorf3/grayscaleZNCC/RefSplit/invDepthCol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/pinholeCamera/niederdorf3/grayscaleZNCC/RefSplit/invDepthCol.png -------------------------------------------------------------------------------- /referenceTestResults/pinholeCamera/niederdorf3/grayscaleZNCC/RefSplit/refImg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastienjacquet/PlaneSweepLib/db1d1883055ebd730b7e3d197bbbc4c781ee4e63/referenceTestResults/pinholeCamera/niederdorf3/grayscaleZNCC/RefSplit/refImg.png -------------------------------------------------------------------------------- /runFisheyePlanesweepTestsLinux.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ -d "testResults/fisheyeCamera/" ]; then 4 | echo "Old results found. They need to be deleted before running the tests again, do you want to delete them?" 5 | rm -r -I testResults/fisheyeCamera/ 6 | fi 7 | 8 | if [ ! -d "testResults/fisheyeCamera/" ]; then 9 | mkdir -p testResults/fisheyeCamera/ 10 | 11 | echo "Runing fisheye planesweep on the left dataset..." 12 | build/bin/fisheyePlanesweepTest --dataFolder ./data/fisheyeCamera/left/ 13 | mv fisheyeTestResults testResults/fisheyeCamera/left/ 14 | echo "done" 15 | 16 | echo "Runing fisheye planesweep on the right dataset..." 17 | build/bin/fisheyePlanesweepTest --dataFolder ./data/fisheyeCamera/right/ 18 | mv fisheyeTestResults testResults/fisheyeCamera/right/ 19 | echo "done" 20 | fi 21 | 22 | -------------------------------------------------------------------------------- /runFisheyePlanesweepTestsWindows.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | if exist .\testResults\fisheyeCamera ( 4 | echo Old results found. They need to be deleted before running the tests again, do you want to delete them? 5 | rmdir /S .\testResults\fisheyeCamera 6 | ) 7 | 8 | if not exist .\testResults\fisheyeCamera ( 9 | mkdir .\testResults\fisheyeCamera 10 | 11 | echo Runing fisheye planesweep on the left dataset... 12 | build\bin\Release\fisheyePlanesweepTest --dataFolder .\data\fisheyeCamera\left\ 13 | move fisheyeTestResults testResults\fisheyeCamera\left 14 | echo done 15 | 16 | echo Runing fisheye planesweep on the right dataset... 17 | build\bin\Release\fisheyePlanesweepTest --dataFolder .\data\fisheyeCamera\right\ 18 | move fisheyeTestResults testResults\fisheyeCamera\right 19 | echo done 20 | ) 21 | 22 | 23 | -------------------------------------------------------------------------------- /runPinholePlanesweepTestsLinux.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ -d "testResults/pinholeCamera/" ]; then 4 | echo "Old results found. They need to be deleted before running the tests again, do you want to delete them?" 5 | rm -r -I testResults/pinholeCamera 6 | fi 7 | 8 | if [ ! -d "testResults/pinholeCamera/" ]; then 9 | mkdir -p testResults/pinholeCamera/ 10 | 11 | echo "Runing pinhole planesweep on the niederdorf1 dataset..." 12 | build/bin/pinholePlanesweepTest --dataFolder ./data/pinholeCamera/niederdorf1/ 13 | mv pinholeTestResults testResults/pinholeCamera/niederdorf1 14 | echo "done" 15 | 16 | echo "Runing pinhole planesweep on the niederdorf2 dataset..." 17 | build/bin/pinholePlanesweepTest --dataFolder ./data/pinholeCamera/niederdorf2/ 18 | mv pinholeTestResults testResults/pinholeCamera/niederdorf2 19 | echo "done" 20 | 21 | echo "Runing pinhole planesweep on the niederdorf3 dataset..." 22 | build/bin/pinholePlanesweepTest --dataFolder ./data/pinholeCamera/niederdorf3/ 23 | mv pinholeTestResults testResults/pinholeCamera/niederdorf3 24 | echo "done" 25 | fi 26 | -------------------------------------------------------------------------------- /runPinholePlanesweepTestsWindows.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | if exist .\testResults\pinholeCamera ( 4 | echo Old results found. They need to be deleted before running the tests again, do you want to delete them? 5 | rmdir /S .\testResults\pinholeCamera 6 | ) 7 | 8 | if not exist .\testResults\pinholeCamera ( 9 | mkdir .\testResults\pinholeCamera 10 | 11 | echo Runing pinhole planesweep on the niederdorf1 dataset... 12 | build\bin\Release\pinholePlanesweepTest --dataFolder .\data\pinholeCamera\niederdorf1\ 13 | move pinholeTestResults testResults\pinholeCamera\niederdorf1 14 | echo done 15 | 16 | echo Runing pinhole planesweep on the niederdorf2 dataset... 17 | build\bin\Release\pinholePlanesweepTest --dataFolder .\data\pinholeCamera\niederdorf2\ 18 | move pinholeTestResults testResults\pinholeCamera\niederdorf2 19 | echo done 20 | 21 | echo Runing pinhole planesweep on the niederdorf3 dataset... 22 | build\bin\Release\pinholePlanesweepTest --dataFolder .\data\pinholeCamera\niederdorf3\ 23 | move pinholeTestResults testResults\pinholeCamera\niederdorf3 24 | echo done 25 | ) 26 | -------------------------------------------------------------------------------- /src/Apps/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | find_package(VTK REQUIRED) 2 | include(${VTK_USE_FILE}) 3 | 4 | add_executable(cudaPlanesweepMAPTk cudaPlanesweepMAPTk.cpp) 5 | target_link_libraries(cudaPlanesweepMAPTk PSL ${VTK_LIBRARIES} ${Boost_LIBRARIES} ${OpenCV_LIBRARIES}) 6 | -------------------------------------------------------------------------------- /src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(PSL) 2 | add_subdirectory(PSLTests) 3 | add_subdirectory(Apps) 4 | -------------------------------------------------------------------------------- /src/PSL/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | file(GLOB PSL_BASE_SRC_FILES 2 | "psl_base/*.cpp" 3 | "psl_base/*.h" 4 | ) 5 | 6 | file(GLOB PSL_IO_SRC_FILES 7 | "psl_io/*.cpp" 8 | "psl_io/*.h" 9 | ) 10 | 11 | file(GLOB PSL_STEREO_SRC_FILES 12 | "psl_stereo/*.cpp" 13 | "psl_stereo/*.h" 14 | ) 15 | 16 | file(GLOB PSL_CUDA_BASE_SRC_FILES 17 | "psl_cudaBase/*.cpp" 18 | "psl_cudaBase/*.h" 19 | ) 20 | 21 | cuda_compile(PSL_CUDA_SRC_FILES 22 | psl_stereo/cudaPlaneSweep.cu 23 | psl_stereo/cudaFishEyePlaneSweep.cu 24 | psl_cudaBase/deviceBuffer.cu 25 | psl_cudaBase/deviceImage.cu 26 | psl_cudaBase/cudaFishEyeImageProcessor.cu 27 | OPTIONS 28 | -use_fast_math 29 | #-arch sm_10 30 | #-Xcompiler -fpic 31 | ) 32 | 33 | add_library(PSL STATIC 34 | ${PSL_BASE_SRC_FILES} 35 | ${PSL_IO_SRC_FILES} 36 | ${PSL_STEREO_SRC_FILES} 37 | ${PSL_CUDA_BASE_SRC_FILES} 38 | ${PSL_CUDA_SRC_FILES} 39 | ) 40 | 41 | target_link_libraries(PSL 42 | ${OpenCV_LIBRARIES} 43 | ${CUDA_CUDART_LIBRARY} 44 | ) 45 | -------------------------------------------------------------------------------- /src/PSL/psl_base/cameraMatrix.cpp: -------------------------------------------------------------------------------- 1 | // This file is part of PlaneSweepLib (PSL) 2 | 3 | // Copyright 2016 Christian Haene (ETH Zuerich) 4 | 5 | // PSL is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | 10 | // PSL is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | 15 | // You should have received a copy of the GNU General Public License 16 | // along with PSL. If not, see . 17 | 18 | 19 | #include "cameraMatrix.h" 20 | 21 | #include 22 | #include 23 | #include 24 | #include 25 | 26 | using namespace PSL; 27 | using Eigen::Matrix; 28 | 29 | template 30 | CameraMatrix::CameraMatrix() 31 | { 32 | this->K.setIdentity(); 33 | this->R.setIdentity(); 34 | this->T.setZero(); 35 | 36 | recomputeStoredValues(); 37 | } 38 | 39 | template 40 | CameraMatrix::CameraMatrix(const Matrix &K, const Matrix &R, const Matrix& T) 41 | { 42 | this->K = K; 43 | this->R = R; 44 | this->T = T; 45 | 46 | // scale K such that K(2,2) = 1 47 | NumericType scale = 1/K(2,2); 48 | this->K *= scale; 49 | 50 | recomputeStoredValues(); 51 | } 52 | 53 | template 54 | CameraMatrix::CameraMatrix(const CameraMatrix &otherCameraMatrix) 55 | { 56 | this->K = otherCameraMatrix.K; 57 | this->R = otherCameraMatrix.R; 58 | this->T = otherCameraMatrix.T; 59 | 60 | recomputeStoredValues(); 61 | } 62 | 63 | template 64 | CameraMatrix& CameraMatrix::operator=(const CameraMatrix& otherCameraMatrix) 65 | { 66 | this->K = otherCameraMatrix.K; 67 | this->R = otherCameraMatrix.R; 68 | this->T = otherCameraMatrix.T; 69 | 70 | recomputeStoredValues(); 71 | 72 | return *this; 73 | } 74 | 75 | template 76 | CameraMatrix::CameraMatrix(const Matrix& P) 77 | { 78 | setP(P); 79 | } 80 | 81 | template 82 | void CameraMatrix::setP(const Matrix& P) 83 | { 84 | K(0,0) = P(0,0); K(0,1) = P(0,1); K(0,2) = P(0,2); 85 | K(1,0) = P(1,0); K(1,1) = P(1,1); K(1,2) = P(1,2); 86 | K(2,0) = P(2,0); K(2,1) = P(2,1); K(2,2) = P(2,2); 87 | 88 | // Calculate RQ decomposition of M 89 | // Hartley & Zissermann, p579 (2nd ed) 90 | 91 | NumericType d = std::sqrt(K(2,2)*K(2,2) + K(2,1)*K(2,1)); 92 | NumericType c = -K(2,2)/d; 93 | NumericType s = K(2,1)/d; 94 | 95 | Matrix Rx; 96 | Rx(0,0) = 1; Rx(0,1) = 0; Rx(0,2) = 0; 97 | Rx(1,0) = 0; Rx(1,1) = c; Rx(1,2) = -s; 98 | Rx(2,0) = 0; Rx(2,1) = s; Rx(2,2) = c; 99 | 100 | K = K*Rx; 101 | 102 | d = std::sqrt(K(2,2)*K(2,2) + K(2,0)*K(2,0)); 103 | c = K(2,2)/d; 104 | s = K(2,0)/d; 105 | 106 | Matrix Ry; 107 | Ry(0,0) = c; Ry(0,1) = 0; Ry(0,2) = s; 108 | Ry(1,0) = 0; Ry(1,1) = 1; Ry(1,2) = 0; 109 | Ry(2,0) = -s; Ry(2,1) = 0; Ry(2,2) = c; 110 | 111 | K = K*Ry; 112 | 113 | d = std::sqrt(K(1,1)*K(1,1) + K(1,0)*K(1,0)); 114 | c = -K(1,1)/d; 115 | s = K(1,0)/d; 116 | 117 | Matrix Rz; 118 | Rz(0,0) = c; Rz(0,1) = -s; Rz(0,2) = 0; 119 | Rz(1,0) = s; Rz(1,1) = c; Rz(1,2) = 0; 120 | Rz(2,0) = 0; Rz(2,1) = 0; Rz(2,2) = 1; 121 | 122 | K = K*Rz; 123 | 124 | Matrix Sign; 125 | Sign.setIdentity(); 126 | if (K(0,0) < 0) Sign(0,0) = -1; 127 | if (K(1,1) < 0) Sign(1,1) = -1; 128 | if (K(2,2) < 0) Sign(2,2) = -1; 129 | 130 | K = K*Sign; 131 | 132 | R = Rx*Ry*Rz*Sign; 133 | R.transposeInPlace(); 134 | 135 | T(0) = P(0,3); 136 | T(1) = P(1,3); 137 | T(2) = P(2,3); 138 | 139 | T = K.inverse()*T; 140 | 141 | // scale K such that K(2,2) = 1 142 | NumericType scale = 1/K(2,2); 143 | K(0,0) *= scale; K(0,1) *= scale; K(0,2) *= scale; 144 | K(1,1) *= scale; K(1,2) *= scale; 145 | K(2,2) *= scale; 146 | 147 | recomputeStoredValues(); 148 | } 149 | 150 | template 151 | const Matrix& CameraMatrix::getK() const 152 | { 153 | return K; 154 | } 155 | 156 | template 157 | const Matrix& CameraMatrix::getR() const 158 | { 159 | return R; 160 | } 161 | 162 | template 163 | const Matrix& CameraMatrix::getT() const 164 | { 165 | return T; 166 | } 167 | 168 | template 169 | const Matrix& CameraMatrix::getC() const 170 | { 171 | return C; 172 | } 173 | 174 | template 175 | const Matrix& CameraMatrix::getP() const 176 | { 177 | return P; 178 | } 179 | 180 | template 181 | void CameraMatrix::setKRT(const Matrix& K, const Matrix& R, const Matrix& T) 182 | { 183 | this->K = K; 184 | this->R = R; 185 | this->T = T; 186 | 187 | recomputeStoredValues(); 188 | } 189 | 190 | template 191 | void CameraMatrix::setRT(const Matrix& RT) 192 | { 193 | Matrix R; 194 | Matrix T; 195 | R(0,0)=RT(0,0); R(0,1)=RT(0,1); R(0,2)=RT(0,2); T(0)=RT(0,3); 196 | R(1,0)=RT(1,0); R(1,1)=RT(1,1); R(1,2)=RT(1,2); T(1)=RT(1,3); 197 | R(2,0)=RT(2,0); R(2,1)=RT(2,1); R(2,2)=RT(2,2); T(2)=RT(2,3); 198 | 199 | this->R = R; 200 | this->T = T; 201 | 202 | recomputeStoredValues(); 203 | } 204 | 205 | template 206 | const Matrix &CameraMatrix::getCam2Global() const 207 | { 208 | return cam2Global; 209 | } 210 | 211 | template 212 | void CameraMatrix::recomputeStoredValues() 213 | { 214 | // compute P 215 | P.topLeftCorner(3,3) = R; 216 | P.rightCols(1) = T; 217 | P = K*P; 218 | 219 | // compute C 220 | C = -R.inverse()*T; 221 | 222 | // compute cam2Global 223 | cam2Global.setIdentity(); 224 | cam2Global.topLeftCorner(3,3) = R.transpose(); 225 | cam2Global.topRightCorner(3,1) = C; 226 | } 227 | 228 | template 229 | Matrix CameraMatrix::unprojectPoint(NumericType x, NumericType y, NumericType depth) const 230 | { 231 | Matrix point; 232 | 233 | point(0) = (x - K(0,2))*depth/K(0,0); 234 | point(1) = (y - K(1,2))*depth/K(1,1); 235 | point(2) = depth; 236 | point(3) = 1; 237 | 238 | return cam2Global*point; 239 | } 240 | 241 | template 242 | void CameraMatrix::scaleK(NumericType scale_x, NumericType scale_y) 243 | { 244 | K(0,0) *= scale_x; 245 | K(0,1) *= scale_x; 246 | K(0,2) = (K(0,2) + (NumericType) 0.5)*scale_x - (NumericType) 0.5; 247 | K(1,1) *= scale_y; 248 | K(1,2) = (K(1,2) + (NumericType) 0.5)*scale_y - (NumericType) 0.5; 249 | 250 | } 251 | 252 | template 253 | void CameraMatrix::loadFromDepthMapDataFile(std::string fileName) 254 | { 255 | std::ifstream inStream; 256 | inStream.open(fileName.c_str(), std::ios::in | std::ios::binary); 257 | 258 | if (!inStream.is_open()) 259 | { 260 | PSL_THROW_EXCEPTION("Could not open depth map data input file.") 261 | } 262 | 263 | // read in version 264 | unsigned char version; 265 | inStream.read((char*)&version, 1); 266 | if (version != 1) 267 | { 268 | PSL_THROW_EXCEPTION("Only version 1 is supported.") 269 | } 270 | 271 | // read in endian 272 | unsigned char endian; 273 | inStream.read((char*)&endian, 1); 274 | 275 | unsigned char currentEndian = is_little_endian() ? 0: 1; 276 | if (endian != currentEndian) 277 | { 278 | PSL_THROW_EXCEPTION("Current platform does not have the same endian as the depth map data file.") 279 | } 280 | 281 | // read in the size of an unsigned int from file 282 | unsigned char uintSize; 283 | inStream.read((char*)&uintSize, 1); 284 | 285 | // check if current plattform has the same unsigned int size 286 | if (uintSize != sizeof (unsigned int)) 287 | { 288 | PSL_THROW_EXCEPTION("Current platform does not have the same unsigned int size as the one the file was written with.") 289 | } 290 | 291 | unsigned int tSize; 292 | unsigned int uSize; 293 | inStream.read((char*)&tSize, sizeof(unsigned int)); 294 | inStream.read((char*)&uSize, sizeof(unsigned int)); 295 | if (uSize != sizeof(NumericType)) 296 | { 297 | PSL_THROW_EXCEPTION("Size of numeric data type does not match.") 298 | } 299 | 300 | // read camera matrix 301 | Eigen::Matrix P; 302 | for (int i = 0; i < 3; i++) 303 | for (int j = 0; j < 4; j++) 304 | inStream.read((char*)&(P(i,j)), sizeof(NumericType)); 305 | 306 | if (!inStream.good()) 307 | { 308 | PSL_THROW_EXCEPTION("Error while reading the camera matrix") 309 | } 310 | 311 | setP(P); 312 | } 313 | 314 | template 315 | Eigen::Matrix CameraMatrix::localPoint2GlobalPoint(Eigen::Matrix& localPoint) const 316 | { 317 | return cam2Global*localPoint; 318 | } 319 | 320 | template class CameraMatrix; 321 | template class CameraMatrix; 322 | -------------------------------------------------------------------------------- /src/PSL/psl_base/cameraMatrix.h: -------------------------------------------------------------------------------- 1 | // This file is part of PlaneSweepLib (PSL) 2 | 3 | // Copyright 2016 Christian Haene (ETH Zuerich) 4 | 5 | // PSL is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | 10 | // PSL is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | 15 | // You should have received a copy of the GNU General Public License 16 | // along with PSL. If not, see . 17 | 18 | #ifndef CAMERAMATRIX_H 19 | #define CAMERAMATRIX_H 20 | 21 | #include 22 | #include 23 | 24 | namespace PSL 25 | { 26 | template 27 | class CameraMatrix 28 | { 29 | public: 30 | EIGEN_MAKE_ALIGNED_OPERATOR_NEW 31 | CameraMatrix(); 32 | CameraMatrix(const Eigen::Matrix& P); 33 | CameraMatrix(const Eigen::Matrix& K, const Eigen::Matrix& R, const Eigen::Matrix& T); 34 | 35 | // copy consturctor and assignment 36 | CameraMatrix(const CameraMatrix& otherCameraMatrix); 37 | CameraMatrix& operator=(const CameraMatrix& otherCameraMatrix); 38 | 39 | void scaleK(NumericType scale_x, NumericType scale_y); 40 | 41 | void setKRT(const Eigen::Matrix& K, const Eigen::Matrix& R, const Eigen::Matrix& T); 42 | void setP(const Eigen::Matrix& P); 43 | void setRT(const Eigen::Matrix& RT); 44 | 45 | const Eigen::Matrix& getK() const; 46 | const Eigen::Matrix& getR() const; 47 | const Eigen::Matrix& getT() const; 48 | const Eigen::Matrix& getP() const; 49 | const Eigen::Matrix& getC() const; 50 | const Eigen::Matrix& getCam2Global() const; 51 | 52 | Eigen::Matrix unprojectPoint(NumericType x, NumericType y, NumericType depth) const; 53 | 54 | Eigen::Matrix localPoint2GlobalPoint(Eigen::Matrix& localPoint) const; 55 | 56 | void loadFromDepthMapDataFile(std::string fileName); 57 | 58 | private: 59 | Eigen::Matrix K; 60 | Eigen::Matrix R; 61 | Eigen::Matrix T; 62 | 63 | void recomputeStoredValues(); 64 | 65 | // some prestored values to return 66 | Eigen::Matrix P; 67 | Eigen::Matrix cam2Global; 68 | Eigen::Matrix C; 69 | }; 70 | } 71 | 72 | 73 | #endif // CAMERAMATRIX_H 74 | -------------------------------------------------------------------------------- /src/PSL/psl_base/colorMapJet.cpp: -------------------------------------------------------------------------------- 1 | // This file is part of PlaneSweepLib (PSL) 2 | 3 | // Copyright 2016 Christian Haene (ETH Zuerich) 4 | 5 | // PSL is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | 10 | // PSL is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | 15 | // You should have received a copy of the GNU General Public License 16 | // along with PSL. If not, see . 17 | 18 | 19 | #include "colorMapJet.h" 20 | 21 | namespace PSL 22 | { 23 | float colorMapJet[256][3] = 24 | { 25 | {0.0f, 0.0f, 0.5156f}, 26 | {0.0f, 0.0f, 0.5312f}, 27 | {0.0f, 0.0f, 0.5469f}, 28 | {0.0f, 0.0f, 0.5625f}, 29 | {0.0f, 0.0f, 0.5781f}, 30 | {0.0f, 0.0f, 0.5938f}, 31 | {0.0f, 0.0f, 0.6094f}, 32 | {0.0f, 0.0f, 0.6250f}, 33 | {0.0f, 0.0f, 0.6406f}, 34 | {0.0f, 0.0f, 0.6562f}, 35 | {0.0f, 0.0f, 0.6719f}, 36 | {0.0f, 0.0f, 0.6875f}, 37 | {0.0f, 0.0f, 0.7031f}, 38 | {0.0f, 0.0f, 0.7188f}, 39 | {0.0f, 0.0f, 0.7344f}, 40 | {0.0f, 0.0f, 0.7500f}, 41 | {0.0f, 0.0f, 0.7656f}, 42 | {0.0f, 0.0f, 0.7812f}, 43 | {0.0f, 0.0f, 0.7969f}, 44 | {0.0f, 0.0f, 0.8125f}, 45 | {0.0f, 0.0f, 0.8281f}, 46 | {0.0f, 0.0f, 0.8438f}, 47 | {0.0f, 0.0f, 0.8594f}, 48 | {0.0f, 0.0f, 0.8750f}, 49 | {0.0f, 0.0f, 0.8906f}, 50 | {0.0f, 0.0f, 0.9062f}, 51 | {0.0f, 0.0f, 0.9219f}, 52 | {0.0f, 0.0f, 0.9375f}, 53 | {0.0f, 0.0f, 0.9531f}, 54 | {0.0f, 0.0f, 0.9688f}, 55 | {0.0f, 0.0f, 0.9844f}, 56 | {0.0f, 0.0f, 1.0000f}, 57 | {0.0f, 0.0156f, 1.0000f}, 58 | {0.0f, 0.0312f, 1.0000f}, 59 | {0.0f, 0.0469f, 1.0000f}, 60 | {0.0f, 0.0625f, 1.0000f}, 61 | {0.0f, 0.0781f, 1.0000f}, 62 | {0.0f, 0.0938f, 1.0000f}, 63 | {0.0f, 0.1094f, 1.0000f}, 64 | {0.0f, 0.1250f, 1.0000f}, 65 | {0.0f, 0.1406f, 1.0000f}, 66 | {0.0f, 0.1562f, 1.0000f}, 67 | {0.0f, 0.1719f, 1.0000f}, 68 | {0.0f, 0.1875f, 1.0000f}, 69 | {0.0f, 0.2031f, 1.0000f}, 70 | {0.0f, 0.2188f, 1.0000f}, 71 | {0.0f, 0.2344f, 1.0000f}, 72 | {0.0f, 0.2500f, 1.0000f}, 73 | {0.0f, 0.2656f, 1.0000f}, 74 | {0.0f, 0.2812f, 1.0000f}, 75 | {0.0f, 0.2969f, 1.0000f}, 76 | {0.0f, 0.3125f, 1.0000f}, 77 | {0.0f, 0.3281f, 1.0000f}, 78 | {0.0f, 0.3438f, 1.0000f}, 79 | {0.0f, 0.3594f, 1.0000f}, 80 | {0.0f, 0.3750f, 1.0000f}, 81 | {0.0f, 0.3906f, 1.0000f}, 82 | {0.0f, 0.4062f, 1.0000f}, 83 | {0.0f, 0.4219f, 1.0000f}, 84 | {0.0f, 0.4375f, 1.0000f}, 85 | {0.0f, 0.4531f, 1.0000f}, 86 | {0.0f, 0.4688f, 1.0000f}, 87 | {0.0f, 0.4844f, 1.0000f}, 88 | {0.0f, 0.5000f, 1.0000f}, 89 | {0.0f, 0.5156f, 1.0000f}, 90 | {0.0f, 0.5312f, 1.0f}, 91 | {0.0f, 0.5469f, 1.0f}, 92 | {0.0f, 0.5625f, 1.0f}, 93 | {0.0f, 0.5781f, 1.0f}, 94 | {0.0f, 0.5938f, 1.0f}, 95 | {0.0f, 0.6094f, 1.0f}, 96 | {0.0f, 0.6250f, 1.0f}, 97 | {0.0f, 0.6406f, 1.0f}, 98 | {0.0f, 0.6562f, 1.0f}, 99 | {0.0f, 0.6719f, 1.0f}, 100 | {0.0f, 0.6875f, 1.0f}, 101 | {0.0f, 0.7031f, 1.0f}, 102 | {0.0f, 0.7188f, 1.0f}, 103 | {0.0f, 0.7344f, 1.0f}, 104 | {0.0f, 0.7500f, 1.0f}, 105 | {0.0f, 0.7656f, 1.0f}, 106 | {0.0f, 0.7812f, 1.0f}, 107 | {0.0f, 0.7969f, 1.0f}, 108 | {0.0f, 0.8125f, 1.0f}, 109 | {0.0f, 0.8281f, 1.0f}, 110 | {0.0f, 0.8438f, 1.0f}, 111 | {0.0f, 0.8594f, 1.0f}, 112 | {0.0f, 0.8750f, 1.0f}, 113 | {0.0f, 0.8906f, 1.0f}, 114 | {0.0f, 0.9062f, 1.0f}, 115 | {0.0f, 0.9219f, 1.0f}, 116 | {0.0f, 0.9375f, 1.0f}, 117 | {0.0f, 0.9531f, 1.0f}, 118 | {0.0f, 0.9688f, 1.0f}, 119 | {0.0f, 0.9844f, 1.0f}, 120 | {0.0f, 1.0f, 1.0f}, 121 | {0.0156f, 1.0f, 0.9844f}, 122 | {0.0312f, 1.0f, 0.9688f}, 123 | {0.0469f, 1.0f, 0.9531f}, 124 | {0.0625f, 1.0f, 0.9375f}, 125 | {0.0781f, 1.0f, 0.9219f}, 126 | {0.0938f, 1.0f, 0.9062f}, 127 | {0.1094f, 1.0f, 0.8906f}, 128 | {0.1250f, 1.0f, 0.8750f}, 129 | {0.1406f, 1.0f, 0.8594f}, 130 | {0.1562f, 1.0f, 0.8438f}, 131 | {0.1719f, 1.0f, 0.8281f}, 132 | {0.1875f, 1.0f, 0.8125f}, 133 | {0.2031f, 1.0f, 0.7969f}, 134 | {0.2188f, 1.0f, 0.7812f}, 135 | {0.2344f, 1.0f, 0.7656f}, 136 | {0.2500f, 1.0f, 0.7500f}, 137 | {0.2656f, 1.0f, 0.7344f}, 138 | {0.2812f, 1.0f, 0.7188f}, 139 | {0.2969f, 1.0f, 0.7031f}, 140 | {0.3125f, 1.0f, 0.6875f}, 141 | {0.3281f, 1.0f, 0.6719f}, 142 | {0.3438f, 1.0f, 0.6562f}, 143 | {0.3594f, 1.0f, 0.6406f}, 144 | {0.3750f, 1.0f, 0.6250f}, 145 | {0.3906f, 1.0f, 0.6094f}, 146 | {0.4062f, 1.0f, 0.5938f}, 147 | {0.4219f, 1.0f, 0.5781f}, 148 | {0.4375f, 1.0f, 0.5625f}, 149 | {0.4531f, 1.0f, 0.5469f}, 150 | {0.4688f, 1.0f, 0.5312f}, 151 | {0.4844f, 1.0f, 0.5156f}, 152 | {0.5000f, 1.0f, 0.5000f}, 153 | {0.5156f, 1.0f, 0.4844f}, 154 | {0.5312f, 1.0f, 0.4688f}, 155 | {0.5469f, 1.0f, 0.4531f}, 156 | {0.5625f, 1.0f, 0.4375f}, 157 | {0.5781f, 1.0f, 0.4219f}, 158 | {0.5938f, 1.0f, 0.4062f}, 159 | {0.6094f, 1.0f, 0.3906f}, 160 | {0.6250f, 1.0f, 0.3750f}, 161 | {0.6406f, 1.0f, 0.3594f}, 162 | {0.6562f, 1.0f, 0.3438f}, 163 | {0.6719f, 1.0f, 0.3281f}, 164 | {0.6875f, 1.0f, 0.3125f}, 165 | {0.7031f, 1.0f, 0.2969f}, 166 | {0.7188f, 1.0f, 0.2812f}, 167 | {0.7344f, 1.0f, 0.2656f}, 168 | {0.7500f, 1.0f, 0.2500f}, 169 | {0.7656f, 1.0f, 0.2344f}, 170 | {0.7812f, 1.0f, 0.2188f}, 171 | {0.7969f, 1.0f, 0.2031f}, 172 | {0.8125f, 1.0f, 0.1875f}, 173 | {0.8281f, 1.0f, 0.1719f}, 174 | {0.8438f, 1.0f, 0.1562f}, 175 | {0.8594f, 1.0f, 0.1406f}, 176 | {0.8750f, 1.0f, 0.1250f}, 177 | {0.8906f, 1.0f, 0.1094f}, 178 | {0.9062f, 1.0f, 0.0938f}, 179 | {0.9219f, 1.0f, 0.0781f}, 180 | {0.9375f, 1.0f, 0.0625f}, 181 | {0.9531f, 1.0f, 0.0469f}, 182 | {0.9688f, 1.0f, 0.0312f}, 183 | {0.9844f, 1.0f, 0.0156f}, 184 | {1.0f, 1.0f, 0.0f}, 185 | {1.0f, 0.9844f, 0.0f}, 186 | {1.0f, 0.9688f, 0.0f}, 187 | {1.0f, 0.9531f, 0.0f}, 188 | {1.0f, 0.9375f, 0.0f}, 189 | {1.0f, 0.9219f, 0.0f}, 190 | {1.0f, 0.9062f, 0.0f}, 191 | {1.0f, 0.8906f, 0.0f}, 192 | {1.0f, 0.875f, 0.0f}, 193 | {1.0f, 0.8594f, 0.0f}, 194 | {1.0f, 0.8438f, 0.0f}, 195 | {1.0f, 0.8281f, 0.0f}, 196 | {1.0f, 0.8125f, 0.0f}, 197 | {1.0f, 0.7969f, 0.0f}, 198 | {1.0f, 0.7812f, 0.0f}, 199 | {1.0f, 0.7656f, 0.0f}, 200 | {1.0f, 0.75f, 0.0f}, 201 | {1.0f, 0.7344f, 0.0f}, 202 | {1.0f, 0.7188f, 0.0f}, 203 | {1.0f, 0.7031f, 0.0f}, 204 | {1.0f, 0.6875f, 0.0f}, 205 | {1.0f, 0.6719f, 0.0f}, 206 | {1.0f, 0.6562f, 0.0f}, 207 | {1.0f, 0.6406f, 0.0f}, 208 | {1.0f, 0.625f, 0.0f}, 209 | {1.0f, 0.6094f, 0.0f}, 210 | {1.0f, 0.5938f, 0.0f}, 211 | {1.0f, 0.5781f, 0.0f}, 212 | {1.0f, 0.5625f, 0.0f}, 213 | {1.0f, 0.5469f, 0.0f}, 214 | {1.0f, 0.5312f, 0.0f}, 215 | {1.0f, 0.5156f, 0.0f}, 216 | {1.0f, 0.5f, 0.0f}, 217 | {1.0f, 0.4844f, 0.0f}, 218 | {1.0f, 0.4688f, 0.0f}, 219 | {1.0f, 0.4531f, 0.0f}, 220 | {1.0f, 0.4375f, 0.0f}, 221 | {1.0f, 0.4219f, 0.0f}, 222 | {1.0f, 0.4062f, 0.0f}, 223 | {1.0f, 0.3906f, 0.0f}, 224 | {1.0f, 0.375f, 0.0f}, 225 | {1.0f, 0.3594f, 0.0f}, 226 | {1.0f, 0.3438f, 0.0f}, 227 | {1.0f, 0.3281f, 0.0f}, 228 | {1.0f, 0.3125f, 0.0f}, 229 | {1.0f, 0.2969f, 0.0f}, 230 | {1.0f, 0.2812f, 0.0f}, 231 | {1.0f, 0.2656f, 0.0f}, 232 | {1.0f, 0.25f, 0.0f}, 233 | {1.0f, 0.2344f, 0.0f}, 234 | {1.0f, 0.2188f, 0.0f}, 235 | {1.0f, 0.2031f, 0.0f}, 236 | {1.0f, 0.1875f, 0.0f}, 237 | {1.0f, 0.1719f, 0.0f}, 238 | {1.0f, 0.1562f, 0.0f}, 239 | {1.0f, 0.1406f, 0.0f}, 240 | {1.0f, 0.125f, 0.0f}, 241 | {1.0f, 0.1094f, 0.0f}, 242 | {1.0f, 0.0938f, 0.0f}, 243 | {1.0f, 0.0781f, 0.0f}, 244 | {1.0f, 0.0625f, 0.0f}, 245 | {1.0f, 0.0469f, 0.0f}, 246 | {1.0f, 0.0312f, 0.0f}, 247 | {1.0f, 0.0156f, 0.0f}, 248 | {1.0f, 0.0f, 0.0f}, 249 | {0.9844f, 0.0f, 0.0f}, 250 | {0.9688f, 0.0f, 0.0f}, 251 | {0.9531f, 0.0f, 0.0f}, 252 | {0.9375f, 0.0f, 0.0f}, 253 | {0.9219f, 0.0f, 0.0f}, 254 | {0.9062f, 0.0f, 0.0f}, 255 | {0.8906f, 0.0f, 0.0f}, 256 | {0.875f, 0.0f, 0.0f}, 257 | {0.8594f, 0.0f, 0.0f}, 258 | {0.8438f, 0.0f, 0.0f}, 259 | {0.8281f, 0.0f, 0.0f}, 260 | {0.8125f, 0.0f, 0.0f}, 261 | {0.7969f, 0.0f, 0.0f}, 262 | {0.7812f, 0.0f, 0.0f}, 263 | {0.7656f, 0.0f, 0.0f}, 264 | {0.75f, 0.0f, 0.0f}, 265 | {0.7344f, 0.0f, 0.0f}, 266 | {0.7188f, 0.0f, 0.0f}, 267 | {0.7031f, 0.0f, 0.0f}, 268 | {0.6875f, 0.0f, 0.0f}, 269 | {0.6719f, 0.0f, 0.0f}, 270 | {0.6562f, 0.0f, 0.0f}, 271 | {0.6406f, 0.0f, 0.0f}, 272 | {0.625f, 0.0f, 0.0f}, 273 | {0.6094f, 0.0f, 0.0f}, 274 | {0.5938f, 0.0f, 0.0f}, 275 | {0.5781f, 0.0f, 0.0f}, 276 | {0.5625f, 0.0f, 0.0f}, 277 | {0.5469f, 0.0f, 0.0f}, 278 | {0.5312f, 0.0f, 0.0f}, 279 | {0.5156f, 0.0f, 0.0f}, 280 | {0.5f, 0.0f, 0.0f} 281 | }; 282 | } 283 | 284 | -------------------------------------------------------------------------------- /src/PSL/psl_base/colorMapJet.h: -------------------------------------------------------------------------------- 1 | // This file is part of PlaneSweepLib (PSL) 2 | 3 | // Copyright 2016 Christian Haene (ETH Zuerich) 4 | 5 | // PSL is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | 10 | // PSL is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | 15 | // You should have received a copy of the GNU General Public License 16 | // along with PSL. If not, see . 17 | 18 | #ifndef COLORMAPJET_H 19 | #define COLORMAPJET_H 20 | 21 | namespace PSL 22 | { 23 | extern float colorMapJet[256][3]; 24 | } 25 | 26 | #endif // COLORMAPJET_H 27 | -------------------------------------------------------------------------------- /src/PSL/psl_base/common.h: -------------------------------------------------------------------------------- 1 | // This file is part of PlaneSweepLib (PSL) 2 | 3 | // Copyright 2016 Christian Haene (ETH Zuerich) 4 | 5 | // PSL is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | 10 | // PSL is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | 15 | // You should have received a copy of the GNU General Public License 16 | // along with PSL. If not, see . 17 | 18 | 19 | #ifdef _MSC_VER 20 | #include 21 | 22 | inline double round(double val) 23 | { 24 | return std::floor(val + 0.5); 25 | } 26 | 27 | namespace std 28 | { 29 | inline long long atoll(const char* str) 30 | { 31 | return (long long) _atoi64(str); 32 | } 33 | } 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /src/PSL/psl_base/configFile.cpp: -------------------------------------------------------------------------------- 1 | // This file is part of PlaneSweepLib (PSL) 2 | 3 | // Copyright 2016 Christian Haene (ETH Zuerich) 4 | 5 | // PSL is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | 10 | // PSL is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | 15 | // You should have received a copy of the GNU General Public License 16 | // along with PSL. If not, see . 17 | 18 | #include "configFile.h" 19 | #include 20 | 21 | #include 22 | #include 23 | #include 24 | #include 25 | 26 | using namespace PSL; 27 | using std::ifstream; 28 | using std::getline; 29 | using std::istringstream; 30 | using boost::algorithm::trim; 31 | 32 | ConfigFile::ConfigFile(const string& fileName) { 33 | 34 | fileRead = false; 35 | 36 | ifstream file; 37 | file.open(fileName.c_str()); 38 | 39 | if (!file.is_open()) 40 | return; 41 | 42 | while (!file.eof()) { 43 | string line; 44 | getline(file, line); 45 | parseLine(line); 46 | } 47 | 48 | fileRead = true; 49 | } 50 | 51 | void ConfigFile::parseLine(string& line) { 52 | 53 | int commentPos = (int) line.find('#'); 54 | 55 | // nothing interesting before the comment 56 | if (commentPos != -1 && commentPos < 3) 57 | return; 58 | 59 | // remove commented part 60 | if (commentPos != -1) 61 | { 62 | line = line.substr(0, commentPos); 63 | } 64 | int eqPos = (int) line.find('='); 65 | if (eqPos == -1) 66 | return; 67 | 68 | string before = line.substr(0, eqPos); 69 | string after = line.substr(eqPos+1, line.length()-eqPos-1); 70 | 71 | trim(before); 72 | trim(after); 73 | 74 | // if both strings are not emtpy add the pair to the hash table 75 | if (before.length() > 0 && after.length() > 0) 76 | this->configEntries[before] = after; 77 | } 78 | 79 | string ConfigFile::get(const string& configParameter) 80 | { 81 | if (configEntries.count(configParameter) != 0) 82 | { 83 | return configEntries[configParameter]; 84 | } 85 | else 86 | { 87 | return string(); 88 | } 89 | } 90 | 91 | int ConfigFile::getAsInt(const string& configParameter) 92 | { 93 | std::string paramStr = get(configParameter); 94 | if (paramStr.empty()) 95 | { 96 | std::stringstream strStr; 97 | strStr << "Parameter " << configParameter << " is not defined in config file."; 98 | PSL_THROW_EXCEPTION(strStr.str().c_str()); 99 | } 100 | return atoi(paramStr.c_str()); 101 | } 102 | 103 | float ConfigFile::getAsFloat(const string& configParameter) 104 | { 105 | std::string paramStr = get(configParameter); 106 | if (paramStr.empty()) 107 | { 108 | std::stringstream strStr; 109 | strStr << "Parameter " << configParameter << " is not defined in config file."; 110 | PSL_THROW_EXCEPTION(strStr.str().c_str()); 111 | } 112 | return (float) atof(paramStr.c_str()); 113 | } 114 | bool ConfigFile::isFileRead() { 115 | return fileRead; 116 | } 117 | -------------------------------------------------------------------------------- /src/PSL/psl_base/configFile.h: -------------------------------------------------------------------------------- 1 | // This file is part of PlaneSweepLib (PSL) 2 | 3 | // Copyright 2016 Christian Haene (ETH Zuerich) 4 | 5 | // PSL is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | 10 | // PSL is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | 15 | // You should have received a copy of the GNU General Public License 16 | // along with PSL. If not, see . 17 | 18 | #ifndef CONFIGFILE_H 19 | #define CONFIGFILE_H 20 | 21 | #include 22 | #include 23 | 24 | namespace PSL 25 | { 26 | using std::map; 27 | using std::string; 28 | 29 | class ConfigFile { 30 | public: 31 | ConfigFile(const string& fileName); 32 | 33 | string get(const string& configParameter); 34 | int getAsInt(const string& configParameter); 35 | float getAsFloat(const string& configParameter); 36 | 37 | bool isFileRead(); 38 | 39 | private: 40 | 41 | bool fileRead; 42 | 43 | void parseLine(string& line); 44 | 45 | map configEntries; 46 | }; 47 | } 48 | 49 | #endif // CONFIGFILE_H 50 | -------------------------------------------------------------------------------- /src/PSL/psl_base/depthMap.h: -------------------------------------------------------------------------------- 1 | // This file is part of PlaneSweepLib (PSL) 2 | 3 | // Copyright 2016 Christian Haene (ETH Zuerich) 4 | 5 | // PSL is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | 10 | // PSL is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | 15 | // You should have received a copy of the GNU General Public License 16 | // along with PSL. If not, see . 17 | 18 | #ifndef DEPTHMAP_H 19 | #define DEPTHMAP_H 20 | 21 | #include "cameraMatrix.h" 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | 28 | namespace PSL 29 | { 30 | 31 | using boost::shared_array; 32 | using std::ofstream; 33 | using std::string; 34 | 35 | template 36 | class DepthMap 37 | { 38 | public: 39 | EIGEN_MAKE_ALIGNED_OPERATOR_NEW 40 | 41 | DepthMap(); 42 | DepthMap(unsigned int width, unsigned int height, const CameraMatrix& cam); 43 | void initialize(T value); 44 | DepthMap& operator*= (T scale); 45 | T* getDataPtr(); 46 | unsigned int getWidth() const; 47 | unsigned int getHeight() const; 48 | T& operator() (int x, int y); 49 | const T& operator() (int x, int y) const; 50 | const CameraMatrix& getCam() const; 51 | void setCam(const CameraMatrix& new_cam); 52 | 53 | void display(T minZ, T maxZ, int displayTime = 0, const char* windowName = "depth map"); 54 | void displayInvDepth(T minZ, T maxZ, int displayTime = 0, const char* windowName = "inverse depth map"); 55 | void displayInvDepthColored(T minZ, T maxZ, int displayTime = 0, const char* windowName = "color coded inverse depth map"); 56 | 57 | // returns a point with homogeneous component 0 if depth is invalid 58 | Eigen::Matrix unproject(int x, int y) const; 59 | 60 | void meshToVRML(ofstream& os, string textureImageFileName, float scale, float maxDispDiff, U maxDist = -1); 61 | void meshToVRML(ofstream& os, U maxDist = -1, T maxDispDiff = -1); 62 | void pointCloudToVRML(ofstream& os, U maxDist = -1); 63 | void pointCloudColoredToVRML(ofstream& os, cv::Mat image, U maxDist = -1); 64 | void saveAsImage(string fileName, T minDepth, T maxDepth); 65 | void saveInvDepthAsImage(string fileName, T minDepth, T maxDepth); 66 | void saveInvDepthAsColorImage(string fileName, T minZ, T maxZ); 67 | 68 | void saveAsDataFile(string fileName); 69 | void loadFromDataFile(string fileName); 70 | void setRT(const Eigen::Matrix& RT); 71 | 72 | private: 73 | shared_array depths; 74 | unsigned int width; 75 | unsigned int height; 76 | CameraMatrix cam; 77 | }; 78 | } 79 | 80 | #endif // DEPTHMAP_H 81 | -------------------------------------------------------------------------------- /src/PSL/psl_base/exception.h: -------------------------------------------------------------------------------- 1 | // This file is part of PlaneSweepLib (PSL) 2 | 3 | // Copyright 2016 Christian Haene (ETH Zuerich) 4 | 5 | // PSL is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | 10 | // PSL is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | 15 | // You should have received a copy of the GNU General Public License 16 | // along with PSL. If not, see . 17 | 18 | #ifndef EXCEPTION_H 19 | #define EXCEPTION_H 20 | 21 | #include 22 | #include 23 | #include 24 | 25 | using std::stringstream; 26 | 27 | namespace PSL 28 | { 29 | 30 | #ifdef _MSC_VER 31 | #define PSL_THROW_EXCEPTION(message) throw PSL::Exception(__FUNCSIG__, (message)); 32 | #else 33 | #define PSL_THROW_EXCEPTION(message) throw PSL::Exception(__PRETTY_FUNCTION__, (message)); 34 | #endif 35 | 36 | class Exception : public std::exception 37 | { 38 | public: 39 | Exception(std::string& message) 40 | : message(message) 41 | { } 42 | 43 | Exception(const char* place, const char* message) 44 | { 45 | stringstream messageStream; 46 | messageStream << place << " : " << message; 47 | this->message = messageStream.str(); 48 | } 49 | 50 | Exception(const char* fileName, int lineNumber, const char* place, const char* message) 51 | { 52 | stringstream messageStream; 53 | messageStream << fileName << "(" << lineNumber << ") " << place << " : " << message; 54 | this->message = messageStream.str(); 55 | } 56 | 57 | virtual ~Exception() throw() { } 58 | 59 | virtual const char* what() const throw() 60 | { 61 | return message.c_str(); 62 | } 63 | 64 | protected: 65 | std::string message; 66 | }; 67 | } 68 | 69 | #endif // EXCEPTION_H 70 | -------------------------------------------------------------------------------- /src/PSL/psl_base/fishEyeCameraMatrix.cpp: -------------------------------------------------------------------------------- 1 | // This file is part of PlaneSweepLib (PSL) 2 | 3 | // Copyright 2016 Christian Haene (ETH Zuerich) 4 | 5 | // PSL is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | 10 | // PSL is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | 15 | // You should have received a copy of the GNU General Public License 16 | // along with PSL. If not, see . 17 | 18 | #include "fishEyeCameraMatrix.h" 19 | #include 20 | 21 | using namespace PSL; 22 | using Eigen::Matrix; 23 | 24 | template 25 | FishEyeCameraMatrix::FishEyeCameraMatrix() 26 | { 27 | xi = 1; 28 | } 29 | 30 | 31 | template 32 | FishEyeCameraMatrix::FishEyeCameraMatrix(const Eigen::Matrix& K, const Eigen::Matrix& R, 33 | const Eigen::Matrix& T, NumericType xi) 34 | { 35 | cam.setKRT(K, R, T); 36 | 37 | this->xi = xi; 38 | } 39 | 40 | template 41 | void FishEyeCameraMatrix::scaleK(NumericType scale_x, NumericType scale_y) 42 | { 43 | cam.scaleK(scale_x, scale_y); 44 | } 45 | 46 | template 47 | const Eigen::Matrix& FishEyeCameraMatrix::getK() const 48 | { 49 | return cam.getK(); 50 | } 51 | 52 | template 53 | const Eigen::Matrix& FishEyeCameraMatrix::getR() const 54 | { 55 | return cam.getR(); 56 | } 57 | 58 | template 59 | const Eigen::Matrix& FishEyeCameraMatrix::getT() const 60 | { 61 | return cam.getT(); 62 | } 63 | 64 | template 65 | const NumericType& FishEyeCameraMatrix::getXi() const 66 | { 67 | return this->xi; 68 | } 69 | 70 | template 71 | void FishEyeCameraMatrix::setKRTXi(const Eigen::Matrix& K, const Eigen::Matrix& R, const Eigen::Matrix& T, NumericType xi) 72 | { 73 | this->cam.setKRT(K, R, T); 74 | this->xi = xi; 75 | 76 | } 77 | 78 | // current version only unprojects points which are less than 180° 79 | template 80 | Eigen::Matrix FishEyeCameraMatrix::unprojectPoint(NumericType x, NumericType y, NumericType depth) const 81 | { 82 | NumericType mx = (x - cam.getK()(0,2))/cam.getK()(0,0); 83 | NumericType my = (y - cam.getK()(1,2))/cam.getK()(1,1); 84 | 85 | NumericType mxMySqr = mx*mx + my*my; 86 | NumericType D = 1+(1-xi*xi)*mxMySqr; 87 | if (D > 1e-5) 88 | { 89 | NumericType fact = (xi + sqrt(D))/(mxMySqr + 1); 90 | if (fact - xi < 0.1) // if the points go to close to 180° things go crazy! 91 | return Eigen::Matrix::Zero(); 92 | 93 | NumericType fact2 = depth/(fact - xi); 94 | 95 | Eigen::Matrix point; 96 | point(0) = fact*fact2*mx; 97 | point(1) = fact*fact2*my; 98 | point(2) = depth; 99 | point(3) = 1; 100 | 101 | return cam.localPoint2GlobalPoint(point); 102 | 103 | } 104 | 105 | return Eigen::Matrix::Zero(); 106 | } 107 | 108 | template 109 | Eigen::Matrix FishEyeCameraMatrix::projectPoint(NumericType x, NumericType y, NumericType z) const 110 | { 111 | Eigen::Matrix point; 112 | point << x, y, z; 113 | 114 | point = cam.getR()*point; 115 | point = point + cam.getT(); 116 | 117 | NumericType length = point.norm(); 118 | point /= length; 119 | 120 | point(2) += getXi(); 121 | point /= point(2); 122 | 123 | Eigen::Matrix projPoint; 124 | projPoint = (cam.getK()*point).topRows(2); 125 | 126 | return projPoint; 127 | } 128 | 129 | template 130 | const Eigen::Matrix& FishEyeCameraMatrix::getC() const 131 | { 132 | return cam.getC(); 133 | } 134 | 135 | 136 | 137 | template class FishEyeCameraMatrix; 138 | template class FishEyeCameraMatrix; 139 | -------------------------------------------------------------------------------- /src/PSL/psl_base/fishEyeCameraMatrix.h: -------------------------------------------------------------------------------- 1 | // This file is part of PlaneSweepLib (PSL) 2 | 3 | // Copyright 2016 Christian Haene (ETH Zuerich) 4 | 5 | // PSL is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | 10 | // PSL is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | 15 | // You should have received a copy of the GNU General Public License 16 | // along with PSL. If not, see . 17 | 18 | #ifndef FISHEYECAMERAMATRIX_H 19 | #define FISHEYECAMERAMATRIX_H 20 | 21 | #include 22 | #include 23 | #include "cameraMatrix.h" 24 | 25 | namespace PSL 26 | { 27 | template 28 | class FishEyeCameraMatrix 29 | { 30 | public: 31 | EIGEN_MAKE_ALIGNED_OPERATOR_NEW 32 | 33 | FishEyeCameraMatrix(); 34 | FishEyeCameraMatrix(const Eigen::Matrix& K, const Eigen::Matrix& R, const Eigen::Matrix& T, NumericType xi); 35 | 36 | const NumericType& getXi() const; 37 | void scaleK(NumericType scale_x, NumericType scale_y); 38 | void setKRTXi(const Eigen::Matrix& K, const Eigen::Matrix& R, const Eigen::Matrix& T, NumericType xi); 39 | 40 | const Eigen::Matrix& getK() const; 41 | const Eigen::Matrix& getR() const; 42 | const Eigen::Matrix& getT() const; 43 | const Eigen::Matrix& getC() const; 44 | 45 | Eigen::Matrix unprojectPoint(NumericType x, NumericType y, NumericType depth) const; 46 | Eigen::Matrix projectPoint(NumericType x, NumericType y, NumericType z) const; 47 | 48 | private: 49 | CameraMatrix cam; 50 | NumericType xi; 51 | }; 52 | } 53 | 54 | #endif // FISHEYECAMERAMATRIX_H 55 | -------------------------------------------------------------------------------- /src/PSL/psl_base/fishEyeDepthMap.h: -------------------------------------------------------------------------------- 1 | // This file is part of PlaneSweepLib (PSL) 2 | 3 | // Copyright 2016 Christian Haene (ETH Zuerich) 4 | 5 | // PSL is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | 10 | // PSL is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | 15 | // You should have received a copy of the GNU General Public License 16 | // along with PSL. If not, see . 17 | 18 | #ifndef FISHEYEDPETHMAP_H 19 | #define FISHEYEDPETHMAP_H 20 | 21 | #include "fishEyeCameraMatrix.h" 22 | #include 23 | #include 24 | #include 25 | #include 26 | 27 | namespace PSL 28 | { 29 | template 30 | class FishEyeDepthMap 31 | { 32 | public: 33 | EIGEN_MAKE_ALIGNED_OPERATOR_NEW 34 | 35 | FishEyeDepthMap(); 36 | FishEyeDepthMap(unsigned int width, unsigned int height, const FishEyeCameraMatrix& cam); 37 | 38 | T& operator() (int x, int y); 39 | const T& operator() (int x, int y) const; 40 | 41 | T* getDataPtr(); 42 | 43 | unsigned int getWidth() const; 44 | unsigned int getHeight() const; 45 | const FishEyeCameraMatrix& getCam() const; 46 | void setCam(const FishEyeCameraMatrix& cam); 47 | 48 | void display(T minZ, T maxZ, int displayTime = 0, const char* windowName = "depth map"); 49 | void displayColored(T minZ, T maxZ, int displayTime = 0, const char* windowName = "depth map colored"); 50 | void displayInvDepth(T minZ, T maxZ, int displayTime = 0, const char* windowName = "inverse depth map"); 51 | void displayInvDepthColored(T minZ, T maxZ, int displayTime = 0, const char* windowName = "color coded inverse depth map"); 52 | 53 | void saveInvDepthAsColorImage(std::string fileName, T minZ, T maxZ); 54 | 55 | // returns a point with homogeneous component 0 if depth is invalid 56 | Eigen::Matrix unproject(int x, int y) const; 57 | 58 | void meshToVRML(std::ofstream& os, std::string textureImageFileName, float scale, float maxDispDiff, U maxDist = -1); 59 | void pointCloudToVRML(std::ofstream& os, U maxDist = -1); 60 | void pointCloudColoredToVRML(std::ofstream& os, cv::Mat image, U maxDist = -1); 61 | 62 | private: 63 | boost::shared_array depths; 64 | unsigned int width; 65 | unsigned int height; 66 | FishEyeCameraMatrix cam; 67 | 68 | }; 69 | } 70 | 71 | #endif // FISHEYEDEPTHMAP_H 72 | -------------------------------------------------------------------------------- /src/PSL/psl_base/grid.cpp: -------------------------------------------------------------------------------- 1 | // This file is part of PlaneSweepLib (PSL) 2 | 3 | // Copyright 2016 Christian Haene (ETH Zuerich) 4 | 5 | // PSL is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | 10 | // PSL is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | 15 | // You should have received a copy of the GNU General Public License 16 | // along with PSL. If not, see . 17 | 18 | #include "grid.h" 19 | #include 20 | #include 21 | 22 | namespace PSL 23 | { 24 | 25 | template 26 | void saveGridZSliceAsImage(Grid& grid, unsigned int z, const char* fileName) 27 | { 28 | cv::Mat_ sliceMat(grid.getHeight(), grid.getWidth(), &grid(0,0,z)); 29 | 30 | double min, max; 31 | cv::Point minLoc, maxLoc; 32 | cv::minMaxLoc(sliceMat, &min, &max, &minLoc, &maxLoc); 33 | 34 | cv::Mat_ sliceMat2 = sliceMat - min; 35 | cv::imwrite(fileName, sliceMat2/(max-min)*255); 36 | } 37 | 38 | template 39 | void saveGridZSliceAsImage(Grid& grid, unsigned int z, Elem minVal, Elem maxVal, const char* fileName) 40 | { 41 | cv::Mat_ sliceMat(grid.getHeight(), grid.getWidth(), &grid(0,0,z)); 42 | cv::Mat_ sliceMat2 = sliceMat - minVal; 43 | cv::imwrite(fileName, sliceMat2/(maxVal-minVal)*255); 44 | } 45 | 46 | template 47 | void displayGridZSliceAsImage(Grid& grid, unsigned int z, long time, const char* windowName) 48 | { 49 | cv::Mat_ sliceMat(grid.getHeight(), grid.getWidth(), &grid(0,0,z)); 50 | 51 | double min, max; 52 | cv::Point minLoc, maxLoc; 53 | cv::minMaxLoc(sliceMat, &min, &max, &minLoc, &maxLoc); 54 | 55 | cv::Mat_ sliceMat2 = sliceMat - min; 56 | cv::imshow(windowName, sliceMat2/(max-min)); 57 | cv::waitKey(time); 58 | } 59 | 60 | template 61 | void displayGridZSliceAsImage(Grid& grid, unsigned int z, Elem minVal, Elem maxVal, long time, const char* windowName) 62 | { 63 | cv::Mat_ sliceMat(grid.getHeight(), grid.getWidth(), &grid(0,0,z)); 64 | cv::Mat_ sliceMat2 = sliceMat - minVal; 65 | 66 | cv::imshow(windowName, sliceMat2/(maxVal-minVal)); 67 | cv::waitKey(time); 68 | } 69 | 70 | template void saveGridZSliceAsImage(Grid& grid, unsigned int z, const char* fileName); 71 | template void saveGridZSliceAsImage(Grid& grid, unsigned int z, double minVal, double maxVal, const char* fileName); 72 | 73 | template void saveGridZSliceAsImage(Grid& grid, unsigned int z, const char* fileName); 74 | template void saveGridZSliceAsImage(Grid& grid, unsigned int z, float minVal, float maxVal, const char* fileName); 75 | 76 | template void displayGridZSliceAsImage(Grid& grid, unsigned int z, long time, const char* windowName); 77 | template void displayGridZSliceAsImage(Grid& grid, unsigned int z, double minVal, double maxVal, long time, const char* windowName); 78 | 79 | template void displayGridZSliceAsImage(Grid& grid, unsigned int z, long time, const char* windowName); 80 | template void displayGridZSliceAsImage(Grid& grid, unsigned int z, float minVal, float maxVal, long time, const char* windowName); 81 | } 82 | -------------------------------------------------------------------------------- /src/PSL/psl_base/grid.h: -------------------------------------------------------------------------------- 1 | // This file is part of PlaneSweepLib (PSL) 2 | 3 | // Copyright 2016 Christian Haene (ETH Zuerich) 4 | 5 | // PSL is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | 10 | // PSL is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | 15 | // You should have received a copy of the GNU General Public License 16 | // along with PSL. If not, see . 17 | 18 | #ifndef GRID_H 19 | #define GRID_H 20 | 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | 29 | namespace PSL 30 | { 31 | template 32 | class Grid 33 | { 34 | 35 | public: 36 | Grid(); 37 | Grid(unsigned int xDim, unsigned int yDim, unsigned int zDim = 1); 38 | Grid(unsigned int xDim, unsigned int yDim, unsigned int zDim, const Elem& value); 39 | 40 | const Elem& operator()(unsigned int x, unsigned int y, unsigned int z = 0) const; 41 | Elem& operator()(unsigned int x, unsigned int y, unsigned int z = 0); 42 | 43 | Grid clone() const; 44 | 45 | unsigned int getWidth() const; 46 | unsigned int getHeight() const; 47 | unsigned int getDepth() const; 48 | unsigned int getNbVoxels() const; 49 | 50 | Elem* getDataPtr() const; 51 | 52 | void resize(unsigned int _xDim, unsigned int _yDim, unsigned int _zDim); 53 | 54 | void saveAsDataFile(const std::string& fileName); 55 | void loadFromDataFile(const std::string& fileName); 56 | 57 | protected: 58 | boost::shared_array _cells; 59 | unsigned int _xDim, _yDim, _zDim; 60 | 61 | unsigned int _xyDim; 62 | unsigned int _xyzDim; 63 | }; 64 | 65 | template 66 | void saveGridZSliceAsImage(Grid& grid, unsigned int z, const char* fileName); 67 | 68 | template 69 | void saveGridZSliceAsImage(Grid& grid, unsigned int z, Elem minVal, Elem maxVal, const char* fileName); 70 | 71 | template 72 | void displayGridZSliceAsImage(Grid& grid, unsigned int z, long time=0, const char* windowName = "Grid"); 73 | 74 | template 75 | void displayGridZSliceAsImage(Grid& grid, unsigned int z, Elem minVal, Elem maxVal, long time=0, const char* windowName = "Grid"); 76 | } 77 | 78 | template 79 | PSL::Grid::Grid() 80 | { 81 | _xDim = 0; 82 | _yDim = 0; 83 | _zDim = 0; 84 | _xyDim = 0; 85 | _xyzDim = 0; 86 | } 87 | 88 | template 89 | PSL::Grid::Grid(unsigned int xDim, unsigned int yDim, unsigned int zDim) 90 | { 91 | this->_xDim = xDim; 92 | this->_yDim = yDim; 93 | this->_zDim = zDim; 94 | this->_xyDim = xDim*yDim; 95 | this->_xyzDim = _xyDim*zDim; 96 | Elem* cellsPtr = new Elem[_xyzDim]; 97 | _cells.reset(cellsPtr); 98 | } 99 | 100 | template 101 | PSL::Grid::Grid(unsigned int xDim, unsigned int yDim, unsigned int zDim, const Elem &value) 102 | { 103 | this->_xDim = xDim; 104 | this->_yDim = yDim; 105 | this->_zDim = zDim; 106 | this->_xyDim = xDim*yDim; 107 | this->_xyzDim = _xyDim*zDim; 108 | Elem* cellsPtr = new Elem[_xyzDim]; 109 | _cells.reset(cellsPtr); 110 | 111 | for (unsigned int i = 0; i < _xyzDim; i++) 112 | { 113 | _cells[i] = value; 114 | } 115 | 116 | } 117 | 118 | template 119 | const Elem& PSL::Grid::operator ()(unsigned int x, unsigned int y, unsigned int z) const 120 | { 121 | return _cells[z*_xyDim + y*_xDim + x]; 122 | } 123 | 124 | template 125 | Elem& PSL::Grid::operator ()(unsigned int x, unsigned int y, unsigned int z) 126 | { 127 | return _cells[z*_xyDim + y*_xDim + x]; 128 | } 129 | 130 | template 131 | void PSL::Grid::resize(unsigned int xDim, unsigned int yDim, unsigned int zDim) 132 | { 133 | if(xDim == this->_xDim && yDim == this->_yDim && zDim == this->_zDim) 134 | return; 135 | 136 | this->_xDim = xDim; 137 | this->_yDim = yDim; 138 | this->_zDim = zDim; 139 | this->_xyDim = xDim*yDim; 140 | this->_xyzDim = _xyDim*zDim; 141 | 142 | _cells = boost::shared_array(new Elem[_xyzDim]); 143 | } 144 | 145 | template 146 | unsigned int PSL::Grid::getWidth() const 147 | { 148 | return _xDim; 149 | } 150 | 151 | template 152 | unsigned int PSL::Grid::getHeight() const 153 | { 154 | return _yDim; 155 | } 156 | 157 | template 158 | unsigned int PSL::Grid::getDepth() const 159 | { 160 | return _zDim; 161 | } 162 | 163 | template 164 | unsigned int PSL::Grid::getNbVoxels() const 165 | { 166 | return _xyzDim; 167 | } 168 | 169 | template 170 | Elem* PSL::Grid::getDataPtr() const 171 | { 172 | return _cells.get(); 173 | } 174 | 175 | template 176 | PSL::Grid PSL::Grid::clone() const 177 | { 178 | Grid result(getWidth(), getHeight(), getDepth()); 179 | memcpy((void*)result.getDataPtr(), (void*)this->getDataPtr(), sizeof(Elem)*getNbVoxels()); 180 | return result; 181 | } 182 | 183 | template 184 | void PSL::Grid::saveAsDataFile(const std::string& fileName) 185 | { 186 | if (CHAR_BIT != 8) 187 | { 188 | PSL_THROW_EXCEPTION("Only platforms with 8 bit chars are supported.") 189 | } 190 | 191 | std::ofstream outStream; 192 | outStream.open(fileName.c_str(), std::ios::out | std::ios::binary); 193 | 194 | if (!outStream.is_open()) 195 | { 196 | PSL_THROW_EXCEPTION("Could not open grid data output file for writing.") 197 | } 198 | 199 | // file format version, might be useful at some point 200 | unsigned char version = 1; 201 | outStream.write((char*)&version, 1); 202 | 203 | // endianness 204 | unsigned char endian = is_little_endian() ? 0 : 1; 205 | outStream.write((char*)&endian, 1); 206 | 207 | // store sizes of data types written 208 | // first unsigned int in an unsigned char because we know that char has always size 1 209 | unsigned char uintSize = sizeof(unsigned int); 210 | outStream.write((char*)&uintSize, 1); 211 | 212 | // for Elem we use unsigned int 213 | unsigned int elemSize = sizeof(Elem); 214 | outStream.write((char*)&elemSize, sizeof(unsigned int)); 215 | 216 | // now we store the size of the grid 217 | outStream.write((char*)&_xDim, sizeof(unsigned int)); 218 | outStream.write((char*)&_yDim, sizeof(unsigned int)); 219 | outStream.write((char*)&_zDim, sizeof(unsigned int)); 220 | 221 | // now grid data is written 222 | outStream.write((char*)getDataPtr(), sizeof(Elem)*_xyzDim); 223 | 224 | if (!outStream.good()) 225 | { 226 | PSL_THROW_EXCEPTION("An error occured while writing the grid to a data file.") 227 | } 228 | 229 | // writing is done closing stream 230 | outStream.close(); 231 | } 232 | 233 | template 234 | void PSL::Grid::loadFromDataFile(const std::string& fileName) 235 | { 236 | if (CHAR_BIT != 8) 237 | { 238 | PSL_THROW_EXCEPTION("Only platforms with 8 bit chars are supported.") 239 | } 240 | 241 | std::ifstream inStream; 242 | inStream.open(fileName.c_str(), std::ios::in | std::ios::binary); 243 | 244 | if (!inStream.is_open()) 245 | { 246 | PSL_THROW_EXCEPTION("Could not open grid data input file.") 247 | } 248 | 249 | // read in version 250 | unsigned char version; 251 | inStream.read((char*)&version, 1); 252 | if (version != 1) 253 | { 254 | PSL_THROW_EXCEPTION("Only version 1 is supported.") 255 | } 256 | 257 | // read in endian 258 | unsigned char endian; 259 | inStream.read((char*)&endian, 1); 260 | 261 | unsigned char currentEndian = is_little_endian() ? 0: 1; 262 | if (endian != currentEndian) 263 | { 264 | PSL_THROW_EXCEPTION("Current platform does not have the same endian as the depht map data file.") 265 | } 266 | 267 | // read in the size of an unsigned int from file 268 | unsigned char uintSize; 269 | inStream.read((char*)&uintSize, 1); 270 | 271 | // check if current plattform has the same unsigned int size 272 | if (uintSize != sizeof (unsigned int)) 273 | { 274 | PSL_THROW_EXCEPTION("Current platform does not have the same unsigned int size as the one the file was written with.") 275 | } 276 | 277 | unsigned int elemSize; 278 | inStream.read((char*)&elemSize, sizeof(unsigned int)); 279 | if (elemSize != sizeof(Elem)) 280 | { 281 | PSL_THROW_EXCEPTION("Size of the datatype stored in the grid does not match with the one from the file.") 282 | } 283 | 284 | // read the grid size 285 | unsigned int width, height, depth; 286 | inStream.read((char*)&width, sizeof(unsigned int)); 287 | inStream.read((char*)&height, sizeof(unsigned int)); 288 | inStream.read((char*)&depth, sizeof(unsigned int)); 289 | 290 | // resize the grid 291 | resize(width, height, depth); 292 | 293 | // load the data stored in the grid 294 | inStream.read((char*)getDataPtr(), sizeof(Elem)*width*height*depth); 295 | 296 | // check stream 297 | if (!inStream.good()) 298 | { 299 | PSL_THROW_EXCEPTION("Error while loading the grid from the data file") 300 | } 301 | 302 | inStream.close(); 303 | } 304 | 305 | 306 | #endif // GRID_H 307 | -------------------------------------------------------------------------------- /src/PSL/psl_cudaBase/cudaCommon.h: -------------------------------------------------------------------------------- 1 | // This file is part of PlaneSweepLib (PSL) 2 | 3 | // Copyright 2016 Christian Haene (ETH Zuerich) 4 | 5 | // PSL is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | 10 | // PSL is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | 15 | // You should have received a copy of the GNU General Public License 16 | // along with PSL. If not, see . 17 | 18 | #ifndef CUDACOMMON_H 19 | #define CUDACOMMON_H 20 | 21 | #include 22 | 23 | #include 24 | 25 | using std::ostringstream; 26 | 27 | 28 | namespace PSL_CUDA 29 | { 30 | 31 | const int TILE_WIDTH = 16; 32 | const int TILE_HEIGHT = 16; 33 | 34 | inline int getNumTiles(int totalSize, int tileSize) 35 | { 36 | const int div = totalSize/tileSize; 37 | return totalSize % tileSize == 0 ? div : div + 1; 38 | } 39 | 40 | #ifdef _MSC_VER 41 | 42 | #define PSL_CUDA_CHECKED_CALL(cuda_call) \ 43 | { \ 44 | cudaError err = cuda_call; \ 45 | if( cudaSuccess != err) \ 46 | { \ 47 | /* generate message */ \ 48 | ostringstream os; \ 49 | os << "Cuda Error: " << cudaGetErrorString(err); \ 50 | throw PSL::Exception(__FILE__, __LINE__, __FUNCSIG__, os.str().c_str()); \ 51 | } \ 52 | } 53 | 54 | #define PSL_CUDA_CHECK_ERROR \ 55 | { \ 56 | cudaError err = cudaGetLastError(); \ 57 | if( cudaSuccess != err) \ 58 | { \ 59 | /* generate message */ \ 60 | ostringstream os; \ 61 | os << "Cuda Error: " << cudaGetErrorString(err); \ 62 | throw PSL::Exception(__FILE__, __LINE__, __FUNCSIG__, os.str().c_str()); \ 63 | } \ 64 | } 65 | 66 | #else 67 | #define PSL_CUDA_CHECKED_CALL(cuda_call) \ 68 | { \ 69 | cudaError err = cuda_call; \ 70 | if( cudaSuccess != err) \ 71 | { \ 72 | /* generate message */ \ 73 | ostringstream os; \ 74 | os << "Cuda Error: " << cudaGetErrorString(err); \ 75 | throw PSL::Exception(__FILE__, __LINE__, __PRETTY_FUNCTION__, os.str().c_str()); \ 76 | } \ 77 | } 78 | 79 | #define PSL_CUDA_CHECK_ERROR \ 80 | { \ 81 | cudaError err = cudaGetLastError(); \ 82 | if( cudaSuccess != err) \ 83 | { \ 84 | /* generate message */ \ 85 | ostringstream os; \ 86 | os << "Cuda Error: " << cudaGetErrorString(err); \ 87 | throw PSL::Exception(__FILE__, __LINE__, __PRETTY_FUNCTION__, os.str().c_str()); \ 88 | } \ 89 | } 90 | #endif 91 | } 92 | 93 | 94 | #endif //CUDACOMMON_H 95 | -------------------------------------------------------------------------------- /src/PSL/psl_cudaBase/cudaFishEyeImageProcessor.cpp: -------------------------------------------------------------------------------- 1 | // This file is part of PlaneSweepLib (PSL) 2 | 3 | // Copyright 2016 Christian Haene (ETH Zuerich) 4 | 5 | // PSL is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | 10 | // PSL is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | 15 | // You should have received a copy of the GNU General Public License 16 | // along with PSL. If not, see . 17 | 18 | #include "cudaFishEyeImageProcessor.h" 19 | #include 20 | #include 21 | 22 | using namespace PSL_CUDA; 23 | using namespace PSL; 24 | 25 | CudaFishEyeImageProcessor::CudaFishEyeImageProcessor() 26 | { 27 | CudaFishEyeImageProcessorDeviceCode::fishEyeImageProcessorInitTexturing(); 28 | } 29 | 30 | void CudaFishEyeImageProcessor::setInputImg(DeviceImage& inputImg, FishEyeCameraMatrix& camera) 31 | { 32 | this->inputImg = inputImg; 33 | this->camera = camera; 34 | if (camera.getK()(0,1) != 0) 35 | { 36 | PSL_THROW_EXCEPTION("Only Ks without skew allowed.") 37 | } 38 | } 39 | 40 | std::pair > CudaFishEyeImageProcessor::undistort(double iScale, double fScale, double k1, double k2, double p1, double p2) 41 | { 42 | if (inputImg.getNumChannels() != 1) 43 | { 44 | PSL_THROW_EXCEPTION("Only grayscale supported.") 45 | } 46 | 47 | DeviceImage outputImage; 48 | int width = (int) round(iScale*inputImg.getWidth()); 49 | int height = (int) round(iScale*inputImg.getHeight()); 50 | 51 | outputImage.allocatePitched(width, height, 1); 52 | 53 | Eigen::Matrix3d Knew = camera.getK(); 54 | Knew /= Knew(2,2); // make sure it is normalized 55 | Knew(0,0) *= iScale*fScale; 56 | Knew(1,1) *= iScale*fScale; 57 | Knew(0,2) = (Knew(0,2) + 0.5)*iScale - 0.5; 58 | Knew(1,2) = (Knew(1,2) + 0.5)*iScale -0.5; 59 | 60 | 61 | if (Knew(0,1) != 0) 62 | { 63 | PSL_THROW_EXCEPTION("Only Ks without skew allowed.") 64 | } 65 | 66 | Eigen::Matrix3d K = camera.getK(); 67 | K /= K(2,2); 68 | 69 | Eigen::Matrix3d KnewInv = Knew.inverse(); 70 | 71 | 72 | FishEyeCameraMatrix newCamera(Knew, camera.getR(), camera.getT(), camera.getXi()); 73 | 74 | 75 | CudaFishEyeImageProcessorDeviceCode::fishEyeImageProcessorUndistort(inputImg, outputImage, k1, k2, p1, p2, 76 | K(0,0), K(0,2), K(1,1), K(1,2), KnewInv(0,0), KnewInv(0,2), KnewInv(1,1), KnewInv(1,2)); 77 | 78 | return std::make_pair >(outputImage, newCamera); 79 | } 80 | 81 | DeviceImage CudaFishEyeImageProcessor::extractPinhole(double iScale, Eigen::Matrix3d& KPinhole, double k1, double k2, double p1, double p2) 82 | { 83 | if (inputImg.getNumChannels() != 1) 84 | { 85 | PSL_THROW_EXCEPTION("Only grayscale supported.") 86 | } 87 | 88 | DeviceImage outputImage; 89 | int width = (int) round(iScale*inputImg.getWidth()); 90 | int height = (int) round(iScale*inputImg.getHeight()); 91 | 92 | outputImage.allocatePitched(width, height, 1); 93 | 94 | KPinhole /= KPinhole(2,2); 95 | 96 | if (KPinhole(0,1) != 0) 97 | { 98 | PSL_THROW_EXCEPTION("Only Ks without skew allowed.") 99 | } 100 | 101 | Eigen::Matrix3d KInvPinhole = KPinhole.inverse(); 102 | 103 | Eigen::Matrix3d K = camera.getK(); 104 | K /= K(2,2); 105 | 106 | CudaFishEyeImageProcessorDeviceCode::fishEyeImageProcessorUndistortRectify(inputImg, outputImage, camera.getXi(), k1, k2, p1, p2, 107 | K(0,0), K(0,2), K(1,1), K(1,2), KInvPinhole(0,0), KInvPinhole(0,2), KInvPinhole(1,1), KInvPinhole(1,2)); 108 | 109 | return outputImage; 110 | } 111 | 112 | -------------------------------------------------------------------------------- /src/PSL/psl_cudaBase/cudaFishEyeImageProcessor.cu: -------------------------------------------------------------------------------- 1 | // This file is part of PlaneSweepLib (PSL) 2 | 3 | // Copyright 2016 Christian Haene (ETH Zuerich) 4 | 5 | // PSL is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | 10 | // PSL is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | 15 | // You should have received a copy of the GNU General Public License 16 | // along with PSL. If not, see . 17 | 18 | #include 19 | #include 20 | 21 | namespace PSL_CUDA 22 | { 23 | namespace CudaFishEyeImageProcessorDeviceCode 24 | { 25 | texture fishEyeImageProcessorGrayscaleTexture; 26 | cudaChannelFormatDesc fishEyeImageProcessorGrayscaleChannelDesc; 27 | 28 | bool fishEyeImageProcessorTexturingInitialized = false; 29 | 30 | 31 | void fishEyeImageProcessorInitTexturing() 32 | { 33 | if (!fishEyeImageProcessorTexturingInitialized) 34 | { 35 | // textures for image processing 36 | fishEyeImageProcessorGrayscaleChannelDesc = cudaCreateChannelDesc(8,0,0,0,cudaChannelFormatKindUnsigned); 37 | 38 | fishEyeImageProcessorGrayscaleTexture.addressMode[0] = cudaAddressModeWrap; 39 | fishEyeImageProcessorGrayscaleTexture.addressMode[1] = cudaAddressModeWrap; 40 | fishEyeImageProcessorGrayscaleTexture.filterMode = cudaFilterModeLinear; 41 | fishEyeImageProcessorGrayscaleTexture.normalized = true; 42 | 43 | fishEyeImageProcessorTexturingInitialized = true; 44 | } 45 | } 46 | 47 | __global__ void fishEyeImageProcessorUndistortKernel(DeviceImage outputImg, float k1_input, float k2_input, float p1_input, float p2_input, 48 | float k11_input, float k13_input, float k22_input, float k23_input, 49 | float k11inv_output, float k13inv_output, float k22inv_output, float k23inv_output, 50 | int inputImgWidth, int inputImgHeight) 51 | { 52 | // get position of outupt 53 | const unsigned int x = blockIdx.x*blockDim.x + threadIdx.x; 54 | const unsigned int y = blockIdx.y*blockDim.y + threadIdx.y; 55 | 56 | if (x < outputImg.getWidth() && y < outputImg.getHeight()) 57 | { 58 | // compute position 59 | // apply Kinv 60 | float mx = k11inv_output*x + k13inv_output; 61 | float my = k22inv_output*y + k23inv_output; 62 | 63 | // apply distortion 64 | float rho_sqr = mx*mx + my*my; 65 | 66 | float ratio_radial = k1_input*rho_sqr + k2_input*rho_sqr*rho_sqr; 67 | 68 | float du_radial_x = mx * ratio_radial; 69 | float du_radial_y = my * ratio_radial; 70 | 71 | float du_tangent_x = 2.0f*p1_input*mx*my + p2_input*(rho_sqr + 2.0f * mx*mx); 72 | float du_tangent_y = p1_input*(rho_sqr + 2.0f*my*my) + 2.0f*p2_input*mx*my; 73 | 74 | float udx = mx + du_radial_x + du_tangent_x; 75 | float udy = my + du_radial_y + du_tangent_y; 76 | 77 | float xd = k11_input*udx + k13_input; 78 | float yd = k22_input*udy + k23_input; 79 | 80 | const float u = (xd+0.5f) / (float) inputImgWidth; 81 | const float v = (yd+0.5f) / (float) inputImgHeight; 82 | 83 | const float1 pix = tex2D(fishEyeImageProcessorGrayscaleTexture, u, v); 84 | 85 | outputImg(x,y) = pix.x*255; 86 | } 87 | } 88 | 89 | void fishEyeImageProcessorUndistort(DeviceImage& inputImg, DeviceImage& outputImg, double k1_input, 90 | double k2_input, double p1_input, double p2_input, 91 | double k11_input, double k13_input, double k22_input, double k23_input, 92 | double k11inv_output, double k13inv_output, double k22inv_output, double k23inv_output) 93 | { 94 | // bind texture 95 | PSL_CUDA_CHECKED_CALL( cudaBindTexture2D(0, fishEyeImageProcessorGrayscaleTexture, inputImg.getAddr(), fishEyeImageProcessorGrayscaleChannelDesc, inputImg.getWidth(), inputImg.getHeight(), inputImg.getPitch()); ) 96 | 97 | dim3 gridDim(getNumTiles(outputImg.getWidth(), TILE_WIDTH), getNumTiles(outputImg.getHeight(), TILE_HEIGHT)); 98 | dim3 blockDim(TILE_WIDTH, TILE_HEIGHT); 99 | 100 | 101 | fishEyeImageProcessorUndistortKernel<<>>(outputImg, (float) k1_input, (float) k2_input, (float) p1_input, (float) p2_input, 102 | (float) k11_input, (float) k13_input, (float) k22_input, (float) k23_input, (float) k11inv_output, (float) k13inv_output, (float) k22inv_output, (float) k23inv_output, 103 | inputImg.getWidth(), inputImg.getHeight()); 104 | PSL_CUDA_CHECK_ERROR 105 | 106 | PSL_CUDA_CHECKED_CALL( cudaUnbindTexture(fishEyeImageProcessorGrayscaleTexture); ) 107 | 108 | } 109 | 110 | __global__ void fishEyeImageProcessorUndistortRectifyKernel(DeviceImage outputImg, float xi_input, float k1_input, float k2_input, float p1_input, float p2_input, 111 | float k11_input, float k13_input, float k22_input, float k23_input, 112 | float k11inv_output, float k13inv_output, float k22inv_output, float k23inv_output, 113 | int inputImgWidth, int inputImgHeight) 114 | { 115 | // get position of outupt 116 | const unsigned int x = blockIdx.x*blockDim.x + threadIdx.x; 117 | const unsigned int y = blockIdx.y*blockDim.y + threadIdx.y; 118 | 119 | if (x < outputImg.getWidth() && y < outputImg.getHeight()) 120 | { 121 | // compute position 122 | // apply Kinv 123 | float mx = k11inv_output*x + k13inv_output; 124 | float my = k22inv_output*y + k23inv_output; 125 | 126 | float lengthInv = 1.0f/sqrtf(mx*mx + my*my + 1.0f); 127 | 128 | float ux = mx*lengthInv; 129 | float uy = my*lengthInv; 130 | float uz = lengthInv + xi_input; 131 | ux /= uz; 132 | uy /= uz; 133 | 134 | // apply distortion 135 | float rho_sqr = ux*ux + uy*uy; 136 | 137 | float ratio_radial = k1_input*rho_sqr + k2_input*rho_sqr*rho_sqr; 138 | 139 | float du_radial_x = ux * ratio_radial; 140 | float du_radial_y = uy * ratio_radial; 141 | 142 | float du_tangent_x = 2.0f*p1_input*ux*uy + p2_input*(rho_sqr + 2.0f * ux*ux); 143 | float du_tangent_y = p1_input*(rho_sqr + 2.0f*uy*uy) + 2.0f*p2_input*ux*uy; 144 | 145 | float udx = ux + du_radial_x + du_tangent_x; 146 | float udy = uy + du_radial_y + du_tangent_y; 147 | 148 | float xd = k11_input*udx + k13_input; 149 | float yd = k22_input*udy + k23_input; 150 | 151 | const float u = (xd+0.5f) / (float) inputImgWidth; 152 | const float v = (yd+0.5f) / (float) inputImgHeight; 153 | 154 | const float1 pix = tex2D(fishEyeImageProcessorGrayscaleTexture, u, v); 155 | 156 | outputImg(x,y) = pix.x*255; 157 | } 158 | } 159 | 160 | void fishEyeImageProcessorUndistortRectify(DeviceImage& inputImg, DeviceImage& outputImg, double xi_input, double k1_input, 161 | double k2_input, double p1_input, double p2_input, 162 | double k11_input, double k13_input, double k22_input, double k23_input, 163 | double k11inv_output, double k13inv_output, double k22inv_output, double k23inv_output) 164 | { 165 | // bind texture 166 | PSL_CUDA_CHECKED_CALL( cudaBindTexture2D(0, fishEyeImageProcessorGrayscaleTexture, inputImg.getAddr(), fishEyeImageProcessorGrayscaleChannelDesc, inputImg.getWidth(), inputImg.getHeight(), inputImg.getPitch()); ) 167 | 168 | dim3 gridDim(getNumTiles(outputImg.getWidth(), TILE_WIDTH), getNumTiles(outputImg.getHeight(), TILE_HEIGHT)); 169 | dim3 blockDim(TILE_WIDTH, TILE_HEIGHT); 170 | 171 | 172 | fishEyeImageProcessorUndistortRectifyKernel<<>>(outputImg, (float) xi_input, (float) k1_input, (float) k2_input, (float) p1_input, (float) p2_input, 173 | (float) k11_input, (float) k13_input, (float) k22_input, (float) k23_input, (float) k11inv_output, (float) k13inv_output, (float) k22inv_output, (float) k23inv_output, 174 | inputImg.getWidth(), inputImg.getHeight()); 175 | PSL_CUDA_CHECK_ERROR 176 | 177 | PSL_CUDA_CHECKED_CALL( cudaUnbindTexture(fishEyeImageProcessorGrayscaleTexture); ) 178 | } 179 | } 180 | } 181 | -------------------------------------------------------------------------------- /src/PSL/psl_cudaBase/cudaFishEyeImageProcessor.h: -------------------------------------------------------------------------------- 1 | // This file is part of PlaneSweepLib (PSL) 2 | 3 | // Copyright 2016 Christian Haene (ETH Zuerich) 4 | 5 | // PSL is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | 10 | // PSL is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | 15 | // You should have received a copy of the GNU General Public License 16 | // along with PSL. If not, see . 17 | 18 | #ifndef CUDAFISHEYEIMAGEPROCESSOR_H 19 | #define CUDAFISHEYEIMAGEPROCESSOR_H 20 | 21 | #include "deviceImage.h" 22 | #include 23 | 24 | namespace PSL_CUDA 25 | { 26 | namespace CudaFishEyeImageProcessorDeviceCode 27 | { 28 | void fishEyeImageProcessorInitTexturing(); 29 | void fishEyeImageProcessorUndistort(DeviceImage& inputImg, DeviceImage& outputImg, double k1_input, 30 | double k2_input, double p1_input, double p2_input, 31 | double k11_input, double k13_input, double k22_input, double k23_input, 32 | double k11inv_output, double k13inv_output, double k22inv_output, double k23inv_output); 33 | void fishEyeImageProcessorUndistortRectify(DeviceImage& inputImg, DeviceImage& outputImg, double xi_input, double k1_input, 34 | double k2_input, double p1_input, double p2_input, 35 | double k11_input, double k13_input, double k22_input, double k23_input, 36 | double k11inv_output, double k13inv_output, double k22inv_output, double k23inv_output); 37 | } 38 | 39 | class CudaFishEyeImageProcessor 40 | { 41 | public: 42 | CudaFishEyeImageProcessor(); 43 | void setInputImg(DeviceImage& inputImg, PSL::FishEyeCameraMatrix& camera); 44 | std::pair > undistort(double iScale, double fScale, double k1, double k2, double p1, double p2); 45 | DeviceImage extractPinhole(double iScale, Eigen::Matrix3d& Kpinhole, double k1, double k2, double p1, double p2); 46 | private: 47 | DeviceImage inputImg; 48 | PSL::FishEyeCameraMatrix camera; 49 | }; 50 | } 51 | 52 | #endif //CUDAFISHEYEIMAGEPROCESSOR_H 53 | -------------------------------------------------------------------------------- /src/PSL/psl_cudaBase/deviceBuffer.cpp: -------------------------------------------------------------------------------- 1 | // This file is part of PlaneSweepLib (PSL) 2 | 3 | // Copyright 2016 Christian Haene (ETH Zuerich) 4 | 5 | // PSL is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | 10 | // PSL is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | 15 | // You should have received a copy of the GNU General Public License 16 | // along with PSL. If not, see . 17 | 18 | #include "deviceBuffer.h" 19 | #include 20 | #include 21 | 22 | using namespace PSL_CUDA; 23 | 24 | template 25 | void DeviceBuffer::downloadAndDisplay(int waitTime, T minVal, T maxVal, std::string windowTitle) 26 | { 27 | cv::Mat_ mat(height, width); 28 | 29 | download((T*)mat.data, mat.step); 30 | 31 | mat -= minVal; 32 | mat /= (maxVal - minVal); 33 | 34 | cv::imshow(windowTitle.c_str(), mat); 35 | 36 | cv::waitKey(waitTime); 37 | } 38 | 39 | template 40 | void DeviceBuffer::download(T* dstPtr, size_t dstPitch) 41 | { 42 | PSL_CUDA_CHECKED_CALL( cudaMemcpy2D(dstPtr, dstPitch, addr, pitch, sizeof(T)*width, height, cudaMemcpyDeviceToHost); ) 43 | } 44 | 45 | #ifdef _MSC_VER 46 | #pragma warning( disable : 4661) 47 | #endif 48 | 49 | template class DeviceBuffer; 50 | template class DeviceBuffer; 51 | -------------------------------------------------------------------------------- /src/PSL/psl_cudaBase/deviceBuffer.cu: -------------------------------------------------------------------------------- 1 | // This file is part of PlaneSweepLib (PSL) 2 | 3 | // Copyright 2016 Christian Haene (ETH Zuerich) 4 | 5 | // PSL is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | 10 | // PSL is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | 15 | // You should have received a copy of the GNU General Public License 16 | // along with PSL. If not, see . 17 | 18 | #include "deviceBuffer.h" 19 | #include "deviceBuffer.cuh" 20 | #include 21 | 22 | namespace PSL_CUDA 23 | { 24 | namespace DeviceBufferDeviceCode 25 | { 26 | template 27 | __global__ void clearKernel(DeviceBuffer buf, T value) 28 | { 29 | // get position of outupt 30 | unsigned int x = blockIdx.x*blockDim.x + threadIdx.x; 31 | unsigned int y = blockIdx.y*blockDim.y + threadIdx.y; 32 | 33 | if (x < buf.getWidth() && y < buf.getHeight()) 34 | { 35 | buf(x,y) = value; 36 | } 37 | } 38 | } 39 | } 40 | 41 | using namespace PSL; 42 | using namespace PSL_CUDA; 43 | using namespace DeviceBufferDeviceCode; 44 | 45 | 46 | template 47 | DeviceBuffer::DeviceBuffer() 48 | { 49 | addr = 0; 50 | } 51 | 52 | template 53 | void DeviceBuffer::allocatePitched(int width, int height) 54 | { 55 | // // to avoid memory leaks 56 | // deallocate(); 57 | 58 | PSL_CUDA_CHECKED_CALL( cudaMallocPitch(&addr, &pitch, width*sizeof(T), height); ) 59 | this->width = width; 60 | this->height = height; 61 | } 62 | 63 | template 64 | void DeviceBuffer::reallocatePitched(int width, int height) 65 | { 66 | if (addr != 0) 67 | { 68 | if (width == this->width && height == this->height) 69 | { 70 | return; 71 | } 72 | deallocate(); 73 | } 74 | allocatePitched(width, height); 75 | } 76 | 77 | 78 | 79 | template 80 | void DeviceBuffer::deallocate() 81 | { 82 | // if (addr != 0) 83 | // { 84 | PSL_CUDA_CHECKED_CALL( cudaFree((void *)addr); ) 85 | // } 86 | addr = 0; 87 | } 88 | 89 | template 90 | void DeviceBuffer::clear(T value) 91 | { 92 | 93 | dim3 gridDim(getNumTiles(width, TILE_WIDTH), getNumTiles(height, TILE_HEIGHT)); 94 | dim3 blockDim(TILE_WIDTH, TILE_HEIGHT); 95 | 96 | clearKernel<<>>(*this, value); 97 | } 98 | 99 | template 100 | void DeviceBuffer::upload(T* dataPtr, size_t dataPitch) 101 | { 102 | // pitch is in bytes 103 | PSL_CUDA_CHECKED_CALL( cudaMemcpy2D(addr, pitch, dataPtr, dataPitch, width*sizeof(T), height, cudaMemcpyHostToDevice); ) 104 | } 105 | 106 | 107 | #ifdef _MSC_VER 108 | #pragma warning( disable : 4661) 109 | #endif 110 | 111 | // instantiate needed buffers 112 | template class DeviceBuffer; 113 | template class DeviceBuffer; 114 | 115 | -------------------------------------------------------------------------------- /src/PSL/psl_cudaBase/deviceBuffer.cuh: -------------------------------------------------------------------------------- 1 | // This file is part of PlaneSweepLib (PSL) 2 | 3 | // Copyright 2016 Christian Haene (ETH Zuerich) 4 | 5 | // PSL is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | 10 | // PSL is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | 15 | // You should have received a copy of the GNU General Public License 16 | // along with PSL. If not, see . 17 | 18 | #ifndef DEVICEBUFFER_CUH 19 | #define DEVICEBUFFER_CUH 20 | 21 | template 22 | inline __device__ T& PSL_CUDA::DeviceBuffer::operator()(unsigned int x, unsigned int y) 23 | { 24 | return *((T*)((char*)addr + y*pitch) + x); 25 | } 26 | 27 | 28 | #endif // DEVICEBUFFER_CUH 29 | -------------------------------------------------------------------------------- /src/PSL/psl_cudaBase/deviceBuffer.h: -------------------------------------------------------------------------------- 1 | // This file is part of PlaneSweepLib (PSL) 2 | 3 | // Copyright 2016 Christian Haene (ETH Zuerich) 4 | 5 | // PSL is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | 10 | // PSL is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | 15 | // You should have received a copy of the GNU General Public License 16 | // along with PSL. If not, see . 17 | 18 | #ifndef DEVICEBUFFER_H 19 | #define DEVICEBUFFER_H 20 | 21 | #include "cudaCommon.h" 22 | #include "cuda_runtime.h" 23 | #include 24 | 25 | 26 | namespace PSL_CUDA 27 | { 28 | template 29 | class DeviceBuffer 30 | { 31 | public: 32 | DeviceBuffer(); 33 | 34 | // host and device functions 35 | inline __host__ __device__ T* getAddr() const 36 | { 37 | return addr; 38 | } 39 | inline __host__ __device__ int getWidth() const 40 | { 41 | return width; 42 | } 43 | inline __host__ __device__ int getHeight() const 44 | { 45 | return height; 46 | } 47 | inline __host__ __device__ int getPitch() const 48 | { 49 | return (int) pitch; 50 | } 51 | inline __host__ __device__ bool isAllocated() const 52 | { 53 | return addr != 0; 54 | } 55 | inline __host__ __device__ int2 getSize() const 56 | { 57 | return make_int2(width, height); 58 | } 59 | 60 | // device only functions 61 | inline __device__ T& operator()(unsigned int x, unsigned int y); 62 | 63 | // host only functions 64 | void allocatePitched(int width, int height); 65 | void reallocatePitched(int width, int height); 66 | void clear(T value); 67 | void download(T* dstPtr, size_t dstPitch); 68 | void downloadAndDisplay(int waitTime, T minVal, T maxVal, std::string windowTitle = "Buffer"); 69 | void upload(T* dataPtr, size_t dataPitch); 70 | 71 | void deallocate(); 72 | 73 | private: 74 | T* addr; 75 | int width; 76 | int height; 77 | size_t pitch; 78 | }; 79 | } 80 | 81 | #endif // CUDADEVICEBUFFER_H 82 | -------------------------------------------------------------------------------- /src/PSL/psl_cudaBase/deviceImage.cpp: -------------------------------------------------------------------------------- 1 | // This file is part of PlaneSweepLib (PSL) 2 | 3 | // Copyright 2016 Christian Haene (ETH Zuerich) 4 | 5 | // PSL is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | 10 | // PSL is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | 15 | // You should have received a copy of the GNU General Public License 16 | // along with PSL. If not, see . 17 | 18 | #include "deviceImage.h" 19 | #include 20 | #include 21 | 22 | using namespace PSL_CUDA; 23 | 24 | void DeviceImage::allocatePitchedAndUpload(const cv::Mat& img) 25 | { 26 | if (img.type() == CV_8UC4) 27 | { 28 | this->width = img.cols; 29 | this->height = img.rows; 30 | this->numChannels = 4; 31 | } 32 | else if (img.type() == CV_8UC1) 33 | { 34 | this->width = img.cols; 35 | this->height = img.rows; 36 | this->numChannels = 1; 37 | } 38 | else 39 | { 40 | PSL_THROW_EXCEPTION ( "Only BRGA and Grayscale supported!") 41 | } 42 | 43 | PSL_CUDA_CHECKED_CALL( cudaMallocPitch(&addr, &pitch, width*numChannels, height); ) 44 | PSL_CUDA_CHECKED_CALL( cudaMemcpy2D(addr, pitch, img.data, img.step, width*numChannels, height, cudaMemcpyHostToDevice); ) 45 | } 46 | 47 | void DeviceImage::reallocatePitchedAndUpload(const cv::Mat& img) 48 | { 49 | if ((img.type() == CV_8UC4 && numChannels != 4) 50 | || (img.type() == CV_8UC1 && numChannels != 1) 51 | || (img.cols != width) 52 | || (img.rows != height)) 53 | { 54 | deallocate(); 55 | allocatePitchedAndUpload(img); 56 | } 57 | else 58 | { 59 | PSL_CUDA_CHECKED_CALL( cudaMemcpy2D(addr, pitch, img.data, img.step, width*numChannels, height, cudaMemcpyHostToDevice); ) 60 | } 61 | } 62 | 63 | void DeviceImage::allocatePitched(int width, int height, int numChannels) 64 | { 65 | this->width = width; 66 | this->height = height; 67 | this->numChannels = numChannels; 68 | 69 | PSL_CUDA_CHECKED_CALL( cudaMallocPitch(&addr, &pitch, width*numChannels, height); ) 70 | } 71 | 72 | void DeviceImage::download(cv::Mat& img) 73 | { 74 | if (numChannels == 4) 75 | { 76 | img = cv::Mat(height, width, CV_8UC4); 77 | } 78 | else if (numChannels == 1) 79 | { 80 | img = cv::Mat(height, width, CV_8UC1); 81 | } 82 | else 83 | { 84 | PSL_THROW_EXCEPTION ( "Only BRGA and BRG supported!") 85 | } 86 | PSL_CUDA_CHECKED_CALL( cudaMemcpy2D(img.data, img.step, addr, pitch, width*numChannels, height, cudaMemcpyDeviceToHost); ) 87 | } 88 | -------------------------------------------------------------------------------- /src/PSL/psl_cudaBase/deviceImage.cu: -------------------------------------------------------------------------------- 1 | // This file is part of PlaneSweepLib (PSL) 2 | 3 | // Copyright 2016 Christian Haene (ETH Zuerich) 4 | 5 | // PSL is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | 10 | // PSL is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | 15 | // You should have received a copy of the GNU General Public License 16 | // along with PSL. If not, see . 17 | 18 | #include "deviceImage.h" 19 | #include "deviceImage.cuh" 20 | 21 | namespace PSL_CUDA 22 | { 23 | namespace DeviceImageDeviceCode 24 | { 25 | __global__ void clearKernel(DeviceImage devImg, unsigned char value) 26 | { 27 | // get position of outupt 28 | unsigned int x = blockIdx.x*blockDim.x + threadIdx.x; 29 | unsigned int y = blockIdx.y*blockDim.y + threadIdx.y; 30 | 31 | if (x < devImg.getWidth()*devImg.getNumChannels() && y < devImg.getHeight()) 32 | { 33 | devImg(x,y) = value; 34 | } 35 | } 36 | } 37 | } 38 | 39 | using namespace PSL; 40 | using namespace PSL_CUDA; 41 | using namespace DeviceImageDeviceCode; 42 | 43 | 44 | DeviceImage::DeviceImage() 45 | { 46 | addr = 0; 47 | } 48 | 49 | 50 | 51 | void DeviceImage::deallocate() 52 | { 53 | PSL_CUDA_CHECKED_CALL( cudaFree((void *)addr); ) 54 | addr = 0; 55 | } 56 | 57 | void DeviceImage::clear(unsigned char value) 58 | { 59 | 60 | dim3 gridDim(getNumTiles(width*numChannels, TILE_WIDTH), getNumTiles(height, TILE_HEIGHT)); 61 | dim3 blockDim(TILE_WIDTH, TILE_HEIGHT); 62 | 63 | clearKernel<<>>(*this, value); 64 | } 65 | 66 | -------------------------------------------------------------------------------- /src/PSL/psl_cudaBase/deviceImage.cuh: -------------------------------------------------------------------------------- 1 | // This file is part of PlaneSweepLib (PSL) 2 | 3 | // Copyright 2016 Christian Haene (ETH Zuerich) 4 | 5 | // PSL is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | 10 | // PSL is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | 15 | // You should have received a copy of the GNU General Public License 16 | // along with PSL. If not, see . 17 | 18 | #ifndef DEVICEIMAGE_CUH 19 | #define DEVICEIMAGE_CUH 20 | 21 | inline __device__ unsigned char& PSL_CUDA::DeviceImage::operator()(unsigned int x, unsigned int y) 22 | { 23 | return *(addr + y*pitch + x); 24 | } 25 | 26 | inline __device__ unsigned char& PSL_CUDA::DeviceImage::operator()(unsigned int x, unsigned int y, unsigned int c) 27 | { 28 | return *(addr + y*pitch + x*numChannels + c); 29 | } 30 | 31 | 32 | #endif // DEVICEIMAGE_CUH 33 | -------------------------------------------------------------------------------- /src/PSL/psl_cudaBase/deviceImage.h: -------------------------------------------------------------------------------- 1 | // This file is part of PlaneSweepLib (PSL) 2 | 3 | // Copyright 2016 Christian Haene (ETH Zuerich) 4 | 5 | // PSL is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | 10 | // PSL is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | 15 | // You should have received a copy of the GNU General Public License 16 | // along with PSL. If not, see . 17 | 18 | #ifndef DEVICEIMAGE_H 19 | #define DEVICEIMAGE_H 20 | 21 | #include "cudaCommon.h" 22 | #include "cuda_runtime.h" 23 | 24 | namespace cv 25 | { 26 | class Mat; 27 | } 28 | 29 | 30 | namespace PSL_CUDA 31 | { 32 | class DeviceImage 33 | { 34 | public: 35 | DeviceImage(); 36 | 37 | // host and device functions 38 | inline __host__ __device__ unsigned char* getAddr() const 39 | { 40 | return addr; 41 | } 42 | inline __host__ __device__ int getWidth() const 43 | { 44 | return width; 45 | } 46 | inline __host__ __device__ int getHeight() const 47 | { 48 | return height; 49 | } 50 | inline __host__ __device__ int getNumChannels() const 51 | { 52 | return numChannels; 53 | } 54 | inline __host__ __device__ int getPitch() const 55 | { 56 | return (int) pitch; 57 | } 58 | inline __host__ __device__ bool isAllocated() const 59 | { 60 | return addr != 0; 61 | } 62 | inline __host__ __device__ int2 getSize() const 63 | { 64 | return make_int2(width, height); 65 | } 66 | 67 | // device only functions 68 | inline __device__ unsigned char& operator()(unsigned int x, unsigned int y); 69 | inline __device__ unsigned char& operator()(unsigned int x, unsigned int y, unsigned int c); 70 | 71 | // host only functions 72 | void allocatePitchedAndUpload(const cv::Mat& img); 73 | void reallocatePitchedAndUpload(const cv::Mat& img); 74 | void allocatePitched(int width, int height, int numChannels); 75 | void download(cv::Mat& img); 76 | void clear(unsigned char value); 77 | void deallocate(); 78 | 79 | private: 80 | unsigned char* addr; 81 | int width; 82 | int height; 83 | int numChannels; 84 | size_t pitch; 85 | }; 86 | } 87 | 88 | #endif // CUDADEVICEIMAGE_H 89 | -------------------------------------------------------------------------------- /src/PSL/psl_io/ioTools.cpp: -------------------------------------------------------------------------------- 1 | // This file is part of PlaneSweepLib (PSL) 2 | 3 | // Copyright 2016 Christian Haene (ETH Zuerich) 4 | 5 | // PSL is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | 10 | // PSL is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | 15 | // You should have received a copy of the GNU General Public License 16 | // along with PSL. If not, see . 17 | 18 | #include "ioTools.h" 19 | #include 20 | #include 21 | 22 | namespace PSL 23 | { 24 | bool is_little_endian() 25 | { 26 | short int word = 1; 27 | char *byte = (char *) &word; 28 | return byte[0] != 0; 29 | } 30 | 31 | std::string extractBaseFileName(const std::string &fullFileName) 32 | { 33 | size_t pos = fullFileName.find_last_of('/'); 34 | std::string baseName; 35 | if (pos != std::string::npos) 36 | { 37 | baseName = fullFileName.substr(pos+1, fullFileName.size()-pos); 38 | } 39 | else 40 | { 41 | baseName = fullFileName; 42 | } 43 | // remove the ending 44 | pos = baseName.find_first_of('.'); 45 | if (pos != std::string::npos) 46 | { 47 | return baseName.substr(0, pos); 48 | } 49 | else 50 | { 51 | return baseName; 52 | } 53 | } 54 | 55 | std::string extractFileName(const std::string &fullFileName) 56 | { 57 | size_t pos = fullFileName.find_last_of('/'); 58 | if (pos != std::string::npos) 59 | { 60 | return fullFileName.substr(pos+1, fullFileName.size()-pos); 61 | } 62 | else 63 | { 64 | return fullFileName; 65 | } 66 | } 67 | 68 | std::string extractPath(const std::string &fullFileName) 69 | { 70 | size_t pos = fullFileName.find_last_of('/'); 71 | if (pos != std::string::npos) 72 | { 73 | return fullFileName.substr(0, pos+1); 74 | } 75 | else 76 | { 77 | return "./"; 78 | } 79 | } 80 | 81 | 82 | void readObjFile(const std::string &fileName, std::vector& vertices, std::vector >& faces) 83 | { 84 | std::ifstream objStream; 85 | objStream.open(fileName.c_str()); 86 | 87 | if (!objStream.is_open()) 88 | { 89 | PSL_THROW_EXCEPTION("Error opening obj file.") 90 | } 91 | 92 | std::string line; 93 | while (!objStream.eof()) 94 | { 95 | getline(objStream, line); 96 | 97 | int commentPos = (int) line.find('#'); 98 | 99 | // nothing interesting before the comment 100 | if (commentPos != -1 && commentPos < 3) 101 | continue; 102 | 103 | // remove commented part 104 | if (commentPos != -1) 105 | { 106 | line = line.substr(0, commentPos); 107 | } 108 | 109 | stringstream lineStream(line); 110 | 111 | std::string firstInLine; 112 | lineStream >> firstInLine; 113 | if (firstInLine == "v") 114 | { 115 | // now we need to read the three coordinates 116 | double x, y, z; 117 | lineStream >> x >> y >> z; 118 | Eigen::Vector3d point; 119 | point(0) = x; point(1) = y; point(2) = z; 120 | vertices.push_back(point); 121 | //cout << "vertex found: (" << x << ", " << y << ", " << z << ")" << endl; 122 | } 123 | else if (firstInLine == "f") 124 | { 125 | // we need to read the indices 126 | std::vector indexStrings; 127 | std::string nextString; 128 | while (lineStream >> nextString) 129 | { 130 | indexStrings.push_back(nextString); 131 | } 132 | 133 | std::vector face; 134 | 135 | for (unsigned int i = 0; i < indexStrings.size(); i++) 136 | { 137 | stringstream indexStream(indexStrings[i]); 138 | int idx; 139 | indexStream >> idx; 140 | face.push_back(idx-1); 141 | //std::cout << idx-1 << " "; 142 | } 143 | //std::cout << endl; 144 | 145 | //cout << "face found: " << endl; 146 | 147 | faces.push_back(face); 148 | } 149 | } 150 | } 151 | } 152 | -------------------------------------------------------------------------------- /src/PSL/psl_io/ioTools.h: -------------------------------------------------------------------------------- 1 | // This file is part of PlaneSweepLib (PSL) 2 | 3 | // Copyright 2016 Christian Haene (ETH Zuerich) 4 | 5 | // PSL is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | 10 | // PSL is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | 15 | // You should have received a copy of the GNU General Public License 16 | // along with PSL. If not, see . 17 | 18 | #ifndef IOTOOLS_H 19 | #define IOTOOLS_H 20 | 21 | #include 22 | #include 23 | #include 24 | 25 | 26 | namespace PSL 27 | { 28 | bool is_little_endian(); 29 | std::string extractBaseFileName(const std::string& fullFileName); 30 | std::string extractFileName(const std::string& fullFileName); 31 | std::string extractPath(const std::string& fullFileName); 32 | 33 | // reads a simple obj file vertex indices are returned 0 based 34 | void readObjFile(const std::string& fileName, std::vector& vertices, std::vector >& faces); 35 | } 36 | 37 | 38 | #endif // IOTOOLS_H 39 | -------------------------------------------------------------------------------- /src/PSL/psl_stereo/cudaPlaneSweep.h: -------------------------------------------------------------------------------- 1 | // This file is part of PlaneSweepLib (PSL) 2 | 3 | // Copyright 2016 Christian Haene (ETH Zuerich) 4 | 5 | // PSL is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | 10 | // PSL is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | 15 | // You should have received a copy of the GNU General Public License 16 | // along with PSL. If not, see . 17 | 18 | #ifndef CUDAPLANESWEEP_H 19 | #define CUDAPLANESWEEP_H 20 | 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | 27 | #include 28 | #include 29 | 30 | #include 31 | 32 | #include 33 | 34 | using std::map; 35 | using std::vector; 36 | using cv::Mat; 37 | using Eigen::Matrix; 38 | using Eigen::Vector4d; 39 | 40 | 41 | namespace PSL_CUDA 42 | { 43 | namespace CudaPlaneSweepDeviceCode 44 | { 45 | // device function declarations 46 | void planeSweepInitTexturing(); 47 | 48 | void planeSweepBoxFilterCosts(DeviceBuffer& costBuf, DeviceBuffer& filteredCostBuf, int radius_x, int radius_y); 49 | void planeSweepBoxFilterImageAndSqrImage(DeviceImage& refImg, 50 | DeviceBuffer& boxFilterBuf, DeviceBuffer& boxFilterSqrBuf, 51 | int radius_x, int radius_y); 52 | void planeSweepWarpZNCC(const DeviceImage& otherImg, float* homography, const DeviceImage& refImg, 53 | DeviceBuffer& refImgBoxFilterBuf, DeviceBuffer& refImgSqrBoxFilterBuf, 54 | DeviceBuffer& costBuf, int radius_x, int radius_y); 55 | void planeSweepWarpZNCCAccum(const DeviceImage& otherImg, float* homography, 56 | const DeviceImage& refImg, 57 | DeviceBuffer& refImgBoxFilterBuf, DeviceBuffer& refImgSqrBoxFilterBuf, 58 | float accumScale, DeviceBuffer& costAccumBuf, int radius_x, int radius_y); 59 | void planeSweepWarpAD(const DeviceImage& srcImg, bool color, const float* homography, 60 | const DeviceImage& refImg, 61 | DeviceBuffer& costBuf); 62 | void planeSweepWarpADAccum(DeviceImage& srcImg, bool color, const float* homography, 63 | DeviceImage& refImg, 64 | float accumScale, DeviceBuffer& costAccumBuf); 65 | void updateBestK(DeviceBuffer& newCostsBuf, DeviceBuffer& bestCostsBuf, DeviceBuffer& bestMinBuf); 66 | void planeSweepAccumCostBestK(DeviceBuffer& costAccumBuf, DeviceBuffer& costBuf, DeviceBuffer& minCostBuf, float maxVal, float accumScale); 67 | void planeSweepUpdateBestPlane(const DeviceBuffer& newCosts, int width, int height, int currPlaneIndex, 68 | DeviceBuffer& bestPlaneCosts, DeviceBuffer& bestPlanes); 69 | void planeSweepUpdateBestPlaneSubPixel(const DeviceBuffer& currCosts, const DeviceBuffer& prev1, const DeviceBuffer& prev2, int width, int height, int prevPlaneIdx, 70 | DeviceBuffer& bestPlaneCosts, DeviceBuffer& bestPlanes, DeviceBuffer& subPixelPlaneOffsets); 71 | void planeSweepUpdateBestAndSecondBestPlane(const DeviceBuffer& newCosts, int width, int height, int currPlaneIndex, 72 | DeviceBuffer& bestPlaneCosts, DeviceBuffer& secondBestPlaneCosts, DeviceBuffer& bestPlanes); 73 | void planeSweepUpdateBestAndSecondBestPlaneSubPixel(const DeviceBuffer& currCosts, const DeviceBuffer& prev1, const DeviceBuffer& prev2, 74 | int width, int height, int prevPlaneIdx, DeviceBuffer& bestPlaneCosts, 75 | DeviceBuffer& secondBestPlaneCosts, DeviceBuffer& bestPlanes, DeviceBuffer& subPixelPlaneOffsets); 76 | void planeSweepMinFloat(DeviceBuffer& buf1, DeviceBuffer& buf2, DeviceBuffer& minBuf); 77 | void computeUniquenessRatio(DeviceBuffer& bestCost, DeviceBuffer& secondBestCost, DeviceBuffer& uniquenessRatios); 78 | void planeSweepComputeBestDepths(DeviceBuffer& bestPlanes, int numPlanes, vector& planes, 79 | float* bestDepthsAddr, int bestDepthsPitch, vector &KrefInv); 80 | void planeSweepComputeBestDepthsSubPixelInverse(DeviceBuffer& bestPlanes, DeviceBuffer& planeOffsets, int numPlanes, vector& planes, 81 | float* bestDepthsAddr, int bestDepthsPitch, vector &KrefInv); 82 | void planeSweepComputeBestDepthsSubPixelDirect(DeviceBuffer& bestPlanes, DeviceBuffer& planeOffsets, int numPlanes, vector& planes, 83 | float* bestDepthsAddr, int bestDepthsPitch, vector &KrefInv); 84 | } 85 | } 86 | 87 | namespace PSL 88 | { 89 | enum PlaneSweepOcclusionMode 90 | { 91 | PLANE_SWEEP_OCCLUSION_NONE, 92 | PLANE_SWEEP_OCCLUSION_BEST_K, 93 | PLANE_SWEEP_OCCLUSION_REF_SPLIT 94 | }; 95 | 96 | enum PlaneSweepPlaneGenerationMode 97 | { 98 | PLANE_SWEEP_PLANEMODE_UNIFORM_DEPTH, 99 | PLANE_SWEEP_PLANEMODE_UNIFORM_DISPARITY 100 | }; 101 | 102 | enum PlaneSweepMatchingCosts 103 | { 104 | PLANE_SWEEP_SAD, 105 | PLANE_SWEEP_ZNCC 106 | }; 107 | 108 | struct CudaPlaneSweepImage 109 | { 110 | PSL_CUDA::DeviceImage devImg; 111 | CameraMatrix cam; 112 | }; 113 | 114 | enum PlaneSweepSubPixelInterpMode 115 | { 116 | PLANE_SWEEP_SUB_PIXEL_INTERP_DIRECT, 117 | PLANE_SWEEP_SUB_PIXEL_INTERP_INVERSE 118 | }; 119 | 120 | class CudaPlaneSweep 121 | { 122 | public: 123 | CudaPlaneSweep(); 124 | ~CudaPlaneSweep(); 125 | int addImage(Mat image, CameraMatrix& cam); 126 | int addDeviceImage(PSL_CUDA::DeviceImage& devImg, CameraMatrix& cam); 127 | void deleteImage(int id); 128 | 129 | // needs to be set prior to run 130 | void setZRange(double nearZ, double farZ); 131 | void setMatchWindowSize(int w, int h); 132 | void setNumPlanes(int num); 133 | void setOcclusionMode(PlaneSweepOcclusionMode occlusionMode); 134 | void setOcclusionBestK(int bestK); 135 | void setPlaneGenerationMode(PlaneSweepPlaneGenerationMode planeGenerationMode); 136 | void setMatchingCosts(PlaneSweepMatchingCosts matchingCosts); 137 | void setScale(double scale); 138 | void updateCameraMatrix(int id, CameraMatrix& cam); 139 | 140 | void enableOutputBestDepth(bool enabled = true); 141 | void enableColorMatching(bool enabled = true); 142 | void enableBoxFilterBeforeOcclusion(bool enabled = true); 143 | void enableOutputBestCosts(bool enabled = true); 144 | void enableOuputUniquenessRatio(bool enabled = true); 145 | void enableOutputCostVolume(bool enabled = true); 146 | void enableSubPixel(bool enabled = true); 147 | 148 | void setSubPixelInterpolationMode(PlaneSweepSubPixelInterpMode interpMode); 149 | 150 | DepthMap getBestDepth(); 151 | Grid getBestCosts(); 152 | Grid getUniquenessRatios(); 153 | Grid getCostVolume(); 154 | Grid getPlanes(); 155 | CameraMatrix getRefImgCam(); 156 | 157 | cv::Mat downloadImage(int id); 158 | 159 | void process(int refImgId); 160 | void process(int refImgId, Grid& planes); 161 | 162 | void deallocateBuffers(); 163 | 164 | private: 165 | map images; 166 | 167 | int nextId; 168 | 169 | double nearZ; 170 | double farZ; 171 | 172 | double scale; 173 | 174 | int matchWindowWidth; 175 | int matchWindowHeight; 176 | int matchWindowRadiusX; 177 | int matchWindowRadiusY; 178 | 179 | int numPlanes; 180 | 181 | PlaneSweepOcclusionMode occlusionMode; 182 | int occlusionBestK; 183 | 184 | bool boxFilterBeforeOcclusion; 185 | 186 | PlaneSweepPlaneGenerationMode planeGenerationMode; 187 | 188 | PlaneSweepMatchingCosts matchingCosts; 189 | 190 | void planeHomography(const Matrix& plane, const CameraMatrix& refCam, const CameraMatrix& otherCam, float* H); 191 | void matchImage(const CudaPlaneSweepImage& refImg, const CudaPlaneSweepImage& otherImg, const Matrix& plane, PSL_CUDA::DeviceBuffer& costBuffer); 192 | double largestBaseline(const CudaPlaneSweepImage& refImg); 193 | 194 | // enabled features 195 | bool outputBestDepthEnabled; 196 | bool outputBestCostsEnabled; 197 | bool colorMatchingEnabled; 198 | bool outputUniquenessRatioEnabled; 199 | bool outputCostVolumeEnabled; 200 | bool subPixelEnabled; 201 | 202 | PlaneSweepSubPixelInterpMode subPixelInterpMode; 203 | 204 | // for output 205 | DepthMap bestDepth; 206 | Grid bestCosts; 207 | Grid uniqunessRatios; 208 | Grid costVolume; 209 | Grid planes; 210 | CameraMatrix refImgCam; 211 | 212 | // CudaPlaneSweepImage warpingBuffer; 213 | // CudaPlaneSweepFloatBuffer costBuffer; 214 | PSL_CUDA::DeviceBuffer costAccumBuffer; 215 | PSL_CUDA::DeviceBuffer subPixelCostAccumBufferPrev1; 216 | PSL_CUDA::DeviceBuffer subPixelCostAccumBufferPrev2; 217 | PSL_CUDA::DeviceBuffer subPixelPlaneOffsetsBuffer; 218 | // CudaPlaneSweepFloatBuffer costAccumBuffer; 219 | PSL_CUDA::DeviceBuffer boxFilterTempBuffer; 220 | PSL_CUDA::DeviceBuffer bestPlaneBuffer; 221 | PSL_CUDA::DeviceBuffer bestPlaneCostBuffer; 222 | PSL_CUDA::DeviceBuffer secondBestPlaneCostBuffer; 223 | vector > costBuffers; 224 | 225 | // Buffers for best K 226 | PSL_CUDA::DeviceBuffer bestKBuffer0; 227 | PSL_CUDA::DeviceBuffer bestKBuffer1; 228 | 229 | // Buffers for half sequence 230 | PSL_CUDA::DeviceBuffer costAccumBeforeBuffer; 231 | PSL_CUDA::DeviceBuffer costAccumAfterBuffer; 232 | 233 | // Buffers for NCC matching costs 234 | PSL_CUDA::DeviceBuffer refImgBoxFilterBuffer; 235 | PSL_CUDA::DeviceBuffer otherImgBoxFilterBuffer; 236 | PSL_CUDA::DeviceBuffer refImgSqrBoxFilterBuffer; 237 | PSL_CUDA::DeviceBuffer otherImgSqrBoxFilterBuffer; 238 | PSL_CUDA::DeviceBuffer imgProdBoxFilterBuffer; 239 | PSL_CUDA::DeviceBuffer boxFilterSqrTempBuffer; 240 | PSL_CUDA::DeviceBuffer boxFilterProdTempBuffer; 241 | }; 242 | 243 | } 244 | 245 | #endif // PLANESWEEP_H 246 | -------------------------------------------------------------------------------- /src/PSLTests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | link_libraries(PSL ${Boost_LIBRARIES} ${OpenCV_LIBRARIES}) 2 | 3 | add_executable(pinholePlanesweepTest pinholePlanesweepTest.cpp) 4 | add_executable(fisheyePlanesweepTest fisheyePlanesweepTest.cpp) 5 | 6 | --------------------------------------------------------------------------------