imagery(1)		      Grass User's Manual		    imagery(1)



NNAAMMEE
       iimmaaggeerryy - Description of GRASS image processing functions.

IIMMAAGGEE PPRROOCCEESSSSIINNGG IINN GGRRAASSSS
       The  following  discussion  is  intended to provide a quick overview of
       image processing in GRASS.  Some concepts and some hints are  provided.
       For  a  more complete discussion and description of image processing in
       GRASS see _G_R_A_S_S _T_u_t_o_r_i_a_l_: _I_m_a_g_e _P_r_o_c_e_s_s_i_n_g.

EEXXTTRRAACCTTIINNGG IIMMAAGGEERRYY DDAATTAA IINNTTOO AA GGRRAASSSS DDAATTAABBAASSEE
       Remotely sensed images are captured for computer processing by  filter-
       ing  radiation  emanating  from	the image into various electromagnetic
       wavelength bands, converting the overall intensity  for	each  band  to
       digital	format,  and  storing  the values on computer compatible media
       such as magnetic tape.


       The GRASS programs which extract image data from magnetic tape can read
       LANDSAT	multi-spectral	scanner  (MSS) data (_i_._t_a_p_e_._m_s_s), LANDSAT the-
       matic mapper (TM) data, (_i_._t_a_p_e_._t_m), and other formats, such as scanned
       aerial photography or SPOT satellite data (_i_._t_a_p_e_._o_t_h_e_r).  They extract
       the band data into raster files in a GRASS database.  Each band becomes
       a  separate raster file, with standard GRASS map layer support, and can
       be displayed and analyzed just like any other raster file.

UUNNRREEGGIISSTTEERREEDD DDAATTAA
       The band data extracted from tapes are assumed to be unregistered data.
       This  means that the GRASS software does not know the earth coordinates
       for pixels in the image.  The only coordinates known  at  the  time  of
       extraction  are	the  columns and the rows relative to the way the data
       was stored on the tape.


       Data can only be extracted into a database which has an x,y  coordinate
       system, and not into a projected database (e.g., a UTM database).  This
       is to prevent users from mixing the unregistered data  with  registered
       data  in  the  same database.  The GRASS system comes with the database
       _i_m_a_g_e_r_y which is an x,y database.  New  databases  can  be  created  by
       users  during  GRASS  startup.  See the _g_._h_e_l_p section on "Setting Up a
       GRASS Database" for instructions on creating a new database.

CCEELLLL HHEEAADDEERRSS
       The cell headers for the band files in these x,y databases are  set  to
       reflect	the  rows  and columns of the extracted data.  The north-south
       values represent the rows, and the east-west values represent the  col-
       umns.  The resolution of the unregistered data is set to 1.


       Note,  however,	that  while  the row numbers increase from 1 to n from
       north to south, GRASS requires that the values of  the  user's  current
       geographic  region  decrease from north to south.  The solution adopted
       was to represent the rows with negative values (i.e., -1 to -n).   This
       allows  them  to decrease from north to south and, if the minus sign is
       ignored, to reflect the row numbers.


       The cell headers for the layers in x,y databases are set  so  that  the
       coordinates  at	the  center  of each pixel exactly reflect the row and
       column for that pixel.  The northern edge is set to 0.5 less  than  the
       first  row, the southern edge 0.5 larger than the last row, the west to
       0.5 less than the first column, and the east to	0.5  larger  than  the
       last  column.  When the image is displayed on the graphics monitor, the
       _d_._w_h_e_r_e command can be used to report row and column values.


       For example, suppose rows 100-500 and columns  200-800  are  extracted.
       Then  the cell headers for the extracted data will be given the follow-
       ing values:

       north:	 -99.5
       south:	 -500.5
       west:	 199.5
       east:	 800.5
       ns res:	 1.0
       ew res:	 1.0



RREEGGIIOONN AANNDD MMAASSKK
       Since the data layers are given	essentially  contrived	cell  headers,
       users  must  exercise  extra care when analyzing or displaying unregis-
       tered images.  It is very easy for the  user's  GRASS  region  to  have
       absolutely  no  relationship to the data he is trying to display.  This
       could happen when the region is set for data extracted from  one  tape,
       but  the  analysis is attempted on data extracted from another tape.  A
       good habit to develop is to set the region to exactly match one of  the
       band files.  This can be done using the GRASS _g_._r_e_g_i_o_n command.


       Another	pitfall is to have a mask set to a band file from one data set
       while trying to read another.  Even if the region is set properly,  the
       data  will  appear  to  be  all no-data since the mask will effectively
       knock out any data.  Be sure that the mask is either set to  a  related
       data  layer  or	not set at all.  See _r_._m_a_s_k for information on setting
       and unsetting the mask.


       Please note that the tape extraction routines set your database	region
       to match the rows and columns of the data that is extracted.

