Path: news.mathworks.com!not-for-mail
From: "Bryan " <cssmwbs@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Printing an image to scale
Date: Thu, 3 Apr 2008 06:03:06 +0000 (UTC)
Organization: Nativis Inc
Lines: 30
Message-ID: <ft1ruq$mct$1@fred.mathworks.com>
References: <ft1nph$5rv$1@fred.mathworks.com>
Reply-To: "Bryan " <cssmwbs@gmail.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 1207202586 22941 172.30.248.37 (3 Apr 2008 06:03:06 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 3 Apr 2008 06:03:06 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 291118
Xref: news.mathworks.com comp.soft-sys.matlab:460741



"Joshua Fialkoff" <fialkj@rpi.edu> wrote in message
<ft1nph$5rv$1@fred.mathworks.com>...
> Hi all,
> Say we import an image into MATLAB.  I can print/export that
> image at the same resolution and using the same file type
> and have the same image (i.e., it will match the dimensions
> of the original).  Similarly, I can perform some operations
> directly on the matrix that represents the image and, again,
> export and get a similarly sized image.  The problem is
> this.  I would like to show the image using imshow and then
> overlay some shapes (e.g., bounding boxes, etc...) and then
> export the image such that it is similarly sized as the
> original.  I can't seem to figure out how to accomplish
> this.  If it helps I'm only working with B&W images, but a
> more generic solution is preferable.  Thanks in advance for
> you help.
> 
> - Josh

you want some version of:

imgMod = get(findobj('type','image),'Cdata');

with more than one figure open, you can use 'gcf' or 'get'
with the figure number, whatever.

there's some other way to do it, i think, but that comes to
mind.

bryan