Re: alignment of pixels with coordinates

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Øyvind Kolås writes:
 > ...
 > I agree that the convention should be that pixel sampling sites are at
 > integer coordinates. I also feel it would be natural to let the extent
 > of a pixel be half way towards the neighbour pixel sites, this however
 > has the issue of not matching the display GIMP provides when zoomed
 > into the image.
 > ...
 > GEGL might in the future also offer other resamplers for blitting /
 > display purposes, the best would of course be if all resamplers could
 > be plugged in and interchangeably used for different purposes, at the
 > moment the resampling that happens in gegl_node_blit does not use the
 > resamplers to do its job for the general cases it probably shouldn't
 > either since it needs to be as fast as possible.

Thank you! I finally figured it out:

Image size conventions are actually decoupled from the
pixel-coordinates convention. (Although they often are linked, they
don't need to be.)

The resamplers can all use one convention (center-based physical
coordinates, as you suggest, and as I prefer). But the operations
which call resamplers can have an optional toggle, with defaults
dependent on the called resampler. <- I am not totally sure this is
easy to implement, but this would be ideal.

So, an affine operation calling a "resampler targeted at downsampling"
(e.g. exact area box filtering) would use the image size convention
which corresponds to exact area resampling---that is, the image
"sticks out" half a pixel from the centers of the boundary pixels
(this is the "big" image convention)---unless overridden by the user
(note that this is separate, althought related, to the issue of where
the pixel coordinates are).  Likewise, an affine operation calling an
"interpolatory resampler" (targeted for point transformations) would
use the image convention which is normally associated with it---the
image ends right at the centers of the boundary pixels (the "small"
image convention).

Nicolas Robidoux
Universite Laurentienne

_______________________________________________
Gegl-developer mailing list
Gegl-developer@xxxxxxxxxxxxxxxxxxxxxx
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gegl-developer


[Index of Archives]     [Yosemite News]     [Yosemite Photos]     [gtk]     [GIMP Users]     [KDE]     [Gimp's Home]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux