Changeset 1215 for trunk/doc/pslib
- Timestamp:
- Jul 13, 2004, 11:43:09 AM (22 years ago)
- File:
-
- 1 edited
-
trunk/doc/pslib/psLibADD.tex (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/pslib/psLibADD.tex
r1208 r1215 1 %%% $Id: psLibADD.tex,v 1.2 1 2004-07-12 22:18:39 eugene Exp $1 %%% $Id: psLibADD.tex,v 1.22 2004-07-13 21:43:09 eugene Exp $ 2 2 \documentclass[panstarrs]{panstarrs} 3 3 … … 12 12 \project{Pan-STARRS Image Processing Pipeline} 13 13 \organization{Institute for Astronomy} 14 \version{0 2}14 \version{03} 15 15 \docnumber{PSDC-430-006} 16 16 … … 645 645 \subsubsection{Astronomical Image Manipulations} 646 646 647 \paragraph{Interpolation} 648 649 Interpolation is needed in various image manipulation operations, 650 including rotation and resampling. We have specified a function to 651 perform the interpolation using one of several possible interpolation 652 methods, defined below. It is important in the discussions that 653 follow to remember that a pixel with column,row if $i,j$ has 654 coordinate at the center of $i+0.5,j+0.5$ and corners with coordinates 655 from $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 657 column,row of (5,4), (5,5), (6,4), (6,5). 658 659 \subparagraph{Nearest Pixel Interpolation ({\tt PS\_RESAMPLE\_FLAT})} 660 661 In this interpolation, the value of the closest pixel is returned. 662 This is equivalent to pixel duplication or replication. 663 664 \subparagraph{Bilinear Interpolation ({\tt PS\_RESAMPLE\_BILINEAR})} 665 666 In this interpolation, the value at the coordinate is calculated using 667 linear interpolation in two dimensions from the four nearest neighbor 668 pixels. The bilinear interpolation value at a coordinate $x,y$ 669 depends on the four nearest neighbor pixels and the fractional 670 distance $fx,fy$ of the given coordinates from the centers of those 671 four 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 \] 675 This expression is more efficiently evaluated by factoring and 676 calculating 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 680 Note that the values of $f_x$ and $f_y$ require some care. Given a 681 coordinate $x,y$, the value of $f_x$ is calculated as $f_x - 0.5 - 682 int(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) 684 and the fractional coordinate values $f_x, f_y = 0.3, 0.7$. The 685 resulting 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 647 692 \paragraph{Image Cuts and Slices} 648 693
Note:
See TracChangeset
for help on using the changeset viewer.
