Skip to Main Content Skip to Search
Login
File Exchange
MATLAB Newsgroup
Link Exchange
  Blogs  
 Contest 
MathWorks.com

Thread Subject: Image pixel placement

Subject: Image pixel placement

From: Sven

Date: 07 Feb, 2008 02:30:05

Message: 1 of 3

Hi there,

Quoting the image help page:
IMAGE(X,Y,C), where X and Y are vectors, specifies the
locations of the pixel centers of C(1,1) and C(M,N). Element
C(1,1) is centered over (X(1), Y(1)), element C(M,N) is
centered over (X(end), Y(end)), and the pixel centers of the
remaining elements of C are spread out evenly between those
two points, so that the rectilinear patches are all of equal
width and height.

Is it possible to *not* have rectilinear patches? Ie, I
want the placement of the pixel centers of C(i,j) to be
given by Y(i), X(j), rather than being spaced *linearly*
between the axis limits. This is basically to display an
image with a variable resolution over its Y-axis.

Is this at all possible? Is there a simple method?

Cheers,
Sven.

Subject: Re: Image pixel placement

From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)

Date: 07 Feb, 2008 04:08:23

Message: 2 of 3

In article <fodqfd$bok$1@fred.mathworks.com>,
Sven <sven.holcombe@removethis.gmail.com> wrote:

>IMAGE(X,Y,C), where X and Y are vectors, specifies the
>locations of the pixel centers of C(1,1) and C(M,N).
[as rectilinear patches]

>Is it possible to *not* have rectilinear patches? Ie, I
>want the placement of the pixel centers of C(i,j) to be
>given by Y(i), X(j), rather than being spaced *linearly*
>between the axis limits. This is basically to display an
>image with a variable resolution over its Y-axis.

>Is this at all possible? Is there a simple method?

Not with image(). What you can do is use patch() for each
pixel, drawing the box yourself.
--
   "I was very young in those days, but I was also rather dim."
   -- Christopher Priest

Subject: Re: Image pixel placement

From: Sven

Date: 28 Mar, 2008 03:22:02

Message: 3 of 3

> >IMAGE(X,Y,C), where X and Y are vectors, specifies the
> >locations of the pixel centers of C(1,1) and C(M,N).
> [as rectilinear patches]
>
> >Is it possible to *not* have rectilinear patches? Ie, I
> >want the placement of the pixel centers of C(i,j) to be
> >given by Y(i), X(j), rather than being spaced *linearly*
> >between the axis limits. This is basically to display an
> >image with a variable resolution over its Y-axis.
>
> >Is this at all possible? Is there a simple method?
>
> Not with image(). What you can do is use patch() for each
> pixel, drawing the box yourself.

Thanks for the input Walter.

Just for anyone with a similar problem, the uimage()
function on the file exchange solved my problem quite
elegantly. It actually resamples non-rectilinear pixels in
an image() call so that the resulting image comes out *as
if* the pixel locations were correct.

Cheers,
Sven.

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
uimage Sven 27 Mar, 2008 23:25:10
image Sven 27 Mar, 2008 23:25:10
custom Sven 06 Feb, 2008 21:30:00
axis Sven 06 Feb, 2008 21:30:00
image Sven 06 Feb, 2008 21:30:00
rssFeed for this Thread

envelope graphic E-mail this page to a colleague

Public Submission Policy
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.
Related Topics