comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Fractional Pixels Origin?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Fractional Pixels Origin? [message #47616 is a reply to message #47583] Mon, 20 February 2006 10:56 Go to previous messageGo to previous message
JD Smith is currently offline  JD Smith
Messages: 850
Registered: December 1999
Senior Member
On Mon, 20 Feb 2006 10:00:03 +1300, Mark Hadfield wrote:

> Mark Hadfield wrote:
>>
>> my_image_plot, my_data, x, y
>
> Oops, sorry, JD. I missed an opportunity to gratuitously offend your
> sensibilities. The correct command would be

Thanks for that, Mark.

I don't see your argument. Fractional pixels are useful only when
calculating things which relate pixel coordinates to some other
coordinate (like celestial coordinates on the sky, etc), or when
computing other derived fractional pixel positions (e.g. clip two
polygons). Obviously, the computer has no understanding of a
fractional pixel, but only the memory indexed offset [0,0]. But the
latter does not have to drive the former. In fact I'd say it's rather
strange to let the layout in memory dictate a physical coordinate
system. You don't need to make this distinction.

An example: if you have an array of size 8x8, and it corresponds to, I
don't know, electron mobility vs. viscosity, of course it doesn't
bother you that the computer's understanding of the "coordinate" is
the dumb and fixed integer set [0-7,0-7], and not your higher-level
coordinate system of, say [0.001-0.1,100-200], in logarithmic bins.
My recommendation puts pixel coordinate distance on the same footing
as any other physical measure. How the underlying data is held in
memory is immaterial.

So, perhaps if you consider two separate coordinate systems, things
are made simpler (really!):

1. The "memory" coordinate system. This is the basis for mapping to
any other coordinate system. You'll never get rid of it, since
it's how the computer understands arrays.

2. The physical "pixel distance" coordinate system. This is among the
physical systems which can be mapped to by #1 (trivially, by adding
0.5).

The first is a necessity, given how computers arrange data. The
second is a particular choice, for computing distance/position based
transformations.

My last argument is this: when you have a widget readout of fractional
pixel position, do you really want [-0.5,-0.5] to be a valid position?

JD

P.S. Feel free to rename it JDTS_HIST_ND(). Much easier to remember.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Processing getting slower and slower?
Next Topic: how to get scale info from a transform matrix?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Oct 12 02:23:21 PDT 2025

Total time taken to generate the page: 0.55926 seconds