photo.2target(1)       Grass User's Manual	 photo.2target(1)



_T_h_i_s  _i_s  _n_o_t  _a  _c_o_m_m_a_n_d _i_n _i_t_s_e_l_f_, _b_u_t _a_n _o_p_t_i_o_n _t_o _t_h_e _c_o_m_m_a_n_d
_i_._o_r_t_h_o_._p_h_o_t_o

NNAAMMEE
       _p_h_o_t_o_._2_t_a_r_g_e_t - An imagery function that  enables  you  to
       mark control points on an image to be ortho-rectified, and
       then input the  coordinates  of	each  control  point  for
       determination   of  ortho-rectification	parameters.   The
       ortho-rectification parameters are required as  input  for
       the GRASS program _p_h_o_t_o_._r_e_c_t_i_f_y
       _(_G_R_A_S_S _I_m_a_g_e_r_y _P_r_o_c_e_s_s_i_n_g _T_o_o_l_)

SSYYNNOOPPSSIISS
       Selected from _i_._o_r_t_h_o_._p_h_o_t_o


DDEESSCCRRIIPPTTIIOONN
       _p_h_o_t_o_._2_t_a_r_g_e_t  is  an imagery function that enables you to
       mark control points on an image to be ortho-rectified  and
       then  input  the coordinates of each point for calculation
       of rectification parameters.  Rectification is the mapping
       of  an  image  from one coordinate system to another.  The
       geometry of an image extracted into a GRASS LOCATION  hav-
       ing  an x,y coordinate system is not planimetric.  To cre-
       ate a planimetric image, that is, to convert the x,y coor-
       dinate system into a standard coordinate system (for exam-
       ple, the UTM coordinate system or the State Plane  coordi-
       nate  system), points from a map having the standard coor-
       dinates must be associated with the  same  points  on  the
       image to be rectified.  The ortho-rectification parameters
       are computed in two phases. The	first  phase  computes	a
       transformation  matrix between image (row,col) coordinates
       and photo (x,y) coordinates relative  to  the  perspective
       center.	The  transformation matrix is computed explicitly
       in the option _p_h_o_t_o_._2_i_m_a_g_e The second  phase,  _p_h_o_t_o_._2_t_a_r_-
       _g_e_t,  enables  you to mark control points on the image and
       then input the standard coordinates (Easting,Northing, and
       elevation)  to determine the parameters for a three dimen-
       sional projective transformation.

       _p_h_o_t_o_._i_n_i_t
	may be run before running  _p_h_o_t_o_._2_t_a_r_g_e_t  to  modify  the
       initial	camera exposure station parameters, and/or modify
       the standard deviation of these parameters.

       _p_h_o_t_o_._i_n_i_t
	is not required but generally is helpful.


       During the process of marking control points and  entering
       standard  coordinates,  you may compute the RMS (root mean
       square) error for each control point entered.  photo.2tar-
       get  does this by calculating the transformation equation,
       and then plugging these results into an equation  for  RMS
       error.


       _p_h_o_t_o_._2_t_a_r_g_e_t offers a zoom option to locate precisely the
       point to be marked on an image. This program  also  offers
       you  the  option  of  acquiring standard coordinates for a
       marked point from a map layer in the target  database,  or
       from a digitizer.


       To run _p_h_o_t_o_._2_t_a_r_g_e_t, a graphics monitor is required.


       The  procedure  for  marking points, entering coordinates,
       and calculating RMS error is described below.


       The terminal screen displays the following message:


       uussee mmoouussee nnooww......


       The graphics monitor displays the following screen:



       +-----------------------------+--------------------------------+
       |imagery   filename   (mag)	| target  filename  (mag)
       |
       +-----------------------------+--------------------------------+
       |							|
       |
       |							|
       |
       |							|
       |
       |							|
       |
       |							|
       |
       |							|
       |
       |							|
       |
       +-----------------------------+--------------------------------+
       |							|
       |
       |							|
       |
       |							|
       |
       |							|
       |
       |							|
       |
       |							|
       |
       +-----------------------------+--------------------------------+
       |QUIT	   ZOOM        PLOTCELL        ANALYZE		|
       |
       +-----------------------------+--------------------------------+



       A pop-down menu like that shown below will be superimposed
       on the left half of the screen:



		  +----------------------------------------+
		  |Double click on cell file to be plotted |
		  | Double click here to cancel 	   |
		  +----------------------------------------+
			      +--------------------+
			      |  Mapset PERMANENT  |
			      +---------+----------+
			      |gs13.1	| gs14.1   |
			      +---------+----------+
			      |gs21.1	| gs22.2   |
			      +---------+----------+




       Any  single  file in the imagery group may be used to mark
       points, and you can mark points on more than one  file  in
       the  imagery  group  to accumulate the 12 points suggested
       minimum.  Any file in the imagery group can  be	rectified
       (using

       _p_h_o_t_o_._r_e_c_t_i_f_y ) based on the rectification parameters com-
       puted from these control points.


       The imagery file you select is displayed in the upper left
       quadrant of the screen.

ZZOOOOMM
       To  magnify  the  displayed file, you must place the mouse
       cross hairs on the word ZOOM. The following menu will then
       be displayed at the bottom of the screen:




		 +-------+-----+-------++--------------------+
		 |Cancel | Box | Point ||Select type of ZOOM |
		 +-------+-----+-------++--------------------+



       You  may  identifying  the zoom window either by using the
       mouse to make a box, or by using the  mouse  to	mark  the
       center  of the window and entering a magnification factor.
       The terminal screen will display a mouse  button  menu  to
       guide you in identifying the window.



MMAARRKKIINNGG PPOOIINNTTSS
       To  mark  the  points  on the image that correspond to the
       points on a standard coordinate system map, you must place
       the mouse cross hairs on the corresponding location on the
       image to be marked and press the left hand button  on  the
       mouse.	A  diamond  shaped  symbol  will be marked on the
       image.  The terminal will display the following menu:



	  +------------------------------------+--------------------------+
	  |Point    1	 marked    at	 IMAGE	  COORDINATES	|
       |
	  |IMAGE      X:	 1023.77			|
       |
	  |IMAGE       Y:	 -164.41			|
       |
	  |							|
       |
	  +------------------------------------+--------------------------+
	  |Enter  CONTROL  COORDINATES	as  east,north,elevation:
       |
	  +---------------------------------------------------------------+



       You then enter the easting, northing,  and  elevation  for
       the point marked on the image.  If you wish not to enter a
       coordinate, simply hit RETURN to  return  control  to  the
       mouse;  the marked point then disappears.



PPLLOOTT CCEELLLL
       In  addition  to  acquiring control points from a standard
       map, you have the option of acquiring the  points  from	a
       cell-map in the target database.  The database map is dis-
       played by placing the mouse cross hairs on the words  PLOT
       CELL.   The following line is then displayed at the bottom
       of the monitor:



	   +-------+---------------------------------------+
	   |Cancel | Indicate which side should be plotted |
	   +-------+---------------------------------------+



       Which side of the monitor is to be plotted is indicated by
       placing	the  mouse cross hairs on the half of the monitor
       screen that you would like to use, and pressing	the  left
       mouse  button.  The following pop-down menu will be super-
       imposed on the half of the screen that was chosen:



	   +----------------------------------------+
	   |Double click on cell file to be plotted |
	   | Double click here to cancel	    |
	   +----------------------------------------+


	   +-----------------------------+
	   |   Mapset user1		 |
	   +--------------+--------------+
	   |tm.rectified  |		 |
	   +--------------+--------------+
	   |tm.classified |		 |
	   +--------------+--------------+
	   |   Mapset PERMANENT 	 |
	   +--------------+--------------+
	   |elevation	  | geology	 |
	   +--------------+--------------+
	   |slope	  | soils	 |
	   +--------------+--------------+
	   |aspect	  |		 |
	   +--------------+--------------+
	   |roads	  |		 |
	   +--------------+--------------+
	   |streams	  |		 |
	   +--------------+--------------+
	   |airfields	  |		 |
	   +--------------+--------------+



       After the map is displayed the following  message  appears
       at the bottom of the monitor:



	    +-----------------+----------+--------+
	    |input method ->  | keyboard | screen |
	    +-----------------+----------+--------+



       If  you	wish to use the plotted map only as a comparative
       reference, the keyboard can be  chosen  as  the	means  to
       input  coordinates  corresponding  to  the  marked control
       points.	This is done by placing the mouse cross hairs  on
       the  word  KEYBOARD  and  pressing  the left button on the
       mouse.


       If you select the SCREEN  option,  points  marked  on  the
       image  will  automatically  be associated with the coordi-
       nates from the corresponding points on the target database
       map,  and  a  corresponding  elevation  from the cell-file
       selected for elevation data.  In  this  option,	when  you
       mark a point on the image, the following menu is displayed
       on the terminal:



	  +------------------------------------+--------------------------+
	  |Point    5	 marked    at	 IMAGE	  COORDINATES	|
       |
	  |IMAGE      X:       1023.77				|
       |
	  |IMAGE       Y:	-164.41 			|
       |
	  |							|
       |
	  |							|
       |
	  |Control	Point	    location			|
       |
	  |East:	       679132.57			|
       |
	  |North:	     4351080.67 			|
       |
	  |Elevation:		1010.00 			|
       |
	  |							|
       |
	  |							|
       |
	  |							|
       |
	  +------------------------------------+--------------------------+
	  |use			  mouse 		   now...
       |
	  +---------------------------------------------------------------+



       The coordinates for the target database map are	automati-
       cally saved as the coordinates corresponding to the marked
       control point on the image.

