Path: news.mathworks.com!not-for-mail
From: "Steven Lord" <slord@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Origin in the center of an image, +y at the top!
Date: Tue, 2 Oct 2007 22:41:12 -0400
Organization: The MathWorks, Inc.
Lines: 22
Message-ID: <fduvg8$mmt$1@fred.mathworks.com>
References: <fducih$nku$1@fred.mathworks.com>
Reply-To: "Steven Lord" <slord@mathworks.com>
NNTP-Posting-Host: lords.dhcp.mathworks.com
X-Trace: fred.mathworks.com 1191379272 23261 144.212.105.187 (3 Oct 2007 02:41:12 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 3 Oct 2007 02:41:12 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138
Xref: news.mathworks.com comp.soft-sys.matlab:431101




"David Doria" <daviddoria@gmail.com> wrote in message 
news: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?

Set the YDir property of your axes.

http://www.mathworks.com/support/solutions/data/1-16MFFQ.html?solution=1-16MFFQ

-- 
Steve Lord
slord@mathworks.com