MATLAB: How to specify the output of insertShape or insertText as 2D grayscale images

MATLAB

The returned output of 'insertShape' is in RGB format, is there a way I can specify the output to be a grayscale image?

Best Answer

The output of 'insertShape' is only specified to be in truecolor format.  The workaround is to call 'rgb2gray' on the output to convert it to grayscale.
Related Question