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

Thread Subject:
How to apply text to images?

Subject: How to apply text to images?

From: E. Paul Wileyto

Date: 20 Mar, 2008 13:00:39

Message: 1 of 3


If I want to label an image in Photoshop, or any other photo-editing
program, I just select the text tool and write on it. How do you do
this in Matlab? If I open a figure, I can write in a text-box, but when
I go to save the edited image, the saved image includes all of the
buffer around the outside that would normally be filled with axis labels
and such. There must be a simple way to do this without having to take
a trip to other software outside of Matlab.

Paul



--
E. Paul Wileyto, Ph.D.
Assistant Professor of Biostatistics
Tobacco Use Research Center
School of Medicine, U. of Pennsylvania
3535 Market Street, Suite 4100
Philadelphia, PA 19104-3309

215-746-7147
Fax: 215-746-7140
epw@mail.med.upenn.edu
http://mail.med.upenn.edu/~epw/

Subject: How to apply text to images?

From: Vihang Patil

Date: 21 Mar, 2008 07:07:01

Message: 2 of 3

"E. Paul Wileyto" <epw@mail.med.upenn.edu> wrote in
message <frtn5p$f734$1@netnews.upenn.edu>...
>
> If I want to label an image in Photoshop, or any other
photo-editing
> program, I just select the text tool and write on it.
How do you do
> this in Matlab? If I open a figure, I can write in a
text-box, but when
> I go to save the edited image, the saved image includes
all of the
> buffer around the outside that would normally be filled
with axis labels
> and such. There must be a simple way to do this without
having to take
> a trip to other software outside of Matlab.
>
> Paul
>
>
>
> --
> E. Paul Wileyto, Ph.D.
> Assistant Professor of Biostatistics
> Tobacco Use Research Center
> School of Medicine, U. of Pennsylvania
> 3535 Market Street, Suite 4100
> Philadelphia, PA 19104-3309
>
> 215-746-7147
> Fax: 215-746-7140
> epw@mail.med.upenn.edu
> http://mail.med.upenn.edu/~epw/


Hello
One way of achieving this is to set the border to tight
before displaying the image in the figure window, so that
only the image is saved and not its borders.

doc iptsetpref
iptsetpref('ImshowBorder','tight');
figure,imshow('yourimage');
%Use texttool after this and then save the image

HTH
VIhang

Subject: How to apply text to images?

From: ImageAnalyst

Date: 21 Mar, 2008 17:56:34

Message: 3 of 3

On Mar 20, 9:00=A0am, "E. Paul Wileyto" <e...@mail.med.upenn.edu> wrote:
> If I want to label an image in Photoshop, or any other photo-editing
> program, I just select the text tool and write on it. =A0How do you do
> this in Matlab? =A0If I open a figure, I can write in a text-box, but when=

> I go to save the edited image, the saved image includes all of the
> buffer around the outside that would normally be filled with axis labels
> and such. =A0There must be a simple way to do this without having to take
> a trip to other software outside of Matlab.
>
> Paul
>
> --
> E. Paul Wileyto, Ph.D.
> Assistant Professor of Biostatistics
> Tobacco Use Research Center
> School of Medicine, U. of Pennsylvania
> 3535 Market Street, Suite 4100
> Philadelphia, PA =A019104-3309
>
> 215-746-7147
> Fax: 215-746-7140
> e...@mail.med.upenn.eduhttp://mail.med.upenn.edu/~epw/

-----------------------------------
Good question that I don't know the answer to. Since I mostly program
in MATLAB, I don't spend much time in its extraordinarily limited user
interface. There might be such a text annotation tool in imtool (one
of the few UI's built in to MATLAB). Sadly, MATLAB does not have a
nice interactive user interface like Photoshop and other image
analysis packages, so I end up doing a lot of stuff in Photoshop. I
don't see any improvement in that area coming. It seems like MATLAB
is so very entrenched in the command line interface. :-(
Feeling your pain,
ImageAnalyst

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