mirror of
https://github.com/boostorg/gil.git
synced 2026-01-19 16:22:14 +00:00
1.4 KiB
1.4 KiB
Morphology
Morphological operations capabilities in GIL are demonstrated by the program morphology, compiled from the sources example/morphology.cpp.
Synopsis
morphology input.png output-image-template operation1 [operation2 ... operationN]
- The first parameter must be the full path to an existing image in the PNG format for
morphologyto process - The second parameter is the pattern to use to name the output files. For example, a template of
out-will generate files likeout-erosion.png. Note that a full path can be given here, but that the directory must exist, asmorphologywill not create it. - The rest of the parameters are operation names, separated by a space. Each operation triggers the output of a file, whose name follows the pattern:
_output-image-template_-_operation_-.png. For example, the linemorphology input.png out- erosionwill produce the imageout-erosion.png.
The morphological operations available are the following:
- black_hat
- top_hat
- morphological_gradient
- dilation
- erosion
- opening
- closing
- binary
The operations can be provided in any order, only note that if binary is supplied, it will be applied first.
Specific requirements
Build requirements
- A C++ compiler compliant with C++14 or above
- The PNG library installed and configured.
Execution requirements
morphology has no specific execution requirements.