CsatiZoltan / CristalX

Identification and analysis of polycrystalline microstructures
https://cristalx.readthedocs.io
GNU Lesser General Public License v3.0
6 stars 7 forks source link

Distinguishable colors for nearby labels in a label image #9

Open CsatiZoltan opened 4 years ago

CsatiZoltan commented 4 years ago

Currently, random colors are generated when saving a label image. https://github.com/CsatiZoltan/Polycrystalline-microstructures/blob/20e3eb63df753251911fbe1c2b8ae410cb0c8c7d/grains/segmentation.py#L265 An ongoing issue deals with it: https://github.com/scikit-image/scikit-image/issues/4507 Ideally, colors should be chosen so that nearby labelled regions are easily distinguishable. See the above issue for details. This functionality is already implemented in ImageJ: https://imagej.net/Glasbey