randomize_segmentation_labels¶
- grizli.catalog.randomize_segmentation_labels(seg, random_seed=1, fill_value=nan)[source]¶
Randomize labels on a segmentation image for easier visualization
- Parameters
- segstr or array
Segmentation filename or integer array
- random_seedint
Random number seed for
numpy.random.seed
- fill_valuescalar
Value to insert where
seg == 0
- Returns
- rand_idsarray
1D array of the randomized labels with size
max(seg)+1
- rand_segarray
2D rray with randomized labels