MATLAB: How to insert text below the images in matlab.

Computer Vision Toolboxmatlab image with text

I want text to be displayed below the image (in figure window) as shown with colors. How can this be done. Anyone can help me out in this.??

Best Answer

Try this
im = imread('peppers.png');
imshow(im);
annotation('textbox', [0.13 0.08 0.8 0.1], ...
'String', 'What: This is an image containing oranges', ...
'Color', [1 0.5 0], ...
'FontWeight', 'bold', ...
'EdgeColor', 'none')
annotation('textbox', [0.13 0.03 0.8 0.1], ...
'String', 'Benefit: Good for health', ...
'Color', [0 0.5 0], ...
'FontWeight', 'bold', ...
'EdgeColor', 'none')