Path: news.mathworks.com!not-for-mail
From: "John D'Errico" <woodchips@rochester.rr.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: delaunay
Date: Fri, 24 Apr 2009 13:14:01 +0000 (UTC)
Organization: John D'Errico (1-3LEW5R)
Lines: 67
Message-ID: <gssdup$1io$1@fred.mathworks.com>
References: <ae08d7b0-bcc0-4d20-bc6d-0e1d48c936db@c12g2000yqc.googlegroups.com> <495b7f4c-89e1-4b33-a1dc-312f72290749@a7g2000yqk.googlegroups.com>
Reply-To: "John D'Errico" <woodchips@rochester.rr.com>
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 1240578841 1624 172.30.248.37 (24 Apr 2009 13:14:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 24 Apr 2009 13:14:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 869215
Xref: news.mathworks.com comp.soft-sys.matlab:535191


hajoura <fradi.hajer@gmail.com> wrote in message <495b7f4c-89e1-4b33-a1dc-312f72290749@a7g2000yqk.googlegroups.com>...
> ok,
> i'm trying to use triangulation of delaunay to achieve super
> resolution.
> i read article "High Resolution Image Formation From Low Resolution
> Frames Using Delaunay Triangulation".after that, i find  the
> implementation of this method in
> http://www.tsi.enst.fr/tsi/enseignement/ressources/mti/delaunay/delaunay_imprimable.pdf,
> in this paper, they start with high resolution image , than they
> undersampled this image, they obtain 5 low resoltion images.
> lt = lr1 + lr2 + lr3 + lr4 + lr5; It contain the  information from the
> 5 images
> after that, they use  the function delaunay;
> i didn't understand also why they use meshgrid
> For me, i want to use only 2 undersampled image
> my code:
> img=imread('----------');
> i1=1;
> j1=1;
> i2=3;
> j2=3;
> M=M/4
> N=N/4
> %undersampling the image
> im1(i1:1:M,j1:1:N)=img(i1:4:4*M,j1:4:4*N);
> im2(i1:1:M,j1:1:N)=img(i2:4:4*M,j2:4:4*N);
> 
> image=im1+im2;
> image=image(:)';
> i1=1;
> j1=1;
> [X_1,Y_1]=meshgrid(i1:4:4*M, j1:4:4*N);
> X1=X_1(:)';
> Y1=Y_1(:)';
> TRID=delaunay3(X1, Y1, image, {'QJ'});
> 
> So, two questions 1)why we use meshgrid in this case?
>                            2)why the function delaunay3 work ?

I had to go to the reference to understand your
goal here. Of course, since it is in French, and
my command of that language is limited to what
I learned in 7th grade, I'm surprised that I got
anything out of it. 8-)

You do NOT want to use delaunay3. Delaunay3 is
for a three dimensional object. Your problem lies
in two dimensions, i.e., the (x,y) plane of
coordinates in an image. If you look at the
reference that you provided, see that they use
delaunay, NOT delaunay3 ! Re-read the paper
more carefully.

Delaunay will build a triangulation of the (x,y)
domain of the composite images, then you can
interpolate within that triangulation. There is a
bit more to the paper, but my French is too poor
to really know if I like what they are trying to do
in the paper.

Your other question is why do you use meshgrid?
Look at what meshgrid generates. It gives the
set of pixel coordiantes for a rectangular image
array. This is what delaunay will use to build the
triangulation.

John