Sophie

Sophie

distrib > Fedora > 13 > i386 > by-pkgid > 413e0bdb3c48563b2d8d9038d07d5533 > files > 1972

grass-6.3.0-15.fc13.i686.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>GRASS GIS: photo.2target</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="grassdocs.css" type="text/css">
</head>
<body bgcolor="white">

<img src="grass_logo.png" alt="GRASS logo"><hr align=center size=6 noshade>

<h2>NAME</h2>
<em><b>photo.2target</b></em>  - Creates control points on an image to be ortho-rectified.
<h2>KEYWORDS</h2>
imagery
<h2>SYNOPSIS</h2>
<b>photo.2target</b><br>
<b>photo.2target help</b><br>
<b>photo.2target</b> <b>group</b>=<em>string</em>  [<b>map</b>=<em>name</em>]   [<b>target</b>=<em>name</em>]   [--<b>verbose</b>]  [--<b>quiet</b>] 


<h3>Parameters:</h3>
<DL>
<DT><b>group</b>=<em>string</em></DT>
<DD>Name of imagery group</DD>

<DT><b>map</b>=<em>name</em></DT>
<DD>Name of image to be rectified which will  be initialy drawn on screen.</DD>

<DT><b>target</b>=<em>name</em></DT>
<DD>Name of a map from target mapset which  will be initialy drawn on screen.</DD>

</DL>
<H2>DESCRIPTION</H2>

<EM>photo.2target</EM>
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 having an x,y coordinate system is not
planimetric.  To create a planimetric image, that is, to
convert the x,y coordinate system into a standard coordinate
system (for example, the UTM coordinate system or the State
Plane coordinate system), points from a map having the
standard coordinates 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 <EM>
<A HREF="photo.2image.html">photo.2image</A>
</EM>.
 
The second phase, <EM>photo.2target</EM>, 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 dimensional projective transformation.
 
<EM>
<A HREF="photo.init.html">photo.init</A>
</EM> may be run before 
running <EM>photo.2target</EM>
to modify the initial camera exposure station parameters, and/or 
modify the standard deviation of these parameters.
<EM>
<A HREF="photo.init.html">photo.init</A>
</EM> is not required but generally is helpful.


<P>

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.2target does this by
calculating the transformation equation, and then
plugging these results into an equation for RMS error.


<P>

<EM>photo.2target</EM> 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.


<P>

To run <EM>photo.2target</EM>, a graphics monitor is required.


<P>

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


<P>

The terminal screen displays the following message: 


<P>
<B>use mouse now...</B>
<P>
The graphics monitor displays the following screen:
<P>
<PRE>
+-----------------------------+--------------------------------+
|imagery  filename  (mag)     | target  filename  (mag)        |
+-----------------------------+--------------------------------+
|                             |                                |
|                             |                                |
|                             |                                |
|                             |                                |
|                             |                                |
|                             |                                |
|                             |                                |
+-----------------------------+--------------------------------+
|                             |                                |
|                             |                                |
|                             |                                |
|                             |                                |
|                             |                                |
|                             |                                |
+-----------------------------+--------------------------------+
|QUIT ZOOM PLOTCELL ANALYZE   |                                |
+-----------------------------+--------------------------------+
</PRE>
<P>
A pop-down menu like that shown below will be superimposed on the
left half of the screen:
<P>
<PRE>
           +------------------------------------------+
           | Double click on raster map to be plotted |
           | Double click here to cancel              |
           +------------------------------------------+
                       +--------------------+
                       |  Mapset PERMANENT  |
                       +---------+----------+
                       |gs13.1   | gs14.1   |
                       +---------+----------+
                       |gs21.1   | gs22.2   |
                       +---------+----------+

</PRE>
<P>
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 
<EM>
<A HREF="photo.rectify.html">photo.rectify</A>
</EM>) based on the rectification parameters 
computed from these control points.
<P>
The imagery file you select is displayed in the upper 
left quadrant of the screen.

<H2>ZOOM</H2>

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:
<P>
<PRE>

          +-------+-----+-------++--------------------+
          |Cancel | Box | Point ||Select type of ZOOM |
          +-------+-----+-------++--------------------+
</PRE>
<P> 
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.
<P> 
It is also possible to start zoom by box with middle mouse button
and pan by right mouse button.
<P>
<H2>MARKING POINTS</H2>
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:
<P>
<PRE>
   +------------------------------------+--------------------------+
   |Point 1 marked at IMAGE COORDINATES |                          |
   |IMAGE X:   1023.77                  |                          |
   |IMAGE Y:  -164.41                   |                          |
   |                                    |                          |
   +------------------------------------+--------------------------+
   |Enter CONTROL COORDINATES as east,north,elevation:             |
   +---------------------------------------------------------------+
