Code Monkey home page Code Monkey logo

pyjbu's Introduction

pyJBU

A Python implementation of Joint Bilateral Upsampling [1].

Installation

pip install -r requirements.txt

Usage

usage: jbu.py [-h] [--radius RADIUS] [--sigma-spatial SIGMA_SPATIAL]
              [--sigma-range SIGMA_RANGE]
              source reference output

Perform Joint Bilateral Upsampling with a source and reference image

positional arguments:
  source                Path to the source image
  reference             Path to the reference image
  output                Path to the output image

optional arguments:
  -h, --help            show this help message and exit
  --radius RADIUS       Radius of the filter kernels (default: 2)
  --sigma-spatial SIGMA_SPATIAL
                        Sigma of the spatial weights (default: 2.5)
  --sigma-range SIGMA_RANGE
                        Sigma of the range weights (default: standard
                        deviation of the reference image)

The source image will be upsampled to the resolution of the reference image. The result will be written to the specified path of the output image.

References

  1. Kopf, J., Cohen, M. F., Lischinski, D., & Uyttendaele, M. (2007, August). Joint bilateral upsampling. In ACM Transactions on Graphics (ToG) (Vol. 26, No. 3, p. 96). ACM.

pyjbu's People

Contributors

dependabot[bot] avatar mzur 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

Watchers

 avatar  avatar  avatar

pyjbu's Issues

error in line 60

I am sorry to bother you that when I try to use the bilateral upsampling, I meet an error at line 60

Traceback (most recent call last):
  File "jbu.py", line 60, in <module>
    Image.fromarray(np.array(list(result)).astype(np.uint8)).save(args.output)
  File "/usr/local/lib/python2.7/dist-packages/concurrent/futures/_base.py", line 641, in result_iterator
    yield fs.pop().result()
  File "/usr/local/lib/python2.7/dist-packages/concurrent/futures/_base.py", line 455, in result
    return self.__get_result()
  File "/usr/local/lib/python2.7/dist-packages/concurrent/futures/_base.py", line 414, in __get_result
    raise exception_type, self._exception, self._traceback
ValueError: cannot reshape array of size 100 into shape (3)

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.