<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE document PUBLIC "-//CNX//DTD CNXML 0.5 plus MathML//EN" "http://cnx.rice.edu/cnxml/0.5/DTD/cnxml_mathml.dtd">
<document xmlns="http://cnx.rice.edu/cnxml" xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="m10987">
  <name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">2D DFT</name>
  <metadata xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
  <md:version xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">2.3</md:version>
  <md:created xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">2003/01/02</md:created>
  <md:revised xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">2003/03/11</md:revised>
  <md:authorlist xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
      <md:author xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="nowak">
      <md:firstname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Rob</md:firstname>
      <md:othername xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">"The Kid"</md:othername>
      <md:surname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Nowak</md:surname>
      <md:email xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">nowak@rice.edu</md:email>
    </md:author>
  </md:authorlist>

  <md:maintainerlist xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
    <md:maintainer xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="mjhaag">
      <md:firstname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Michael</md:firstname>
      
      <md:surname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Haag</md:surname>
      <md:email xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">mjhaag@rice.edu</md:email>
    </md:maintainer>
    <md:maintainer xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="nowak">
      <md:firstname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Rob</md:firstname>
      <md:othername xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">"The Kid"</md:othername>
      <md:surname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Nowak</md:surname>
      <md:email xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">nowak@rice.edu</md:email>
    </md:maintainer>
  </md:maintainerlist>
  
  <md:keywordlist xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
    <md:keyword xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">2D-DFT</md:keyword>
    <md:keyword xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">convolution</md:keyword>
    <md:keyword xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">DFT</md:keyword>
    <md:keyword xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">FFT</md:keyword>
    <md:keyword xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">image</md:keyword>
    <md:keyword xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">image processing</md:keyword>
    <md:keyword xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">two-dimensional dft</md:keyword>
  </md:keywordlist>

  <md:abstract xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">This module extends the ideas of the Discrete Fourier Transform (DFT) into two-dimensions, which is necessary for any image processing.</md:abstract>
