NodeMICMAC is a Node.js App and REST API to access MicMac. It exposes an API which is used by WebODM or other projects. This project is sponsored and developed by DroneMapper. This repository was originally forked from NodeODM, which is part of the OpenDroneMap Project.
This list is not by order of importance.
- Forked NodeODM
- Updated README
- New Dockerfile
- Add MicMac Source Build
- Initial Docker & Native Testing
- Digital Elevation Model Creation
- Orthomosaic Creation
- External and Relative Camera Orientation Exports
- Interfaces w/ Other Software (PMVS/OpenSFM/Pix4D/DroneMapper)
- Point Cloud
- Post Processing
- GCP Processing
- Oblique Imagery and/or 3D Model
- Conform / Rename Outputs to ODM Conventions
- Wire Up 2D and Potree Tile Creation
- Multi-Scale Tie-Point Generation (Similar to Photoscan)
- Export Undistorted Images
- Utilize RPY Omega Phi Kappa
- Sparse Point Cloud w/ Camera Position
- Point Cloud w/ Image Ground Footprints
- Update Tests
- Initial Integration w/ WebODM
- Full Integration w/ WebODM
- Progress Reporting
- Staged Restart Ability
Note: This project currently creates a geo-referenced DEM and Ortho from our 4th Ave. test imagery (and most likely your imagery). The results are located in their respective directories in UTM projection.
DroneMapper 4th Ave. Reservoir - 48 Geo-tagged Images DJI Phantom 3 Advanced
- Results clipped to an AOI and displayed using Global Mapper GlobalMapper
Mission Planning / Execution
- We recommend using a mission planning application such as MapPilot, DJI GS Pro, or Pix4DMapper.
We recommend that you setup NodeMICMAC using Docker.
- Docker image build:
docker build -t dronemapper/node-micmac .
- From the Docker Quickstart Terminal (Windows / OSX) or from the command line (Linux) type:
docker run -p 3000:3000 dronemapper/node-micmac
- If you're on Windows/OSX, find the IP of your Docker machine by running this command from your Docker Quickstart Terminal:
Linux users can connect to 127.0.0.1.
- Open a Web Browser to
- Load some images with geo-tags
- Press "Start Task"
- Go for a walk or enjoy a pastis! :)
If the computer running NodeMICMAC is using an old or 32bit CPU, you need to compile OpenDroneMap from sources and setup NodeMICMAC natively. You cannot use docker. Docker images work with CPUs with 64-bit extensions, MMX, SSE, SSE2, SSE3 and SSSE3 instruction set support or higher. Seeing a
Illegal instruction error while processing images is an indication that your CPU is too old.
API Options / Command Line Parameters
positional arguments: <project name> Name of Project (i.e subdirectory of projects folder) optional arguments: -h, --help show this help message and exit --images <path>, -i <path> Path to input images --project-path <path> Path to the project folder --max-concurrency <integer> The maximum number of cores to use in processing. Default: 4 --resize-to <integer> Scale image width for tie-point extraction. Default: 800 --zoom <integer> The level of DEM construction. 2 means 2x native GSD. Default: 2 Values: 1, 2, 4, 8 --matcher-distance <integer> Distance threshold in meters to find pre-matching images based on GPS exif data. Default: 0 (use auto-distance) --multi-scale Uses an image file pair based multi-scale tie-point generation routine similar to Photoscan. --camera-cloud Creates a sparse point cloud with camera positions --image-footprint Creates a point cloud and geojson with image footprints --ccd-width <float> The CCD sensor width in millimeters (mm). Example: 6.17 --ccd-height <float> The CCD sensor height in millimeters (mm). Example: 4.55 --version Displays version number and exits.
See the ODM API Documentation Page.
Run Tasks from the Command Line
You can use CloudODM to run tasks with NodeMICMAC from the command line. (Untested)
Using an External Hard Drive (Not Recommended/Performance IO Reasons)
If you want to store results on a separate drive, map the
/var/www/data folder to the location of your drive:
docker run -p 3000:3000 -v /mnt/external_hd:/var/www/data dronemapper/node-micmac
This can be also used to access the computation results directly from the file system.
Run it Natively
If you are already running ODM on Ubuntu natively you can follow these steps:
- You may need to step through the Dockerfile and install missing dependencies listed there to install natively.
1] Install PotreeConverter and LASzip dependency
apt-get install -y libboost-dev libboost-program-options-dev exiftool pip install Shapely pip install utm mkdir /staging git clone https://github.com/pierotofy/LAStools /staging/LAStools cd LAStools/LASzip mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release .. make git clone https://github.com/pierotofy/PotreeConverter /staging/PotreeConverter cd /staging/PotreeConverter mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release -DLASZIP_INCLUDE_DIRS=/staging/LAStools/LASzip/dll -DLASZIP_LIBRARY=/staging/LAStools/LASzip/build/src/liblaszip.a .. make && sudo make install
2] Install gdal2tiles.py script, node.js and npm dependencies
sudo curl --silent --location https://deb.nodesource.com/setup_6.x | sudo bash - sudo apt-get install -y nodejs python-gdal git clone hhttps://github.com/dronemapper-io/NodeMICMAC.git cd NodeMICMAC npm install
3] Start NodeMICMAC
nodejs index.js --odm_path /home/projects/NodeMICMAC/dm/
For other command line options you can run:
nodejs index.js --help
You can also specify configuration values via a JSON file:
nodejs index.js --config config.default.json
Command line arguments always take precedence over the configuration file.
Run it using PM2
The app can also be run as a background process using the pm2 process manager, which can also assist you with system startup scripts and process monitoring.
To install pm2, run (using
sudo if required):
npm install pm2 -g
The app can then be started using
pm2 start processes.json
To have pm2 started on OS startup run
pm2 save pm2 startup
and then run the command as per the instructions that prints out. If that command errors then you may have to specify the system (note that systemd should be used on CentOS 7). Note that if the process is not running as root (recommended) you will need to change
/etc/init.d/pm2-init.sh to set
export PM2_HOME="/path/to/user/home/.pm2", as per these instructions
You can monitor the process using
If you want to make a contribution, but don't want to setup OpenDroneMap or MICMAC, or perhaps you are working on a Windows machine, or if you want to run automated tests, you can turn test mode on:
node index.js --test
While in test mode all calls to OpenDroneMap/MICMAC's code will be simulated (see the /tests directory for the mock data that is returned).
You can find some test drone images here.
What if I need more functionality?
NodeMICMAC is meant to be a lightweight API.
You can also contact us here
Stay current with upstream MicMac development providing an easy to use interface and API. Roll in upstream ODM API changes into this repo. Test, Process Images, Rinse, Repeat!
Cloned: 04-26-2019 Commit: fec03b2