This is not an official Google product.
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.
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.
- Run MATLAB.
cd src/matlabdemo
bguFitGiven a (low-resolution) input/output pair, fits an affine model.bguSliceGiven an affine model and a (high-resolution) image, applies the model, producing a (high-resolution) result.testBGUTest harness that runsbguFitfollowed bybguSlice. Stores the results along with the passed-in ground truth into a result struct.showTestResultsDisplays the result struct as image figures.runOnFilesnamesRuntestBGUandshowTestResultson filenames instead of matrices.demo.mRunsrunOnFilenameson the Parrot example inimages.
Our code should build and run on Windows but we have not tested it.
cd src/halide- Download a Halide distribution and unzip it such that you have a directory called
src/halide/halide. - 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, editMakefileand changeMACOS_PREFIX_PATHappropriately. make- Look at
high_res_out.pngandhigh_res_out_gray.png.
Apache 2.0.