georgy7 / fffd

D port of flood_fill_filter.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fffd

Build Status

D port of flood-fill-filter.

Installation

dub build --build=release --compiler=ldc2
sudo cp fffd /usr/local/bin/

Usage

fffd [--help] [--diff=(0, 1) Default: 0.08.]
            [--activation-threshold=(0, 1) Default: 0.45.]
            [--radius=[1, 5] Default: 4.]
            [--denoise]
            input output

Positional arguments:
 input           Input file or "-" for reading from STDIN.
 output          Output file or "-" for writing to STDOUT.

Optional arguments:
 --help, -h      Prints this help.
 --diff, -d (0, 1) Default: 0.08.
                 Y (CIE XYZ) sensitivity.
 --activation-threshold, -a (0, 1) Default: 0.45.
                 The fraction of filled pixels within the fill window needed for
                 the white pixel in the output.
 --radius, -r [1, 5] Default: 4.
                 The fill window margin. The window width equals 2r+1.
 --denoise       Remove free-standing points.

Performance

$ time flood_fill_filter --denoise samples2/IMG_2164_q40_orig.bmp samples2/out_fff.png

real    0m4,510s
user    0m14,724s
sys     0m0,577s

$ time fffd --denoise samples2/IMG_2164_q40_orig.bmp samples2/out_fffd.png

real    0m0,762s
user    0m3,777s
sys     0m0,072s

$ /usr/bin/time -v flood_fill_filter --denoise samples2/IMG_2164_q40_orig.bmp samples2/out_fff.png |& grep "Maximum resident"
	Maximum resident set size (kbytes): 172592

$ /usr/bin/time -v fffd --denoise samples2/IMG_2164_q40_orig.bmp samples2/out_fffd.png |& grep "Maximum resident"
	Maximum resident set size (kbytes): 57676

About

D port of flood_fill_filter.

License:GNU Affero General Public License v3.0


Languages

Language:D 99.6%Language:Shell 0.4%