Forums

Unsupported Image

Started by Dr John November 14, 2001
Hey Group,

Has anyone got any experience of importing a image file into Matlab
that was unsupported? If so could you please help..

Cheers





I don't know what you're trying to do, but if it is a standard image format, why
don't you use an imaging program like Imaging (which comes as an accessory with
Windows95, WindowsNT, and Windows2000) or Microsoft Photo Editor, or numerous
others? Load the image, then save it as a JPEG or something Matlab supports.

If you don't have any of those programs, you can still try searching for imaging
programs at a software site, such as www.download.com or www.shareware.com.

If you really must put it directly into Matlab, then you'll need a specification
of the image format. Matlab has all the routines you would need to read the
binary file, parse it into an image, and store it. Glen Ragan



--- Dr John <> wrote:
> Hey Group,
>
> Has anyone got any experience of importing a image
> file into Matlab
> that was unsupported? If so could you please help..
>
> Cheers >
Hi,
My first advise is to search for contributed program
at MTW site and at mathtools site, because it isn't an
easy task.
To start doing it yourself, collect any information
available about the image: size(in pixels), depth (in
bits),format (bw,rgb or else).
Any image format starts with header that contains
important data but usually you can't figure out what
its mean.
Your first task is to find out the length of this
header in order to get rid of it. This header length
is usually some power of 2 (128,256, 512, ...)
although it can be something else.
From here on you can try to read the rest as an ascii
and view the result using Matlab functions. The rest
is trail and error.

Joe
BSTEX-Equation viewer for Matlab
http://www.geocities.com/bstex2001