A playground in which I experiment and learn about image filters.
Flag | Details | Default |
---|---|---|
-i / --input |
Image input | input.jpg |
-o / --output |
Image output | output.jpg |
-x |
Crop x-coordinate | 0 |
-y |
Crop y-coordinate | 0 |
-w / --width |
Crop width | Image width |
-h / --height |
Crop height | Image width |
-v |
Verbose output | false |
An explanation for each setting can also be found via:
$ image-filter --help
Optionally, an image filter can be partially applied in the following way:
$ image-filter -i input.jpg -x 160 -y 160 -w 400 -h 400 gaussian1d -s 50.0
Flag | Details | Default |
---|---|---|
-r / --radius |
Blur strength (radius) | 1 |
$ image-filter -i a.jpg -o b.jpg box_blur_1d -r 10
$ image-filter -i a.jpg -o b.jpg box_blur_2d -r 10
Flag | Details | Default |
---|---|---|
-s / --sigma |
Blur strength (sigma) | 0.84089642 |
$ image-filter -i a.jpg -o b.jpg gaussian_blur_1d -s 10.0
$ image-filter -i a.jpg -o b.jpg gaussian_blur_2d -s 10.0
Flag | Details | Default |
---|---|---|
-s / --sigma |
Blur strength (sigma) | None |
$ image-filter -i a.jpg -o b.jpg sobel_2d -s 1.0
Criterion is used to benchmark performance. See the user guide and documentation for information on how to generate reports.
To run a specific benchmark, i.e. gaussian_250x250
, the following command can be used:
$ cargo bench -- gaussian_250x250
To save a given baseline to compare against:
$ cargo bench --bench gaussian -- --save-baseline example_a --sample-size 25
To compare against a saved baseline:
$ cargo bench --bench gaussian -- --load-baseline example_b --baseline example_a
All filters are part of the filters
library. If you wish to change or compile the compute
shaders, you will have to use
glslValidator
to compile
them to SPIR-V.
$ glslangvalidator -V shader.comp -o shader.comp.spv
As the shaders are currently statically linked, image-filter
will have to be
recompiled as well.
-
This project is released under the MIT License
-
Image, "Chaotic Clouds of Jupiter", via NASA/JPL-Caltech/SwRI/MSSS/Gerald Eichstad/Sean Doran is CC-NC-SA