ere
ken
ving
ling
her
ing.
ing
rms
ma,
by
ude
tch.
y &
pro-
Iser
ori-
, for
hich
ight
was
t al,
lied
ose
king
hilst
ereo
jach
ised
rule-
AEX
pro-
ly in
per-
data
nent
age
Sys-
ated
ape
and
2. MIS DESCRIPTION
MIS is similar to NAMEX in that it is a hybrid Prolog-based
system where high level queries and problems can be ex-
pressed in a logic program of English-like Prolog predi-
cates, facts, and primitives. This hybrid nature allows the
benefits of Prolog’s ability to manipulate high level sym-
bolic data and its inference mechanism (backtracking) to
be realised whilst utilising the data processing efficiencies
and fast numerical analysis capabilities of low level proce-
dural languages, for which Prolog has no particular current
advantage. Low level functions are accessed via Prolog
primitives calling low level procedural routines written in
FORTRAN77 and Kernigham and Ritchie ‘C’. Presently
(May 1992) MIS consists of approximately 1000 lines of
Prolog, 50 lines of C, and 1000 lines of FORTRAN code.
The low level routines which perform data processing and
numerical analysis are largely implemented in FORTRAN.
The C component of the low level procedures is used as
a communication interface between the Prolog primitives
and FORTRAN, and for specifically selected tasks involv-
ing the high speed processing of raster data. The kind of
tasks performed by the low level routines include camera
modelling; detection of control point containment within
images; the computation of image centres and corners; a
model of the spheroids of Mars (Wu, 1981) and Phobos
(Duxbury, 1991); overlap detection between two or more
images; and the scanning of specified regions in a raster
based-map.
Most of the data utilised by MIS was obtained from NASA
CD-ROMs (NASA, 1988, 1992A), and include a gazetteer,
a l' per pixel geological raster map of Mars, and Viking
Orbiter camera event and geometry data. Additional data
was supplied by the USGS Flagstaff in the form of a
file containing 4505 USGS control point locations (Wu &
Schafer, 1984); a set of improved camera event and ge-
ometry data (Wu et al, 1982) and a + per grid-point DEM
for the whole of Mars (NASA, 1992C). Pre-processing of
all of these data was necessary to convert them into a form
suitable for MIS. The gazetteer contained feature names,
locations and sizes — these were converted into Prolog
facts. The DEM data had to be resampled to a standard
1° per pixel raster map format. A new Viking Orbiter im-
age geometry and event file was also generated by com-
bining the Viking Orbiter CD-ROM data with the smaller
set of USGS improved data. The USGS records replaced
corresponding CD-ROM records and were given a higher
quality value.
2.1 Prolog Primitives
A Prolog primitive is a basic command which performs a
single specific operation via low level procedural routines.
Prolog primitives control these low level routines by pass-
ing command and control codes, and data, via a central
command routine. The command routine then instructs
the other routines to read or write data, or to perform data
processing, or calculations. The outcome of a command is
returned to a Prolog primitive either as a flag to indicate a
successful completion or as data which will subsequently
be used by Prolog. The use of Prolog primitives effec-
tively shields the user from the complexities of the low
789
level procedural routines.
An example of a Prolog primitive is: limb(/mage). This
takes an image name, passes this to a low level routine
which then identifies the appropriate image record and
calculates the rays through each corner of the image. If
any corner ray fails to intersect with the planet then the
primitive succeeds and the limb of the planet is visible.
Another example is: stereo_illumination(Image1, Image2,
Value). This passes the names of two images, which over-
lap, to a low level routine which then computes the solar
altitude and azimuth for each image. The altitude and
azimuth information is then used to calculate the ends
of shadow tips from a unit high object on the surface of
Mars at the centre of each image. The value returned
(x10), known as the “stereo illumination difference”, is the
unit difference between the tips of both shadows. This
value was used as an approximation as to how suitable
stereo image pairs are, illumination-wise. A large illumi-
nation difference value indicates that shadows present in
both images will have changed significantly and as a result
the stereo matcher will fail.
Most of the Prolog primitives which call low level routines
are generally concerned with images and features. Some
of these primitives make use of other Prolog statements
to perform simple high to low level data translation tasks,
and vice versa, during interaction with low level procedural
routines. Appendix 1 lists a small selection of the Prolog
primitives used by MIS.
2.2 Prolog facts
There are two classes of Prolog facts used in MIS, "com-
prehensive" and "example" facts. "Comprehensive" facts
are where a complete set of facts are available such as
all the named features on Mars. "Example" facts apply
to cases where the information being presented is incom-
plete and the facts available are only representative. This
latter type of Prolog fact is prefixed by the word "example".
Approximately one thousand cartographic features are
stored as Prolog facts and each contains a feature name,
location, size, and feature class. Circular structures such
as craters or volcanoes are represented by centre loca-
tions and a diameter (km). Linear and area features are
currently represented by longitude and latitude limits of an
enclosing bounding rectangle, and a length (km) e.g.
feature('Copernicus', 169.0, -50.0, 280, crater).
feature('Olympus Mons', 133.0, 18.0, 540, volcano).
feature('Ma'adim Vallis', 184.0,181.0,-28.0,-16.0, 955,
sinuous valley).
It was decided to utilise the existing USGS map sheet
and quadrant system notation (Greeley & Batson, 1991)
to specify default regions in which stereo matching would
take place. The fact map_limits contains the map sheet
number, the quadrant, and the map's longitude and lat-
itude limits. If required, a new user defined non-USGS
map sheet area can be defined by asserting an additional
map.limits fact e.g.
map_limits('Olympus Mons area’, map, 128,140,12,25).
Te PS Eee