https://doi.org/10.5201/ipol.2022.215
README.txt
- Name and brief description of the program:
paraws is an algorithm to compute the watershed lines in a disorderly fashion.
This new approach allows for easy parallelisation and as it does not require
sorting the pixels elevations. The watershed transform can be performed on more
complex types such as floats.
- Version number and release date:
This program has no versioning numbers but its current version has been
released in 26 May 2020.
- Reference to the article:
Not yet published
- Authors and licence:
This program is written by Theodore Chabardes
<theodore.chabardes@mines-paristech.fr> with contributions from Pierre Guillou
<pierre.guillou@mines-paristech.fr> and distributed under the terms of the
GPLv3 license.
- Location of future releases and updates :
Not known yet.
- Copyright, patent and licence information :
See GPLv3.txt
- Tools and libraries needed to compile and use the program
This program has been successfully built with gcc 8.3.0 and clang 4.0.1.
It depends on libpng (http://www.libpng.org/pub/png/libpng.html) and has been
successfully built with libpng 1.6.30.
- Compilation instructions:
Use make or meson/ninja.
- Usage intructions and example:
One executable is produced: paraws. The directory 'examples' contains several
images used to test the executions of the algorithm.
./paraws [options]
Options:
-A | --paraws_bench Benchs paraws
-B | --hqws_bench Benchs hqws
-h | --help Print this help
-i | --input_uint8 Path to uint8 input image
-I | --input_uint16 Path to uint16 input image
-m | --marker_uint8 Path to uint8 marker image
-M | --marker_uint16 Path to uint16 marker image
-N | --marker_uint32 Path to uint32 marker image
-o | --output_uint8 Path to uint8 output image
-O | --output_uint16 Path to uint16 output image
-P | --output_uint32 Path to uint32 output image
-C | --cross 4-connex structuring element
-S | --square 8-connex structuring element
-R | --cross3d 6-connex structuring element (3d)
-U | --cube 26-connex structuring element (3d)
-x | --size_x Width dimension (only for raw images)
-y | --size_y Height dimension (only for raw images)
-z | --size_z Depth dimension (only for raw images)
-w | --without_labels_limit Ignore errors due to label number overflow
-g | --export_RGB Export the output image in RGB format.
This program needs at least one input image, one output image and a structuring element. Only png and raw format are supported, and it should be identical for the input and the ouput. If raw format is used, dimensions must be specified. An additional markers image can be used for constrained watershed, whose type should match the output image..
Examples of execution:
paraws -i examples/dots.png -o examples/dots_out.png -C
paraws -i examples/grains.png -o examples/grains_out.png -S
paraws -i examples/lenna.png -O examples/lenna_out.png -C --export_RGB
- Changes in the software since it was first published:
This version is the sixth publication of this code.
Changes include in second publication:
- Fix label function that causes segmentation fault.
- The executable now use a portable, reentrant, embeddable, getopt-like option parser and features a detailed usage message.
- The linker problem with libpng has been fixed.
- The flag -fopenmp has been added by default.
- A concurrence race has been fixed in the distance function.
- A concurrence race has been fixed in the paraws function.
- Hexagonal structuring element has been desactived, as it seems to cause some troubles. It will be enable in the next release.
- Example images have been added. Corresponding calls to the executable can be found in the file 'README.txt'.
generate more warnings.
Changes include in third publication:
- Support markers-based watershed.
- Fix hexagonal structuring element.
- Add a benchmark option.
Changes include in fourth publication:
Changes include in fifth publication:
- Add RGB output.
Changes include in sixth publication:
- Bug fix that could cause a memory leak due to the popping of an empty hierarchical queue in flood.hpp
- List of the files:
examples: contains various test images.
tests: contains unit tests that verifies the shape of the watershed lines.
src: contains source files.
README.txt: this file.
paraws.cpp: executable that read the input image and write the output image at
the specified location.
meson_options.txt: contains meson options.
meson.build: contains meson build definitions
Makefile: build file.
Dockerfile: docker commands
GPLv3.txt: holds copyrights.
common.mk: holds common flags for compilation with makefile.
- List of known defects:
The connected component labeling algorithm is not optimised.
Missing doxygen documentation.
This implementation does not support hexagonal structuring element yet.
- Credits and acknowledgments:
Petr Dokladal, thesis supervisor.
Matthieu Faessel, thesis supervisor.
Michel Bilodeau, thesis supervisor.
Pierre Guillou, for the meson build system and docker file and for the git.
Nicolas Limare, for the function, which output labeled images in RGB format.