</metadata>

  <content xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
    <section xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="sec1">
      <name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">2D DFT</name>
      
      <!-- add link to image restoration below -->

      <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="p1">
	To perform image restoration (and many other useful image
	processing algorithms) in a computer, we need a Fourier
	Transform (FT) that is discrete and two-dimensional.

	<equation xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="eq1">
	  <m:math>
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:ci type="fn" class="discrete">F</m:ci>
		<m:ci>k</m:ci>
		<m:ci>l</m:ci>
	      </m:apply>
	      <m:apply>
		<m:csymbol definitionURL="http://cnx.rice.edu/cd/cnxmath.ocd#evaluateat"/>
		<m:condition>
		  <m:apply>
		    <m:eq/>
		    <m:ci>u</m:ci>
		    <m:apply>
		      <m:divide/>
		      <m:apply>
			<m:times/>
			<m:cn>2</m:cn>
			<m:pi/>
			<m:ci>k</m:ci>
		      </m:apply>
		      <m:ci>N</m:ci>
		    </m:apply>
		  </m:apply>
		</m:condition>
		<m:condition>
		  <m:apply>
		    <m:eq/>
		    <m:ci>v</m:ci>
		    <m:apply>
		      <m:divide/>
		      <m:apply>
			<m:times/>
			<m:cn>2</m:cn>
			<m:pi/>
			<m:ci>l</m:ci>
		      </m:apply>
		      <m:ci>N</m:ci>
		    </m:apply>
		  </m:apply>
		</m:condition>
		<m:apply>
		  <m:ci type="fn">F</m:ci>
		  <m:ci>u</m:ci>
		  <m:ci>v</m:ci>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:math>
	</equation>
	
	for 
	<m:math>
	  <m:apply>
	    <m:eq/>
	    <m:ci>k</m:ci>
	    <m:set>
	      <m:cn>0</m:cn>
	      <m:ci>…</m:ci>
	      <m:apply>
		<m:minus/>
		<m:ci>N</m:ci>
		<m:cn>1</m:cn>
	      </m:apply>
	    </m:set>
	  </m:apply>
	</m:math> and 
	<m:math>
	  <m:apply>
	    <m:eq/>
	    <m:ci>l</m:ci>
	    <m:set>
	      <m:cn>0</m:cn>
	      <m:ci>…</m:ci>
	      <m:apply>
		<m:minus/>
		<m:ci>N</m:ci>
		<m:cn>1</m:cn>
	      </m:apply>
	    </m:set>
	  </m:apply>
	</m:math>.
	
	<equation xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="eq2">
	  <m:math>
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:ci type="fn">F</m:ci>
		<m:ci>u</m:ci>
		<m:ci>v</m:ci>
	      </m:apply>
	      <m:apply>
		<m:sum/>
		<m:domainofapplication>
		  <m:ci>m</m:ci>
		</m:domainofapplication>
		<m:apply>
		  <m:sum/>
		  <m:domainofapplication>
		    <m:ci>n</m:ci>
		  </m:domainofapplication>
		  <m:apply>
		    <m:times/>
		    <m:apply>
		      <m:ci type="fn" class="discrete">f</m:ci>
		      <m:ci>m</m:ci>
		      <m:ci>n</m:ci>
		    </m:apply>
		    <m:apply>
		      <m:exp/>
		      <m:apply>
			<m:minus/>
			<m:apply>
			  <m:times/>
			  <m:imaginaryi/>
			  <m:ci>u</m:ci>
			  <m:ci>m</m:ci>
			</m:apply>
		      </m:apply>
		    </m:apply>
		    <m:apply>
		      <m:exp/>
		      <m:apply>
			<m:minus/>
			<m:apply>
			  <m:times/>
			  <m:imaginaryi/>
			  <m:ci>v</m:ci>
			  <m:ci>m</m:ci>
			</m:apply>
		      </m:apply>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:math>
	</equation>

	<equation xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="eq3">
	  <m:math>
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:ci type="fn" class="discrete">F</m:ci>
		<m:ci>k</m:ci>
		<m:ci>l</m:ci>
	      </m:apply>
	      <m:apply>
		<m:sum/>
		<m:bvar><m:ci>m</m:ci></m:bvar>
		<m:uplimit>
		  <m:apply>
		    <m:minus/>
		    <m:ci>N</m:ci>
		    <m:cn>1</m:cn>
		  </m:apply>
		</m:uplimit>
		<m:lowlimit>
		  <m:cn>0</m:cn>
		</m:lowlimit>
		<m:apply>
		  <m:sum/>
		  <m:bvar><m:ci>n</m:ci></m:bvar>
		  <m:uplimit>
		    <m:apply>
		      <m:minus/>
		      <m:ci>N</m:ci>
		      <m:cn>1</m:cn>
		    </m:apply>
		  </m:uplimit>
		  <m:lowlimit>
		    <m:cn>0</m:cn>
		  </m:lowlimit>
		  <m:apply>
		    <m:times/>
		    <m:apply>
		      <m:ci type="fn" class="discrete">f</m:ci>
		      <m:ci>m</m:ci>
		      <m:ci>n</m:ci>
		    </m:apply>
		    <m:apply>
		      <m:exp/>
		      <m:apply>
			<m:times/>
			<m:apply>
			  <m:minus/>
			  <m:imaginaryi/>
			</m:apply>
			<m:apply>
			  <m:divide/>
			  <m:apply>
			    <m:times/>
			    <m:cn>2</m:cn>
			    <m:pi/>
			    <m:ci>k</m:ci>
			    <m:ci>m</m:ci>
			  </m:apply>
			  <m:ci>N</m:ci>
			</m:apply>
		      </m:apply>
		    </m:apply>
		    <m:apply>
		      <m:exp/>
		      <m:apply>
			<m:times/>
			<m:apply>
			  <m:minus/>
			  <m:imaginaryi/>
			</m:apply>
			<m:apply>
			  <m:divide/>
			  <m:apply>
			    <m:times/>
			    <m:cn>2</m:cn>
			    <m:pi/>
			    <m:ci>l</m:ci>
			    <m:ci>n</m:ci>
			  </m:apply>
			  <m:ci>N</m:ci>
			</m:apply>
		      </m:apply>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:math>
	</equation>
	
	where the above equation (<cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="eq3" strength="8"/>)
	has finite support for an
	<m:math><m:ci>N</m:ci></m:math>x<m:math><m:ci>N</m:ci></m:math>
	image.
      </para>
      
      <section xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="sec2">
	<name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Inverse 2D DFT</name>
	<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="s2_p1">
	  As with our regular fourier transforms, the 2D DFT also has
	  an inverse transform that allows us to reconstruct an image
	  as a weighted combination of complex sinusoidal basis
	  functions. 
	  
	  <equation xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="eq4">
	    <m:math>
	      <m:apply>
		<m:eq/>
		<m:apply>
		  <m:ci type="fn" class="discrete">f</m:ci>
		  <m:ci>m</m:ci>
		  <m:ci>n</m:ci>
		</m:apply>
		<m:apply>
		  <m:times/>
		  <m:apply>
		    <m:divide/>
		    <m:cn>1</m:cn>
		    <m:apply>
		      <m:power/>
		      <m:ci>N</m:ci>
		      <m:cn>2</m:cn>
		    </m:apply>
		  </m:apply>
		  <m:apply>
		    <m:sum/>
		    <m:bvar><m:ci>k</m:ci></m:bvar>
		    <m:uplimit>
		      <m:apply>
			<m:minus/>
			<m:ci>N</m:ci>
			<m:cn>1</m:cn>
		      </m:apply>
		    </m:uplimit>
		    <m:lowlimit>
		      <m:cn>0</m:cn>
		    </m:lowlimit>
		    <m:apply>
		      <m:sum/>
		      <m:bvar><m:ci>l</m:ci></m:bvar>
		      <m:uplimit>
			<m:apply>
			  <m:minus/>
			  <m:ci>N</m:ci>
			  <m:cn>1</m:cn>
			</m:apply>
		      </m:uplimit>
		      <m:lowlimit>
			<m:cn>0</m:cn>
		      </m:lowlimit>
		      <m:apply>
			<m:times/>
			<m:apply>
			  <m:ci type="fn" class="discrete">F</m:ci>
			  <m:ci>k</m:ci>
			  <m:ci>l</m:ci>
			</m:apply>
			<m:apply>
			  <m:exp/>
			  <m:apply>
			    <m:divide/>
			    <m:apply>
			      <m:times/>
			      <m:imaginaryi/>
			      <m:cn>2</m:cn>
			      <m:pi/>
			      <m:ci>k</m:ci>
			      <m:ci>m</m:ci>
			    </m:apply>
			    <m:ci>N</m:ci>
			  </m:apply>
			</m:apply>
			<m:apply>
			  <m:exp/>
			  <m:apply>
			    <m:divide/>
			    <m:apply>
			      <m:times/>
			      <m:imaginaryi/>
			      <m:cn>2</m:cn>
			      <m:pi/>
			      <m:ci>l</m:ci>
			      <m:ci>n</m:ci>
			    </m:apply>
			    <m:ci>N</m:ci>
			  </m:apply>
			</m:apply>
		      </m:apply>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:math>
	  </equation>
	</para>

	<example xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="eg2">
	  <name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Periodic Extensions</name>
	  <figure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="fig1">
	    <media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" type="image/png" src="per_ext.png"/>
	    <caption xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	      Illustrate the periodic extension of images.
	    </caption>
	  </figure>  
	</example>
	
      </section>
    </section>

    
    <section xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="sec3">
      <name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">2D DFT and Convolution</name>
      <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="s3_p1">
	The regular 2D convolution equation is 

	<equation xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="eq5">
	  <m:math>
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:ci type="fn" class="discrete">g</m:ci>
		<m:ci>m</m:ci>
		<m:ci>n</m:ci>
	      </m:apply>
	      <m:apply>
		<m:sum/>
		<m:bvar><m:ci>k</m:ci></m:bvar>
		<m:uplimit>
		  <m:apply>
		    <m:minus/>
		    <m:ci>N</m:ci>
		    <m:cn>1</m:cn>
		  </m:apply>
		</m:uplimit>
		<m:lowlimit>
		  <m:cn>0</m:cn>
		</m:lowlimit>
		<m:apply>
		  <m:sum/>
		  <m:bvar><m:ci>l</m:ci></m:bvar>
		  <m:uplimit>
		    <m:apply>
		      <m:minus/>
		      <m:ci>N</m:ci>
		      <m:cn>1</m:cn>
		    </m:apply>
		  </m:uplimit>
		  <m:lowlimit>
		    <m:cn>0</m:cn>
		  </m:lowlimit>
		  <m:apply>
		    <m:times/>
		    <m:apply>
		      <m:ci type="fn" class="discrete">f</m:ci>
		      <m:ci>k</m:ci>
		      <m:ci>l</m:ci>
		    </m:apply>
		    <m:apply>
		      <m:ci type="fn" class="discrete">h</m:ci>
		      <m:apply>
			<m:minus/>
			<m:ci>m</m:ci>
			<m:ci>k</m:ci>
		      </m:apply>
		      <m:apply>
			<m:minus/>
			<m:ci>n</m:ci>
			<m:ci>l</m:ci>
		      </m:apply>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:math>
	</equation>
      </para>

      <example xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="eg3">
	<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="eg3_p1">
	  Below we go through the steps of convolving two
	  two-dimensional arrays.  You can think of
	  <m:math><m:ci>f</m:ci></m:math> as representing an image and
	  <m:math><m:ci>h</m:ci></m:math> represents a PSF, where 
	  <m:math>
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:ci type="fn" class="discrete">h</m:ci>
		<m:ci>m</m:ci>
		<m:ci>n</m:ci>
	      </m:apply>
	      <m:cn>0</m:cn>
	    </m:apply>
	  </m:math> for 
	  <m:math>
	    <m:apply>
	      <m:gt/>
	      <m:apply>
		<m:and/>
		<m:ci>m</m:ci>
		<m:ci>n</m:ci>
	      </m:apply>
	      <m:cn>1</m:cn>
	    </m:apply>
	  </m:math> and 
	  <m:math>
	    <m:apply>
	      <m:lt/>
	      <m:apply>
		<m:and/>
		<m:ci>m</m:ci>
		<m:ci>n</m:ci>
	      </m:apply>
	      <m:cn>0</m:cn>
	    </m:apply>
	  </m:math>.

	  <m:math display="block">
	    <m:apply>
	      <m:eq/>
	      <m:ci>h</m:ci>
	      <m:matrix>
		<m:matrixrow>
		  <m:apply>
		    <m:ci type="fn" class="discrete">h</m:ci>
		    <m:cn>0</m:cn>
		    <m:cn>0</m:cn>
		  </m:apply>
		  <m:apply>
		    <m:ci type="fn" class="discrete">h</m:ci>
		    <m:cn>0</m:cn>
		    <m:cn>1</m:cn>
		  </m:apply>
		</m:matrixrow>
		<m:matrixrow>
		  <m:apply>
		    <m:ci type="fn" class="discrete">h</m:ci>
		    <m:cn>1</m:cn>
		    <m:cn>0</m:cn>
		  </m:apply>
		  <m:apply>
		    <m:ci type="fn" class="discrete">h</m:ci>
		    <m:cn>1</m:cn>
		    <m:cn>1</m:cn>
		  </m:apply>
		</m:matrixrow>
	      </m:matrix>
	    </m:apply>
	  </m:math>
	  
	  <m:math display="block">
	    <m:apply>
	      <m:eq/>
	      <m:ci>f</m:ci>
	      <m:matrix>
		<m:matrixrow>
		  <m:apply>
		    <m:ci type="fn" class="discrete">f</m:ci>
		    <m:cn>0</m:cn>
		    <m:cn>0</m:cn>
		  </m:apply>
		  <m:ci>…</m:ci>
		  <m:apply>
		    <m:ci type="fn" class="discrete">f</m:ci>
		    <m:cn>0</m:cn>
		    <m:apply>
		      <m:minus/>
		      <m:ci>N</m:ci>
		      <m:cn>1</m:cn>
		    </m:apply>
		  </m:apply>
		</m:matrixrow>
		<m:matrixrow>
		  <m:ci>⋮</m:ci>
		  <m:ci>⋱</m:ci>
		  <m:ci>⋮</m:ci>
		</m:matrixrow>
		<m:matrixrow>
		  <m:apply>
		    <m:ci type="fn" class="discrete">f</m:ci>
		    <m:apply>
		      <m:minus/>
		      <m:ci>N</m:ci>
		      <m:cn>1</m:cn>
		    </m:apply>
		    <m:cn>0</m:cn>
		  </m:apply>
		  <m:ci>…</m:ci>
		  <m:apply>
		    <m:ci type="fn" class="discrete">f</m:ci>
		    <m:apply>
		      <m:minus/>
		      <m:ci>N</m:ci>
		      <m:cn>1</m:cn>
		    </m:apply>
		    <m:apply>
		      <m:minus/>
		      <m:ci>N</m:ci>
		      <m:cn>1</m:cn>
		    </m:apply>
		  </m:apply>
		</m:matrixrow>
	      </m:matrix>
	    </m:apply>
	  </m:math>

	  Step 1 (Flip <m:math><m:ci>h</m:ci></m:math>):

	  <equation xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="eq6">
	    <m:math>
	      <m:apply>
		<m:eq/>
		<m:apply>
		  <m:ci type="fn" class="discrete">h</m:ci>
		  <m:apply>
		    <m:minus/>
		    <m:ci>m</m:ci>
		  </m:apply>
		  <m:apply>
		    <m:minus/>
		    <m:ci>n</m:ci>
		  </m:apply>
		</m:apply>
		<m:matrix>
		  <m:matrixrow>
		    <m:apply>
		      <m:ci type="fn" class="discrete">h</m:ci>
		      <m:cn>1</m:cn>
		      <m:cn>1</m:cn>
		    </m:apply>
		    <m:apply>
		      <m:ci type="fn" class="discrete">h</m:ci>
		      <m:cn>1</m:cn>
		      <m:cn>0</m:cn>
		    </m:apply>
		    <m:cn>0</m:cn>
		  </m:matrixrow>
		  <m:matrixrow>
		    <m:apply>
		      <m:ci type="fn" class="discrete">h</m:ci>
		      <m:cn>0</m:cn>
		      <m:cn>1</m:cn>
		    </m:apply>
		    <m:apply>
		      <m:ci type="fn" class="discrete">h</m:ci>
		      <m:cn>0</m:cn>
		      <m:cn>0</m:cn>
		    </m:apply>
		    <m:cn>0</m:cn>
		  </m:matrixrow>
		  <m:matrixrow>
		    <m:cn>0</m:cn>
		    <m:cn>0</m:cn>
		    <m:cn>0</m:cn>
		  </m:matrixrow>
		</m:matrix>
	      </m:apply>
	    </m:math>
	  </equation>

	  Step 2 (Convolve):  

	  <equation xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="eq7">
	    <m:math>
	      <m:apply>
		<m:eq/>
		<m:apply>
		  <m:ci type="fn" class="discrete">g</m:ci>
		  <m:cn>0</m:cn>
		  <m:cn>0</m:cn>
		</m:apply>
		<m:apply>
		  <m:times/>	
		  <m:apply>
		    <m:ci type="fn" class="discrete">h</m:ci>
		    <m:cn>0</m:cn>
		    <m:cn>0</m:cn>
		  </m:apply>
		  <m:apply>
		    <m:ci type="fn" class="discrete">f</m:ci>
		    <m:cn>0</m:cn>
		    <m:cn>0</m:cn>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:math>
	  </equation>

	  We use the standard 2D convolution equation (<cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="eq5" strength="8"/>) to find the first element of
	  our convolved image.  In order to better understand what is
	  happening, we can think of this visually.  The basic idea is
	  to take
	  <m:math>
	    <m:apply>
	      <m:ci type="fn" class="discrete">h</m:ci>
	      <m:apply>
		<m:minus/>
		<m:ci>m</m:ci>
	      </m:apply>
	      <m:apply>
		<m:minus/>
		<m:ci>n</m:ci>
	      </m:apply>
	    </m:apply>
	  </m:math> and place it "on top" of 
	  <m:math>
	    <m:apply>
	      <m:ci type="fn" class="discrete">f</m:ci>
	      <m:ci>k</m:ci>
	      <m:ci>l</m:ci>
	    </m:apply>
	  </m:math>, so that just the bottom-right element, 
	  <m:math>
	    <m:apply>
	      <m:ci type="fn" class="discrete">h</m:ci>
	      <m:cn>0</m:cn>
	      <m:cn>0</m:cn>
	    </m:apply>
	  </m:math> of 
	  
	  <m:math>
	    <m:apply>
	      <m:ci type="fn" class="discrete">h</m:ci>
	      <m:apply>
		<m:minus/>
		<m:ci>m</m:ci>
	      </m:apply>
	      <m:apply>
		<m:minus/>
		<m:ci>n</m:ci>
	      </m:apply>
	    </m:apply>
	  </m:math> overlaps with the top-left element, 
	  <m:math>
	    <m:apply>
	      <m:ci type="fn" class="discrete">f</m:ci>
	      <m:cn>0</m:cn>
	      <m:cn>0</m:cn>
	    </m:apply>
	  </m:math>, of 
	  <m:math>
	    <m:apply>
	      <m:ci type="fn" class="discrete">f</m:ci>
	      <m:ci>k</m:ci>
	      <m:ci>l</m:ci>
	    </m:apply>
	  </m:math>.  Then, to get the next element of our convolved
	  image, we slide the flipped matrix, 
	  <m:math>
	    <m:apply>
	      <m:ci type="fn" class="discrete">h</m:ci>
	      <m:apply>
		<m:minus/>
		<m:ci>m</m:ci>
	      </m:apply>
	      <m:apply>
		<m:minus/>
		<m:ci>n</m:ci>
	      </m:apply>
	    </m:apply>
	  </m:math>, over one element to the right and get the
	  following result:
	  <m:math display="block">
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:ci type="fn" class="discrete">g</m:ci>
		<m:cn>0</m:cn>
		<m:cn>1</m:cn>
	      </m:apply>
	      <m:apply>
		<m:plus/>
		<m:apply>
		  <m:times/>
		  <m:apply>
		    <m:ci type="fn" class="discrete">h</m:ci>
		    <m:cn>0</m:cn>
		    <m:cn>0</m:cn>
		  </m:apply>
		  <m:apply>
		    <m:ci type="fn" class="discrete">f</m:ci>
		    <m:cn>0</m:cn>
		    <m:cn>1</m:cn>
		  </m:apply>
		</m:apply>
		<m:apply>
		  <m:times/>
		  <m:apply>
		    <m:ci type="fn" class="discrete">h</m:ci>
		    <m:cn>0</m:cn>
		    <m:cn>1</m:cn>
		  </m:apply>
		  <m:apply>
		    <m:ci type="fn" class="discrete">f</m:ci>
		    <m:cn>0</m:cn>
		    <m:cn>0</m:cn>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:math>
	  
	  We continue in this fashion to find all of the elements of
	  our convolved image, 
	  <m:math>
	    <m:apply>
	      <m:ci type="fn" class="discrete">g</m:ci>
	      <m:ci>m</m:ci>
	      <m:ci>n</m:ci>
	    </m:apply>
	  </m:math>.  Using the above method we define the general
	  formula to find a particular element of 
	  <m:math>
	    <m:apply>
	      <m:ci type="fn" class="discrete">g</m:ci>
	      <m:ci>m</m:ci>
	      <m:ci>n</m:ci>
	    </m:apply>
	  </m:math> as:

	  <equation xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="eq9">
	    <m:math>
	      <m:apply>
		<m:eq/>
		<m:apply>
		  <m:ci type="fn" class="discrete">g</m:ci>
		  <m:ci>m</m:ci>
		  <m:ci>n</m:ci>
		</m:apply>
		<m:apply>
		  <m:plus/>
		  <m:apply>
		    <m:times/>
		    <m:apply>
		      <m:ci type="fn" class="discrete">h</m:ci>
		      <m:cn>0</m:cn>
		      <m:cn>0</m:cn>
		    </m:apply>
		    <m:apply>
		      <m:ci type="fn" class="discrete">f</m:ci>
		      <m:ci>m</m:ci>
		      <m:ci>n</m:ci>
		    </m:apply>
		  </m:apply>
		  <m:apply>
		    <m:times/>
		    <m:apply>
		      <m:ci type="fn" class="discrete">h</m:ci>
		      <m:cn>0</m:cn>
		      <m:cn>1</m:cn>
		    </m:apply>
		    <m:apply>
		      <m:ci type="fn" class="discrete">f</m:ci>
		      <m:ci>m</m:ci>
		      <m:apply>
			<m:minus/>
			<m:ci>n</m:ci>
			<m:cn>1</m:cn>
		      </m:apply>
		    </m:apply>
		  </m:apply>
		  <m:apply>
		    <m:times/>
		    <m:apply>
		      <m:ci type="fn" class="discrete">h</m:ci>
		      <m:cn>1</m:cn>
		      <m:cn>0</m:cn>
		    </m:apply>
		    <m:apply>
		      <m:ci type="fn" class="discrete">f</m:ci>
		      <m:apply>
			<m:minus/>
			<m:ci>m</m:ci>
			<m:cn>1</m:cn>
		      </m:apply>
		      <m:ci>n</m:ci>
		    </m:apply>
		  </m:apply>
		  <m:apply>
		    <m:times/>
		    <m:apply>
		      <m:ci type="fn" class="discrete">h</m:ci>
		      <m:cn>1</m:cn>
		      <m:cn>1</m:cn>
		    </m:apply>
		    <m:apply>
		      <m:ci type="fn" class="discrete">f</m:ci>
		      <m:apply>
			<m:minus/>
			<m:ci>m</m:ci>
			<m:cn>1</m:cn>
		      </m:apply>
		      <m:apply>
			<m:minus/>
			<m:ci>n</m:ci>
			<m:cn>1</m:cn>
		      </m:apply>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:math>
	  </equation>

	</para>
      </example>

      <section xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="sub1">
        <name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Circular Convolution</name>
	
	<exercise xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="exer1">
	  <problem xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	    <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="prob_1">
	      What does 
	      <m:math>
		<m:apply>
		  <m:times/>	
		  <m:apply>
		    <m:ci type="fn" class="discrete">H</m:ci>
		    <m:ci>k</m:ci>
		    <m:ci>l</m:ci>
		  </m:apply>
		  <m:apply>
		    <m:ci type="fn" class="discrete">F</m:ci>
		    <m:ci>k</m:ci>
		    <m:ci>l</m:ci>
		  </m:apply>
		</m:apply>
	      </m:math>
	      produce?
	    </para>
	  </problem>
	  <solution xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	    <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="sol_1">
	      2D Circular Convolution

	      <equation xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="eq10">
		<m:math>
		  <m:apply>
		    <m:eq/>
		    <m:apply>	
		      <m:ci type="fn" class="discrete">
			<m:mover accent="true">
			  <m:mi>g</m:mi>
			  <m:mo>~</m:mo>
			</m:mover>
		      </m:ci>
		      <m:ci>m</m:ci>
		      <m:ci>n</m:ci>
		    </m:apply>
		    <m:apply>
		      <m:ci type="fn">IDFT</m:ci>
		      <m:apply>
			<m:times/>	
			<m:apply>
			  <m:ci type="fn" class="discrete">H</m:ci>
			  <m:ci>k</m:ci>
			  <m:ci>l</m:ci>
			</m:apply>
			<m:apply>
			  <m:ci type="fn" class="discrete">F</m:ci>
			  <m:ci>k</m:ci>
			  <m:ci>l</m:ci>
			</m:apply>
		      </m:apply>
		    </m:apply>
		    <m:ci>circular convolution in 2D</m:ci>
		  </m:apply>
		</m:math>
	      </equation>
	    </para>
	  </solution> 
	</exercise>

	<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="p1_sub1">
	  Due to periodic extension by DFT (<cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="fig2" strength="9"/>):
	</para>

	<figure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="fig2">
	  <media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" type="image/png" src="dft_extension.png"/>
	</figure>  

	<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="p2_sub1">
	  Based on the above solution, we will let

	  <equation xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="eq11">
	    <m:math>
	      <m:apply>
		<m:eq/>
		<m:apply>	
		  <m:ci type="fn" class="discrete">
		    <m:mover accent="true">
		      <m:mi>g</m:mi>
		      <m:mo>~</m:mo>
		    </m:mover>
		  </m:ci>
		  <m:ci>m</m:ci>
		  <m:ci>n</m:ci>
		</m:apply>
		<m:apply>
		  <m:ci type="fn">IDFT</m:ci>
		  <m:apply>
		    <m:times/>	
		    <m:apply>
		      <m:ci type="fn" class="discrete">H</m:ci>
		      <m:ci>k</m:ci>
		      <m:ci>l</m:ci>
		    </m:apply>
		    <m:apply>
		      <m:ci type="fn" class="discrete">F</m:ci>
		      <m:ci>k</m:ci>
		      <m:ci>l</m:ci>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:math>
	  </equation>

	  Using this equation, we can calculate the value for each
	  position on our final image,
	  <m:math>
	    <m:apply>
	      <m:ci type="fn" class="discrete">
		<m:mover accent="true">
		  <m:mi>g</m:mi>
		  <m:mo>~</m:mo>
		</m:mover>
	      </m:ci>
	      <m:ci>m</m:ci>	
	      <m:ci>n</m:ci>
	    </m:apply>
	  </m:math>.  For example, due to the periodic extension of
	  the images, when circular convolution is applied we will
	  observe a <term xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">wrap-around</term> effect.

	  <equation xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="eq12">
	    <m:math>
	      <m:apply>
		<m:eq/>
		<m:apply>	
		  <m:ci type="fn" class="discrete">
		    <m:mover accent="true">
		      <m:mi>g</m:mi>
		      <m:mo>~</m:mo>
		    </m:mover>
		  </m:ci>
		  <m:cn>0</m:cn>
		  <m:cn>0</m:cn>
		</m:apply>
		<m:apply>
		  <m:plus/>
		  <m:apply>
		    <m:times/>
		    <m:apply>
		      <m:ci type="fn" class="discrete">h</m:ci>
		      <m:cn>0</m:cn>
		      <m:cn>0</m:cn>
		    </m:apply>
		    <m:apply>
		      <m:ci type="fn" class="discrete">f</m:ci>
		      <m:cn>0</m:cn>
		      <m:cn>0</m:cn>
		    </m:apply>
		  </m:apply>
		  <m:apply>
		    <m:times/>
		    <m:apply>
		      <m:ci type="fn" class="discrete">h</m:ci>
		      <m:cn>1</m:cn>
		      <m:cn>0</m:cn>
		    </m:apply>
		    <m:apply>
		      <m:ci type="fn" class="discrete">f</m:ci>
		      <m:apply>
		  	<m:minus/>
			<m:ci>N</m:ci>
			<m:cn>1</m:cn>
		      </m:apply>
		      <m:cn>0</m:cn>
		    </m:apply>
		  </m:apply>
		  <m:apply>
		    <m:times/>
		    <m:apply>
		      <m:ci type="fn" class="discrete">h</m:ci>
		      <m:cn>0</m:cn>
		      <m:cn>1</m:cn>
		    </m:apply>
		    <m:apply>
		      <m:ci type="fn" class="discrete">f</m:ci>
		      <m:cn>0</m:cn>
		      <m:apply>
		  	<m:minus/>
			<m:ci>N</m:ci>
			<m:cn>1</m:cn>
		      </m:apply>
		    </m:apply>
		  </m:apply>
		  <m:apply>
		    <m:times/>
		    <m:apply>
		      <m:ci type="fn" class="discrete">h</m:ci>
		      <m:cn>1</m:cn>
		      <m:cn>1</m:cn>
		    </m:apply>
		    <m:apply>
		      <m:ci type="fn" class="discrete">f</m:ci>
		      <m:apply>
		  	<m:minus/>
			<m:ci>N</m:ci>
			<m:cn>1</m:cn>
		      </m:apply>
		      <m:apply>
		  	<m:minus/>
			<m:ci>N</m:ci>
			<m:cn>1</m:cn>
		      </m:apply>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:math>
	  </equation>
	  
	  Where the last three terms in <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="eq12" strength="9"/> are a result of the wrap-around effect caused
	  by the presence of the images copies located all around it.
	</para>
      </section>    

      <section xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="sub2">
	<name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Zero Padding</name>
	<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="p1_sub2">
	  If the support of <m:math><m:ci>h</m:ci></m:math> is
	  <m:math><m:ci>M</m:ci></m:math>x<m:math><m:ci>M</m:ci></m:math>
	  and <m:math><m:ci>f</m:ci></m:math> is
	  <m:math><m:ci>N</m:ci></m:math>x<m:math><m:ci>N</m:ci></m:math>,
	  then we zero pad <m:math><m:ci>f</m:ci></m:math> and
	  <m:math><m:ci>h</m:ci></m:math> to 
	  <m:math>
	    <m:apply>
	      <m:plus/>
	      <m:ci>M</m:ci>
	      <m:apply>
		<m:minus/>
		<m:ci>N</m:ci>
		<m:cn>1</m:cn>
	      </m:apply>
	    </m:apply>
	  </m:math> x 
	  <m:math>
	    <m:apply>
	      <m:plus/>
	      <m:ci>M</m:ci>
	      <m:apply>
		<m:minus/>
		<m:ci>N</m:ci>
		<m:cn>1</m:cn>
	      </m:apply>
	    </m:apply>
	  </m:math> (see <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="fig3" strength="9"/>).
	</para>

	<figure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="fig3">
	  <media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" type="image/png" src="zero_pad.png"/>
	</figure>  

	<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="p2_sub2">
	  <note xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" type="note">Circular Convolution = Regular Convolution
	  </note>
	</para>
      </section>

      <section xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="sub3">
	<name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Computing the 2D DFT</name>

	<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="p1_sub3">
	  <equation xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="eq13">
	    <m:math>
	      <m:apply>
		<m:eq/>
		<m:apply>
		  <m:ci type="fn" class="discrete">F</m:ci>
		  <m:ci>k</m:ci>
		  <m:ci>l</m:ci>
		</m:apply>
		<m:apply>
		  <m:sum/>
		  <m:bvar><m:ci>m</m:ci></m:bvar>
		  <m:uplimit>
		    <m:apply>
		      <m:minus/>
		      <m:ci>N</m:ci>
		      <m:cn>1</m:cn>
		    </m:apply>
		  </m:uplimit>
		  <m:lowlimit>
		    <m:cn>0</m:cn>
		  </m:lowlimit>
		  <m:apply>
		    <m:sum/>
		    <m:bvar><m:ci>n</m:ci></m:bvar>
		    <m:uplimit>
		      <m:apply>
			<m:minus/>
			<m:ci>N</m:ci>
			<m:cn>1</m:cn>
		      </m:apply>
		    </m:uplimit>
		    <m:lowlimit>
		      <m:cn>0</m:cn>
		    </m:lowlimit>
		    <m:apply>
		      <m:times/>
		      <m:apply>
			<m:ci type="fn" class="discrete">f</m:ci>
			<m:ci>m</m:ci>
			<m:ci>n</m:ci>
		      </m:apply>
		      <m:apply>
			<m:exp/>
			<m:apply>
			  <m:times/>
			  <m:apply>
			    <m:minus/>
			    <m:imaginaryi/>
			  </m:apply>
			  <m:apply>
			    <m:divide/>
			    <m:apply>
			      <m:times/>
			      <m:cn>2</m:cn>
			      <m:pi/>
			      <m:ci>k</m:ci>
			      <m:ci>m</m:ci>
			    </m:apply>
			    <m:ci>N</m:ci>
			  </m:apply>
			</m:apply>
		      </m:apply>
		      <m:apply>
			<m:exp/>
			<m:apply>
			  <m:times/>
			  <m:apply>
			    <m:minus/>
			    <m:imaginaryi/>
			  </m:apply>
			  <m:apply>
			    <m:divide/>
			    <m:apply>
			      <m:times/>
			      <m:cn>2</m:cn>
			      <m:pi/>
			      <m:ci>l</m:ci>
			      <m:ci>n</m:ci>
			    </m:apply>
			    <m:ci>N</m:ci>
			  </m:apply>
			</m:apply>
		      </m:apply>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:math>
	  </equation>

	  where in the above equation, 
	  
	  <m:math>
	    <m:apply>
	      <m:sum/>
	      <m:bvar><m:ci>n</m:ci></m:bvar>
	      <m:uplimit>
		<m:apply>
		  <m:minus/>
		  <m:ci>N</m:ci>
		  <m:cn>1</m:cn>
		</m:apply>
	      </m:uplimit>
	      <m:lowlimit>
		<m:cn>0</m:cn>
	      </m:lowlimit>
	      <m:apply>
		<m:times/>
		<m:apply>
		  <m:ci type="fn" class="discrete">f</m:ci>
		  <m:ci>m</m:ci>
		  <m:ci>n</m:ci>
		</m:apply>
		<m:apply>
		  <m:exp/>
		  <m:apply>
		    <m:times/>
		    <m:apply>
		      <m:minus/>
		      <m:imaginaryi/>
		    </m:apply>
		    <m:apply>
		      <m:divide/>
		      <m:apply>
			<m:times/>
			<m:cn>2</m:cn>
			<m:pi/>
			<m:ci>l</m:ci>
			<m:ci>n</m:ci>
		      </m:apply>
		      <m:ci>N</m:ci>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:math>
	  is simply a 1D DFT over <m:math><m:ci>n</m:ci></m:math>.
	  This means that we will take the 1D FFT of each row; if we
	  have <m:math><m:ci>N</m:ci></m:math> rows, then it will
	  require 
	  <m:math>
	    <m:apply>
	      <m:times/>
	      <m:ci>N</m:ci>
	      <m:apply>
		<m:log/>
		<m:ci>N</m:ci>
	      </m:apply>
	    </m:apply>
	  </m:math> operations per row.  We can rewrite this as 

	  <equation xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="eq14">
	    <m:math>
	      <m:apply>
		<m:eq/>
		<m:apply>
		  <m:ci type="fn" class="discrete">F</m:ci>
		  <m:ci>k</m:ci>
		  <m:ci>l</m:ci>
		</m:apply>
		<m:apply>
		  <m:sum/>
		  <m:bvar><m:ci>m</m:ci></m:bvar>
		  <m:uplimit>
		    <m:apply>
		      <m:minus/>
		      <m:ci>N</m:ci>
		      <m:cn>1</m:cn>
		    </m:apply>
		  </m:uplimit>
		  <m:lowlimit>
		    <m:cn>0</m:cn>
		  </m:lowlimit>
		  <m:apply>
		    <m:times/>
		    <m:apply>
	<!-- Prime does denote other -->
		      <m:ci type="fn" class="discrete"><m:msup>
			  <m:mi>f</m:mi>
			  <m:mo>′</m:mo>
			</m:msup></m:ci>
		      <m:ci>m</m:ci>
		      <m:ci>l</m:ci>
		    </m:apply>
		    <m:apply>
		      <m:exp/>
		      <m:apply>
			<m:times/>
			<m:apply>
			  <m:minus/>
			  <m:imaginaryi/>
			</m:apply>
			<m:apply>
			  <m:divide/>
			  <m:apply>
			    <m:times/>
			    <m:cn>2</m:cn>
			    <m:pi/>
			    <m:ci>k</m:ci>
			    <m:ci>m</m:ci>
			  </m:apply>
			  <m:ci>N</m:ci>
			</m:apply>
		      </m:apply>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:math>
	  </equation>

	  where now we take the 1D FFT of each column, which means
	  that if we have <m:math><m:ci>N</m:ci></m:math> columns,
	  then it requires	  
	  <m:math>
	    <m:apply>
	      <m:times/>
	      <m:ci>N</m:ci>
	      <m:apply>
		<m:log/>
		<m:ci>N</m:ci>
	      </m:apply>
	    </m:apply>
	  </m:math> operations per column. 

	  <note xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" type="note">
	    Therefore the overall complexity of a 2D FFT is
	    
	    <m:math display="block">
	      <m:apply>
		<m:ci type="fn">O</m:ci>
		<m:apply>
		  <m:times/>
		  <m:apply>
		    <m:power/>
		    <m:ci>N</m:ci>
		    <m:cn>2</m:cn>
		  </m:apply>
		  <m:apply>
		    <m:log/>
		    <m:ci>N</m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:math>
	    
	    where 
	    <m:math>
	      <m:apply>
		<m:power/>
		<m:ci>N</m:ci>
		<m:cn>2</m:cn>
	      </m:apply>
	    </m:math> equals the number of pixels in the image.
	  </note>
	</para>
      </section>

    </section>

  </content>
</document>
