Azzera filtri
Azzera filtri

How to add text to an image

4 visualizzazioni (ultimi 30 giorni)
John Snow
John Snow il 16 Dic 2013
Commentato: Image Analyst il 17 Dic 2013
Hello, If I have an image with the size 512*512 (or any other size) how do I add a string to any location I choose for example location (100,250) all the codes I found are too long but is there a one line code that does this?

Risposta accettata

Image Analyst
Image Analyst il 16 Dic 2013
You can do it with a function in the Computer Vision System Toolbox. If you don't have that, you'll have to use this from Brett Shoelson: http://www.mathworks.com/matlabcentral/fileexchange/38721-embed-text-and-graphics-in-an-image
  13 Commenti
John Snow
John Snow il 17 Dic 2013
Hello I found a solution that worked I converted to binary then from binary to dec again by adding this
LAX = dec2bin(LAX);
LAX = bin2dec(LAX);
LAY = dec2bin(LAY);
LAY = bin2dec(LAY);
It worked for some reason so the problem is solved for me but if there is a better solution I will keep my eyes on this topic thank you very much for all your help
Image Analyst
Image Analyst il 17 Dic 2013
That's nonsense. You don't set the units property of a scalar variable to anything. LAX and LAY don't even have properties like 'units'! You set the units property of an axes or figure to something.

Accedi per commentare.

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by