Giter Site home page Giter Site logo

byyam / butteraugli Goto Github PK

View Code? Open in Web Editor NEW

This project forked from google/butteraugli

0.0 0.0 0.0 6.34 MB

butteraugli estimates the psychovisual difference between two images

License: Apache License 2.0

C++ 98.02% Makefile 0.28% Starlark 1.71%

butteraugli's Introduction

butteraugli

A tool for measuring perceived differences between images

Introduction

Butteraugli is a project that estimates the psychovisual similarity of two images. It gives a score for the images that is reliable in the domain of barely noticeable differences. Butteraugli not only gives a scalar score, but also computes a spatial map of the level of differences.

One of the main motivations for this project is the statistical differences in location and density of different color receptors, particularly the low density of blue cones in the fovea. Another motivation comes from more accurate modeling of ganglion cells, particularly the frequency space inhibition.

Use

Butteraugli can work as a quality metric for lossy image and video compression. On our small test corpus butteraugli performs better than our implementations of the reference methods, psnrhsv-m, ssim, and our yuv-color-space variant of ssim. One possible use is to define the quality level setting used in a jpeg compressor, or to compare two or more compression methods at the same level of psychovisual differences.

Butteraugli is intended to be a research tool more than a practical tool for choosing compression formats. We don't know how well butteraugli performs with major deformations -- we have mostly tuned it within a small range of quality, roughly corresponding to jpeg qualities 90 to 95.

Interface

Only a C++ interface is provided. The interface takes two images and outputs a map together with a scalar value defining the difference. The scalar value can be compared to two reference values that divide the value space into three experience classes: 'great', 'acceptable' and 'not acceptable'.

Build instructions

Install Bazel by following the instructions. Run bazel build -c opt //:butteraugli in the directory that contains this README file to build the command-line utility. If you want to use Butteraugli as a library, depend on the //:butteraugli_lib target.

Alternatively, you can use the Makefile provided in the butteraugli directory, after ensuring that libpng and libjpeg are installed. On some systems you might need to also install corresponding -dev packages.

The code is portable and also compiles on Windows after defining _CRT_SECURE_NO_WARNINGS in the project settings.

Command-line utility {#cmdline-tool}

Butteraugli, apart from the library, comes bundled with a comparison tool. The comparison tool supports PNG and JPG images as inputs. To compare images, run:

butteraugli image1.{png|jpg} image2.{png|jpg}

The tool can also produce a heatmap of differences between images. The heatmap will be output as a PNM image. To produce one, run:

butteraugli image1.{png|jpg} image2.{png|jpg} heatmap.pnm

butteraugli's People

Contributors

jyrkialakuijala avatar khavishbhundoo avatar robryk avatar eustas avatar lvandeve avatar ruuda avatar sbussard avatar byyam 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.