The tissue image is (128,128,3) [RGB] and the mask is (128,128). Now, if I visualize with grayscale colormap:
My ultimate aim is to get bounding boxes for each nuclei in the mask.
What I have understood till this point: Do segmentation on tissue image, obtain the mask, find the bounding boxes on mask. Then I questioned why to get bounding boxes from mask, why not the original image? Then after some searching it led to conclusion that masks are more refined images only emphasizing required portions and setting remaining to 0.
Now, from my understanding a mask would be a binary image with certain pixels as 255 and rest as 0, so that when it is bitwise AND-ed with the original image we get only the required portions (wherever pixel values were 255).
So, in the given mask, how come there are different intensity values for nuclei? Is it due to the fact that some nuclei are strongly represented and some are weakly represented?
- If so, then if I threshold the mask to 255 for every pixel value greater than 0, it should ideally become the mask which I described in my understanding, right?
- If not so, then what is the meaning of this multi-intensity valued mask? It can't be applied like a binary mask for AND operations (since it has values like 38,60,110 apart from 255).
- Even though it's a one channel image, the default colormap sets nuclei to different colors in the mask. Does it indicate that the mask is a m-ary mask with same color nuclei belonging to a certain class/label and if AND-ed with original image, then would yield only those nuclei of that class?