MATLAB: How to blend image and label image

blendimage

I have an colored RGB image and a 'label image' tells the object class. How do I combine these 2 to make the output look like the image below (without the white squiggly lines).

Best Answer

If you already have label matrix for your RGB image, the last part of the following example will help.