Path: news.mathworks.com!not-for-mail
From: "David Doria" <daviddoria@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Origin in the center of an image, +y at the top!
Date: Wed, 3 Oct 2007 16:39:13 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 47
Message-ID: <fe0gjh$dk9$1@fred.mathworks.com>
References: <fducih$nku$1@fred.mathworks.com> <fe0akp$3nn$1@fred.mathworks.com>
Reply-To: "David Doria" <daviddoria@gmail.com>
NNTP-Posting-Host: webapp-06-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1191429553 13961 172.30.248.36 (3 Oct 2007 16:39:13 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 3 Oct 2007 16:39:13 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1105197
Xref: news.mathworks.com comp.soft-sys.matlab:431219



I see, thanks!  However, With:

imshow(InputImage, 'XData', [-size(InputImage,2)/2
size(InputImage,2)/2], 'YData', [size(InputImage,1)/2
-size(InputImage,1)/2])
axis xy
axis on

I still cannot click on points, it still snaps the cursor to
the top or bottom edge!! Any thoughts?

Thanks

David

"Dietrich Lueerssen" <dietrich.lueerssen@nospam.ogt.co.uk>
wrote in message <fe0akp$3nn$1@fred.mathworks.com>...
> Dear David,
> 
> I think the simplest solution to your issue is the use of
> the command "axis xy".
> 
> You use the command imshow to display the image, and this
> sets the coordinate system in the conventional way for image
> applications ("axis ij"). The origin is then in the upper
> left corner. 
> 
> If you add "axis on" to your code, you can see that the
> coordinate system is the way you would like it to be (I
assume).
> 
> Best regards,
> Dietrich
> 
> "David Doria" <daviddoria@gmail.com> wrote in message
> <fducih$nku$1@fred.mathworks.com>...
> > I figured out how to move the origin, using this command:
> > 
> > imshow(InputImage, 'XData', [-size(InputImage,2)/2
> > size(InputImage,2)/2], 'YData', [size(InputImage,1)/2
> > -size(InputImage,1)/2])
> > 
> > however, that FLIPS my image!!  Is there a convenient way to
> > have (0,0) at the center of my image and have +y going up
> > and +x going to the right?
>