GGRROOUUPPSS
       Since  the  band  files are individual raster files, it is necessary to
       have a mechanism to maintain a relationship between band files from the
       same  image  as	well as raster files derived from the band files.  The
       GRASS _g_r_o_u_p data structure accomplishes this goal.  The group is essen-
       tially  a  list of names of raster files that belong in the group.  For
       user convenience, groups are also created (and  updated)  by  the  tape
       extraction routines.  The tape extraction programs ask the user to sup-
       ply a group name as well as to specify the bands to be extracted.  Sup-
       pose that the user extracts bands 1, 2, and 3 into a group called _n_h_a_p.
       Then the band files will become the raster files  _n_h_a_p_._1,  _n_h_a_p_._2,  and
       _n_h_a_p_._3  and the group _n_h_a_p will list these 3 raster files as members of
       the group.


       Groups can also be created and modified by the  user  using  the  GRASS
       command _i_._g_r_o_u_p_.

IIMMAAGGEE RREEGGIISSTTRRAATTIIOONN AANNDD RREECCTTIIFFIICCAATTIIOONN
       Image  registration and image rectification is the process of associat-
       ing earth coordinates with pixels on the image and then converting  the
       unregistered raster files to raster files in a projected database.


       Image  registration  (_i_._p_o_i_n_t_s)	is  applied to a group, rather than to
       individual raster files.  The control points are stored in  the	group,
       allowing  all  related  band  files to be registered in one step rather
       than individually.


       Image rectification (_i_._r_e_c_t_i_f_y) is applied to individual raster	files,
       with the control points for the group used to control the rectification
       and the group target (_i_._t_a_r_g_e_t) used to specify the database where  the
       rectified layer will live.

IIMMAAGGEE CCLLAASSSSIIFFIICCAATTIIOONN
       Image  classification methods process all or a subset of the band files
       as a unit.  Spectral signatures for the image are generated (_i_._c_l_u_s_t_e_r)
       and then used to produce a landcover map (_i_._m_a_x_l_i_k).


       The  signatures	must be associated only with the raster files actually
       used in the analysis. This means that with a group  _s_u_b_g_r_o_u_p_s  must  be
       created (_i_._g_r_o_u_p) which list the band files to be grouped for classifi-
       cation purposes.  The signatures are stored with the subgroup.


       Note that multiple subroups can be created within a group.  This allows
       different classifications to be run with different combinations of band
       files.


       Also note that raster files  produced  by  the  classification  process
       (_i_._m_a_x_l_i_k) are automatically listed as part of the group.

RREECCTTIIFFIIEEDD VVSS.. UUNNRREECCTTIIFFIIEEDD AANNAALLYYSSIISS
       There  are two possible routes for processing image data.  The first is
       to register the group (_i_._p_o_i_n_t_s), perform the analyses on the  unrecti-
       fied  band  data  (_i_._m_a_x_l_i_k), and then rectify the results (_i_._r_e_c_t_i_f_y).
       The second is to register the group (_i_._p_o_i_n_t_s), rectify the  band  data
       (_i_._r_e_c_t_i_f_y), then run analyses on the rectified band data in the target
       location (_i_._r_e_c_t_i_f_y).  Both routes are  permissible  in	GRASS.	 Users
       will  most  likely prefer the first.  The second route requires leaving
       GRASS and re-running GRASS under the target  location.	It  also  will
       require	that a group be created to hold the rectified band files since
       _i_._r_e_c_t_i_f_y does not create or modify groups.   Also,  spatial  filtering
       may  not  be  as effective on rectified data since the rectification of
       the data requires resampling the original data.

SSEEEE AALLSSOO
       _G_R_A_S_S _T_u_t_o_r_i_a_l_: _I_m_a_g_e _P_r_o_c_e_s_s_i_n_g


       _d_._w_h_e_r_e

       _g_._r_e_g_i_o_n

       _i_._c_l_u_s_t_e_r

       _i_._g_r_o_u_p

       _i_._m_a_x_l_i_k

       _i_._p_o_i_n_t_s

       _i_._r_e_c_t_i_f_y

       _i_._t_a_p_e_._o_t_h_e_r

       _i_._t_a_p_e_._m_s_s

       _i_._t_a_p_e_._t_m

       _i_._t_a_r_g_e_t

       _r_._m_a_s_k

AAUUTTHHOORR
       Michael Shapiro, U.S.Army Construction Engineering Research Laboratory

       _L_a_s_t _c_h_a_n_g_e_d_: _$_D_a_t_e_: _2_0_0_2_/_0_1_/_2_5 _0_5_:_4_5_:_3_3 _$



GRASS 5.0							    imagery(1)
