Skip to content

GRAPHOS is a open-source photogrammetric software for 3D reconstruction.

License

Notifications You must be signed in to change notification settings

TIDOP-USAL/graphos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GRAPHOS

License: GPL v3

GRAPHOS is a open-source photogrammetric software for 3D reconstruction.

gui

Getting Started

Releases

You can download the latest version of GRAPHOS from the GitHub Releases section.

Building with CMake

Prerequisites

  • CMake v3.10+
  • C++ Compiler with support for C++14
  • Git

Dependencies

To properly install and run GRAPHOS, you need the following dependencies:

Make sure your environment has these dependencies installed before proceeding with the build.

Cloning the Repository

git clone https://github.com/TIDOP-USAL/graphos.git
cd graphos

Building with CMake

Once you have the dependencies installed and the repository cloned, follow these steps to build GRAPHOS using CMake.

Step 1: Create the Build Directory

Create a build directory where the build files will be generated:

mkdir build
cd build

Step 2: CMake Configuration

Configure 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=OFF

Step 3: Building the Project

Once 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.

Step 4: Installation

After the build completes, install GRAPHOS on your system:

sudo make install

Docker

GRAPHOS can be run in a Docker container, enabling ease of setup and GPU support for computational tasks.

Build the Docker Image

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.

Running a Container with GPU Support

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 graphos

Explanation:

  • -it Runs the container in interactive mode with a TTY shell.

  • --name graphos Names the container graphos for easier reference.

  • --gpus all Enables GPU acceleration inside the container. Requires NVIDIA Docker support.

  • -v /home/user/data:/app Mounts the local directory /home/user/data to /app inside the container, allowing the container to access data on the host machine.

Using GRAPHOS Inside the Container

Once inside the container, you can use GRAPHOS commands as described in this documentation. For example:

graphos createproj --name my_project
graphos image_manager -p my_project/my_project.xml -i /app/images/image01.jpg
graphos featextract -p my_project/my_project.xml

Issues and Contributions:

If you encounter any issues or would like to contribute, please visit the Issues section on GitHub.

GRAPHOS Command-Line Interface

Overview

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.

Usage

graphos [--version] [-h | --help] [--licence] <command> [<args>]

To see help for a specific command:

graphos <command> --help

Available Commands

  • createproj - 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.

Command Details

createproj

Create a new Graphos project.

Usage

graphos createproj [OPTION...]

Options

  • -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)

Example

graphos createproj --name inspector

image_manager

Manage images in a Graphos project.

Usage

graphos image_manager [OPTION...]

Options

  • -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)

Examples

graphos image_manager -p 253/253.xml -i image001.jpg
graphos image_manager -p 253/253.xml -i image001.jpg -d

featextract

Extract features (SIFT) from images.

Usage

graphos featextract [OPTION...]

Options

  • -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)

Example

graphos featextract -p 253/253.xml

gcps

Import of control points

Usage

graphos gcps [OPTION...]

Options

  • -p, --prj [R] Project file.
  • --cp [R] Ground control points file.
  • --crs [O] CRS.

Example

graphos gcps --p 253/253.xml --cp 253/georef.xml

ori

Perform 3D reconstruction.

Usage

graphos ori [OPTION...]

Options

  • -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)

Example

graphos ori -p 253/253.xml -a

dense

Generate a dense point cloud.

Usage

graphos dense [OPTION...]

Options

  • -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)

Example

graphos dense -p 253/253.xml --method pmvs

mesh

Create a Poisson reconstruction mesh.

Usage

graphos mesh [OPTION...]

Options

  • -p, --prj [R] - Project file. (Required)
  • --depth [O] - Maximum reconstruction depth. (Optional)
  • --boundary_type [O] - Boundary type. Supported values: [Free, Dirichlet, Neumann]. (Optional)

Example

graphos mesh -p 253/253.xml --depth 12 --boundary_type Dirichlet

dem

Create DSM (Digital Surface Model) and/or (Digital Terrain Model).

Usage

graphos dem [OPTION...]

Options

  • -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)

Examples

graphos dem -p 253/253.xml --gsd 0.1

export_point_cloud

Export point cloud

Usage

graphos export_point_cloud [OPTION...]

Options

  • -p, --prj [R] - Project file.
  • -f, --file [R] - Export file.
  • --crs [O] - CRS of the point cloud (default: CRS of the project ).

Examples

graphos export_point_cloud -p 253/253.xml --file point_cloud.ply

License

GRAPHOS is distributed under the GNU General Public License Version 3 (GPL v3). Please see the LICENSE file for more information.