Документ взят из кэша поисковой машины. Адрес оригинального документа : http://hea-www.harvard.edu/PROS/PUG/node129.html
Дата изменения: Unknown
Дата индексирования: Mon Oct 1 23:24:43 2012
Кодировка:

Поисковые слова: star
*imlintran, magnify* - Image Scale, Orientation, and Translation next up previous contents
Next: *qpsim* - Generate Simulated Up: Image Manipulation Previous: *imcalc* - Image Arithmetic

   
*imlintran, magnify* - Image Scale, Orientation, and Translation

To compare images from different instruments it is desirable for them to have the same scale and orientation. IRAF provides a number of tools which allow manipulation of images. For qp files QPOE Utilities.


To magnify or shrink (both linear transformations), specify the reduction factor in both x and y.

  im> imlintran.ncols = 0                        # necessary to set values in empty 
  im> imlintran.nlines = 0                     # pixels to zero. Use for shrinking.
  im> imlintran casa casa_m  0. 0. 2. 2. # input image casa.imh is shrunk factor of 2 
                                                    # and result put in casa_m.imh

or this can be accomplished with,

  im> magnify casa casa_m 0.5 0.5.

To shift, specify the old and new position of the image center.

  im> imlintran casa_m casa_mt  0. 0. 1. 1. xin=256 yin=256 xout = 276 yout=456 
                 # moves the image casa_m 20 pixels to the right and 200 pixels up.

To embed a small image in a larger (blank) array

  im> magnify casa casa_big 1 1 x1=-56  x2=200  y1=-56  y2=200 
  # This example places the 144x144 array, ``casa'' at the center of a 256x256 array 
                                                         # with no change of scale.

To rotate, specify angle of rotation in degrees (positive is counter clockwise).

  im> imlintran casa_m casa_mr 30. 30. 1. 1.                  # rotates image
casa_m.imh 
                                                                 # 30 deg ccw 
  im> imlintran casa_m casa _mf  0. 180 1. 1.              # flips the image,
                                                     # output is mirror image 
                                            # There is 180 rotation of y axis

A flip about the y axis, however, is more easily accomplished by

  im> imcopy casa_m[*,-*] casa_mf

Note that several operations can be done at the same time

  im> imlintran casa casa_mrt 45. 45. 1.25 1.25 xin=512 yin=512 xout=492 yout=519



rsdc@cfa.harvard.edu
1998-06-10