www.gusucode.com > vision 源码程序 matlab案例代码 > vision/AnnotateImageWithIntegerNumbersExample.m

    %% Annotate Image with Integer Numbers
% Read image.

% Copyright 2015 The MathWorks, Inc.

I = imread('coins.png');
%%
% Set positions for the circles. The first two values represents the center at (x,y) and the third value is the radius.
position = [96 146 31;236 173 26];
%%
% Set the label to display the integers 5 and 10 (U.S. cents).
label = [5 10];
%%
% Insert the annotations.
RGB = insertObjectAnnotation(I,'circle',position,label,'LineWidth',3,'Color',{'cyan','yellow'},'TextColor','black');
%%
% Display.
figure
imshow(RGB)
title('Annotated coins');