IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 1215


Ignore:
Timestamp:
Jul 13, 2004, 11:43:09 AM (22 years ago)
Author:
eugene
Message:

added rotation and interpolation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/pslib/psLibADD.tex

    r1208 r1215  
    1 %%% $Id: psLibADD.tex,v 1.21 2004-07-12 22:18:39 eugene Exp $
     1%%% $Id: psLibADD.tex,v 1.22 2004-07-13 21:43:09 eugene Exp $
    22\documentclass[panstarrs]{panstarrs}
    33
     
    1212\project{Pan-STARRS Image Processing Pipeline}
    1313\organization{Institute for Astronomy}
    14 \version{02}
     14\version{03}
    1515\docnumber{PSDC-430-006}
    1616
     
    645645\subsubsection{Astronomical Image Manipulations}
    646646
     647\paragraph{Interpolation}
     648
     649Interpolation is needed in various image manipulation operations,
     650including rotation and resampling.  We have specified a function to
     651perform the interpolation using one of several possible interpolation
     652methods, defined below.  It is important in the discussions that
     653follow to remember that a pixel with column,row if $i,j$ has
     654coordinate at the center of $i+0.5,j+0.5$ and corners with coordinates
     655from $i,j$ to $i+1,j+1$.  Thus, the interpolation of a coordinate
     656$x,y$ = 5.0,4.0 is a value midway between the four pixels with
     657column,row of (5,4), (5,5), (6,4), (6,5). 
     658
     659\subparagraph{Nearest Pixel Interpolation ({\tt PS\_RESAMPLE\_FLAT})}
     660
     661In this interpolation, the value of the closest pixel is returned.
     662This is equivalent to pixel duplication or replication.
     663
     664\subparagraph{Bilinear Interpolation ({\tt PS\_RESAMPLE\_BILINEAR})}
     665
     666In this interpolation, the value at the coordinate is calculated using
     667linear interpolation in two dimensions from the four nearest neighbor
     668pixels.  The bilinear interpolation value at a coordinate $x,y$
     669depends on the four nearest neighbor pixels and the fractional
     670distance $fx,fy$ of the given coordinates from the centers of those
     671four pixels.  Consider four neighboring pixels at column,row of $i,j$,
     672$i+1,j$, $i,j+1$, and $i+1,j+1$ with pixel values $V_{0,0}$,
     673$V_{1,0}$, $V_{0,1}$, $V_{1,1}$.  The value at $x,y$ is given by:
     674\[ V = (V_{0,0}(1 - f_x) + V_{1,0}f_x)(1 - f_y) + (V_{0,1}(1-f_x) + V_{1,1}f_x)f_y \]
     675This expression is more efficiently evaluated by factoring and
     676calculating the expresion as:
     677\[ r_x = V_{0,0} + (V_{1,0} - V_{0,0})f_x \]
     678\[ V = r_x + (V_{0,1} + (V_{1,1} - V_{0,1})f_x - r_x)f_y \]
     679
     680Note that the values of $f_x$ and $f_y$ require some care.  Given a
     681coordinate $x,y$, the value of $f_x$ is calculated as $f_x - 0.5 -
     682int(f_x - 0.5)$.  For example, when interpolating the value at
     683(5.8.5.2), the relevant neighbor pixels are (5,4), (6,4), (5,5), (6,5)
     684and the fractional coordinate values $f_x, f_y = 0.3, 0.7$.  The
     685resulting coordinate would be contained within the pixel at column,row
     686(5,5).
     687
     688\subparagraph{Bilinear Interpolation ({\tt PS\_RESAMPLE\_SINC})}
     689
     690\subparagraph{Bilinear Interpolation ({\tt PS\_RESAMPLE\_LAGRANGE})}
     691
    647692\paragraph{Image Cuts and Slices}
    648693
Note: See TracChangeset for help on using the changeset viewer.