Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: combine image parts
Date: Sat, 25 Jul 2009 18:18:01 +0000 (UTC)
Organization: Universit&#228;tsSpital Z&#252;rich
Lines: 35
Message-ID: <h4fi8p$msr$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>
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 1248545881 23451 172.30.248.37 (25 Jul 2009 18:18:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 25 Jul 2009 18:18:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 11
Xref: news.mathworks.com comp.soft-sys.matlab:558306


"Brian J." <brian0945@gmail.com> wrote in message <h4fgav$k3q$1@fred.mathworks.com>...
> ImageAnalyst <imageanalyst@mailinator.com> wrote in message <701f52c0-8ab6-4b0a-ac88-7dec944aa8ce@n11g2000yqb.googlegroups.com>...
> > On Jul 24, 5:32?am, "us2 " <u...@yahoo.com> wrote:
> > > I have NxM sized image and divide it into let's say 4 different parts. I want to see these parts in a figure with a blank between them.
> > >
> > > I mean that the new image figure must include all the parts but it must be seen as divided. When I convert the new image into binary, I want to see 4 different partitions separately
> > >
> > > how to do this?
> > 
> > ------------------------------------------------------------
> > One way:
> > 1. crop your image into 4 separate images.
> > 2. indicate the axes with subplot(2,2,1).  last arg would be 1, 2, 3,
> > or 4.
> > 3. display image with image, imshow, or imagesc.
> > 4. repeat steps 2 and 3 until all four parts have been displayed.
> 
> My problem is similar to this question. I have divided my original image into 4 parts and now, I have to combine them so that when we convert the combined image to binary image then we must see the 4 white region and black background in the binary image. 
> how to do this?

one of the solutions

     img=1+ceil(100*rand(8));     % <- the image
     i1=img(1:4,1:4);     % <- the subimages...
     i2=img(1:4,5:8);
     i3=img(5:8,1:4);
     i4=img(5:8,5:8);
     del=zeros(4,1);     % <- delimiter between subimages...
     ic=[i1,del,i2;del.',0,del.';i3,del,i4];     % <- img with delimiters...
     imagesc(ic);
     axis image;
     colormap([[0,0,0];jet(100)]);
     colorbar;

us