Borrar filtros
Borrar filtros

Displaying a value on a image using Imagesc

7 visualizaciones (últimos 30 días)
Gova ReDDy
Gova ReDDy el 11 de Mzo. de 2014
Comentada: Image Analyst el 13 de Mzo. de 2014
Hello,
Can someone explain how to print a value on the image(required image).I tried this but the image was flipped and displayed
plot(5,6,'*r');test=imread('Capture.JPG');hold on;imagesc([.001 .001], [.001 0.001], test)
I also don't understand this scaling [.001 .001], [.001 0.001]
can someone explain of how to use the imagesc to print a value on the(or inside the) image .

Respuesta aceptada

Image Analyst
Image Analyst el 13 de Mzo. de 2014
Just use the text() function
caption = sprintf('At (row %d, column %d), the value = %.3f', row, column, yourValue);
text(column, row, caption, 'FontSize', 30, 'Color', [.7, .4, .1]);
  2 comentarios
Gova ReDDy
Gova ReDDy el 13 de Mzo. de 2014
thanks it works but, can I know how to reduce the image size as the image attached is covering most of the iamge.I want to reduce the size of my image so that it sits in a small of the figure I plot
i=imread('Capture.JPG');
figure;imagesc(10,10,i);
axis([0 400 0 400]);
caption = sprintf('HBR value = %.3f',60);
text(150,150, caption, 'FontSize', 10, 'Color', [.7, .4, .1]);
can I know how to reduce the image size.
Image Analyst
Image Analyst el 13 de Mzo. de 2014
You can use imresize().

Iniciar sesión para comentar.

Más respuestas (1)

Walter Roberson
Walter Roberson el 11 de Mzo. de 2014
compare "axis xy" to "axis ij"
  1 comentario
Gova ReDDy
Gova ReDDy el 13 de Mzo. de 2014
Can I get an example to use this imagesc. As I want to print a value of some value here HBR in the middle of the image
box_title = 'HeartRate';
box = uicontrol('Style', 'text','Units', 'norm', 'Position', [0.8 0.8 0.1 0.05]);
set(box,'string', sprintf('%s %f', box_title,HBR));
can I get some example to print a value inside(or middel of the) image.
thanks.

Iniciar sesión para comentar.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by