A simple program to test OpenCV image blur filters mean (blur)
and median (medianBlur)
.
Based on this code on the
OpenCV documentation. A refactored version can be found in src/original.py
.
The modified code is on the src/smoothing.py
file.
The following values can be modified by the user:
- image: the full or relative path to the image.
- filter strategy: the blur algorithm to be used. Valid values are
mean
ormedian
- blur delay: how long does each processing image stays on the screen (ms). Type
0
to disable this feature and pass them through a key press.
This configuration can be done in three diferent ways:
- By answering the prompt questions
- By passing command-line arguments in the following order: image, filter strategy and blur delay.
- By using the default values:
- image:
../data/uniform-plus-saltpepr.tif
- filter strategy:
median
- blur delay:
0 ms
- image:
Futher configuration can be done through directly editing the global variables' section of the src/smoothing.py
file.