Borrar filtros
Borrar filtros

Can I add values to an image

5 visualizaciones (últimos 30 días)
Mohammed
Mohammed el 9 de Mayo de 2014
Editada: Image Analyst el 9 de Mayo de 2014
Hello What I mean is that I create a function, I have an image and I want when I run the program, some of values are added or written on the image. Can anyone tell me if that is possible or not?
  2 comentarios
Mohammed
Mohammed el 9 de Mayo de 2014
Thanks for everyone tried to help me. I want to clarify it more I want to add this image
and I want when I run the program some results(results 1, 2 and 3 shown in the image like the second image
Image Analyst
Image Analyst el 9 de Mayo de 2014
Editada: Image Analyst el 9 de Mayo de 2014
How about you clarify it even more (so that I will know how to help you) by answering my questions? And are you now talking about text instead of a line?

Iniciar sesión para comentar.

Respuestas (2)

David Sanchez
David Sanchez el 9 de Mayo de 2014
Do you mean something like this:
load clown
figure
imagesc(X)
colormap(gray)
axis image
x = 23;
my_string =sprintf('TEXT and x = %g',x);
text(50,50, my_string,'FontSize',18,'Color',[1 1 0]) % adapt the coordinates (50,50) to your needs

Image Analyst
Image Analyst el 9 de Mayo de 2014
If you want it in the overlay above the image but not really inthe image pixels themselves, then use line() or plot().
But if you want the line "burned into" the image, see my attached demo where it uses imline to "burn" a line into the image.

Categorías

Más información sobre Images en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by