Thread Subject: how to take input image from user

Subject: how to take input image from user

From: Amol Deshpande

Date: 9 Apr, 2008 06:44:02

Message: 1 of 5

how to take input image from user through kerboard for
image processing? as we take value for any variabe say 'x'
from user through command scanf,similarly how to take
image in Matlab.

Subject: how to take input image from user

From: Sven

Date: 9 Apr, 2008 07:33:02

Message: 2 of 5

"Amol Deshpande" <sdamol@rediffmail.com> wrote in message
<fthoji$t6n$1@fred.mathworks.com>...
> how to take input image from user through kerboard for
> image processing? as we take value for any variabe say 'x'
> from user through command scanf,similarly how to take
> image in Matlab.

What exactly do you mean by an image through a keyboard?

If you mean you ask the user to give matlab an image file
(.gif, .jpg, .bmp etc), then you can use the uigetfile
function to get a file name, and then use imread to load it
into matlab (although this isn't exactly getting the image
"from keyboard").

If you mean you want the user to somehow "type" the image
with the keyboard... then, other than asking them to type a
series of 1s or 0s, I'm a little lost.

Thanks,
Sven.

Subject: how to take input image from user

From: Amol Deshpande

Date: 9 Apr, 2008 08:58:02

Message: 3 of 5

image through keyboard means, for example if we type 'c'
from keyboard then matlab should take 'cameraman.tif',if
we type 'f' then matlab should take 'football.jpg' etc;
and after taking the image the program should use the
image which we have provided to the program(like here we
have provided 'cameraman.tif').so what is the command or
function which will ask us 'which image you want to
process?' and then we can provide any image of our choice.

Subject: how to take input image from user

From: Yumnam Kirani Singh

Date: 9 Apr, 2008 08:52:30

Message: 4 of 5

Won't an input box help?

Subject: how to take input image from user

From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)

Date: 9 Apr, 2008 16:15:04

Message: 5 of 5

In article <fti0eq$brs$1@fred.mathworks.com>,
Amol Deshpande <sdamol@rediffmail.com> wrote:
>image through keyboard means, for example if we type 'c'
>from keyboard then matlab should take 'cameraman.tif',if
>we type 'f' then matlab should take 'football.jpg' etc;
>and after taking the image the program should use the
>image which we have provided to the program(like here we
>have provided 'cameraman.tif').so what is the command or
>function which will ask us 'which image you want to
>process?' and then we can provide any image of our choice.

If your program knows the names of the possible images in advance,
then consider using the menu() function, or the input() function
with the 'string' option.
--
   "Beware of bugs in the above code; I have only proved it correct,
   not tried it." -- Donald Knuth

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

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.

rssFeed for this Thread

Contact us at files@mathworks.com