Path: news.mathworks.com!not-for-mail
From: "Sven" <sven.holcombe@gmail.deleteme.com>
Newsgroups: comp.soft-sys.matlab
Subject: Flip horizontal axis on image
Date: Mon, 30 Mar 2009 20:49:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 23
Message-ID: <gqrb7u$jfs$1@fred.mathworks.com>
Reply-To: "Sven" <sven.holcombe@gmail.deleteme.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 1238446142 19964 172.30.248.37 (30 Mar 2009 20:49:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 30 Mar 2009 20:49:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1326470
Xref: news.mathworks.com comp.soft-sys.matlab:528815


Hi there,

I have an image with known pixel locations on which I want to overlay some points. Something like:

figure
imagesc(xScale, yScale, myImage)
hold on
plot(myPts(:,1), myPts(:,2),'ro')

Now, imagine that I wanted to flip the image (and associated points) vertically. I could simply do this by toggling between 'axis xy' and 'axis ij'. I like this.

What I want to do next, however, is to flip things horizontally. I don't think there's a built in axis command to do this. Also, I cannot do the following due to an imagesc error (x and y axes must be increasing):

myImage = flipdim(myImage,2);
yScale = flipdim(yScale,2);
figure
imagesc(xScale, yScale, myImage)

Is there a fix to this? I essentially have an X-Ray image with bone locations stored, and I want to flip it horizontally so that I'm looking from the 'other side' of the xray. 

Let me know if you've got any clues.
Cheers,
Sven.