Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: combine image parts
Date: Sun, 26 Jul 2009 18:10:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 44
Message-ID: <h4i65q$hpv$1@fred.mathworks.com>
References: <h4bv2g$ac0$1@fred.mathworks.com> <701f52c0-8ab6-4b0a-ac88-7dec944aa8ce@n11g2000yqb.googlegroups.com> <h4fgav$k3q$1@fred.mathworks.com> <h4fi8p$msr$1@fred.mathworks.com> <h4fjv5$d7q$1@fred.mathworks.com> <h4hmf9$6v3$1@fred.mathworks.com> <h4hr5a$7vl$1@fred.mathworks.com> <h4i1up$13i$1@fred.mathworks.com> <h4i2a1$r36$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1248631802 18239 172.30.248.37 (26 Jul 2009 18:10:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 26 Jul 2009 18:10:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1916313
Xref: news.mathworks.com comp.soft-sys.matlab:558432


"us " <us@neurol.unizh.ch> wrote in message <h4i2a1$r36$1@fred.mathworks.com>...
> "Brian J."
> > Dear "us", thanks a lot, but when I use  img=phantom(256); then I could not see the result :((
> 
> you must learn to be a bit more ML-self-contained, as well...
> eg, what do you get with these
> 
>      size(img)
>      r=[min(img(:)),max(img(:))]
> % compare the results with those obtained from the IMG created in the solution...
> 
> us

I am very thankful to you. It was impossible to solve this problem without you, thanks a lot. 

The last thing about this is binarization. I have tried to solve it by myself but the error is very different so again I need you. When I write the following code:

     binaryImage=im2bw(simg, graythresh(simg)); figure(2); imshow(binaryImage);

then I am getting the following error:

??? Error
using ==>
imageDisplayValidateParams>validateCData
at 114 Unsupported dimension

Error in ==>
imageDisplayValidateParams
at 31
common_args.CData=validateCData(common_args.CData,image_type);

Error in ==>
imageDisplayParseInputs
at 79
common_args =imageDisplayValidateParams(common_args);

Error in ==>
imshow at 199
  [common_args,specific_args]
  = ...

Error in ==>
 binaryImage=im2bw(simg, graythresh(simg));
 figure(2); imshow(binaryImage);