# How to give each segment a new colour in image segmentation? [closed]

I'm currently working on a tumour detection project using Dicom images. As I'm a beginner, I don't know how to segment each part in the image and give each segment a new different colour. I'm using the Watershed segmentation algorithm in Matlab, which only segments the part of interest (the ones that have tumour).

So instead of predicting a $$C$$ dimensional vector $$\vec{x}$$ where $$C$$ corresponds to the number of class labels, you predict a tensor $$x\in\mathbb{R}^{h\times w \times C}$$ of the same height and width dimensions as your input image, and with $$C$$ channels which correspond to the different classes.