Products            Buy            Support Forum            Professional            About            Codec Central

Possibility to implement AVIR - Image Resizing Algorithm?

  • Time
  • Show
Clear All
new posts
  • Lynx_TWO
    dBpoweramp Enthusiast
    • Aug 2009
    • 83

    Possibility to implement AVIR - Image Resizing Algorithm?

    I ran across this today:

    High-quality pro HDR image resizing / scaling C++ library, including a very fast, precise, SIMD Lanczos resizer (header-only C++) - avaneev/avir

    As per the site:

    "Me, Aleksey Vaneev, is happy to offer you an open source image resizing / scaling library which has reached a production level of quality, and is ready to be incorporated into any project. This library features routines for both down- and upsizing of 8- and 16-bit, 1 to 4-channel images. Image resizing routines were implemented in multi-platform C++ code, and have a high level of optimality. Beside resizing, this library offers a sub-pixel shift operation. Built-in sRGB gamma correction is available.

    The resizing algorithm at first produces 2X upsized image (relative to the source image size, or relative to the destination image size if downsizing is performed) and then performs interpolation using a bank of sinc function-based fractional delay filters. At the last stage a correction filter is applied which fixes smoothing introduced at previous steps.

    The resizing algorithm was designed to provide the best visual quality. The author even believes this algorithm provides the "ultimate" level of quality (for an orthogonal, non neural-network, resizing) which cannot be increased further: no math exists to provide a better frequency response, better anti-aliasing quality and at the same time having less ringing artifacts: these are 3 elements that define any resizing algorithm's quality; in AVIR practice these elements have a high correlation to each other, so they can be represented by a single parameter (AVIR offers several parameter sets with varying quality). Algorithm's time performance turned out to be very good as well (for the "ultimate" image quality).

    An important element utilized by this algorithm is the so called Peaked Cosine window function, which is applied over sinc function in all filters. Please consult the documentation for more details.

    Note that since AVIR implements orthogonal resizing, it may exhibit diagonal aliasing artifacts. These artifacts are usually suppressed by EWA or radial filtering techniques. EWA-like technique is not implemented in AVIR, because it requires considerably more computing resources and may produce a blurred image."

    Would it be possible to implement this in the image downscaling option? I know you focus on quality and precision which I truly appreciate, so thought it might be of interest
  • ananittarhib
    • May 2024
    • 4

    AVIR is an advanced open-source image resizing library designed for high-quality scaling of 8- and 16-bit, 1 to 4-channel images. Implemented in multi-platform C++, it emphasizes optimized routines for both downscaling and upscaling. Key features include sub-pixel shifting, built-in sRGB gamma correction, and a sophisticated resizing algorithm using sinc function-based interpolation with Peaked Cosine window functions. AVIR aims to achieve optimal visual quality by minimizing artifacts like ringing and diagonal aliasing. It offers flexibility with multiple parameter sets to adjust quality levels, catering to applications requiring precise and efficient image resizing solutions.