GRAPHOS is a open-source photogrammetric software for 3D reconstruction.
You can download the latest version of GRAPHOS from the GitHub Releases section.
- CMake v3.10+
- C++ Compiler with support for C++14
- Git
To properly install and run GRAPHOS, you need the following dependencies:
Make sure your environment has these dependencies installed before proceeding with the build.
git clone https://github.com/TIDOP-USAL/graphos.git
cd graphosOnce you have the dependencies installed and the repository cloned, follow these steps to build GRAPHOS using CMake.
Create a build directory where the build files will be generated:
mkdir build
cd buildConfigure the project using CMake. If you want to build a version that uses GPU, ensure CUDA support is available. If you do not want to use CUDA, you can disable it during the configuration:
# To build with CUDA support
cmake .. -DWITH_CUDA=ON
# Or, to build without CUDA support
cmake .. -DWITH_CUDA=OFFOnce configured, compile the project by running:
make -j$(nproc)The -j$(nproc) argument parallelizes the build using all available CPU cores, speeding up the process.
After the build completes, install GRAPHOS on your system:
sudo make installGRAPHOS can be run in a Docker container, enabling ease of setup and GPU support for computational tasks.
IMPORTANT: The Docker image only supports console mode. The graphical interface is not available.
To build a Docker image for GRAPHOS, navigate to the root directory of the repository (where the Dockerfile is located) and run:
docker build -t graphos .This command builds the Docker image and tags it as graphos.
To run GRAPHOS in a Docker container with GPU support, use the following command:
docker run -it --name graphos --gpus all -v /home/user/data:/app graphosExplanation:
-
-itRuns the container in interactive mode with a TTY shell. -
--name graphosNames the containergraphosfor easier reference. -
--gpus allEnables GPU acceleration inside the container. Requires NVIDIA Docker support. -
-v /home/user/data:/appMounts the local directory/home/user/datato/appinside the container, allowing the container to access data on the host machine.
Once inside the container, you can use GRAPHOS commands as described in this documentation. For example:
graphos createproj --name /app/proj/test1/test1.xml -o
find /app/datasets -type f \( -iname "*.jpg" -o -iname "*.png" \) > /app/datasets/images.txt
graphos image_manager -p /app/proj/test1/test1.xml -l /app/datasets/images.txt
graphos featextract -p /app/proj/test1/test1.xml
graphos featmatch -p /app/proj/test1/test1.xml
graphos ori -p /app/proj/test1/test1.xml -a
graphos dense -p /app/proj/test1/test1.xml --method mvs --mvs:resolution_level 2 --mvs:min-resolution 256 --mvs:max-resolution 3000 --mvs:number_views 5 --mvs:number_views_fuse 3If you encounter any issues or would like to contribute, please visit the Issues section on GitHub.
GRAPHOS can be used via a graphical interface or from the command line. This document provides instructions on using the available GRAPHOS commands through the command-line interface.
graphos [--version] [-h | --help] [--licence] <command> [<args>]
To see help for a specific command:
graphos <command> --helpcreateproj- Create a new Graphos project.image_manager- Manage images in a Graphos project.featextract- Extract features (SIFT) from images.featmatch- Match features between images.gcps- Import ground control points.ori- Perform 3D reconstruction.dense- Generate a dense point cloud.mesh- Create a Poisson reconstruction mesh.undistort- Undistort images.dem- Create DSM and/or DTM.export_point_cloud- Export point cloud.
Create a new Graphos project.
graphos createproj [OPTION...]-n, --name [R]- Project name or project file (.xml). (Required)-d, --description [O]- Project description. (Optional)-o, --overwrite [O]- Force project overwrite (default = false). (Optional)
graphos createproj --name inspectorManage images in a Graphos project.
graphos image_manager [OPTION...]-p, --prj [R]- Project file. (Required)-i, --image [O]- Image to add or remove (with option [--delete|-d]). (Optional)-l, --image_list [O]- List of images to add or remove (with option [--delete|-d]). (Optional)-d, --delete [O]- Delete an image from the project. (Optional)-c, --camera [O]- Camera type. Supported values: [Pinhole 1, Pinhole 2, Radial 1, Radial 2, OpenCV 1, OpenCV Fisheye, OpenCV 2, Radial Fisheye 1, Radial Fisheye 2, Radial 3]. (Optional)
graphos image_manager -p 253/253.xml -i image001.jpg
graphos image_manager -p 253/253.xml -i image001.jpg -dExtract features (SIFT) from images.
graphos featextract [OPTION...]-p, --prj [R]- Project file. (Required)-s, --max_image_size [O]- Maximum image size (default = 3200). (Optional)--max_features_number [O]- Maximum number of features to detect (default = 5000). (Optional)--octave_resolution [O]- SIFT: Number of layers in each octave (default = 3). (Optional)--contrast_threshold [O]- SIFT: Contrast Threshold (default = 0.006667). (Optional)--edge_threshold [O]- SIFT: Threshold for filtering out edge-like features (default = 10.0). (Optional)--disable_cuda [O]- Disable CUDA (default = false). (Optional)
graphos featextract -p 253/253.xmlImport of control points
graphos gcps [OPTION...]-p, --prj [R]Project file.--cp [R]Ground control points file.--crs [O]CRS.
graphos gcps --p 253/253.xml --cp 253/georef.xmlPerform 3D reconstruction.
graphos ori [OPTION...]-p, --prj [R]- Project file. (Required)-c, --fix_calibration [O]- Fix calibration. (Optional)-p, --fix_poses [O]- Fix poses. (Optional)-a, --absolute_orientation [O]- Absolute orientation. (Optional)
graphos ori -p 253/253.xml -aGenerate a dense point cloud.
graphos dense [OPTION...]-p, --prj [R]- Project file. (Required)-m, --method [O]- Densification method. Supported values: [mvs, pmvs, smvs]. (Optional)- Other method-specific options like resolution, colors, visibility, smoothing, etc.
--disable_cuda [O]- Disable CUDA (default = false). (Optional)
graphos dense -p 253/253.xml --method pmvsCreate a Poisson reconstruction mesh.
graphos mesh [OPTION...]-p, --prj [R]- Project file. (Required)--depth [O]- Maximum reconstruction depth. (Optional)--boundary_type [O]- Boundary type. Supported values: [Free, Dirichlet, Neumann]. (Optional)
graphos mesh -p 253/253.xml --depth 12 --boundary_type DirichletCreate DSM (Digital Surface Model) and/or (Digital Terrain Model).
graphos dem [OPTION...]-p, --prj [R]- Project file. (Required)-g, --gsd [O]- Ground sample distance. (Optional)--dsm [O]- Create a Digital Surface Model. (Optional)--dtm [O]- Create a Digital Terrain Model. (Optional)
graphos dem -p 253/253.xml --gsd 0.1Export point cloud
graphos export_point_cloud [OPTION...]-p, --prj [R]- Project file.-f, --file [R]- Export file.--crs [O]- CRS of the point cloud (default: CRS of the project ).
graphos export_point_cloud -p 253/253.xml --file point_cloud.plyGRAPHOS is distributed under the GNU General Public License Version 3 (GPL v3). Please see the LICENSE file for more information.