</PRE>
<P>
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.
<P>
Entered point can be canceled by right mouse button click.
<P>
<H2>PLOT CELL</H2>

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 displayed by 
placing the mouse cross hairs on the words PLOT CELL.  The 
following line is then displayed at the bottom of the monitor:
<P>
<PRE>
    +-------+---------------------------------------+
    |Cancel | Indicate which side should be plotted |
    +-------+---------------------------------------+
</PRE>
<P>
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 superimposed on the half of the screen that was
chosen:
<P>
<PRE>
    +------------------------------------------+
    | Double click on raster map to be plotted |
    | Double click here to cancel              |
    +------------------------------------------+
</PRE>
<PRE>
    +-----------------------------+
    |   Mapset user1              |
    +--------------+--------------+
    |tm.rectified  |              |
    +--------------+--------------+
    |tm.classified |              |
    +--------------+--------------+
    |   Mapset PERMANENT          |
    +--------------+--------------+
    |elevation     | geology      |
    +--------------+--------------+
    |slope         | soils        |
    +--------------+--------------+
    |aspect        |              |
    +--------------+--------------+
    |roads         |              |
    +--------------+--------------+
    |streams       |              |
    +--------------+--------------+
    |airfields     |              |
    +--------------+--------------+
</PRE>
<P>
After the map is displayed the following message appears at
the bottom of the monitor:
<P>
<PRE>
     +-----------------+----------+--------+
     |input method ->  | keyboard | screen |
     +-----------------+----------+--------+
</PRE>
<P>
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.
<P> 
If you select the SCREEN option, points marked on
the image will automatically be associated with the
coordinates 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:
<P>
<PRE>
   +------------------------------------+--------------------------+
   |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...                                               |
   +---------------------------------------------------------------+
</PRE>
<P>
The coordinates for the target database map are automatically saved
as the coordinates corresponding to the marked control point on the image.

<H2>ANALYZE</H2>

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 monitor:
<P>
<PRE>
+--------------------------------------------------------------------------+
|                                 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                                 |
+--------------------------------------------------------------------------+
</PRE>
<P>
 The following menu then appears at the bottom of the monitor:
<P>
<PRE>
 +-----+------------+------------------------------------------------+
 |DONE | PRINT FILE |  Double click on point to be included/excluded |
 +-----+------------+------------------------------------------------+
</PRE>
<P>
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 italics).
<P>
The image coordinates of the point marked on the
imagery group file is given under the heading "image" and the 
subheadings "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 calculation
of the RMS error, or included in the final rectification parameters. 
However, it can be retrieved within <EM>photo.2target</EM> at any time
by double clicking with the mouse as described above.

<H2>QUIT</H2>

To end the <EM>photo.2target</EM> program place the mouse cross hairs
on the word QUIT;  the marked control points (including coordinates)
will be saved.

<H2>NOTES</H2>

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 
<EM>
<A HREF="photo.init.html">photo.init</A>
</EM> for the selected imagery group with accurate 
camera exposure station parameters should remedy the situation.
The excluded control points may again be included as described in the section
ANALYZE.
<P>
<P>
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 parameters 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.   
<P>
An RMS error of less than or equal to approximately one resolution
unit (pixel) for the image being rectified is generally considered 
acceptable.

<H2>SEE ALSO</H2>

<EM><A HREF="i.ortho.photo.html">i.ortho.photo</A></EM>,
<EM><A HREF="photo.camera.html">photo.camera</A></EM>,
<EM><A HREF="photo.2image.html">photo.2image</A></EM>,
<EM><A HREF="photo.init.html">photo.init</A></EM>,
<EM><A HREF="photo.rectify.html">photo.rectify</A></EM>

<H2>AUTHOR</H2>

Mike Baba,  DBA Systems, Inc.

<p><i>Last changed: $Date: 2006-12-15 11:10:21 +0100 (Fri, 15 Dec 2006) $</i>
<HR>
<P><a href="index.html">Main index</a> - <a href="photo.html">photo index</a> - <a href="full_index.html">Full index</a></P>
<P>&copy; 2003-2008 <a href="http://grass.osgeo.org">GRASS Development Team</a></p>
</body>
</html>