Skip to content

edgarriba cmake branch info (for developers)

Dakota Benjamin edited this page Aug 9, 2016 · 1 revision

Hints for the installation can be found at: https://github.com/OpenDroneMap/OpenDroneMap/wiki/1.-Installation

I want to try help everyone get familiar with the code in the edgarriba's port. I'll try my best to explain it here

Project Structure

β”œβ”€β”€ ccd_defs_check.py                     # check the data/ccd_defs.json for compilation errors
β”œβ”€β”€ CMakeLists.txt                        # cmake file
β”œβ”€β”€ code_of_conduct.md                    # info on contributing
β”œβ”€β”€ configure.sh                          # The new install file. Builds dependencies and external modules in SuperBuild
β”œβ”€β”€ data                                  # Misc data
β”‚Β Β  └── ccd_defs.json                     # json file with camera ccd width definitions
β”œβ”€β”€ Dockerfile                            # For use with Docker
β”œβ”€β”€ hooks                                 # Git hooks
β”‚Β Β  └── pre-commit                        # check ccd_defs before commit
β”œβ”€β”€ img
β”‚Β Β  └── odm_image.png                     # The logo
β”œβ”€β”€ LICENSE                               # GPL v.3 license
β”œβ”€β”€ licenses                              # licenses reference for external modules
β”‚Β Β  β”œβ”€β”€ libext_copyright.txt
β”‚Β Β  β”œβ”€β”€ libx11_copyright.txt
β”‚Β Β  └── license.md
β”œβ”€β”€ modules                               # internal modules
β”‚Β Β  β”œβ”€β”€ CMakeLists.txt                    # cmake file
β”‚Β Β  β”œβ”€β”€ odm_extract_utm                   # extract UTM from images metadata for georeferencing
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ CMakeLists.txt
β”‚Β Β  β”‚Β Β  └── src
β”‚Β Β  β”‚Β Β      β”œβ”€β”€ Logger.cpp
β”‚Β Β  β”‚Β Β      β”œβ”€β”€ Logger.hpp
β”‚Β Β  β”‚Β Β      β”œβ”€β”€ main.cpp
β”‚Β Β  β”‚Β Β      β”œβ”€β”€ UtmExtractor.cpp
β”‚Β Β  β”‚Β Β      └── UtmExtractor.hpp
β”‚Β Β  β”œβ”€β”€ odm_georef                        # georeferences the model
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ CMakeLists.txt
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ CMakeLists.txt.user
β”‚Β Β  β”‚Β Β  └── src
β”‚Β Β  β”‚Β Β      β”œβ”€β”€ FindTransform.cpp
β”‚Β Β  β”‚Β Β      β”œβ”€β”€ FindTransform.hpp
β”‚Β Β  β”‚Β Β      β”œβ”€β”€ Georef.cpp
β”‚Β Β  β”‚Β Β      β”œβ”€β”€ Georef.hpp
β”‚Β Β  β”‚Β Β      β”œβ”€β”€ Logger.cpp
β”‚Β Β  β”‚Β Β      β”œβ”€β”€ Logger.hpp
β”‚Β Β  β”‚Β Β      β”œβ”€β”€ main.cpp
β”‚Β Β  β”‚Β Β      β”œβ”€β”€ modifiedPclFunctions.cpp
β”‚Β Β  β”‚Β Β      └── modifiedPclFunctions.hpp
β”‚Β Β  β”œβ”€β”€ odm_meshing                       # creates a triangulated mesh of the dense point cloud
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ CMakeLists.txt
β”‚Β Β  β”‚Β Β  └── src
β”‚Β Β  β”‚Β Β      β”œβ”€β”€ Logger.cpp
β”‚Β Β  β”‚Β Β      β”œβ”€β”€ Logger.hpp
β”‚Β Β  β”‚Β Β      β”œβ”€β”€ main.cpp
β”‚Β Β  β”‚Β Β      β”œβ”€β”€ OdmMeshing.cpp
β”‚Β Β  β”‚Β Β      └── OdmMeshing.hpp
β”‚Β Β  β”œβ”€β”€ odm_orthophoto                    # Creates an orthophoto from the textured mesh
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ CMakeLists.txt
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ CMakeLists.txt.user
β”‚Β Β  β”‚Β Β  └── src
β”‚Β Β  β”‚Β Β      β”œβ”€β”€ Logger.cpp
β”‚Β Β  β”‚Β Β      β”œβ”€β”€ Logger.hpp
β”‚Β Β  β”‚Β Β      β”œβ”€β”€ main.cpp
β”‚Β Β  β”‚Β Β      β”œβ”€β”€ OdmOrthoPhoto.cpp
β”‚Β Β  β”‚Β Β      └── OdmOrthoPhoto.hpp
β”‚Β Β  └── odm_texturing                     # Creates a textured mesh from the mesh and images
β”‚Β Β      β”œβ”€β”€ CMakeLists.txt
β”‚Β Β      β”œβ”€β”€ CMakeLists.txt.user
β”‚Β Β      └── src
β”‚Β Β          β”œβ”€β”€ Logger.cpp
β”‚Β Β          β”œβ”€β”€ Logger.hpp
β”‚Β Β          β”œβ”€β”€ main.cpp
β”‚Β Β          β”œβ”€β”€ modifiedPclFunctions.cpp
β”‚Β Β          β”œβ”€β”€ modifiedPclFunctions.hpp
β”‚Β Β          β”œβ”€β”€ OdmTexturing.cpp
β”‚Β Β          └── OdmTexturing.hpp
β”œβ”€β”€ opendm                                # Directory containing utility scripts and context
β”‚Β Β  β”œβ”€β”€ config.py                         # Argparse config
β”‚Β Β  β”œβ”€β”€ context.py                        # contains paths and other universal variables (num_cores, supported_extensions)
β”‚Β Β  β”œβ”€β”€ __init__.py
β”‚Β Β  β”œβ”€β”€ io.py                             # io functions
β”‚Β Β  β”œβ”€β”€ log.py                            # logging configuration
β”‚Β Β  β”œβ”€β”€ system.py                         # functions mimicking system function and other utilities
β”‚Β Β  β”œβ”€β”€ tasks.py                          # classes for odmtasks (I don't think this is functional code. It may be irrelevant)
β”‚Β Β  └── types.py                          # classes for ODM_Photo, ODM_Reconstruction, ODM_GCPoint, ODM_Tree
β”œβ”€β”€ patched_files                         # I'm actually not sure what this is for. I think it has to do with the install. 
β”‚Β Β  └── src
β”‚Β Β      └── graclus
β”‚Β Β          β”œβ”€β”€ graclus1.2.tar.gz
β”‚Β Β          └── index.html
β”œβ”€β”€ README.md                             # The Readme for Github
β”œβ”€β”€ run.py                                # The control script. Note it's very small, most of the goods are in scripts/
β”œβ”€β”€ scripts                               # The juicy bits. These files define ecto "cells", explained below
β”‚Β Β  β”œβ”€β”€ cmvs.py                           # With PMVS, generates a dense point cloud
β”‚Β Β  β”œβ”€β”€ dataset.py                        # Prep the dataset
β”‚Β Β  β”œβ”€β”€ example_ecto_python.py            # example
β”‚Β Β  β”œβ”€β”€ __init__.py
β”‚Β Β  β”œβ”€β”€ odm_app.py                        # Defines the main App class, which inherits from ecto.BlackBox, explained below
β”‚Β Β  β”œβ”€β”€ odm_georeferencing.py             # Georeferences the output files
β”‚Β Β  β”œβ”€β”€ odm_meshing.py                    # Generates a triangulated mesh from ply
β”‚Β Β  β”œβ”€β”€ odm_orthophoto.py                 # Generates an orthophoto from textured mesh
β”‚Β Β  β”œβ”€β”€ odm_texturing.py                  # Generates a textured mesh
β”‚Β Β  β”œβ”€β”€ opensfm.py                        # Does the structure from motion process
β”‚Β Β  β”œβ”€β”€ pmvs.py                           # With CMVS, generates a dense point cloud
β”‚Β Β  └── resize.py                         # resizes the photos
β”œβ”€β”€ SuperBuild                            # A cmake SuperBuild downloads, configures and builds other projects
β”‚Β Β  β”œβ”€β”€ cmake
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ External-Catkin.cmake
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ External-Ceres.cmake
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ External-CMVS.cmake
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ External-Ecto.cmake
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ External-GFlags.cmake
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ External-LAStools.cmake
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ External-OpenCV.cmake
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ External-OpenGV.cmake
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ External-OpenSfM.cmake
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ External-PCL.cmake
β”‚Β Β  β”‚Β Β  └── ExternalProject-Setup.cmake
β”‚Β Β  └── CMakeLists.txt
└── tests                                 # Tests
    β”œβ”€β”€ test_data                         # A small, well-oiled dataset that should work most of the time (we hope)
    β”‚Β Β  └── images
    β”‚Β Β      β”œβ”€β”€ 1JI_0064.JPG
    β”‚Β Β      β”œβ”€β”€ ...
    β”œβ”€β”€ testing.md                        # What needs to be tested and how. This is not comprehensive. 
    └── test_odm.py                       # The testing script. Uses unittest. 

Ecto? Cells? Plasms?

OK so this part is a little hard to grok, and I'm still new to the concept too, so bear with me. First off, you can get info about ecto straight from the source.

So as I understand it, ecto is a framework for getting 'stuff' from one place to another- in our case, photos to a variety of other products such as 3D meshes and orthophotos. It uses Directed Acyclic Graphs, called plasms, to do this. Each "cell" is a computation which takes an input, performs some process, and passes an output to a number of other cells.

A BlackBox is an encapsulation of a plasm, so that it can be reused. That mean you can rerun the code on a dataset and it will know which cells have already been run.