www.gusucode.com > vision 源码程序 matlab案例代码 > vision/DisplayTwoStringsAtDifferentLocationsExample.m
%% Display Two Strings at Different Locations %% Set up the text inserter object. % Copyright 2015 The MathWorks, Inc. textInserter = vision.TextInserter('%s', 'LocationSource', 'Input port', 'Color', [255, 255, 255], 'FontSize', 24); %% Read the image. I = imread('peppers.png'); %% Create null separated strings. strings = uint8(['left' 0 'right']); %% Insert the text. J = step(textInserter, I, strings, int32([10 1; 450 1])); %% Display the image with numeric values. imshow(J);