\chapter{Background}\label{ch2}

\section{Geographic Data}

	Information regarding the surface of the earth can be produced
	in a number of different ways.	In one such method, known as
	{\em remote sensing}, a camera or other sensing device is taken to a
	high altitude and aimed at the earth to collect information.
	Alternatively, data can be acquired by means of {\em proximate
	sensing}, which is performed by people using measuring devices at
	ground level~\cite{proximateSensing}.  For any application, the choice of methods
	and technologies is determined by the type, quality, and cost
	constraints of the required data.  Much of the geographic data
	that is collected consists of geographic imagery such as maps
	and photographs.

		\subsection{Aerial Imagery}

		In the case of remotely sensed imagery, a common practice
		is to attach a downward-facing camera or other sensor
		to an aircraft and fly over the area of interest,
		taking pictures.  This type of remote sensing, known
		as {\em aerial imagery}, has been done for almost as long as
		cameras have existed.  Early aerial imagery was done
		by taking photographs from balloons.  Subsequently,
		airplane-mounted cameras were used extensively for
		military reconnaissance in World War I~\cite{aerialPhotographyHistory1}.  Today, both
		airplanes and helicopters are used in the production of
		aerial imagery.  Airplanes have the advantage that they
		can cover a given area more quickly, but helicopters
		can be positioned with greater control
		than airplanes~\cite{helicopterVSairplane}.

		In addition, unmanned aerial vehicles (UAV) are
		increasingly being used as platforms for aerial imagery.
		They can often be used to produce aerial imagery at a
		lower cost than can be done with manned aircraft~\cite{skyborg}.
		UAVs encompass an extraordinary variety of vehicles,
		and the capabilities of UAVs vary greatly from one
		vehicle to the next.  For example, their payloads may
		range from less than 1 kg up to several hundred kg, and
		their maximum altitudes may range from one thousand feet
		up to altitudes in excess of ninety thousand feet~\cite{UAV2003}.
		In spite of this diversity, UAVs do not always give
		the most cost-effective solution over all terrains at
		all altitudes, and the need for a reliable connection
		between UAVs and their remote pilots further limits
		their applicability.  Therefore, there will likely
		continue to be some need to use manned aircraft in remote
		sensing for the foreseeable future.

		\subsection{Satellite Imagery}

		In addition to aircraft, spacecraft can also be used for
		the collection of remotely sensed data.  Spacecraft have
		been used for remote sensing since the 1940's.  At that
		time, cameras were placed inside V2 rockets acquired from
		Germany to take pictures of the Earth.	These rockets
		did not reach orbit, but they were able to take photos at
		high altitude.	Subsequently, in the 1960's, astronauts and
		cosmonauts took pictures of the Earth from their orbiting
		spacecraft~\cite{aerialPhotographyHistory2}.  Today, remote sensing from space is
		commonly done with Earth-orbiting, unmanned satellites.

		Satellite imagery has several advantages and disadvantages
		compared to aerial imagery.  Among the advantages of
		satellite imagery is the fact that the process of contracting to have
		aerial imagery produced requires planning to make sure
		that an aircraft is available and that weather conditions
		are acceptable on the acquisition date.  On the other
		hand, the most recent satellite image of a region
		can generally be ordered with no preparation at all.
		For repeated imaging of the same region, aerial imagery
		can be more expensive because the aircraft has to be
		sent up each time an image is taken.  A satellite has
		the advantage that it remains in orbit and can capture
		additional images with no additional cost~\cite{satelliteVSaerial}.

		Among the advantages of aerial imagery is the fact that
		it can be scheduled for a specific date.  A satellite
		image of a particular region can only be produced on
		the dates when the satellite happens to be passing
		over it.  In addition, aerial imagery often has much
		better resolution because it is taken much closer to
		the ground.  Aerial imagery can have resolutions as
		good as about 2 inches.  The best satellite imagery
		resolution is about 2.4 meters for CIR and about 0.6
		meters for panchromatic images~\cite{satelliteVSaerial}.

		\subsection{Types of Photography}

		In standard color photography, a camera is used that
		responds to light in a way similar to the way that the
		human eye responds to it.  Such a camera will show
		a scene just as we would see it with our own eyes.
		However, there are other ways to depict a scene~\cite{canadaCentreBooklet}.

		Another depiction commonly used in satellite imagery
		is CIR (Color Infrared) imagery, in which the green component
		is depicted as blue, the red is depicted as green, and
		near-infrared component is depicted as red.  The result is
		a {\em false color} photo which allows us to see the infrared
		energy emitted or reflected from objects as the amount
		of red in the image~\cite{canadaCentreBooklet}.  Figure~\ref{fig:falseColor} 
		shows a false color version of the true color image in Figure~\ref{fig:trueColor}.

		\begin{figure}
			\begin{center}
				\includegraphics[width=9cm]{images/trueColor.png}
			\end{center}
			\caption{True Color Image~\cite[page 45]{canadaCentreBooklet}.}
			\label{fig:trueColor}
		\end{figure}

		\begin{figure}
			\begin{center}
				\includegraphics[width=9cm]{images/falseColor.png}
			\end{center}
			\caption{False Color Image~\cite[page 45]{canadaCentreBooklet}.}
			\label{fig:falseColor}
		\end{figure}


		Images can also be shown in a panchromatic format.
		Originally, this term referred to standard black and
		white photography~\cite{panchromatic1}, where the brightness at any
		location in the image corresponds to the total combined
		visible-spectrum light energy detected by the camera at
		the corresponding location in the scene.  Currently, the
		term has a looser definition, applying to any imagery
		where a large portion of the visible spectrum and,
		possibly, some portion of non-visible spectra are taken
		together to produce a monochrome image.  For example, the
		IKONOS and QuickBird satellites each possess panchromatic
		cameras sensitive to light over nearly the entire visible
		spectrum plus the near infrared spectrum as well~\cite{panchromatic2}.

		Geographic images are often captured using multispectral
		scanners.  These are scanners that can be set to
		selectively respond only to a particular light spectrum,
		visible or invisible~\cite{canadaCentreBooklet}.  A multispectral scanner can
		repeatedly scan the same scene each time in a different
		spectrum.  The purpose is to detect selected features such as
		water or vegetation, which show up differently depending
		on the light spectrum.	Hyperspectral scanners are very
		advanced multispectral scanners, having the ability to
		select very narrow light spectra from the available range.
		This allows a particular feature within the scene to
		be identified more precisely than can be done with
		multispectral scanners~\cite{hyperspectral}.

		\subsection{LiDAR}

		A height map is a mapping in which an altitude value is
		associated with each spot on a two-dimensional surface.
		LiDAR, (Light Detection And Ranging) is a form of surface
		scanning in which a laser beam is used to produce such
		a height map~\cite{lidar2}.

		Aircraft-mounted equipment able to produce and detect
		laser beams is flown in a scanning pattern over the area
		of interest, and during the flight, the equipment projects
		laser beams toward the ground, measuring how long it takes
		for the reflections to return.	The equipment records
		the delay times, which it then uses, in conjunction
		with its own altitude and projection angle, to determine
		the altitude of whatever the laser beam struck~\cite{lidar1}.
		This process produces data in the form of a {\em point
		cloud}, a set of points in three-dimensional space, which
		can then be further processed into other formats that are
		easier to interpret~\cite{lidar3}.

		LiDAR data are commonly used in forestry to create maps
		of forest canopy height, a task which is difficult to
		accomplish by other means~\cite{lidar4}.  It is also used for
		mapping beaches and shorelines~\cite{lidar5}.  Other uses of
		LiDAR include, transportation planning, oil exploration,
		and mining~\cite{lidar3}.

		\subsection{Digital Elevation Models}

		A Digital Elevation Model (DEM) is a digital file
		containing the information for a height map of the ground~\cite{dem1}.
		They can be derived from LiDAR data or
		from ground survey data~\cite{dem5}.  Several different types of
		DEMs are produced by the United States Geological Survey
		(USGS).  These DEMs differ mainly in their coverage areas
		and data spacing, which is the horizontal distance between
		each consecutive height measurement~\cite{dem2}.  USGS produces
		DEMs in blocks of 7.5, 15, 30, and 60 minutes of latitude
		corresponding to a 7.5, 15, 30, and 60 nautical miles
		square, respectively.  DEMs are available with data
		spacing of 30m $\times$ 30m, and they are also available with
		spacings of  2$\times$2, 3$\times$3, 2$\times$3, and 1$\times$2 arc-seconds~\cite{dem3}.

		DEMs have a wide variety of applications including
		the modeling of water flow, creation of relief maps,
		rectification of aerial or satellite imagery, and
		rendering 3D visualizations~\cite{dem4}.

		A DSM (Digital Surface Model) is similar to a DEM except
		that it gives forest canopy elevation instead of ground
		elevation.  Similarly, a DCHM (Digital Canopy Height
		Model) is created by subtracting the DEM from the DSM
		to produce a height map of a forest canopy with no height
		variations resulting from variations in ground elevation~\cite{dchm}.

		\subsection{Vegetation Maps}\label{sec:vegMap}

		Data regarding the amount and types of vegetation present
		in a geographic area can be compiled and displayed
		as a map.  Such maps can be used for wildlife habitat
		assessment, resource management planning, and fire risk
		assessment and prioritization~\cite{vegMap2}.  Many
		vegetation maps are produced by LANDFIRE, a joint project
		of the U.S. Department of Agriculture Forest Service
		and U.S. Department of the Interior~\cite{vegMap1}.
		Vegetation maps can be produced using data from
		many different sources.  However, LANDFIRE relies
		heavily on remotely sensed data from the Landsat
		satellites~\cite{vegMap4}.  Three different LANDFIRE
		vegetation maps are shown, each having its
		own color scheme.  In Figure~\ref{fig:vegCover},
		the colors displayed correspond to the amount of
		vegetation coverage at each location on the map.  The darker green areas have
		greater tree coverage, and the lighter green areas have
		less coverage.  Other colors correspond to areas
		in which trees are not the dominant surface feature.
		In Figure~\ref{fig:vegType}, the colors displayed
		correspond to the specific type of vegetation dominant
		in each location, and in Figure~\ref{fig:vegHeight},
		the colors displayed correspond to the height range of
		vegetation dominant in each location.

		In addition, LANDFIRE has maps depicting several other
		forest metrics~\cite{vegMap3}.	These other metrics,
		such as canopy bulk density, canopy height, and canopy
		fuel weight, can be used, along with atmospheric and weather data,
		as inputs in fire simulation programs such as
		FARSITE, which is discussed in Section~\ref{sec:VFIRE}.

		\begin{figure}
			\begin{center}
				\includegraphics[width=12cm]{images/vegCover.png}
			\end{center}
			\caption{Vegetation Coverage of Kyle Canyon.}
			\label{fig:vegCover}
		\end{figure}

		\begin{figure}
			\begin{center}
				\includegraphics[width=12cm]{images/vegType.png}
			\end{center}
			\caption{Vegetation Types for Kyle Canyon.}
			\label{fig:vegType}
		\end{figure}




		\begin{figure}
			\begin{center}
				\includegraphics[width=12cm]{images/vegHeight.png}
			\end{center}
			\caption{Vegetation Heights for Kyle Canyon.}
			\label{fig:vegHeight}
		\end{figure}

		\subsection{GDAL}

		Geographic images are commonly stored as raster data
		files, and there exist many different raster file formats
		in which these data can be encoded.  Some common file
		formats include Arc/Info ASCII Grid, Arc/Info Binary
		Grid, and GeoTIFF~\cite{gdal1}.  With many different formats
		available, it is often helpful to use an abstraction
		library to allow access to the data without concern as to
		the particular file format used.  GDAL (Geospatial Data
		Abstraction Library) is such a library.  It allows data
		to be retrieved using the same generic access commands
		for many different file formats including the ones listed
		above~\cite{gdal2}.

		In addition to the raster data, itself, geographic images
		also have associated metadata.	For example, images of
		the Earth's surface are generally accompanied by longitude
		and latitude or some other georeferencing information to
		establish what part of the world they depict.  GDAL allows
		convenient access to this information as well.

	\section{Image Processing and Analysis}

	Image analysis can be defined as ``the process of describing
	or evaluating an image based on its parts, properties,
	or relationships,'' and image processing can be defined as
	``the manipulation of images by computer''~\cite{ieee610.4}.  From these two
	definitions, it is apparent that image analysis is the process by
	which we gain useful information from an image.  However, we may
	need to use techniques from image processing to manipulate the image in
	the course of acquiring this information.  Therefore, our purpose
	is image analysis, but our methods often involve image processing.

	Since images are stored as numeric arrays within a computer, image
	processing is, in practice, the manipulation of arrays of numbers
	within a computer.  As shown in Figure~\ref{fig:imProc}, an array containing
	a matrix ${\bf X}$, representing the input image, is transformed by
	some process into the output image represented by matrix ${\bf Y}$,
	which may or may not have the same dimensions as the input.

		\begin{figure}[h]
			\begin{center}
				\includegraphics[width=9cm]{images/imageProcessing.png}
			\end{center}
			\caption{Generalization of Image Processing.}
			\label{fig:imProc}
		\end{figure}

	A great variety of methods to manipulate numeric arrays has
	been developed for the purpose of image processing, and there
	are several ways in which these methods can be categorized.
	For example, they can be divided into Fuzzy Logic or Discrete
	Logic methods.	Alternatively, they can be divided into
	spatial-domain or frequency-domain methods.  However, one of
	the most commonly used categorizations is to divide them into
	{\em point operations} and {\em neighborhood} operations.

		\subsection{Point Operations}

		Point operations are methods of manipulating numeric
		arrays such that each element in the output array is a
		function of the corresponding element in the input array~\cite{ieee610.4}.
		The value of each output element does not depend
		on any of the elements surrounding the corresponding
		input element.	Equation~\ref{eq:generalPointOps} gives the general form of a
		point operation.
		\begin{equation}
			y_{i,j}=f(x_{i, j})
			\label{eq:generalPointOps}
		\end{equation}	

		Point operations generally possess a greater degree
		of speed and simplicity than neighborhood operations.
		However, point operations are not always straightforward.
		They can be arbitrarily complex, depending on the
		complexity of the function $f$.  A good example of a point
		operation is the process of changing the brightness of
		an image.  Equation~\ref{eq:brighter} shows how this might be done.
		\begin{equation}
			y_{i,j} = f(x_{i,j}) = \left\{ 
				\begin{array}{ll}
				x_{i,j}+50	~~~~~        {\rm if}~x_{i,j} \leq 205 \\
				255			~~~~~~~~~~~~ {\rm  otherwise}
				\end{array}
				\right.
			\label{eq:brighter}
		\end{equation}	

		Equation~\ref{eq:brighter} assumes an array of 8-bit
		numbers comprising either a monochrome image or the
		brightness component of a color image.	The output image
		is constructed such that each output element is fifty
		units brighter than its corresponding input.  If the input
		value is greater than 205, the output value is clipped at
		255 because this value corresponds to the color white and
		white is the brightest that any pixel can be.  Figure~\ref{fig:afterBrighten} shows the input image
		of Figure~\ref{fig:unprocessedImage}, noticeably brighter
		after the application of Equation~\ref{eq:brighter}.

		\begin{figure}
			\begin{center}
				\includegraphics[width=12cm]{images/originalColorImage.png}
			\end{center}
			\caption{Unprocessed Image.}
			\label{fig:unprocessedImage}
		\end{figure}

		\begin{figure}
			\begin{center}
				\includegraphics[width=12cm]{images/50UnitsBrighter.png}
			\end{center}
			\caption{Brighter Image.}
			\label{fig:afterBrighten}
		\end{figure}

		\subsection{Neighborhood Operations}

		Neighborhood operations are methods of manipulating
		numeric arrays such that each element in the output
		array is a function of a neighborhood  of elements
		near the corresponding element in the input array~\cite{ieee610.4}.
		These operations are inherently more complex than
		point operations, and they generally require more time
		to execute.    However, this added difficulty is often
		unavoidable because there are many tasks that cannot
		be done with point operations alone.  The advantage
		of neighborhood operations is that more information
		goes into the calculation of each output element, and
		a greater range of processes can therefore be implemented.

		If we assume ${\bf X}_{i, j}$  to be a submatrix of ${\bf X}$, where $i$ and $j$
		are indices into ${\bf X}$, as shown in Figure~\ref{fig:inputMatrixExample}, then Equation~\ref{eq:generalNeighborhoodOps}
		shows the general form of a neighborhood operation.
		\begin{equation}
				y_{i, j}=f({\bf X}_{i, j})
			\label{eq:generalNeighborhoodOps}
		\end{equation}	

		For simplicity, a $3 \times 3$ submatrix is shown in Figure~\ref{fig:inputMatrixExample}.
		In practice, however, the submatrix can be of any desired
		dimensions, and the input element corresponding to the
		output element need not be at the center of the submatrix.
	
		\begin{figure}[h]
		\begin{center}
		\begin{tabular}{|c|c|c|}\hline
		$X_{i-1,j-1}$ & $X_{i-1,j} $ & $X_{i-1,j+1}$ \\ \hline
		$X_{i,j-1}$   & $X_{i,j} $   & $X_{i,j+1}$ \\ \hline
		$X_{i+1,j-1}$ & $X_{i+1,j}$  & $X_{i+1,j+1}$ \\ \hline
		\end{tabular}
		\end{center}
		\caption{Example of input submatrix} \label{fig:inputMatrixExample}
		\end{figure}

		We see from Equation~\ref{eq:generalNeighborhoodOps} that the entire neighborhood of
		elements near the input element goes into the calculation
		of each output element.  This process is done for every
		index pair $(i, j)$ for which ${\bf X}_{i,j}$ is defined.	 The function, $f$, is commonly
		written such that each output
		element will be a weighted sum of the elements in the
		input neighborhood, as shown in Equation~\ref{eq:linearCombination},
		where the $h_{m, n}$ coefficients are the weights specified in the function.  
		\begin{equation}	
			y_{i,j} = f({\bf X}_{i,j}) = \sum_{m=0}^{2} \sum_{n=0}^{2} x_{i+m-1,j+n-1} \times h_{m,n}
		\label{eq:linearCombination}
		\end{equation}

		A problem often occurs when attempting to process
		the elements along the edges of the image matrix.
		Depending on the dimensions of the submatrix, some portion of the
		neighborhood may lie outside the image matrix for input
		elements near the edge of the image.  This problem can be
		overcome either by ignoring the edge elements, resulting
		in a smaller output image, or by padding the input image
		with a perimeter of extra elements.  In the latter case,
		the values contained in the padding elements should be
		chosen to minimize their effect on the output values,
		though some effect may be unavoidable.

		Equation~\ref{eq:linearCombination} can be
		rewritten by taking the $h_{m, n}$ coefficients
		out of the function definition and putting
		them into an argument to the function.	In this
		case, Equation~\ref{eq:linearCombination} becomes
		Equation~\ref{eq:dotProduct}, and the function $f$ is
		reduced to merely taking the dot product of two matrices
		for each output element~\cite{dotProductMatrices}, where
		$ {\bf H} $ is the matrix of weights, a constant matrix
		having the same dimensions as submatrix $ {\bf X}_{i,j} $.
		\begin{equation}	
			 y_{i, j} = f({\bf X}_{i, j}, {\bf H}) = {\bf X}_{i, j} \cdot {\bf H}
		\label{eq:dotProduct}
		\end{equation}


		In addition, if we think of the input image and the
		matrix of weights as discrete-domain functions of
		$(i, j)$, the function $f$ becomes almost equivalent to a
		two-dimensional convolution function, commonly denoted
		with an asterisk as in Equation~\ref{eq:convolution}.
		\begin{equation}	
			y(i, j) = x(i, j) * h(i, j)
		\label{eq:convolution}
		\end{equation}


		The major difference between a two-dimensional convolution
		and an array of matrix dot products is that the convolution
		process effectively flips $h$ as if it were a function $ (-i,
		-j) $ instead of $ (i, j) $ before multiplying and summing.
		However, this has no effect as long as the matrix of
		weights is symmetric about the center.

		Several different terms are commonly used to refer to the ${\bf H}$ matrix.
		Such terms include {\em filter, filter mask, convolution mask,} and {\em convolution matrix}.

		A good example of a neighborhood operation is the process
		of bluring an image.  Figure~\ref{fig:blurFilter} shows a simple filter mask that
		could be used for this purpose.

		\begin{figure}
			\begin{center}
				\includegraphics[width=3cm]{images/blurFilter.png}
			\end{center}
			\caption{A Blur Filter.}
			\label{fig:blurFilter}
		\end{figure}

		The output image is constructed such that each output
		element is the mean average of the input element and
		its eight surrounding elements.  The filter mask used in
		this example is commonly referred to as a {\em blur filter}.
		Figure~\ref{fig:afterBlur} shows the input image of Figure~\ref{fig:unprocessedImage}
		after three applications of the blur filter.
 
%		\begin{figure}
%			\begin{center}
%				\includegraphics[width=12cm]{images/originalColorImage.png}
%			\end{center}
%			\caption{Unprocessed Image.}
%			\label{fig:unprocessedImage}
%		\end{figure}

		\begin{figure}[h]
			\begin{center}
				\includegraphics[width=12cm]{images/blurredThrice.png}
			\end{center}
			\caption{Blurred Image.}
			\label{fig:afterBlur}
		\end{figure}

		\subsection{Image Segmentation}

		Image segmentation can be defined as ``the process
		of dividing an image into regions''~\cite{ieee610.4}.  Since any
		region within an image is merely a group of pixels,
		the process of image segmentation can be thought of
		as a grouping problem.	It is the process of grouping
		image pixels according to the objects they represent.
		For example, in a landscape image, there will be a
		group of pixels representing one particular tree,
		another group of pixels representing another tree,
		and so on.	  In addition, there will be a group of
		pixels representing the ground and another group of pixels
		representing the sky.  Therefore, each object depicted
		in the image is represented by a particular pixel group, and
		it is the purpose of image segmentation to put each pixel into its correct group, though
		it may not be known, initially, exactly what those groups represent.
		That determination is generally left to be made in a
		subsequent stage of processing~\cite{interactiveImageAnalysisTools}.

		In most cases, the purpose of image segmentation is
		to divide the image into regions so that the objects
		being represented by those regions can be correctly
		identified.  In practice, however, image
		segmentation can be a very difficult task for computers
		to accurately perform automatically.  As a result, many
		software tools have been developed that allow a human
		user to assist the computer in the segmentation process, but
		whether a system is automatic or interactive, two of the most
		commonly used segmentation algoritms are {\em thresholding} and {\em edge detection}~\cite{thresholdingOrEdgeDetection}.

		\subsection{Image Thresholding}

		Thresholding methods assign each pixel to a particular group
		based on its gray level or color.  Image thresholding
		is so named because it requires one or more thresholds
		to be established.  Once the thresholds have been
		established, all pixels that lie between the same two thresholds
		(or on the same side of the threshold, if there is only one) are assigned to the same pixel group.
		There are many different ways to threshold an image,
		but thresholding methods can be broadly considered to
		fall into two categories.  There is {\em global thresholding},
		in which a single set of thresholds is applied to the
		entire image, and there is {\em local thresholding}, in which
		the image is divided into subregions and each subregion
		has its own set of thresholds.	  The image segmentations
		produced by local thresholds are generally more accurate
		than those produced by global thresholds, but in either
		case, the accuracy is strongly dependent on the particular
		choice of threshold values.  Although thresholding can be
		used on color images, the effect is often easier to see
		in monochrome images.  Figure~\ref{fig:afterThreshold}
		shows the image of Figure~\ref{fig:beforeThreshold}
		after applying a global threshold of 50.  All pixels
		darker than 50 are set to zero (black), and all pixels
		equal to or brighter than 50 are set to 255 (white).

		\begin{figure}[h]
			\begin{center}
				\includegraphics[width=12cm]{images/originalBlackAndWhiteImage.png}
			\end{center}
			\caption{Unprocessed Gray-Scale Image.}
			\label{fig:beforeThreshold}
		\end{figure}

		\begin{figure}
			\begin{center}
				\includegraphics[width=12cm]{images/thresholdedAt50.png}
			\end{center}
			\caption{Image After Applying Threshold of 50.}
			\label{fig:afterThreshold}
		\end{figure}

		\subsection{Edge Detection}

		Edge detection is the process of highlighting the
		boundaries between regions of an image.  There are
		many different types and qualities of edge detection.
		In general, edge detection is accomplished by
		filtering an image with an edge-detection filter.
		One of the difficulties of edge detection is that the
		region representing a particular object may, itself,
		contain many edges and these edges may be highlighted as if they
		delineated separate objects.  To overcome this problem, a
		{\em scale-space} representation is often used in the process
		of edge detection.  In a scale-space representation
		of an image, some of the fine detail has been removed,
		preventing such details from producing any highlighted
		edges in the edge-detection stage.  The removal of detail
		is commonly done by filtering the image with a Gaussian
		blur filter, which is derived from the Gaussian probability
		density function shown in Equation~\ref{eq:gaussianProbability}.
		\begin{equation}
			G(x)=\frac{1}{\sqrt{2\pi}\sigma}e^{\frac{-(x-\mu)^2}{2\sigma^2}}
			\label{eq:gaussianProbability}
		\end{equation}	

		The value of sigma specifies the strength of the filter.
		A greater value of sigma corresponds to a greater loss
		of image detail.  The reason for the use of a Gaussian
		filter is that a Gaussian filter will reduce the existing
		detail in an image without introducing any extraneous
		detail which may occur with other filters.  Figure~\ref{fig:scaleSpace} shows a
		conceptualization of scale space, where $f$ is a function
		of $x$, and the large variations in $f(x)$ diminish as
		sigma increases~\cite{guidedTourCV}.

		\begin{figure}
			\begin{center}
				\includegraphics[width=9cm]{images/scaleSpace.png}
			\end{center}
			\caption{Conceptualization of Scale-Space~\cite{guidedTourCV}.}
			\label{fig:scaleSpace}
		\end{figure}

		A common type of scale-space edge detection filter is
		the Laplacian of Gaussian (LoG) filter.  It combines
		a Gaussian blur filter with a Laplacian edge detection
		filter to produce an edge-highlighted image at whatever
		level of detail is specified in the parameter sigma.
		Figure~\ref{fig:LoG} shows an image after processed with
		a LoG filter using three different values of $\sigma$~\cite{LoGfilter}.

		\begin{figure}
			\begin{center}
				\includegraphics[width=12cm]{images/LoG.png}
			\end{center}
			\caption{LoG Scale-Space Edge Detection at Different Values of Sigma~\cite{LoGfilter}.}
			\label{fig:LoG}
		\end{figure}

		Once the image has been segmented by whatever method,
		the next stage of analysis can begin.
		Often, this will be the process of identifying what each segmented
		region of the image actually represents.

		\subsection{Template Matching}

		Another image processing method that can be used as the
		initial step in an image analysis procedure is {\em template
		matching}.  This method can be used when the appearance
		of an object is already known, but  its location within
		an image needs to be determined.  Template matching
		is a filtering process in which the filter mask is,
		itself, an image of the object that needs to be found.
		The filter mask is referred to as a {\em template}, and the
		output of the process is a {\em correlation image} containing
		a bright spot (or dark spot, depending on the algorithm)
		where the object is located.  A second stage of processing
		searches the correlation image for bright spots to locate
		the object.  If there is more than one instance of the
		object in the source image, each instance will have
		an associated bright spot in the correlation image, and 
		the object will be identified once for each such spot.
		The objects in the image do not need to match the template
		perfectly.  Closer matches produce brighter bright spots, and
		the algorithm can be tuned to accept any bright spots exceeding the brightness threshold
		established for the given application.

	\section{Virtual Reality}

	Virtual Reality can be defined as ``the use of computer
	modeling and simulation that enables a person to interact with
	an artificial three-dimensional (3-D) visual or other sensory
	environment''~\cite{vr1}.  As this definition indicates, virtual
	reality is not just visual.  Technologies exist to provide virtual
	reality displays for other senses as well.  However, virtual
	reality is most commonly associated with the computer graphics
	technologies used to create artificial 3D visual environments.
	In addition, virtual reality systems often include specialized
	input and output devices, designed specifically for that purpose.

	To determine whether a particular technology or experience
	qualifies as virtual reality, four things need to be considered.
	A virtual reality experience must include a virtual world,
	immersion, sensory feedback, and interactivity.  A virtual
	world is ``a description of a collection of objects in a space
	and the rules and relationships governing those objects''~\cite{understandingVR}.
	Immersion is a state of mind in which the artificial
	environment is perceived as if it were real.  The user has the
	perception of being inside the artificial world.  This can be
	accomplished through strong mental engagement in a fictitious
	reality or physically by connecting one or more senses to an
	artificial reality system~\cite{understandingVR}.  Sensory feedback is the sensory
	input that a person receives in response to his or her actions
	within an environment~\cite{understandingVR}.  For example, in the physical environment, if a
	person touches an object, that person will feel what he or she
	is touching.  This particular form of sensory feedback is known
	as {\em haptic} feedback.  Similarly, if a person turns his or her
	head, the scene that he or she sees will change in response~\cite{understandingVR}.
	This is a form of visual feedback.  Interactivity is the ability
	of objects in the environment to be affected by actions of the
	user~\cite{understandingVR}.  For example, when a person exerts a sufficient force
	on an object in the physical environment, it begins to move in
	response.  Therefore, the physical environment would be considered
	interactive.  Video games are also interactive	because objects
	within the game can be moved, destroyed or otherwise affected by
	actions of the user.  Similarly, a 3D graphical virtual world
	is interactive if it contains objects that can be moved or in
	some other way affected by the actions of the user~\cite{understandingVR}.

		\subsection{Visual Depth Cues}

		It is common for virtual reality display devices to
		have the ability to produce the same visual cues that
		we receive from the physical world.  These cues give us
		an impression of the size, proximity, rate of motion,
		and relative position of the objects we see.

		Standard video displays are {\em monoscopic}, meaning that
		they display only one video stream at a time and both
		of the viewer’s eyes receive exactly the same image.
		Some visual cues such as interposition, size, linear
		perspective, and motion parallax can readily be produced
		by standard video display devices~\cite{understandingVR}.  Interposition is
		the situation in which our view of an object is partially
		occluded by another, letting us know that the object
		blocking our view must be closer~\cite{understandingVR}.	Size is a visual
		cue because objects appear smaller as they move away
		and larger as they come closer.  Linear perspective
		is a cue that takes advantage of the linear path that
		objects appear to follow as they move closer to us or
		further away.  Motion Parallax refers to the fact that,
		as we move, distant objects appear to be moving slowly and
		close objects appear to be moving fast~\cite{understandingVR}.  Figure~\ref{fig:parallax}
		shows the way changing position can affect depth cues.

		\begin{figure}
			\begin{center}
				\includegraphics[width=12cm]{images/parallax.png}
			\end{center}
			\caption{Effect of Perspective on Virtual Reality Display~\cite[page 120]{understandingVR}.}
			\label{fig:parallax}
		\end{figure}

		Video display devices designed for use in virtual reality
		applications often provide a {\em stereoscopic} display, meaning
		that they display two different multiplexed video streams
		and that each of the viewer’s eyes receives only one of
		those video images.  Each video image depicts the same
		scene from a slightly different perspective, simulating
		the human visual system in which the brain receives two
		slightly different images of the same scene, one image
		from each eye.	The eyes must turn toward each other to
		force the differing images to coincide, and the brain
		estimates the distance to the object being observed from
		the amount by which the eyes are deflected toward each
		other.	This form of depth perception is similarly induced
		by the differing images produced by stereoscopic displays.

		\subsection{Video Display Devices}

		With the addition of some virtual-reality graphics
		hardware to provide stereoscopic display and other VR
		capabilities, an ordinary desktop computer can be used as
		a virtual reality system.  This is often referred to as a
		{\em fishtank} VR system~\cite{understandingVR}.  Such systems have the advantage
		of being relatively inexpensive, but their small screens
		and stationary placement make them very limited compared
		to the other VR systems in common use~\cite{understandingVR}.

		Projection-based displays are usually much larger than
		fishtank system displays.  They are stationary like
		fishtank systems, but because their screens are so much
		larger, they fill the user's field of view more fully.
		In addition, large projection-based displays have been
		constructed with multiple screens, each acting as 
		one side of a partial or complete cube, large enough for
		people to walk inside.	A three-sided projector system
		is shown in Figure~\ref{fig:3sidedProjector}.

		\begin{figure}
			\begin{center}
				\includegraphics[width=12cm]{images/3sidedProjectionDisplay.png}
			\end{center}
			\caption{A Three-Sided Projector System~\cite{penicksThesis}.}
			\label{fig:3sidedProjector}
		\end{figure}

		Another type of VR display is the Head Mounted Display
		(HMD), which is worn on the head as shown in Figure~\ref{fig:hmd}.
		Head Mounted Displays are significantly less expensive
		than large projection displays, and they usually  have a
		better field of regard (FOR).  The FOR is the percentage
		of all possible directions in which the user can orient
		his or her head without looking away from the VR display.
		The three-sided projection display in Figure~\ref{fig:3sidedProjector} would
		be expected to have an FOR of fifty percent because
		the area covered by the two side projector screens and
		the floor projector screen is equal to the area left
		vacant by the open ceiling and two remaining open sides.	An HMD,
		on the other hand, would be expected to have an FOR of
		one-hundred percent.

		\begin{figure}
			\begin{center}
				\includegraphics[width=12cm]{images/hmd.png}
			\end{center}
			\caption{A Head Mounted Display~\cite[page 14]{understandingVR}.}
			\label{fig:hmd}
		\end{figure}

		Although the FOR of an HMD is usually better than that
		of a multi-sided projector display, the multi-sided
		projector display usually has a wider field of view
		(FOV).	The field of view is the angle associated with
		the user's viewing cone.  A wider FOV means that the
		user can see more of the surrounding scene at one time.
		In addition, projection displays do not cause the
		unpleasant disorientation effects sometimes associated
		with HMDs.  Finally, projection displays have the
		advantage that more than one person can view the same
		display at the same time.

		\subsection{Virtual Reality Input Devices}

		To allow the user to interact with the virtual world, it
		is necessary to use input devices to let the VR system
		know where the user is and what the user is doing.
		Among the most commonly used input devices are those
		used for head tracking.  For VR projection displays,
		it is necessary to know the location and orientation
		of the user's head.  This allows the system to give the
		correct view of the scene at the correct angle of view.
		Head tracking can be done using stationary sensors that
		communicate with a tracking device worn on the user's
		head.  The communication link may be radio, optical,
		or even acoustic~\cite{understandingVR}.	Figure~\ref{fig:goggles} shows a head tracking
		device incorporated into a pair of stereoscopic goggles.
		The goggles work in concert with the stereoscopic display
		by alternately shuttering the view for each eye at the
		instant when a video frame intended for the other eye is
		being displayed.  In this way, each eye receives only its
		intended video stream, and the user is unaware of the
		shuttering because it is too rapid to be perceptible.
		Incorporating the tracking device into the pair of
		goggles allows them to perform two tasks at once.

		Another commonly used input device is the wand.
		The location and orientation of the wand can be tracked
		just like the goggles, and the wand can be used as a 3D
		mouse pointer, with buttons to initiate actions as would
		be found on a conventional mouse.  Figure~\ref{fig:wand} shows a
		wand used for input in a projection display VR system.
 
		\begin{figure}
			\begin{center}
				\includegraphics[width=12cm]{images/goggles.png}
			\end{center}
			\caption{A Pair of Head Tracking, Active Stereo Goggles~\cite{intersense}.}
			\label{fig:goggles}
		\end{figure}

		\begin{figure}
			\begin{center}
				\includegraphics[width=12cm]{images/wand.png}
			\end{center}
			\caption{A Virtual Reality Wand~\cite{intersense}.}
			\label{fig:wand}
		\end{figure}

		A multi-sided projection system along with its associated
		tracking and other input devices together form a system
		known as a CAVE (Cave Automatic Virtual Environment).
		CAVEs are often described in terms of the number
		of projector screens they possess.  For example, a
		four-sided CAVE would compose two-thirds of a complete
		cube and would have an FOR of about sixty-seven percent.
		Similarly, a six-sided CAVE would form a complete cube
		and would have an FOR of one-hundred percent.

	\section{VFIRE}\label{sec:VFIRE}

	VFIRE is an application that uses virtual reality technology to
	allow a user to be immersed in an artificial environment where
	real or fictitious wildfire scenarios can be visualized.
	Unless otherwise noted, the material from this section is based upon the
	material in~\cite{penicksThesis}.
	The purpose of these simulations is to provide useful information
	about fire spread in a particular region under various wind,
	humidity, and other environmental conditions.

	Given that wildfires occur suddenly, without warning, and that the
	ways in which they spread are difficult to accurately predict, it
	is not surprising that a great deal of money and effort have been
	spent to develop mathematical models of wildfire spread patterns.
	However, only minimal resources have been applied to the purpose
	of visualizing simulations of these fire models.

	Determining the accuracy of existing wildfire spread models is
	difficult, short of actually starting a wildfire to see if it
	burns as predicted by the model.  Wildfire visualizations can
	be very useful for this  purpose by comparing the computer
	visualization to video recordings of an actual fire.
	In addition, the visualizations can be used as a training tool
	for firefighters.  Figure~\ref{fig:visualizationInProgress} shows a VFIRE visualization
	in progress.

		\begin{figure}
			\begin{center}
				\includegraphics[width=12cm]{images/visualizationInProgress.png}
			\end{center}
			\caption{Fire Visualization in Progress~\cite{penicksThesis}.}
			\label{fig:visualizationInProgress}
		\end{figure}

	VFIRE allows the user to travel throughout the entire area,
	either at ground level or flying above, observing the fire as
	it progresses.  VFIRE also allows the user to go backward
	or forward in time, reversing or advancing the progress of the
	fire accordingly.  Figure~\ref{fig:interactingWithVFIRE} shows a user interacting with the
	fire visualization.

		\begin{figure}
			\begin{center}
				\includegraphics[width=12cm]{images/userUsingVFIRE.png}
			\end{center}
			\caption{User Interacting with VFIRE Visualization~\cite{penicksThesis}.}
			\label{fig:interactingWithVFIRE}
		\end{figure}


	VFIRE uses a virtual reality toolkit called FreeVR, created by
	William R. Sherman~\cite{freevr}.  A virtual reality toolkit is essential
	in VR applications because it allows the computer to communicate
	with specialized VR hardware, not supported by most operating
	systems or graphics libraries.

	Presently, VFIRE depicts wildfires using fire-spread simulation
	output data created by FARSITE.  FARSITE is a fire behavior
	and growth simulator application designed to be used by wildland
	fire planners and managers~\cite{farsite}.  The FARSITE simulation output
	data contains six parameters of concern to VFIRE.  However,
	the primary parameter is the time of arrival (TOA).  The TOA
	data is a grid of numbers, each representing the time of day
	when the associated region (cell) of the terrain caught fire in
	the simulation.  When the visualization time reaches or exceeds
	the time of arrival for any particular cell, VFIRE shows that cell
	catching fire.	VFIRE shows the fire, the smoke, and eventually,
	the residual burnt vegetation.

	Currently, VFIRE selects the location of each tree in the
	visualization randomly.  Upon completion of this project,
	the arrangement of trees should more accurately reflect their
	positions in the real environment.

	\section{Related Work}

	It is often desirable to have knowledge of the locations,
	types, and sizes of trees in a particular area.  For example,
	plantation managers may need to have accurate counts of their
	inventories in order to plan for their harvest activities.
	Forestry officials often require information about the ages,
	densities and types of trees in forested areas in order to assess
	the health of the forests and identify ongoing trends that may or
	may not be desirable.  Similarly, it may be useful to know how
	much wood is available for harvesting in a particular area and,
	potentially, how much is available for combustion in the event
	of a fire.  For these reasons, significant effort has been made
	to find fast and inexpensive ways of obtaining such data.

	LiDAR data are not available in this project, and an examination
	of the techniques applied to LiDAR  show relatively little
	applicability.	In one instance, an effort was made to
	distinguish individual trees within a set of LiDAR data by
	clustering the point cloud in all three spatial dimensions~\cite{morsdorf}.
	In any area where the space between trees is sufficiently large,
	this algorithm could be expected to accurately locate individual
	trees.	A similar approach could conceivably be applied to the
	photographic images available in this project by treating the
	brightness values as if they were height values in the LiDAR
	data.  Using this approach, however, would likely result in a
	high rate of false positive errors because brightness clusters
	may be produced by a variety of surface features besides trees,
	and without the height information contained in the LiDAR data,
	these false clusters would be indistinguishable from legitimate
	tree clusters.	Similar limitations could be expected when trying
	to apply any LiDAR technique directly to photographic data.

	Most of the algorithms that determine the locations of trees in
	photographic imagery do so by locating local maxima of	the pixel
	values in the image~\cite{pouliot}.  A method of doing this was shown in~\cite{culvenor},
	where a photographic image of a forested area is searched
	vertically, horizontally, and along both diagonals to find
	local maxima occurring in any of eight directions.  One of the
	difficulties that occurs in using this method is that a single
	tree can produce more than one local maximum, resulting in two
	or more trees being detected where only one tree actually exists.

	Various approaches have been developed to prevent such multiple
	detection.  One such method is to apply a scale-space filter to
	the entire image and then extract the individual tree locations
	using a sophisticated thresholding technique~\cite{dralle}.  In another
	approach, a scale-space filter is applied to the entire image
	and the individual tree locations are extracted by applying an
	edge-detection filter to  reveal the curved edges enclosing the
	tree crowns.  Analysis of the curvature of those edges produces
	the locations of likely trees~\cite{brandtberg}.  In yet another method,
	a window is moved over the image in a scanning pattern and,
	at every location, the maximum pixel value inside the window is
	taken to be the local maximum for that region~\cite{wulder,pouliot}.

	The methods described in~\cite{brandtberg}, \cite{wulder}, and \cite{pouliot}, all benefit from
	the use of multispectral imagery.  The different color bands
	in a multispectral image can be mixed in specific ways to allow
	certain types of material to appear brighter than others, allowing
	the image to be optimized for use in a particular algorithm.

	In addition, all the methods described above use image data
	under constraints that can be exploited by the algorithm.
	For example,~\cite{dralle} uses aerial images of ``even-aged homogeneous
	stands of Norway spruce.''   The other methods cited above
	also benefit from a relatively homogeneous scene in which there
	is scarcely anything to be detected except the desired trees.
	Such visual similarity among the items to be detected greatly
	improves accuracy, and the methods cited above work well under
	those constraints.

	In this project, however, the algorithm must be able to locate
	trees in images where no such constraints are assumed to exist and
	where multispectral imagery may not be available.  The research
	done in~\cite{larsen} comes closer to this goal through the use of
	template matching.  In this instance, a set of tree templates
	was created from a ray-traced, three-dimensional model based
	on an image of a Norway spruce forest.	The image was filtered
	with the template, producing a correlation image that could be
	scanned for local maxima.  This method produces good results
	as long as most of the trees in the image match the template
	reasonably well.  This project also uses template matching,
	but the templates can be produced more quickly and easily,
	meaning that a template can readily be created for each group of
	similar-looking trees in an image.  As a result, this project can
	be used as a stand-alone program to locate trees in a wide variety
	of images containing multiple groups of groupwise-uniform trees.
	The only preparation needed is to place the vegetation map data
	into the program in cases where a vegetation map is necessary.

	There does exist image analysis software that can perform template
	matching~\cite{connolly}.  However, these
	software packages would not be expected to list tree locations
	in georeferenced coordinates nor assist the user by integrating
	vegetation map information into the image display.  Finally, this project
	has the ability to make tree placements based on vegetation map
	data alone in cases where photographic imagery is not available.
