• Stars
    star
    64
  • Rank 479,282 (Top 10 %)
  • Language
    C++
  • License
    MIT License
  • Created almost 3 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

FLOꟼ - An MIT-licensed image viewer equipped with a GPU-accelerated perceptual image diffing algorithm based on ꟻLIP

FLOꟼ

image

Prebuilt Single-file Binaries - currently Windows only

FLOꟼ (FLOP with a backwards P if rendered correctly) is an MIT-licensed image viewer equipped with a GPU-accelerated perceptual image diffing algorithm based on ꟻLIP. Read the accompanying blog post here.

The tool is usable either as a standalone executable for comparing images, or as a library to programmatically compare images and retrieve a comparison summary and write results to disk.

Minor note regarding software build and runtime requirements: This software was written and tested on one machine, with a certain set of capabilities afforded to it. Additional testing and possible changes are needed to verify correct operation on other drivers/platforms/hardware before relaxing requirements.

FLOP.2022-02-19.17-59-33.mp4

Build prerequisites

  • Relatively modern C++ compiler (some C++20 features are used)
  • CMake 3.21+
  • VulkanSDK 1.2.198.1

Build instructions

# Supply a custom generator with -G if you don't want the default one
# Pass -DFLOP_BUILD_EXE=OFF if you don't want to build the standalone executable
# Pass -DFLOP_BUILD_TESTS=ON if you want to compile and run the tests
cmake -B build -S .
cmake --build build

The first-time generation time will seem long because several dependencies are being fetched. The dependencies used are:

By default, both the library target and standalone executable are built. If you wish to link the library against your own code, you may either link the lflop library target in cmake, or manually link the compiled library through some other mechanism. The executable itself is simply flop.exe (or just flop on Linux).

Runtime requirements

  • GPU with recent driver
  • Windows 10+

Linux support should be relatively easy to provide, but is not yet tested. MacOS support will require integration with the MoltenVK framework.

Usage

The flop.exe can be run without any arguments and is a fully self-contained executable (no installation is required). When launched in this way, an empty window with a few UI controls to select some images and begin the comparison as seen in the demo above.

Alternatively, command line options may be passed to optionally run FLOꟼ in headless mode, and supply image paths. The full help text (obtainable by passing -h or --help) is reproduced below.

An image comparison tool and visualizer. All options are optional unless headless mode is requested.
Usage: FLOP [OPTIONS]

Options:
  -h,--help                   Print this help message and exit
  -r,--reference TEXT         Path to reference image
  -t,--test TEXT              Path to test image
  -o,--output TEXT            Path to output file.
  -e,--exposure FLOAT         Exposure to apply to an HDR image (log 2 stops)
  --tonemapper ENUM:value in {ACES->1,Reinhard->2,Hable->3} OR {1,2,3}
                              HDR to LDR tonemapping operator
  --hl,--headless             Request that a gui not be presented
  -f,--force                  Overwrite image if file exists at specified output path

FLOꟼ may also be used as a library. The test/ folder demonstrates how to link and programmatically analyze LDR or HDR images.

Differences from the original algorithm

The original paper assumes fully opaque color values, but it is sometimes useful to compare differences in images that possess an alpha channel. FLOꟼ accommodates this by detecting the presence of the alpha channel and scaling the Yy component in linearized Lab space prior to the constrast sensitivity filters.

The HDR FLOꟼ algorithm simply tonemaps both reference and test HDR inputs to LDR ranges with a specified global exposure. This is done currently for speed (less than 100 ms on my machine), but an local tonemapping operator or exposure bracketing may be an option in the future.

Limitations

While FLOꟼ is implemented on the GPU, minimal profiling was actually done to fully optimize it. Performance varies based on image size. The various kernel weights themselves are currently hardcoded in the shader bytecode. This may be relaxed in the future.

The HDR-ꟻLIP algorithm doesn't require specifying exposure when HDR images are supplied. It operates by automatically determining the exposure range, compute the ꟻLIP error for each exposure, then taking the maximum error per-pixel. FLOꟼ on the other hand, is meant to be used interactively, so it's recommended that the GUI be used to determine the appropriate exposure when analyzing HDR images.

References

More Repositories

1

Selene

Simple C++11 friendly header-only bindings to Lua
C++
811
star
2

klein

P(R*_{3, 0, 1}) specialized SIMD Geometric Algebra Library
C++
744
star
3

websocket_client

Erlang websocket client (ws and wss supported)
Erlang
183
star
4

cpp_nn_in_a_weekend

Article and source code reference to construct a C++ neural network in a weekend without any dependencies
C++
148
star
5

coop

C++20 coroutines-based cooperative multitasking library
C++
103
star
6

gal

Geometric Algebra Library
C++
93
star
7

paperbug

An indexed compendium of graphics programming papers, articles, blog posts, presentations, and more
JavaScript
91
star
8

opencl_in_action

Corrected source for the OpenCL in Action book (work in progress)
C
59
star
9

SDLpp

Lightweight C++11 bindings to SDL2
TeX
36
star
10

mc_ruler

Seamless llvm-mca CMake integration
CMake
26
star
11

spool

A C and C++ string pooling CMake-integrated preprocessor
C++
22
star
12

exprotoc

Elixir Protocol Buffers Compiler
Elixir
22
star
13

sharded_eredis

Erlang
20
star
14

eprotoc

Erlang proto file parser and code generator
Erlang
17
star
15

learningit

An overview of my git workflow. Feel free to suggest changes or fork your own version.
3
star
16

Yaiba

Yet Another Implementation of Buchberger's Algorithm
Haskell
2
star
17

ninepoints

Code snippets
C++
2
star
18

jeremyong.github.com

CSS
2
star
19

google-coredumper

Automatically exported from code.google.com/p/google-coredumper
Shell
1
star
20

o3de-extension

C
1
star
21

crdts_in_production

1
star
22

treebook

Ruby
1
star
23

simple_chat_server_tutorial

Erlang
1
star
24

simpleipc

Simple interprocess communication for C++ programs
C++
1
star