Git Product home page Git Product logo

fkmigration.jl's Introduction

fkMigration.jl

A Julia project demonstrating the fast f-k migration algorithm presented in Wave-based non-line-of-sight imaging using fast f−k migration by Lindell et al. at SIGGRAPH 2019.

Setup

If you are new to non-line-of-sight (NLOS) imaging, we have written an introductory blog post to provide some background and explain how we wrote this code.

First, clone the repository and run Julia from it.

cd fkMigration.jl
julia --project

Then, enter package mode ] and instantiate the project.

(fkMigration) pkg> instantiate
Project fkMigration v0.1.0
    Status `fkMigration.jl/Project.toml`
  [7a1cc6ca] + FFTW v0.3.0
  [23992714] + MAT v0.5.0
    Status `fkMigration.jl/Manifest.toml`
  [7a1cc6ca] + FFTW v0.3.0
  [23992714] + MAT v0.5.0

You will need to download and extract NLOS datasets from the Stanford Computational Imaging Lab in order to continue. We used the "teaser" dataset, and have it extracted to ../teaser. You will need to use those directory paths in calls to the fkMigration.jl project.

vertical-temporal waves vertical-horizontal waves

Usage

There is a simple demo function which you can run, but it requires a lot of system memory (>=32GB) to run. A couple of optional arguments can be provided to downsample and crop the data to reduce the memory usage. Either way, the function returns a dense array 3D volumetric represention of the scene. Therefore, the array must be collapsed in order to form a more traditional 2D image of the scene, and we simply use maximum as a way to achieve that below.

julia> using fkMigration

julia> fullVolume = demo("../teaser")
512×512×1024 Array{Float64,3}:
⋮

julia> lowResVolume = demo("../teaser", 64, 512)
64×64×512 Array{Float64,3}:
⋮

julia> lowResImage = maximum(lowResVolume, dims=3)[:, :] / maximum(lowResVolume)
64×64 Array{Float64,2}:

You now have a normalized array which you can further manipulate, view with the ImageView.jl package, or save with the FileIO.jl and ImageMagick.jl packages.

reconstructed scene

Also, if you want more control over the whole process, the lower-level functions used by demo are available to use for yourself.

julia> tau, calib = loadDataset("../teaser", "meas_10min.mat") ;

julia> calibrate!(tau, calib) ;

julia> tau = downsampleAndCrop(tau, 64, 512) ;

julia> tau = reconstruct(tau) ;

fkmigration.jl's People

Contributors

krrutkow avatar

Watchers

 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.