Git Product home page Git Product logo

bgu's Introduction

Bilateral Guided Upsampling

This is not an official Google product.

Overview

This is an implementation of Bilateral Guided Upsampling as outlined in the SIGGRAPH Asia 2016 paper by Jiawen Chen, Andrew Adams, Neal Wadhwa, and Samuel W. Hasinoff.

Code structure

We include a MATLAB implementation of the slow global optimization algorithm and a Halide implementation of the fast approximation algorithm. We also provide a trivial GLSL shader for the performing slicing on the GPU. A full OpenGL demo application in on our roadmap.

We thank Elena Adams for the Parrot photo.

Build instructions (MATLAB)

  1. Run MATLAB.
  2. cd src/matlab
  3. demo

Main driver files:

  • bguFit Given a (low-resolution) input/output pair, fits an affine model.
  • bguSlice Given an affine model and a (high-resolution) image, applies the model, producing a (high-resolution) result.
  • testBGU Test harness that runs bguFit followed by bguSlice. Stores the results along with the passed-in ground truth into a result struct.
  • showTestResults Displays the result struct as image figures.
  • runOnFilesnames Run testBGU and showTestResults on filenames instead of matrices.
  • demo.m Runs runOnFilenames on the Parrot example in images.

Build instructions (Halide, Linux and MacOS)

Our code should build and run on Windows but we have not tested it.

  1. cd src/halide
  2. Download a Halide distribution and unzip it such that you have a directory called src/halide/halide.
  3. Install libpng and zlib. On MacOS, we used MacPorts and installed to the default location under /opt/local. If you use a different prefix location, edit Makefile and change MACOS_PREFIX_PATH appropriately.
  4. make
  5. Look at high_res_out.png and high_res_out_gray.png.

License

Apache 2.0.

bgu's People

Contributors

jiawen avatar

Stargazers

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

Watchers

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