GithubHelp home page GithubHelp logo

akarinvs / vapoursynth-dpid Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wolframrhodium/vapoursynth-dpid

0.0 0.0 0.0 58 KB

Rapid, Detail-Preserving Image Downscaler for VapourSynth

License: BSD 3-Clause "New" or "Revised" License

C++ 95.49% Meson 4.51%

vapoursynth-dpid's Introduction

VapourSynth-dpid

Copyright© 2019 WolframRhodium

Rapid, Detail-Preserving Image Downscaler for VapourSynth

Description

dpid is an algorithm that preserves visually important details in downscaled images and is especially suited for large downscaling factors.

It acts like a convolutional filter where input pixels contribute more to the output image the more their color deviates from their local neighborhood, which preserves visually important details.

Supported Formats

sample type & bps: RGB/YUV/GRAY 8-16 bit integer or floating point.

Usage

dpid.Dpid(clip clip[, int width=0, int height=0, float lambda=1.0, float[] src_left=0, float[] src_top=0, bool read_chromaloc=True])
  • clip:

    The input clip.

  • width & height: (Default: clip.width / clip.height)

    The width and height of the output clip.

    One of which can be 0, and the downscaling will keep the aspect ratio.

  • lambda: (Default: 1.0)

    The power factor of range kernel.

    It can be used to tune the amplification of the weights of pixels that represent detail—from a box filter over an emphasis of distinct pixels towards a selection of only the most distinct pixels.

    This parameter happens to be a python keyword, so you may need to refer to the doc.

  • src_left, src_top: (Default: 0)

    Used to select the source region of the input to use.

    They can be arrays to specify different shifting for each plane. The last value is used for the unspecified planes.

    Only the first value in the array is passed to resize.Bilinear(), i.e.

    clip = core.dpid.Dpid(src, width, height, lambda_, src_lefts, src_tops)

    is equivalent to

    down = core.resize.Bilinear(
        src, width, height, 
        src_left=src_lefts[0], src_top=src_tops[0])
    
    clip = core.dpid.DpidRaw(src, down, lambda_, src_lefts, src_tops)
  • read_chromaloc: (Default: True)

    Whether to read _ChromaLocation property.


dpid.DpidRaw(clip clip[, clip clip2, float lambda=1.0, float[] src_left=0, float[] src_top=0, bool read_chromaloc=True, int[] planes=[0, 1, 2]])
  • clip: (Same as dpid.Dpid())

  • clip2:

    User-defined downsampled clip.

    Should be of the same format and number of frames as clip.

  • lambda: (Default: 1.0)

    (Same as dpid.Dpid())

  • src_left, src_top: (Default: 0)

    Used to select the source region of the input to use.

    It can also be used to shift the image.

  • read_chromaloc: (Default: True)

    (Same as dpid.Dpid())

  • planes: (Default: [0, 1, 2])

    Sets which planes will be processed.

    Any unprocessed planes will be simply copied from clip2.

vapoursynth-dpid's People

Contributors

akarinvs avatar fdar0536 avatar wolframrhodium 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.