Coder Social home page Coder Social logo

conscienceli / ar-depth-occlusion Goto Github PK

View Code? Open in Web Editor NEW
12.0 4.0 4.0 21.34 MB

A complete tutorial to reproduce Fast Depth Densification for Occlusion-aware Augmented Reality (SIGGRAPH-Asia 2018), as well as a script to show effects on custom videos.

License: GNU General Public License v3.0

Python 8.06% CMake 1.09% C++ 90.85%

ar-depth-occlusion's Introduction

AR-Depth-Occlusion

A complete pipeline and a python script to implement simple occlusion effects in AR environment or videos. The theory is from the paper Fast Depth Densification for Occlusion-aware Augmented Reality, and the c++ implementation is from AR-Depth-cpp.

1. Main Steps

1.1 Prepare video file "video.MOV" and extract the frames.
mkdir  ./AR-Depth-cpp/data/frames
ffmpeg -i video.MOV -vf "scale=480:270,fps=20" ./AR-Depth-cpp/data/frames/%06d.png
1.2 Get the reconstruction files with colmap.
colmap automatic_reconstructor --workspace_path ./AR-Depth-cpp/data \
--image_path ./AR-Depth-cpp/data/frames --camera_model=PINHOLE \
--single_camera=1 --data_type=video

If no GPU is available or no display is attached, use --use_gpu=false.

1.3 Convert the reconstruction files to TXT format.
mkdir ./AR-Depth-cpp/data/reconstruction
colmap model_converter  --input_path ./AR-Depth-cpp/data/sparse/0 \
--output_path ./AR-Depth-cpp/data/reconstruction --output_type TXT
1.4 Remove all the comments lines in TXT files.
1.5 Build AR-Depth-cpp according to ./AR-Depth-cpp/README.md. Then
cd AR_DEPTH
./AR_DEPTH
cd ..
1.6 Run the fusion script.
python fusion.py

2. Reference

Reference

3. License

GPLv3 license.

ar-depth-occlusion's People

Contributors

conscienceli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.