Clear Filters
Clear Filters

How to change transparency and color of overlay using imshow?

22 views (last 30 days)
I have a matrix with MRI data that I can plot using imshow in a gray-scale image. Using segmentation I created a mask of part of the brain and I want to overlay this mask (containing only 0 and 1) over my original image. I would like to be able to change the transparancy and color of this mask overlay. Can someone help me with this?

Answers (1)

Kritika Bansal
Kritika Bansal on 29 Jul 2019
Although your desired task may not possible using only imshow. You can use the function labeloverlay along with imshow to change the transparency and color map of the mask. Please refer to the documentation link below to know more about this function:

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!