Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

New to MATLAB?

Thread Subject:
numbers overlaid on image

Subject: numbers overlaid on image

From: Jessica

Date: 21 Apr, 2010 14:46:04

Message: 1 of 3


I am using imread() and image() to display a .jpg image. Is it possible to overlay a counter atop the image? In particular, I am running a loop so that I can record particular coordinates on my image:

for i=1:10

I would like to make it so the value for "MF" (which increases each time the loop is run) is overlaid on the image for each iteration of the loop. This way, I can see the MF number on the image as I am selecting coordinates.

Thanks in advance!

Subject: numbers overlaid on image

From: Beskie

Date: 22 Apr, 2010 19:03:39

Message: 2 of 3

You can use

annotation('textbox',[x y w h],'string',MF,'FontSize',14)

where x and y are starting position of the lower left corner and w and
h are the height and width.

Subject: numbers overlaid on image

From: ImageAnalyst

Date: 22 Apr, 2010 22:51:21

Message: 3 of 3

You can also use the text() function.

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us