COS 598C / HLS 598 - Reconstructing the Thera Frescoes

Spring 2007

Course home Outline and lecture notes Resources


Coordinate System Conventions

This section is giving a short overview on coordinate system conventions used in this project.

3D Coordinates

All 3D coordinate systems have to be right-handed systems. Whenever dealing with an x/y-plane in 3-space, try to adhere to the OpenGL camera convention that assumes you look at the plane along the negative z-direction with x pointing right and y pointing up.

Image Coordinates

All images are interpreted as having the top-left pixel coordinate (0, 0) and the bottom-right pixel coordinate (w-1, h-1). (w and h being image width and height, respectively.)

When expressing sub-pixel quantities, use the convention that pixel centers are integer-valued. That is, the pixel (x, y) extents from (x-0.5, y-0.5) to (x+0.5, y+0.5). In particular, the whole image ranges from (-0.5, -0.5) to (w-0.5, h-0.5).

In many cases, we associate images with a bounding box specification mapping the lower-left image corner to (x1, y1) and the upper-right image corner to (x2, y2). Both corners are specified in millimeters within the embedding x/y-plane. Note that this plane follows the OpenGL camera convention, that is, it is y-up, x-right. Be aware that the transition from image pixel coordinates to x/y-plane coordinates in millimeters changes orientations!

In conclusion, here is a formula to compute a point (X, Y) in the x/y-plane from image coordinates (x, y):

  X = x1 + (0.5   + x) * (x2 - x1) / w;
  Y = y1 + (h-0.5 - y) * (y2 - y1) / h;

File formats

Here are some recommendations regarding file formats.

Images

Unless stated otherwise, you should use 8-bit PNGs to store images.

In many cases, such as for fresco fragment 2D scans, an image comes with a bounding box specification (defined as described above) and an optional transformation file describing a potential transformation of the x/y-plane.

The bounding box file is a one-line ASCII file containing the four numbers x1, y1, x2, and y2, with the same base file name as the corresponding image and the file name extension .bbox.

The transformation file also uses the same base file name and comes with the extension .xf. It contains four ASCII lines containing a homogeneous 4x4 matrix describing the transformation of the x/y-plane in 3-space.


Last update 29-Dec-2010 11:57:34
tweyrich at princeton