https://github.com/georgy7/fffd
D port of flood_fill_filter.
https://github.com/georgy7/fffd
edge-detection edge-detection-algorithm image-filters image-processing jpeg noise-reduction
Last synced: 5 months ago
JSON representation
D port of flood_fill_filter.
- Host: GitHub
- URL: https://github.com/georgy7/fffd
- Owner: georgy7
- License: agpl-3.0
- Created: 2020-03-24T04:51:03.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2021-02-17T21:35:40.000Z (over 5 years ago)
- Last Synced: 2025-02-05T04:45:32.130Z (over 1 year ago)
- Topics: edge-detection, edge-detection-algorithm, image-filters, image-processing, jpeg, noise-reduction
- Language: D
- Homepage:
- Size: 11.5 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
README
# fffd
[](https://travis-ci.org/georgy7/fffd)
D port of [flood-fill-filter](https://github.com/georgy7/flood_fill_filter).
## Installation
* [dub package manager installation](https://github.com/dlang/dub#installation)
* [LDC installation](https://github.com/ldc-developers/ldc#installation)
```sh
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
```