Skip to Main Content Skip to Search
Login
File Exchange
MATLAB Newsgroup
Link Exchange
  Blogs  
 Contest 
MathWorks.com

Thread Subject: problem with 'imread'

Subject: problem with 'imread'

From: c. stein

Date: 01 Sep, 2003 15:05:42

Message: 1 of 4

Dear all,


I saved a 128*128 uint8 (logical) image array to a file. But I could
not read in the file:


%% the code block
imwrite(temp, 'imarray.tif');
[X,map] = imread('imarray.tif');
imfinfo(X)
% code end


The error message is


Error using ==> fopen
Function 'fopen' not defined for variables of class 'uint8'.


Would you pls help me solve this problem?


Thanks!

Subject: Re: problem with 'imread'

From: Rob Henson

Date: 01 Sep, 2003 16:10:29

Message: 2 of 4


"c. stein" <c.onestone@mailcity.com> wrote in message
news:eec3120.-1@WebX.raydaftYaTP...
> Dear all,
>
>
> I saved a 128*128 uint8 (logical) image array to a file. But I could
> not read in the file:
>
>
> %% the code block
> imwrite(temp, 'imarray.tif');
> [X,map] = imread('imarray.tif');
> imfinfo(X)
> % code end

What is "temp"? I guess that it is a numeric array. Try this...

temp = tempname
 imwrite(temp, 'imarray.tif');
 [X,map] = imread('imarray.tif');
 imfinfo(X)

HTH,

Rob Henson
The MathWorks, Inc.

>
>
> The error message is
>
>
> Error using ==> fopen
> Function 'fopen' not defined for variables of class 'uint8'.
>
>
> Would you pls help me solve this problem?
>
>
> Thanks!


Subject: Re: problem with 'imread'

From: Stijn Helsen

Date: 02 Sep, 2003 01:43:42

Message: 3 of 4

I don't think the problem is with reading the file, but with the next
line (imfinfo). That function expects a filename, while the the
output of imread (the map itself) is given.


Stijn
(I'm curious what Rob wanted to get with the "temp=tempname"??)

Subject: Re: problem with 'imread'

From: Rob Henson

Date: 02 Sep, 2003 14:55:35

Message: 4 of 4


"Stijn Helsen" <SHelsen@compuserve.com> wrote in message
news:eec3120.1@WebX.raydaftYaTP...
> I don't think the problem is with reading the file, but with the next
> line (imfinfo). That function expects a filename, while the the
> output of imread (the map itself) is given.
>
>
> Stijn
> (I'm curious what Rob wanted to get with the "temp=tempname"??)

I was answering the wrong question.


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

envelope graphic E-mail this page to a colleague

Public Submission Policy
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.
Related Topics