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:38:01 +0000 (UTC)
Organization: Universit&#228;tsSpital Z&#252;rich
Lines: 28
Message-ID: <h4i7q9$5hf$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> <h4i65q$hpv$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1248633481 5679 172.30.248.35 (26 Jul 2009 18:38:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 26 Jul 2009 18:38:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 11
Xref: news.mathworks.com comp.soft-sys.matlab:558439


"Brian J."
> 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

well, yes - and - of course...
- you add stuff, which you did not mention in your OPs...
- this starts to make things a bit tedious...

now, look at the code snippet, again, and look at what i said

% pre-allocation section
     simg=zeros(m+1,m+1,1,ni*ni);     % <- a 4-D matrix for MONTAGE(!)...
% in the loop section
     simg(:,:,1,k)=[img(xv,yv),del.';del,-100];     % <- note the SINGLETON(!)...
% this is necesssary to get MONTAGE to work
     help montage;

if you want to add some sort of ...binarization..., you should do it in the loop using your original subimage IMG(XV,YV) data...

us