AANNAALLYYZZEE
       After a number of points have been marked (4  to  7),  you
       can check the RMS error of the points marked on the image.
       This is done by placing the mouse cross hairs on the  word
       ANALYZE	at  the  bottom  of the monitor.  An error report
       resembling that shown below is superimposed on  the  moni-
       tor:



       +--------------------------------------------------------------------------+
       |						    error
       |
       |#   east     north     target	  east	   north     east
       north	 elev.	  |
       +--------------------------------------------------------------------------+
       |1   0.0      -0.9	 1.0	  48.5	    4.8   79132.5
       351080.6    10.0     |
       |2  0.4	     1.0	1.3	 53.1	   7.2	  84314.7
       399001.4   239.3     |
       |3  -1.2      -0.5	 0.6	  52.8	    6.5   67841.4
       457682.8   209.5     |
       |4  1.1	     0.5	1.3	 34.0	   9.2	  77573.8
       352626.4   432.5     |
       |5  -2.7      14.0	14.2	  48.6	 -144.9   79132.6
       351080.7   985.0     |
       |
       |
       +--------------------------------------------------------------------------+
       |	     overall	   rms		error:	     4.46
       |
       +--------------------------------------------------------------------------+



       The following menu then appears at the bottom of the moni-
       tor:



	+-----+------------+------------------------------------------------+
	|DONE | PRINT  FILE  |	 Double  click	on  point  to  be
       included/excluded |
	+-----+------------+------------------------------------------------+



       The RMS error for the image  is	given  under  the  column
       TITLEd  "error"	and subTITLEd "east" and "north".  In the
       above report, point number 1 is 0.0 and -0.9 meters  (east
       and north) from the predicted location calculated from the
       transformation equation.  The RMS error for the target map
       is  listed  under  the  heading "target".  This is the RMS
       error for the east and north coordinates of the target map
       but  it is presented in the table using one general value.
       The overall RMS error is displayed at the  bottom  of  the
       screen  in  meters.  Points that create high RMS error are
       displayed in red on the monitor (represented here in ital-
       ics).


       The  image  coordinates of the point marked on the imagery
       group file is given under the heading "image" and the sub-
       headings  "east" and "north".  The location of the control
       point in the target database is given  under  the  heading
       "control"  and the subheadings "east","north", and "elev".
       If you would like to exclude or include a  control  point,
       this  can be accomplished by placing the mouse cross hairs
       on the control point number to be included (if  the  point
       is  absent)  or	excluded  (if the point is displayed) and
       pressing the left button on the mouse twice.  When a point
       is excluded, it is not afterwards included in the calcula-
       tion of the RMS error, or included in the final rectifica-
       tion  parameters.   However,  it  can  be retrieved within
       _p_h_o_t_o_._2_t_a_r_g_e_t at any time  by  double  clicking	with  the
       mouse as described above.

QQUUIITT
       To  end	the  _p_h_o_t_o_._2_t_a_r_g_e_t  program place the mouse cross
       hairs  on  the  word  QUIT;   the  marked  control  points
       (including coordinates) will be saved.

NNOOTTEESS
       During  the course of marking control points and computing
       the ortho-rectification	parameters,  a	matrix	inversion
       error  may  occur.   This  is caused by trying to invert a
       non-singular normal equation matrix.  When this	situation
       arises,	the  status  of  all  previously selected control
       points are modified,  the  control  points  are	excluded.
       Running

       _p_h_o_t_o_._i_n_i_t
	for the selected imagery group with accurate camera expo-
       sure station parameters should remedy the situation.   The
       excluded control points may again be included as described
       in the section ANALYZE.




       A good rule of thumb is to mark at least 12 to  15  points
       which are evenly distributed over the entire imagery group
       file in order to obtain an accurate transformation parame-
       ters  for  the  rectification  process.	The RMS error may
       increase with more points added,  but  the  transformation
       parameters will be more accurate over the entire image.


       An  RMS	error  of less than or equal to approximately one
       resolution unit (pixel) for the image being  rectified  is
       generally considered acceptable.

SSEEEE AALLSSOO
       _i_._o_r_t_h_o_._p_h_o_t_o

       _p_h_o_t_o_._c_a_m_e_r_a

       _p_h_o_t_o_._2_i_m_a_g_e

       _p_h_o_t_o_._i_n_i_t

       _p_h_o_t_o_._r_e_c_t_i_f_y



AAUUTTHHOORR
       Mike Baba,  DBA Systems, Inc.

       _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_4 _$



GRASS 5.0					 photo.2target(1)
