An image segmentation algorithm based on the watershed paradigm
Project description
Consult the module API page at
https://engineering.purdue.edu/kak/distWatershed/Watershed-2.2.2.html
for all information related to this module, including information related to the latest changes to the code. The page at the URL shown above lists all of the module functionality you can invoke in your own code. That page also describes how you can directly access the segmented blobs in your own code and how you can apply a color filter to an image before its segmentation.
With regard to the basic purpose of the module, it is a Python implementation of the watershed algorithm for image segmentation. This implementation allows for both fully automatic and marker-assisted segmentation of an image.
Typical usage syntax:
from Watershed import * shed = Watershed( data_image = "orchid0001.jpg", binary_or_gray_or_color = "color", size_for_calculations = 128, sigma = 1, gradient_threshold_as_fraction = 0.1, level_decimation_factor = 16, padding = 20, ) shed.extract_data_pixels() shed.display_data_image() shed.mark_image_regions_for_gradient_mods() #(A) shed.compute_gradient_image() shed.modify_gradients_with_marker_minima() #(B) shed.compute_Z_level_sets_for_gradient_image() shed.propagate_influence_zones_from_bottom_to_top_of_Z_levels() shed.display_watershed() shed.display_watershed_in_color() shed.extract_watershed_contours_seperated() shed.display_watershed_contours_in_color() The statements in lines (A) and (B) are needed only for marker-assisted segmentation with the module. For a fully automated implemented of the BLM algorithm, you would need to delete those two statements.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file Watershed-2.2.2.tar.gz
.
File metadata
- Download URL: Watershed-2.2.2.tar.gz
- Upload date:
- Size: 12.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9367c86a0af242652e0ab6a0cf5174d6b9b0ade9276e168a6c534c34a123479e |
|
MD5 | 5640661606ca10b0d2a6254b36409f82 |
|
BLAKE2b-256 | dd24c5a776acf10ccbde3eb71bacce13aeefeeae2f3fff9888f476d5cc3e80b8 |