Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merged revisions 916-928 via svnmerge from

https://babelfish.arc.nasa.gov/svn/stereopipeline/trunk

........
  r916 | rbeyer | 2009-10-26 10:44:15 -0700 (Mon, 26 Oct 2009) | 2 lines
  
  Giant commit from edits over the weekend.  Can you believe its still not done yet?
........
  r917 | zmoratto | 2009-10-26 11:19:22 -0700 (Mon, 26 Oct 2009) | 2 lines
  
  Made it so -h will actually being up help on all of the programs. Also increase edgemask buffer width in Filtering.
........
  r918 | rbeyer | 2009-10-26 12:36:07 -0700 (Mon, 26 Oct 2009) | 2 lines
  
  A round of spell-checks.
........
  r919 | zmoratto | 2009-10-26 12:45:18 -0700 (Mon, 26 Oct 2009) | 2 lines
  
  Updated image for the tutorial
........
  r920 | rbeyer | 2009-10-26 14:18:51 -0700 (Mon, 26 Oct 2009) | 2 lines
  
  Reinstated LROC example, figures removed, filenames genericized.
........
  r921 | rbeyer | 2009-10-26 16:05:56 -0700 (Mon, 26 Oct 2009) | 2 lines
  
  Made crazy, giant changes to Zack's otherwise simple script.  The intent was to make it more robust to failures.  We'll see.
........
  r922 | rbeyer | 2009-10-26 17:35:51 -0700 (Mon, 26 Oct 2009) | 2 lines
  
  Final changes from me.
........
  r923 | zmoratto | 2009-10-26 18:03:25 -0700 (Mon, 26 Oct 2009) | 3 lines
  
  Remove warning across Mdis and Cassini. Almost finished with docs. One more pass.
........
  r924 | zmoratto | 2009-10-26 20:26:15 -0700 (Mon, 26 Oct 2009) | 2 lines
  
  I'm still doing my final pass. I'm up to bundle adjustment.
........
  r925 | rbeyer | 2009-10-26 20:58:10 -0700 (Mon, 26 Oct 2009) | 3 lines
  
  Minor wording changes and insertion of vfills and pagebreaks where appropriate t
  o make things look nicer.
........
  r926 | zmoratto | 2009-10-26 21:11:57 -0700 (Mon, 26 Oct 2009) | 2 lines
  
  Finished my last pass over the documentation. Removed nff_terrain, it wasn't being used. Ha.
........
  r927 | mlundy | 2009-10-27 02:25:46 -0700 (Tue, 27 Oct 2009) | 1 line
  
  increment versions
........
  r928 | mlundy | 2009-10-27 02:26:00 -0700 (Tue, 27 Oct 2009) | 1 line
  
  make dist fixes
........
  • Loading branch information...
commit 429a06ea6c6f6c139384a315ed98f44aa139dade 2 parents e7867a8 + 17b44d6
@novas0x2a novas0x2a authored
Showing with 1,387 additions and 1,387 deletions.
  1. +2 −2 configure.ac
  2. +322 −152 data/hiedr2mosaic.py
  3. 0  docs/book/appendix/match_cpp.diff → data/surf_match.patch
  4. +4 −4 docs/book/acknowledgments.tex
  5. +12 −7 docs/book/asp_book.tex
  6. +0 −16 docs/book/bibliography.bib
  7. +215 −210 docs/book/bundle_adjustment.tex
  8. +19 −19 docs/book/correlation.tex
  9. +340 −355 docs/book/examples.tex
  10. BIN  docs/book/images/examples/cassini/cassini_rhea.png
  11. BIN  docs/book/images/examples/mdis/mdis_wide_example.png
  12. BIN  docs/book/images/p19-disparity.png
  13. BIN  docs/book/images/p19-googlemars.png
  14. BIN  docs/book/images/p19-stereo-output.png
  15. +23 −18 docs/book/installation.tex
  16. +73 −5 docs/book/introduction.tex
  17. +71 −267 docs/book/scripting.tex
  18. +4 −4 docs/book/stereodefault.tex
  19. +138 −150 docs/book/tools.tex
  20. +152 −166 docs/book/tutorial.tex
  21. 0  {src/asp/Tools → graveyard}/nff_terrain.cc
  22. 0  {src/asp/Tools → graveyard}/nff_terrain.h
  23. +1 −1  src/asp/Core/Makefile.am
  24. +2 −2 src/asp/Tools/Makefile.am
  25. +1 −1  src/asp/Tools/bundlevis.cc
  26. +1 −1  src/asp/Tools/disparitydebug.cc
  27. +1 −1  src/asp/Tools/isis_adjust.cc
  28. +1 −1  src/asp/Tools/point2dem.cc
  29. +1 −1  src/asp/Tools/point2mesh.cc
  30. +1 −1  src/asp/Tools/reconstruct.cc
  31. +1 −1  src/asp/Tools/rmax2cahvor.cc
  32. +1 −1  src/asp/Tools/rmax_adjust.cc
  33. +1 −1  src/asp/Tools/stereo.cc
View
4 configure.ac
@@ -23,7 +23,7 @@ m4_pattern_allow([^PKG_VW_LIBS_TEMP$])
##################################################
dnl TODO BEFORE RELEASE: update package version
-AC_INIT([NASA Ames Stereo Pipeline], [2.1], [asp@nx.arc.nasa.gov], [StereoPipeline])
+AC_INIT([NASA Ames Stereo Pipeline], [1.0.0], [asp@nx.arc.nasa.gov], [StereoPipeline])
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_MACRO_DIR([m4])
AC_CANONICAL_HOST
@@ -43,7 +43,7 @@ dnl revision++
dnl (see http://sources.redhat.com/autobook/autobook/autobook_91.html)
dnl
dnl LIBTOOL_VERSION=current:revision:age
-LIBTOOL_VERSION=1:0:0
+LIBTOOL_VERSION=2:0:0
AC_SUBST(LIBTOOL_VERSION)
# load the config.options
View
474 data/hiedr2mosaic.py
@@ -1,15 +1,61 @@
-#!/usr/bin/python
+#!/usr/bin/env python
-import os, glob, subprocess, sys, string;
+# __BEGIN_LICENSE__
+# Copyright (C) 2006-2009 United States Government as represented by
+# the Administrator of the National Aeronautics and Space Administration.
+# All Rights Reserved.
+# __END_LICENSE__
-# Note: Feed this one IMG file. This expects to find other 19 IMG
-# files in the same directory. Apply this only from the directory of
-# the file.
+
+import os, glob, optparse, re, shutil, subprocess, sys, string;
job_pool = [];
-num_working_threads = 4;
-def add_job( cmd ):
+def man(option, opt, value, parser):
+ print >>sys.stderr, parser.usage
+ print >>sys.stderr, '''\
+This program operates on HiRISE EDR (.IMG) channel files, and performs the
+following ISIS 3 operations:
+ * Converts to ISIS format (hi2isis)
+ * Performs radiometric calibration (hical)
+ * Stitches the channel files together into single CCD files (histitch)
+ * Attaches SPICE information (spiceinit and spicefit)
+ * Removes camera distortions from the CCD images (noproj)
+ * Perfroms jitter analysis (hijitreg)
+ * Mosaics individual CCDs into one unified image file (handmos)
+ * Normalizes the mosaic (cubenorm)
+
+'''
+ sys.exit()
+
+class Usage(Exception):
+ def __init__(self, msg):
+ self.msg = msg
+
+class CCDs(dict):
+ def __init__(self, cubes, match=5):
+ self.prefix = os.path.commonprefix( cubes )
+ dict.__init__(self)
+ tuples = []
+ for cub in cubes:
+ number = int( cub[len(self.prefix)] )
+ self[number] = cub
+ self.set_match( match )
+
+ def min(self):
+ return min( self.keys() )
+
+ def max(self):
+ return max( self.keys() )
+
+ def set_match(self, cube):
+ self.match = cube
+
+ def matchcube(self):
+ return self[self.match]
+
+
+def add_job( cmd, num_working_threads=4 ):
if ( len(job_pool) >= num_working_threads):
job_pool[0].wait();
job_pool.pop(0);
@@ -38,165 +84,289 @@ def read_flatfile( flat ):
averages[1] = float(crop);
return averages;
-def is_post_isis_3_1_20():
- # Weird method to find to location of ISIS
+def isisversion(verbose=False):
p = subprocess.Popen("echo $ISISROOT", shell=True, stdout=subprocess.PIPE);
path = p.stdout.read();
path = path.strip()
- print path;
+ if( verbose ): print path;
f = open(path+"/inc/Constants.h",'r');
for line in f:
- if ( line.rfind("std::string version(") > 0 ):
+ if ( line.rfind("std::string version(") > 0 ):
index = line.find("\"3");
index_e = line.rfind("|");
- version = line[index+1:index_e];
- print "\tFound Isis Version: "+version;
- index = version.rfind(".");
- if ( int(version[index+1:].strip(string.letters+string.whitespace)) > 20 ):
- return True;
+ version = line[index+1:index_e].rstrip()
+ if( verbose ): print "\tFound Isis Version: "+version;
+ version_strings = version.split('.')
+ version_ints = [int(item) for item in version_strings]
+ version_tuple = tuple( version_ints )
+ return version_tuple
+
+ raise Exception( "Could not find a version string in " + f.str() )
+ return False
+
+
+# def is_post_isis_3_1_20():
+# # Weird method to find to location of ISIS
+# p = subprocess.Popen("echo $ISISROOT", shell=True, stdout=subprocess.PIPE);
+# path = p.stdout.read();
+# path = path.strip()
+#
+# print path;
+# f = open(path+"/inc/Constants.h",'r');
+# for line in f:
+# if ( line.rfind("std::string version(") > 0 ):
+# index = line.find("\"3");
+# index_e = line.rfind("|");
+# version = line[index+1:index_e];
+# print "\tFound Isis Version: "+version;
+# index = version.rfind(".");
+# if ( int(version[index+1:].strip(string.letters+string.whitespace)) > 20 ):
+# return True;
+# else:
+# return False;
+# return False;
+
+def hi2isis( img_files, threads ):
+ hi2isis_cubs = []
+ for img in img_files:
+ # Expect to end in .IMG, change to end in .cub
+ to_cub = os.path.splitext( os.path.basename(img) )[0] + '.cub'
+ if( os.path.exists(to_cub) ):
+ print to_cub + ' exists, skipping hi2isis.'
+ else:
+ cmd = 'hi2isis from= '+ img +' to= '+ to_cub
+ add_job(cmd, threads)
+ hi2isis_cubs.append( to_cub )
+ wait_on_all_jobs()
+ return hi2isis_cubs
+
+def hical( cub_files, threads, delete=False ):
+ hical_cubs = []
+ for cub in cub_files:
+ # Expect to end in .cub, change to end in .hical.cub
+ to_cub = os.path.splitext(cub)[0] + '.hical.cub'
+ if( os.path.exists(to_cub) ):
+ print to_cub + ' exists, skipping hical.'
+ else:
+ cmd = 'hical from= '+ cub +' to= '+ to_cub
+ add_job(cmd, threads)
+ hical_cubs.append( to_cub )
+ wait_on_all_jobs()
+ if( delete ):
+ for cub in cub_files: os.remove( cub )
+ hical_log_files = glob.glob( os.path.commonprefix(cub_files) + '*.hical.log' )
+ for file in hical_log_files: os.remove( file )
+ return hical_cubs
+
+def histitch( cub_files, threads, delete=False ):
+ histitch_cubs = []
+ to_del_cubs = []
+ # Strictly, we should probably look in the image headers, but instead we'll
+ # assume that people have kept a sane naming convention for their files, such
+ # that the name consists of prefix + 'N_C' + suffix
+ # where prefix we extract below and the 'N_C' string is where N is the CCD number
+ # and C is the channel number.
+ prefix = os.path.commonprefix( cub_files )
+ channel_files = [[None]*2 for i in range(10)]
+ pattern = re.compile(r"(\d)_(\d)")
+ for cub in cub_files:
+ match = re.match( pattern, cub[len(prefix):] )
+ if( match ):
+ ccd = match.group(1)
+ channel = match.group(2)
+ # print 'ccd: ' + ccd + ' channel: '+ channel
+ channel_files[int(ccd)][int(channel)] = cub
+ else:
+ raise Exception( 'Could not find a CCD and channel identifier in ' + cub )
+
+ for i in range(10):
+ to_cub = prefix + str(i) + '.histitch.cub'
+
+ if( channel_files[i][0] and channel_files[i][1] ):
+ if( os.path.exists(to_cub) ):
+ print to_cub + ' exists, skipping histitch.'
else:
- return False;
- return False;
+ cmd = 'histitch balance= TRUE from1= '+ channel_files[i][0] \
+ +' from2= '+ channel_files[i][1] +' to= '+ to_cub
+ add_job(cmd, threads)
+ to_del_cubs.append( channel_files[i][0] )
+ to_del_cubs.append( channel_files[i][1] )
+ histitch_cubs.append( to_cub )
+ elif( channel_files[i][0] or channel_files[i][1] ):
+ found = ''
+ if( channel_files[i][0] ): found = channel_files[i][0]
+ else: found = channel_files[i][1]
+ print 'Found '+ found +' but not the matching channel file. Skipping histitch.'
-#----------------------------
+ wait_on_all_jobs()
+ if( delete ):
+ for cub in to_del_cubs: os.remove( cub )
+ return histitch_cubs
-if (len(sys.argv) != 2 ):
- print "Input error:";
- print "Usage:";
- print " " + sys.argv[0] + " ESP_011595_1725_RED0_0.IMG";
- sys.exit();
-
-right_index = sys.argv[1].rfind("_");
-prefix = sys.argv[1][:right_index-1];
-
-# Prestep 1 - Determine Isis Version
-post_isis_20 = is_post_isis_3_1_20();
-
-# Prestep 2 - Determine the number range of files
-list_of_files = glob.glob(prefix+"*.IMG");
-ccd_min = 10;
-ccd_max = 0;
-for line in list_of_files:
- index = line.find("RED");
- ccd_number = int(line[index+3:index+4]);
- if ( ccd_number > ccd_max ):
- ccd_max = ccd_number;
- if ( ccd_number < ccd_min ):
- ccd_min = ccd_number;
-print "\tMin CCD index: "+str(ccd_min);
-print "\tMax CCD index: "+str(ccd_max);
-print;
-
-# Step 1 - hi2isis
-for i in range(ccd_min,ccd_max+1):
- cmd = "hi2isis from="+prefix+str(i)+"_0.IMG to="+prefix+str(i)+"_0.cub"
- add_job(cmd);
- cmd = "hi2isis from="+prefix+str(i)+"_1.IMG to="+prefix+str(i)+"_1.cub"
- add_job(cmd);
-wait_on_all_jobs();
-
-# Step 2 - spiceinit
-for i in range(ccd_min,ccd_max+1):
- cmd = "spiceinit from="+prefix+str(i)+"_0.cub";
- add_job(cmd);
- cmd = "spiceinit from="+prefix+str(i)+"_1.cub";
- add_job(cmd);
-wait_on_all_jobs();
-
-# Step 3 - hical
-for i in range(ccd_min,ccd_max+1):
- cmd = "hical from="+prefix+str(i)+"_0.cub to="+prefix+str(i)+"_0.cal.cub";
- add_job(cmd);
- cmd = "hical from="+prefix+str(i)+"_1.cub to="+prefix+str(i)+"_1.cal.cub";
- add_job(cmd);
-wait_on_all_jobs();
-os.system("rm "+prefix+"?_?.cub");
-
-# Step 4 - histitch
-for i in range(ccd_min,ccd_max+1):
- cmd = "histitch from1="+prefix+str(i)+"_0.cal.cub from2="+prefix+str(i)+"_1.cal.cub to="+prefix+str(i)+".cub";
- add_job(cmd);
-wait_on_all_jobs();
-os.system("rm "+prefix+"?_?.cal.cub");
-
-# Step 5 - cubenorm
-for i in range(ccd_min,ccd_max+1):
- cmd = "cubenorm from="+prefix+str(i)+".cub to="+prefix+str(i)+".norm.cub";
- add_job(cmd);
-wait_on_all_jobs();
-os.system("rm "+prefix+"?.cub");
-
-# Step 6 - spiceinit & spicefit
-for i in range(ccd_min,ccd_max+1):
- cmd = "spiceinit from="+prefix+str(i)+".norm.cub";
- add_job(cmd);
-wait_on_all_jobs();
-for i in range(ccd_min,ccd_max+1):
- cmd = "spicefit from="+prefix+str(i)+".norm.cub";
- add_job(cmd);
-wait_on_all_jobs();
-
-# Step 7 - noproj - must be done sequentially
-for i in range(ccd_min,ccd_max+1):
- cmd = "noproj from="+prefix+str(i)+".norm.cub match="+prefix+"5.norm.cub to="+prefix+str(i)+".noproj.cub source=frommatch";
- os.system(cmd);
-os.system("rm "+prefix+"?.norm.cub")
-
-# Step 8 - hijitreg
-for i in range(ccd_min,ccd_max):
- j = i + 1;
- cmd = "hijitreg from="+prefix+str(i)+".noproj.cub match="+prefix+str(j)+".noproj.cub flatfile=flat_"+str(i)+"_"+str(j)+".txt";
- add_job(cmd);
-wait_on_all_jobs();
-
-# Step 9 - Read averages
-average_sample = [];
-average_line = [];
-for i in range(ccd_min,ccd_max):
- flat_file = "flat_"+str(i)+"_"+str(i+1)+".txt";
- averages = read_flatfile( flat_file );
- average_sample.append(averages[0]);
- average_line.append(averages[1]);
-
-# Step 10 - Handmos
-os.system("cp "+prefix+"5.noproj.cub "+prefix+"mosaic.cub");
-for i in range(4,ccd_min-1,-1):
- sample_sum = 0.0;
- line_sum = 0.0;
- for s in range(4,i-1,-1):
- sample_sum += average_sample[s-ccd_min];
- line_sum += average_line[s-ccd_min];
- cmd = "";
- if ( post_isis_20 ):
- # ISIS 3.1.21+
- cmd = "handmos from="+prefix+str(i)+".noproj.cub mosaic="+prefix+"mosaic.cub outsample="+str(int(round(sample_sum)))+" outline="+str(int(round(line_sum)))+" outband=1 priority=beneath";
- else:
- # ISIS 3.1.20-
- cmd = "handmos from="+prefix+str(i)+".noproj.cub mosaic="+prefix+"mosaic.cub outsample="+str(int(round(sample_sum)))+" outline="+str(int(round(line_sum)))+" outband=1 input=beneath";
- os.system(cmd);
-
-for i in range(6,ccd_max+1,1):
- sample_sum = 0.0;
- line_sum = 0.0;
- for s in range(5,i,1):
- sample_sum -= average_sample[s-ccd_min];
- line_sum -= average_line[s-ccd_min];
- cmd = "";
- if ( post_isis_20 ):
+def spice( cub_files, threads):
+ for cub in cub_files:
+ cmd = 'spiceinit from= '+ cub
+ add_job(cmd, threads)
+ wait_on_all_jobs()
+ for cub in cub_files:
+ cmd = 'spicefit from= '+ cub
+ add_job(cmd, threads)
+ wait_on_all_jobs()
+ return
+
+def noproj( CCD_object, delete=False ):
+ noproj_CCDs = []
+ for i in range( CCD_object.min(), CCD_object.max()+1 ):
+ to_cub = CCD_object.prefix + str(i) + '.noproj.cub'
+ if os.path.exists( to_cub ):
+ print to_cub + ' exists, skipping noproj.'
+ else:
+ cmd = 'noproj from= '+ CCD_object[i] \
+ +' match= '+ CCD_object.matchcube() \
+ +' source= frommatch to= '+ to_cub
+ print cmd
+ os.system(cmd)
+ noproj_CCDs.append( to_cub )
+ if( delete ):
+ for cub in CCD_object.values(): os.remove( cub )
+ return CCDs( noproj_CCDs, CCD_object.match )
+
+# Check for failure for hijitreg. Sometimes bombs? Default to zeros.
+def hijitreg( noproj_CCDs, threads ):
+ for i in range( noproj_CCDs.min(), noproj_CCDs.max() ):
+ j = i + 1;
+ cmd = 'hijitreg from= '+ noproj_CCDs[i] \
+ +' match= '+ noproj_CCDs[j] \
+ + ' flatfile= flat_'+str(i)+'_'+str(j)+'.txt'
+ add_job(cmd, threads)
+ wait_on_all_jobs()
+
+ averages = dict()
+
+ for i in range( noproj_CCDs.min(), noproj_CCDs.max() ):
+ flat_file = 'flat_'+str(i)+'_'+str(i+1)+'.txt'
+ averages[i] = read_flatfile( flat_file )
+ os.remove( flat_file )
+
+ return averages
+
+def mosaic( noprojed_CCDs, averages ):
+ mosaic = noprojed_CCDs.prefix+'.mos_hijitreged.cub'
+ shutil.copy( noprojed_CCDs.matchcube(), mosaic )
+ sample_sum = 1;
+ line_sum = 1;
+ for i in range( noprojed_CCDs.match-1, noprojed_CCDs.min()-1, -1):
+ sample_sum += averages[i][0]
+ line_sum += averages[i][1]
+ handmos( noprojed_CCDs[i], mosaic,
+ str( int(round( sample_sum )) ),
+ str( int(round( line_sum )) ) )
+
+ sample_sum = 1;
+ line_sum = 1;
+ for i in range( noprojed_CCDs.match+1, noprojed_CCDs.max()+1, 1):
+ sample_sum -= averages[i-1][0]
+ line_sum -= averages[i-1][1]
+ handmos( noprojed_CCDs[i], mosaic,
+ str( int(round( sample_sum )) ),
+ str( int(round( line_sum )) ) )
+
+ return mosaic
+
+
+def handmos( fromcub, tocub, outsamp, outline ):
+ cmd = 'handmos from= '+ fromcub +' mosaic= '+ tocub \
+ +' outsample= '+ outsamp \
+ +' outline= '+ outline
+
+ if( isisversion() > (3,1,20) ):
# ISIS 3.1.21+
- cmd = "handmos from="+prefix+str(i)+".noproj.cub mosaic="+prefix+"mosaic.cub outsample="+str(int(round(sample_sum)))+" outline="+str(int(round(line_sum)))+" outband=1 priority=beneath";
+ cmd += ' priority= beneath'
else:
# ISIS 3.1.20-
- cmd = "handmos from="+prefix+str(i)+".noproj.cub mosaic="+prefix+"mosaic.cub outsample="+str(int(round(sample_sum)))+" outline="+str(int(round(line_sum)))+" outband=1 input=beneath";
- os.system(cmd);
+ cmd += ' input= beneath'
+ os.system(cmd)
+ return
+
+def cubenorm( fromcub, delete=False ):
+ tocub = os.path.splitext(cub)[0] + '.norm.cub'
+ cmd = 'cubenorm from= '+ fromcub+' to= '+ to_cub
+ print cmd
+ os.system(cmd)
+ if( delete ):
+ os.remove( fromcub )
+ return tocub
+
+
+#----------------------------
+
+def main():
+ try:
+ try:
+ usage = "usage: hiedr2mosaic.py [--help][--manual][--threads N][--keep][-m match] HiRISE-EDR.IMG-files "
+ parser = optparse.OptionParser(usage=usage)
+ parser.set_defaults(delete=True)
+ parser.set_defaults(match=5)
+ parser.set_defaults(threads=4)
+ parser.add_option("--manual", action="callback", callback=man,
+ help="Read the manual.")
+ parser.add_option("-t", "--threads", dest="threads",
+ help="Number of threads to use.")
+ parser.add_option("-m", "--match", dest="match",
+ help="CCD number of match CCD")
+ parser.add_option("-k", "--keep", action="store_false",
+ dest="delete",
+ help="Will not delete intermediate files.")
+
+ (options, args) = parser.parse_args()
+
+ if not args: parser.error("need .IMG files")
+
+ except optparse.OptionError, msg:
+ raise Usage(msg)
+
+ # # Determine Isis Version
+ # post_isis_20 = is_post_isis_3_1_20();
+
+ # hi2isis
+ hi2isised = hi2isis( args, options.threads )
+
+ # hical
+ hicaled = hical( hi2isised, options.threads, options.delete )
+
+ # histitch
+ histitched = histitch( hicaled, options.threads, options.delete )
+
+ # attach spice
+ spice( histitched, options.threads )
+
+ CCD_files = CCDs( histitched, options.match )
+
+ # noproj
+ noprojed_CCDs = noproj( CCD_files, options.delete )
+
+ # hijitreg
+ averages = hijitreg( noprojed_CCDs, options.threads )
+
+ # mosaic handmos
+ mosaicked = mosaic( noprojed_CCDs, averages )
+
+ # Clean up noproj files
+ if( options.delete ):
+ for cub in noprojed_CCDs.values():
+ os.remove( cub )
+
+ # Run a final cubenorm across the image:
+ cubenorm( mosaicked, options.delete )
-# Clean up
-os.system("rm "+prefix+"?.noproj.cub" );
-os.system("rm flat_?_?.txt");
+ print "Finished"
-# Step 11 - cubenorm mosaic
-os.system("cubenorm from="+prefix+"mosaic.cub to="+prefix+"mosaic.norm.cub");
-os.system("rm "+prefix+"mosaic.cub");
+ except Usage, err:
+ print >>sys.stderr, err.msg
+ # print >>sys.stderr, "for help use --help"
+ return 2
+
-print "Finished"
+if __name__ == "__main__":
+ sys.exit(main())
View
0  docs/book/appendix/match_cpp.diff → data/surf_match.patch
File renamed without changes
View
8 docs/book/acknowledgments.tex
@@ -66,14 +66,14 @@ \section*{Acknowledgments}
technical assistance.
We'd also like to thank our friends and collaborators Dr.~Randolph
-Kirk, Dr.~Brent Archinal, Trent Hare, and Mark Rosiek of the United
-States Geological Survey's (USGS's) Astrogeology Science Center in
+Kirk, Dr.~Brent Archinal, Trent Hare, and Mark Rosiek of the
+\aclu{USGS}'s (\acs{USGS}'s) Astrogeology Science Center in
Flagstaff, AZ, for their encouragement and willingness to share
their experience and expertise by answering many of our technical
questions. We also thank them for their ongoing support and efforts
-to help us evaluate our work. Thanks also to the USGS \ac{ISIS} team,
+to help us evaluate our work. Thanks also to the \ac{USGS} \ac{ISIS} team,
especially Jeff Anderson and Kris Becker, for their help in integrating
-this version of the stereo pipeline with the USGS \ac{ISIS} software
+this version of the stereo pipeline with the \ac{USGS} \ac{ISIS} software
package.
Thanks go also to Dr.~Mark Robinson, Jacob Danton, Ernest
View
19 docs/book/asp_book.tex
@@ -8,18 +8,18 @@
\usepackage{amsfonts, psfrag, fancyhdr, layout, appendix, subfigure, array}
\usepackage{wrapfig}
\usepackage{color}
-\definecolor{violet}{rgb}{0.5,0,1}
-\definecolor{brown}{rgb}{0.4,0.26,0.13}
-\definecolor{gray}{gray}{0.35}
+\definecolor{gray}{gray}{0.25}
\usepackage[numbers]{natbib}
\usepackage[nolist,nohyperlinks]{acronym}
\usepackage{url}
-\usepackage[pdftex,colorlinks=true,urlcolor=blue,citecolor=gray,linkcolor=gray]{hyperref}
\usepackage{longtable}
+\usepackage{fancyvrb}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
+\usepackage[pdftex,colorlinks=true,urlcolor=blue,citecolor=gray,linkcolor=gray]{hyperref}
+
% Set equal margins on book style
%\setlength{\oddsidemargin}{53pt}
%\setlength{\evensidemargin}{53pt}
@@ -118,6 +118,12 @@
\acro{ULCN}{Unified Lunar Coordinate Network}
\acro{HiRISE}{High Resolution Imaging Science Experiment}
\acro{LROC}{Lunar Reconnaissance Orbiter Camera}
+\acro{GCP}{ground control point}
+\acro{CTX}{Context Camera}
+\acro{THEMIS}{Thermal Emission Imaging System}
+\acro{ET}{ephemeris time}
+\acro{PVL}{Parameter Value Language}
+\acro{KML}{Keyhole Markup Language}
\end{acronym}
@@ -142,12 +148,11 @@ \part{Appendices}
\include{tools}
\include{stereodefault}
\include{outputfiles}
-
-% This is disabled for now. Move SURF example into the distribution somewhere.
-% \include{scripting}
+\include{scripting}
% Create the References list
\bibliographystyle{plainnat}
+\phantomsection % to make hyperref behave
\addcontentsline{toc}{chapter}{\bibname}
\bibliography{bibliography.bib}
View
16 docs/book/bibliography.bib
@@ -162,22 +162,6 @@ @INPROCEEDINGS{ johnston03
year = 2003
}
-# HiRISE reference:
-@ARTICLE{2006.HiRISEpre,
-author = {{McEwen}, A.~S. and {Eliason}, E.~M. and {Bergstrom}, J.~W. and {Bridg
-es}, N.~T. and
- {Hansen}, C.~J. and {Delamere}, W.~A. and
- {Grant}, J.~A. and {Gulick}, V.~C. and
- {Herkenhoff}, K.~E. and {Keszthelyi}, L.
- and {Kirk}, R.~L. and {Mellon}, M.~T. and
- {Squyres}, S.~W. and {Thomas}, N.~T. and
- {Weitz}, C.~M.},
-title = "{MRO's High Resolution Imaging Science Experiment (HiRISE)}",
- journal = {Journal of Geophysical Research},
- year = 2006,
- note = {in press, preprint available at http://marsoweb.nas.nasa.gov/HiRISE/papers/other/HiRISE-JGR-preprint.pdf}
-}
-
# LRO stuff
@INPROCEEDINGS{2005LPI....36.1576R,
author = {{Robinson}, M.~S. and {Eliason}, E.~M. and {Hiesinger}, H. and
View
425 docs/book/bundle_adjustment.tex
@@ -6,9 +6,9 @@ \chapter{Bundle Adjustment}
Satellite position and orientation errors have a direct effect on the
accuracy of digital elevation models produced by the Stereo Pipeline.
If they aren't corrected, these uncertainties will result in
-systematic errors in the overall position and slope of the DEM. Severe
+systematic errors in the overall position and slope of the \ac{DEM}. Severe
distortions can occur as well, resulting in twisted or ``taco shaped''
-DEMs, though in most cases these effects are quite subtle and hard to
+\acp{DEM}, though in most cases these effects are quite subtle and hard to
detect.
The Stereo Pipeline includes a powerful suite of tools for correcting
@@ -41,50 +41,45 @@ \chapter{Bundle Adjustment}
\label{fig:bundle_adjustment}
\end{figure}
-Bundle adjustment can also take advantage of ground control points
-(GCPs), which are 3D locations of features that are known a
- priori (often by measuring them by hand in another existing
-DEM). GCPs can improve the internal consistency of your DEM or align
-your DEM to an existing data product. Finally, even though bundle
-adjustment calculates the locations of the 3D objects it views, only
-the final properties of the cameras are recorded for use by the Ames
-Stereo Pipeline. Those properties can be loaded into the \texttt{stereo}
-program which uses its own method for triangulating 3D feature
-locations.
+Bundle adjustment can also take advantage of \acp{GCP}, which are
+3D locations of features that are known a priori (often by measuring
+them by hand in another existing \ac{DEM}). \acp{GCP} can improve the internal
+consistency of your \ac{DEM} or align your \ac{DEM} to an existing data
+product. Finally, even though bundle adjustment calculates the
+locations of the 3D objects it views, only the final properties of
+the cameras are recorded for use by the Ames Stereo Pipeline. Those
+properties can be loaded into the \texttt{stereo} program which
+uses its own method for triangulating 3D feature locations.
When using the Stereo Pipeline, bundle adjustment is an optional step
-between the capture of images and the creation of DEMs. The bundle
+between the capture of images and the creation of \acp{DEM}. The bundle
adjustment process described below should be completed prior to
running the \texttt{stereo} command.
-\begin{center}
- \fcolorbox{black}{lgray}{ \begin{minipage}{5.5in} Although Bundle
- Adjustment is not a required step for generating Digital Elevation
- Models, it is {\em highly recommended} for users who plan to
- create DEMs for scientific analysis and publication.
- Incorporating bundle adjustment into the stereo work flow not only
- results in DEMs that are more internally consistent, it is also
- the correct way to co-register your DEMs with other existing data
- sets and geodetic control networks.
-\end{minipage}}
-\end{center}
+Although bundle adjustment is not a required step for generating
+\acp{DEM}, it is {\em highly recommended} for users who plan to
+create \acp{DEM} for scientific analysis and publication. Incorporating
+bundle adjustment into the stereo work flow not only results in
+\acp{DEM} that are more internally consistent, it is also the correct
+way to co-register your \acp{DEM} with other existing data sets and
+geodetic control networks.
\subsection{A deeper understanding}
-In bundle adjustment the position and orientation of each camera station are
-determined jointly with the 3D position of a set of image tie-points
-points chosen in the overlapping regions between images.
-Tie-points are automatically extracted using the SURF robust feature
-extraction algorithm \citep{surf08}. Outliers are rejected using
-the RANSAC method and trimmed to 1000 matches that are spread evenly
-across the images.
+In bundle adjustment the position and orientation of each camera
+station are determined jointly with the 3D position of a set of
+image tie-points points chosen in the overlapping regions between
+images. Tie-points are automatically extracted using the SURF
+robust feature extraction algorithm \citep{surf08}. Outliers are
+rejected using the RANSAC method \citep{fischler81} and trimmed to
+1000 matches that are spread evenly across the images.
\begin{figure}[b!]
\begin{center}
\includegraphics[trim=20mm 20mm 20mm 15mm,clip,width=6in]{images/ba_feature_observation.pdf}
\end{center}
- \caption{ A feature observation in bundle adjustment \citep{moore09} }
+ \caption{ A feature observation in bundle adjustment, from \citet{moore09} }
\label{fig:ba_feature}
\end{figure}
@@ -120,49 +115,52 @@ \subsection{A deeper understanding}
iterations becomes too large, in which case bundle adjustment may or
may not have finished refining the parameters of the cameras.
-\section{Isis Adjust}
+\section{Performing bundle adjustment with isis\_adjust}
The \texttt{isis\_adjust} program is designed to perform bundle
-adjustment on images supported by USGS's Isis 3 software package.
-The \texttt{isis\_adjust} program is special in that it does not
-discriminate based on camera type. It can perform bundle adjustment
-on line-scan imagers (e.g. MOC, LROC-NAC, HiRISE, and CTX) just
-as well as it can on traditional frame cameras (e.g. Apollo
-Metric Camera). Theoretically it should also work fine with
-push-frame imagers (e.g. THEMIS-VIS, LROC-WAC), though this is untested.
+adjustment on images supported by USGS's \ac{ISIS} 3 software
+package. The \texttt{isis\_adjust} program does not discriminate
+based on camera type. It can perform bundle adjustment on images
+from line-scan imagers like \ac{MOC}, \ac{LROC} NAC, \ac{HiRISE},
+and the \ac{CTX}. The \texttt{isis\_adjust} program can also perform
+bundle adjustment on traditional frame cameras (e.g. Apollo Metric
+Camera). Theoretically it should also work with push-frame
+imagers like the \ac{THEMIS} VIS, and \ac{LROC} WAC, though this is
+untested.
The \texttt{isis\_adjust} program works by first converting all
pixel measurements in an image to measurements defined on the ideal
-focal plane using millimeters and the ephemeris time (ET). The ET
-is the absolute second at which that pixel measurement was recorded
-on the camera. For a frame camera, all of the pixels are captured
-at the same time so the ET will be identical for all measurements
-on the image. For pushbroom, pushframe, or other cameras which
-build up their `image' over time, different parts of the image will
-have different ET values. For example, on a MOC image between the
-first and last line about 5 seconds of ET will have elapsed.
+focal plane using millimeters and the \ac{ET}. The \ac{ET} is the
+absolute second at which that pixel measurement was recorded on the
+camera. For a frame camera, all of the pixels are captured at the
+same time so the \ac{ET} will be identical for all measurements on
+the image. For pushbroom, pushframe, or other cameras which build
+up their `image' over time, different parts of the image will have
+different ET values. For example, on a MOC image between the first
+and last line about 5 seconds of \ac{ET} will have elapsed.
When \texttt{isis\_adjust} calculates the partial derivatives of the
forward projection of a point, it uses an ideal pinhole camera model.
The properties of this model are defined as properties of the subject
-camera at the specified ET for the current measure plus the
+camera at the specified \ac{ET} for the current measure plus the
correction function, $f(t)$, that \texttt{isis\_adjust} is solving
for. Many forms of $f(t)$ could be used; the only limit is the
-number parameters in the equations. Some initial work hints that
+number of parameters in the equations. Some initial work hints that
anything greater than a second order polynomial becomes an ill-posed
problem, but we hope to investigate this further in the future.
\subsection{Options}
-The following is a listing and explanation of the options
-that can be given to \texttt{isis\_adjust} on the command line.
+The following is a listing and explanation of the options that can be
+given to \texttt{isis\_adjust} on the command line. These options are
+not required.
\begin{description}
-\item[--cnet, -c \textnormal{\small{(control network file)}}] \hfill \\
+\item[\texttt{--cnet|-c \textit{control-network-file}}] \hfill \\
\emph{Optional.} This option will force {\tt isis\_adjust} to
use a pre-built built control network. This control network can
- either be in the USGS Isis ``cnet'' format or in the binary Vision
+ either be in the \ac{USGS} \ac{ISIS} ``cnet'' format or in the binary Vision
Workbench format.
If no control network is supplied using this option, {\tt
@@ -171,10 +169,9 @@ \subsection{Options}
\texttt{isis\_adjust} program will then create its own control
network file and save it as \texttt{isis\_adjust.cnet}.
-\item[--cost-function \textnormal{\small{(default=L2)}}] \hfill \\
-
- Sets the cost function used for bundle adjustment. Default is L2
- which is the normal squared error. The full list of avaible options
+\item[\texttt{--cost-function L1|L2|Cauchy|Huber|PseudoHuber(=L2)} ] \hfill \\
+ Sets the cost function used for bundle adjustment. Default is \texttt{L2}
+ which is the normal squared error. The full list of available options
are:
\begin{description}
@@ -190,10 +187,9 @@ \subsection{Options}
cost functions are performed by post-weighting the original errors yet
still using equations derived for squared error.
-\item[--bundle-adjuster \textnormal{\small{(default=Sparse)}}] \hfill \\
-
+\item[\texttt{--bundle-adjuster Ref|Sparse|RobustRef|RobustSparse(=Sparse)}] \hfill \\
Sets the bundle adjustment code to be used. The standard to use is
- sparse, which is a traditional squared error derived method that
+ \texttt{Sparse}, which is a traditional squared error derived method that
utilizes sparse matrices to obtain speed. Here are the complete list
of options:
@@ -210,24 +206,24 @@ \subsection{Options}
adjustment algorithms are still experimental and are a work in
progress.
-\item[--disable-camera-const] \hfill \\
+\item[\texttt{--disable-camera-const}] \hfill \\
\emph{Optional.} This disables the camera constraint error. Useful
for debugging and just exploring what are the effects of this cost
function.
-\item[--disable-gcp-const] \hfill \\
- \emph{Optional.} This disables the GCP constraint error even if GCPs
- are provided. Useful for debugging and just exploring what the
- effects are of GCPs.
+\item[\texttt{--disable-gcp-const}] \hfill \\
+ \emph{Optional.} This disables the \ac{GCP} constraint error even
+ if \acp{GCP} are provided. Useful for debugging and just exploring
+ what the effects are of \acp{GCP}.
-\item[--gcp-scalar \textnormal{\small{(default = 1)}}] \hfill \\
+\item[\texttt{--gcp-scalar \textit{multiplier(=1)}}] \hfill \\
\emph{Optional.} Sets the multiplier that is used to adjust the
- sigma (or uncertainty) of the ground control points. The sigmas of
- ground control points are defined in the GCP data file, so this
- option is useful when debugging for universally scaling GCP sigmas
+ sigma (or uncertainty) of the \aclp{GCP}. The sigmas of
+ \aclp{GCP} are defined in the \ac{GCP} data file, so this
+ option is useful when debugging for universally scaling \ac{GCP} sigmas
up or down.
-\item[--lambda, -l \textnormal{\small{(= \emph{float})}}] \hfill \\
+\item[\texttt{--lambda|-l \textit{float}}] \hfill \\
\emph{Optional.} This sets the starting value for $\lambda$: the
parameter in the Levenberg Marquardt (LMA) optimization algorithm
that selects between Gauss-Newton optimization and gradient
@@ -235,13 +231,13 @@ \subsection{Options}
argument can be used to override its initial value. \emph{This is an
advanced setting, not recommended for normal use.}
-\item[--min-matches \textnormal{\small{(default = 5)}}] \hfill \\
+\item[\texttt{--min-matches \textit{integer(=5)}}] \hfill \\
Set the minimum number of tie-points that are required between a
pair of images for them to be included in the control network. This
option is useful for eliminating tie-points from image pairs that
have only a handful of poor or erroneous matches.
-\item[--max-iterations \textnormal{\small{(default = 25)}}] \hfill \\
+\item[\texttt{--max-iterations \textit{integer(=25)}}] \hfill \\
Sets the maximum number of iterations for bundle adjustment. The
number of required iterations will vary by problem size, so this
parameter allows the user to decide how much time they're willing
@@ -250,26 +246,26 @@ \subsection{Options}
tens or hundreds of iterations may be required for problems with
hundreds or thousands of images.
-\item[--poly-order \textnormal{\small{(default = 0)}}] \hfill \\
+\item[\texttt{--poly-order \textit{integer(=0)}}] \hfill \\
\emph{Optional.} Sets the order of the polynomial that is used for
adjustment. Using zero means only apply offset to the camera
parameters that are not time dependent. That setting is recommend
for frame cameras. Linescan imagers should using either a first
- order polynomial or a second order. Increase this number to high can
- lead to a problem that is ill-defined and would not be able to
- converge on to a solution. \emph{Initial work suggest that anything
+ order polynomial or a second order. Increasing this number too high can
+ lead to a problem that is ill-defined and would prevent the algorithm
+ from converging on a solution. \emph{Initial work suggest that anything
beyond a 2nd order polynomial would be ill-defined. 3rd order may
work with a good dose of ground control points.}
-\item[--position-sigma \textnormal{\small{(default = 100)}}] \hfill \\
+\item[\texttt{--position-sigma \textit{float(=100)}}] \hfill \\
Sets the sigma (or uncertainty) of the spacecraft position in
units of meters.
-\item[--pose-sigma \textnormal{\small{(default = 0.1)}}] \hfill \\
+\item[\texttt{--pose-sigma \textit{float(=0.1)}}] \hfill \\
Sets the sigma (or uncertainty) of the spacecraft pose in units
of radians.
-\item[--report-level, -r \textnormal{\small{(default = 10)}}] \hfill \\
+\item[\texttt{--report-level|-r \textit{integer(=10)}}] \hfill \\
\emph{Optional.} Sets the report level for the final bundle
adjustment report. This report is saved as
\texttt{isis\_adjust.report}. Report levels available are:
@@ -285,38 +281,38 @@ \subsection{Options}
\item[110 - Debug, Write Jacobian Matrix (massive human readable)]
\end{description}
-\item[--robust-threshold \textnormal{\small{(default=10)}}] \hfill \\
+\item[\texttt{--robust-threshold \textit{float(=10)}}] \hfill \\
Sets the robust threshold; an additional parameter specifically for
- the PseudoHuber, Huber, and Cauchy cost functions.
+ the \texttt{PseudoHuber}, \texttt{Huber}, and \texttt{Cauchy} arguments to the \texttt{--cost-function} option.
-\item[--save-iteration-data, -s] \hfill \\
+\item[\texttt{--save-iteration-data|-s}] \hfill \\
\emph{Optional.} Use to write {\tt bundlevis} visualization files.
-\item[--seed-with-previous] \hfill \\
+\item[\texttt{--seed-with-previous}] \hfill \\
\emph{Optional.} Loads up the previous {\tt isis\_adjust} session's
adjustment file and uses them as a starting point for this session.
-\item[--write-isis-cnet-also] \hfill \\
- \emph{Optional.} Write an Isis PVL style control network file in
+\item[\texttt{--write-isis-cnet-also}] \hfill \\
+ \emph{Optional.} Write an \ac{ISIS} \ac{PVL} style control network file to
\texttt{isis\_adjust.net}. The output file is very large compared to
the binary output, \texttt{isis\_adjust.cnet}, but is human readable
- and compatible with the Isis3 \texttt{qnet} tool.
+ and compatible with the \ac{ISIS} 3 \texttt{qnet} tool.
-\item[--write-kml \textnormal{\small{(default=0)}}] \hfill \\
+\item[\texttt{--write-kml [0|1(=0)]}] \hfill \\
\emph{Optional.} Providing this option with a zero will have the
- program write a kml showing the location of all the ground control
- points and be colored according to their final error. Providing this
+ program write a \ac{KML} file showing the location of all the \acp{GCP}
+ and be colored according to their final error. Providing this
option with a one will have this perform as before, but also have it
- write all of the 3D point estimates. This is useful for debug and
- for have a quick visualization of where stress points might exist in
+ write all of the 3D point estimates. This is useful for debugging and
+ for having a quick visualization of where stress points might exist in
a bundle adjustment problem when there are many cameras.
-\item[--help, -h] \hfill \\
+\item[\texttt{--help|-h}] \hfill \\
Provides a shortened list of the above.
\end{description}
-\section{Visualizing Bundle Adjustment with BundleVis}
+\section{Visualizing bundle adjustment with bundlevis}
The \texttt{bundlevis} program is used to visualize the process of
bundle adjustment. It will show an animated, fully interactive 3D
@@ -326,7 +322,7 @@ \section{Visualizing Bundle Adjustment with BundleVis}
\texttt{bundlevis} can be a powerful debugging tool for identifying
the problem.
-\begin{figure}[t!]
+\begin{figure}[b!]
\begin{center}
\includegraphics[width=5in]{images/bundlevis_apollo.png}
\end{center}
@@ -343,20 +339,21 @@ \section{Visualizing Bundle Adjustment with BundleVis}
by the camera. Clicking on a 3D point causes lines to be drawn to all
cameras that view the point.
-Failure of bundle adjustment looks different in every case, but there
-are two failure modes to be especially on the look out for. First is
-segmentation; where tie points will split into two or more distinct
-groups, producing cliffs between or clumps among points. This is
-usually caused by insufficient matches between a
-pair of images in your control network. You may need to choose some
-tie-points between these images by hand or add additional images that
-overlap with the problem area.
+Bundle adjustment can fail in a variety of different ways, but users
+should be aware of two common failure modes. The first is segmentation;
+where tie points will split into two or more distinct groups,
+producing cliffs between or clumps among points. This is usually
+caused by insufficient matches between a pair of images in your
+control network. You may need to choose some tie-points between
+these images by hand or add additional images that overlap with the
+problem area.
The second common sign of a failure is a point cloud explosion or
-implosion. This most often results from a high number of outlying,
-bad tie-point measurements. These bad constraints can be removed by
-hand or mitigated using one of the robust cost modes (e.g. by using
-the \texttt{--cost-function} argument for \texttt{isis\_adjust}).
+implosion (the resulting terrain looks unrecognizably noisy). This
+most often results from a high number of outlying, bad tie-point
+measurements. These bad constraints can be removed by hand or
+mitigated using one of the robust cost modes (e.g. by using the
+\texttt{--cost-function} argument for \texttt{isis\_adjust}).
\subsection{Options}
@@ -365,46 +362,46 @@ \subsection{Options}
\begin{description}
-\item[--camera-iteration-file, -c \textnormal{\small{(bundlevis camera iteration file)}}] \hfill \\
+\item[\texttt{--camera-iteration-file|-c \textit{bundlevis-camera-iteration-file}}] \hfill \\
\emph{Optional.} Supply a camera iteration file that was produced by
\texttt{isis\_adjust}. \texttt{bundlevis} will only draw cameras
if you supply a camera iteration file.
-\item[--points-iteration-file, -p \textnormal{\small{(bundlevis point iteration file)}}] \hfill \\
+\item[\texttt{--points-iteration-file|-p \textit{bundlevis-point-iteration-file}}] \hfill \\
\emph{Optional.} Supply a point iteration file that was produced by
\texttt{isis\_adjust}. \texttt{bundlevis} will only draw 3D points
if you supply a point iteration file.
-\item[--control-network-file, -n \textnormal{\small{(Vision Workbench binary control network file)}}] \hfill \\
+\item[\texttt{--control-network-file|-n \textit{Vision-Workbench-binary-control-network-file}}] \hfill \\
\emph{Optional.} Supply a control network file that was produced by
{\tt isis\_adjust}. This allows {\tt bundlevis} to show the
relationship between points and cameras when used in
conjunction with \texttt{--camera-iteration-file} and
\texttt{--points-iteration-file}.
-\item[--additional-pnt-files \textnormal{\small{(bundlevis point iteration files)}}] \hfill \\
+\item[\texttt{--additional-pnt-files \textit{bundlevis-point-iteration-files}}] \hfill \\
\emph{Optional.} Supply additional points to be animated alongside
the camera and 3D points. The files given must be in the same
- format as a bundlevis point iteration file and have the same number
+ format as a \texttt{bundlevis} point iteration file and have the same number
of iterations.
-\item[--fullscreen] \hfill \\
+\item[\texttt{--fullscreen}] \hfill \\
\emph{Optional.} Displays \texttt{bundlevis} using the entire screen;
otherwise the program loads in a window. \emph{The fullscreen option
does not work correctly with dual screen systems.}
-\item[--stereo] \hfill \\
+\item[\texttt{--stereo}] \hfill \\
\emph{Optional.} Render the 3D scene in red/blue anaglyph mode.
-\item[--show-moon] \hfill \\
- \emph{Optional.} Draws a wireframe sphere with a radius of 1737.3-km
+\item[\texttt{--show-moon}] \hfill \\
+ \emph{Optional.} Draws a wireframe sphere with a radius of 1737.3~km
that represents the Moon.
-\item[--show-mars] \hfill \\
- \emph{Optional.} Draws a wireframe sphere with a radius of 3397-km
+\item[\texttt{--show-mars}] \hfill \\
+ \emph{Optional.} Draws a wireframe sphere with a radius of 3397~km
that represents Mars.
-\item[--show-earth] \hfill \\
+\item[\texttt{--show-earth}] \hfill \\
\emph{Optional.} Draws a wireframe sphere that represents the Earth.
\end{description}
@@ -417,8 +414,8 @@ \subsection{Controls}
\paragraph{Playback Controls}
-Playback controls are similar to winamp; arranged on the keyboard like
-the controls on a tape deck.
+Playback controls are similar to those in the popular Winamp program;
+arranged on the keyboard like the controls on a tape deck.
\newenvironment{myindentpar}[1]
{\begin{list}{}
@@ -466,38 +463,51 @@ \subsection{Controls}
the viewer is zoomed in on that entity.
\section{Examples of Use}
+\label{sec:ba_example}
\subsection{Processing Mars Orbital Camera}
-What follows is an example of bundle adjustment using two Mars Orbital
-Camera (MOC) images of the south Cydonia region. We use images
-M10/00254 and R09/01059. These images are available from NASA's
-Planetary Data System (be sure to download the IMQ or IMG format
-files). For reference, the following ISIS commands are how to convert
-the MOC images to ISIS cubes.
+What follows is an example of bundle adjustment using two \ac{MOC}
+images of the south Cydonia region. We use images M10/00254 and
+R09/01059. These images are available from NASA's \ac{PDS} (the
+\ac{ISIS} \texttt{mocproc} program will operate on either the IMQ
+or IMG format files, we use the \texttt{.imq} below in the example).
+For reference, the following \ac{ISIS} commands are how to convert
+the \ac{MOC} images to \ac{ISIS} cubes.
\begin{verbatim}
- mocproc from= m1000254.im? to= m1000254.cub Mapping= NO
- mocproc from= r0901059.im? to= r0901059.cub Mapping= NO
+ ISIS 3> mocproc from= m1000254.imq to= m1000254.cub Mapping= NO
+ ISIS 3> mocproc from= r0901059.imq to= r0901059.cub Mapping= NO
\end{verbatim}
+You will note that we do not perform map-projection on these files
+(\texttt{Mapping= NO}). Bundle adjustment is about the adjustment
+of the cameras themselves and their relationship to how 3D points
+project onto their focal planes, not how their data are transformed
+into known map projections. Although bundle adjustment could be
+performed on map-projected images, \texttt{isis\_adjust} would just
+have to apply the inverse of the map projection to extract focal plane
+coordinates for each pixel anyway. So it is more efficient to operate
+on non-map-projected images for this step.
+
At this point, we need to automatically generate tie-points between
these two images. This can be done using the \texttt{ipfind} and
\texttt{ipmatch} utilities. These tools do not (currently) work
with photometrically calibrated images, so we must first convert
-these images to a standard format using the ISIS program \texttt{isis2std}:
+these images to a standard format using the \ac{ISIS} program
+\texttt{isis2std}:
\begin{verbatim}
- isis2std from= m1000254.cub to= m1000254.png format= PNG
- isis2std from= r0901059.cub to= r0901059.png format= PNG
+ ISIS 3> isis2std from= m1000254.cub to= m1000254.png format= PNG
+ ISIS 3> isis2std from= r0901059.cub to= r0901059.png format= PNG
\end{verbatim}
Here is how to process those newly created PNG files for tie-points
-using the tools available in Vision Workbench.
+using these Vision Workbench tools.
\begin{verbatim}
- ipfind m1000254.png r0901059.png
- ipmatch m1000254.png r0901059.png -d -r homography -i 20
+ > ipfind m1000254.png r0901059.png
+ > ipmatch m1000254.png r0901059.png -d -r homography -i 20
\end{verbatim}
\begin{center}
@@ -524,27 +534,28 @@ \subsection{Processing Mars Orbital Camera}
detailed report file of \texttt{isis\_adjust}'s results.
\begin{verbatim}
- isis_adjust *.cub -s --max 100 -r 50
+ ISIS 3> isis_adjust *.cub -s --max 100 -r 50
\end{verbatim}
-This command will produce considerable debugging output and will place
-many output files in the current working directory. Don't panic--this
-is perfectly normal! If you look through the output in the terminal or
-alternatively in the output report file, \texttt{isis\_adjust.report},
-you'll see that the problem did not converge but reduced most of the
-error it the first 40 iterations (again, your results may vary
-slightly). The lack of convergence is worrisome and a few (like 3)
-ground control points would probably help out considerably. Even
-still, notice that the error improved only slightly, but the shape of
-the pointcloud and the camera paths have change considerably. This
-untwisting of the cameras can be seen next in \texttt{bundlevis}.
+This command will produce considerable debugging output and will
+place many output files in the current working directory. Don't
+panic--this is perfectly normal! If you look through the output in
+the terminal or alternatively in the output report file,
+\texttt{isis\_adjust.report}, you'll see that the problem did not
+converge but reduced most of the error in the first 40 iterations
+(again, your results may vary slightly). The lack of convergence
+is worrisome and a few (like 3) ground control points would probably
+help considerably. Notice that the error improved only slightly
+after those first 40 iterations, but the shape of the pointcloud and
+the camera paths changed considerably. This untwisting of the
+cameras can be seen next in \texttt{bundlevis}.
Visualizing all of the data that was exported for \texttt{bundlevis}
can be carried out as follows:
\begin{verbatim}
- bundlevis -p iterPointsParam.txt -c iterCameraParam.txt
- -n isis_adjust.cnet
+ > bundlevis -p iterPointsParam.txt -c iterCameraParam.txt \
+ -n isis_adjust.cnet
\end{verbatim}
Press escape to exit out of \texttt{bundlevis} when finished. You may
@@ -553,19 +564,21 @@ \subsection{Processing Mars Orbital Camera}
size of a MOC frame is quite small relative to the size of Mars!
\begin{verbatim}
- bundlevis -p iterPointsParam.txt -c iterCameraParam.txt
- -n isis_adjust.cnet --show-mars
+ > bundlevis -p iterPointsParam.txt -c iterCameraParam.txt \
+ -n isis_adjust.cnet --show-mars
\end{verbatim}
Producing a DEM using the newly created corrections is the same as
covered in the Tutorial on page \pageref{ch:tutorial}, with one small
difference: \texttt{stereo} needs to know of the existence of the
correction files, \texttt{m1000254.isis\_adjust} and
-\texttt{r0901059.isis\_adjust}:
+\texttt{r0901059.isis\_adjust}. The \ac{MOC} images should also be
+map-projected with \texttt{cam2map} (as the Tutorial shows) to create
+the \texttt{.map.cub} files that \texttt{stereo} will operate on.
\begin{verbatim}
- stereo m1000254.cub r0901059.cub m1000254.isis_adjust
- r0901059.isis_adjust MOC_RESULTS/M1000254_R0901059
+ ISIS 3> stereo m1000254.map.cub r0901059.map.cub m1000254.isis_adjust \
+ r0901059.isis_adjust MOC_RESULTS/M1000254_R0901059
\end{verbatim}
Note the two new arguments (\texttt{*.isis\_adjust}) to
@@ -575,20 +588,23 @@ \subsection{Processing Mars Orbital Camera}
\subsection{Processing with Ground Control Points}
-Ground control point files describe a single point in the world that
-is seen by 1 or more cameras. How they are measured in the first place
-is up to the user. We use a manual process of comparing each image to
-a respected map projected image and then recording the LLA. The maps
-to register against can be anything, but it is recommended to register
-against a USGS product that can provide imagery that is registered to
-LIDAR height measurements.
+Ground control point files describe a single point in the world
+that is seen by 1 or more cameras. How they are measured in the
+first place is up to the user. We use a manual process of comparing
+each image to a respected map projected image and then recording
+the latitude, longitude, and altitude of the point(s). The maps to
+register against can be anything, but it is recommended to register
+against a product with a high amount of cartographic stability and
+accuracy. For terrestrial work, we would use a \ac{USGS} product
+that can provide imagery that is registered to LIDAR height
+measurements.
Unlike match files, ground control points must specifically be given
to \texttt{isis\_adjust} from the command line, but in no particular
order. Ground control point files are written with the extension
\texttt{.gcp}. Below is an example of a ground control point file that
was created to control a series of Apollo Metric Camera images from
-several of Apollo 15's orbits.
+several Apollo 15 orbits.
\begin{verbatim}
-52.8452 27.2561 1735999 300 300 500
@@ -603,11 +619,11 @@ \subsection{Processing with Ground Control Points}
sub4-AS15-M-2484.cub 3642.1 4330.9
\end{verbatim}
-First thing that comes to mind is how the first and the rest of the
-lines are different. The first line defines the world location of the
-ground control point, and the rest of the lines define the image
-location of the ground control point. Here are what the columns mean
-for the first line.
+The first line of a \texttt{.gcp} file is like a header line and
+is different from the remaining lines. The first line defines the
+world location of the ground control point, and the rest of the
+lines define the image locations of the ground control points. Here
+are what the columns mean for the first line.
\begin{myindentpar}{2cm}
\begin{description}
@@ -620,7 +636,7 @@ \subsection{Processing with Ground Control Points}
\end{description}
\end{myindentpar}
-The other lines are much easier, and here is what those columns mean.
+The other lines describe where this \ac{GCP} is found in each image:
\begin{myindentpar}{2cm}
\begin{description}
@@ -630,43 +646,43 @@ \subsection{Processing with Ground Control Points}
\end{description}
\end{myindentpar}
-Make a {\tt .gcp} file for every ground control point, then be sure to
-feed them as an input to {\tt isis\_adjust}. Remember that you can
-back off the sigma of all ground control points by using the flag,
-{\tt --gcp-scalar}. Hopefully that will save time by not having to
-edit all of the files.
+Make a {\tt .gcp} file for every ground control point, then be sure
+to feed them as an input to {\tt isis\_adjust}. Remember that you
+can scale the sigma of all ground control points by using the {\tt
+--gcp-scalar} flag. This can save time by allowing you to make
+adjustments without needing to edit all of the files individually.
-\subsection{Sharing Data with Isis 3's Qnet}
+\subsection{Sharing Data with ISIS 3's qnet program}
-Isis contains a program called \texttt{qnet} whose purpose is to
-create and edit Isis style control network files. To share a control
-network with \texttt{qnet}, you will need to save our control network
-in the Isis format. If bundle adjustment has already been performed
-once and if we want to simply convert the control network for use in
-\texttt{qnet}, you can use this command to save an Isis style control:
-network:
+\ac{ISIS} contains a program called \texttt{qnet} whose purpose is
+to create and edit \ac{ISIS} style control network files. To share
+a control network with \texttt{qnet}, you will need to save our
+control network in the \ac{ISIS} format. If bundle adjustment has
+already been performed once and if we want to simply convert the
+control network for use in \texttt{qnet}, you can use this command
+to save an \ac{ISIS} style control network:
\begin{verbatim}
- isis_adjust -c isis_adjust.cnet --write-isis-cnet-also *.cub
+ ISIS 3> isis_adjust -c isis_adjust.cnet --write-isis-cnet-also *.cub
\end{verbatim}
Otherwise if this is the first time performing bundle adjustment and a
control network does not already exist, use:
\begin{verbatim}
- isis_adjust --write-isis-cnet-also *.cub
+ ISIS 3> isis_adjust --write-isis-cnet-also *.cub
\end{verbatim}
-There should now be an \verb=isis_adjust.net= file in the project's
+There should now be an \texttt{isis\_adjust.net} file in the project's
directory. It will be quite a bit larger than the other control
-network file since it is stored as ASCII text, but it can be read and
-edited with a text editor. Before starting \texttt{qnet}, there is one
-additional preparation that must be performed. Isis's \texttt{qnet} requires
-a text file listing of all the cubes used by the control
-network. Here's how to create one:
+network file since it is stored as ASCII text, but it can be read
+and edited with a text editor. Before starting \texttt{qnet}, there
+is one additional preparation that must be performed. \ac{ISIS}'s
+\texttt{qnet} requires a text file listing of all the cubes used
+by the control network. Here's how to create one:
\begin{verbatim}
- ls *.cub > list_of_cubes.lis
+ > ls *.cub > list_of_cubes.lis
\end{verbatim}
Now, start up \texttt{qnet} without any command line arguments. Click
@@ -679,8 +695,8 @@ \subsection{Sharing Data with Isis 3's Qnet}
At this time \texttt{qnet} does not work with the Apollo Metric
Camera's cube files. When loading the text file listing of cubes
- it will issue error about invalid serial numbers for the listed
- cube files. (03/11/09)
+ it will issue an error about invalid serial numbers for the listed
+ cube files. % (03/11/09)
\end{minipage}}
\end{center}
@@ -689,23 +705,12 @@ \subsection{Sharing Data with Isis 3's Qnet}
the new control network in \texttt{isis\_adjust}:
\begin{verbatim}
- isis_adjust -c the_new_control_network.net *.cub
+ ISIS 3> isis_adjust -c the_new_control_network.net *.cub
\end{verbatim}
-Take note that to distinguish Isis style control network files from
-Stereo Pipeline style is by the file extension. Isis control networks
-have the extension of \texttt{.net} and can be read with a text
-editor. Stereo Pipeline's control networks have the extension
-\texttt{.cnet} and are binary.
-
-% \begin{thebibliography}{1}
-%
-% \bibitem{hartley04} Hartley, R.I. and Zisserman, A. ``Multiple View Geometry in Computer Vision,''
-% Cambridge University Press. 2004. pp 597-627.
-% \bibitem{moore09} Moore, Wright, Schinstock, and Lewis. ``Comparison of Bundle Adjustment Formulations,''
-% presented at ASPRS Annual Conf., Baltimore, Maryland, 2009.
-% \bibitem{triggs00} Triggs, McLauchlan, Hartley, and Fitzgibbon. ``Bundle Adjustment - A Modern Synthesis,''
-% Lecture Notes in Computer Science. Vol. 1883, 298. January 2000
-% \bibitem{surf09} Bay, Gool, and Tuytelaars. (2009, Mar.). ``SURF: Speeded Up Robust Features'' [Online]. Available: \verb!http://www.vision.ee.ethz.ch/~surf/download.html!
-%
-% \end{thebibliography}
+Take note that to distinguish \ac{ISIS} style control network files
+from Stereo Pipeline style control network files is by the file
+extension. \ac{ISIS} control networks have the extension of
+\texttt{.net} and can be read with a text editor. Stereo Pipeline's
+control networks have the extension \texttt{.cnet} and are binary
+format files.
View
38 docs/book/correlation.tex
@@ -41,7 +41,7 @@ \section{Pre-processing}
Next, the left and right images are roughly aligned using one of
two methods: (1) a linear transform of the right image based on
automated tie-point measurements, or (2) map projection of both the
-left and right image using the \ac{ISIS} \texttt{cam2map} command. The
+left and right images using the \ac{ISIS} \texttt{cam2map} command. The
former option is done automatically by the stereo pipeline when the
\texttt{DO\_INTERESTPOINT\_ALIGNMENT} variable in the
\texttt{stereo.default} file is turned on.
@@ -174,15 +174,15 @@ \subsection{Debugging Disparity Map Initialization}
these blunders, but the effectiveness of these outlier rejection
strategies does vary depending on the quality of the input imagery.
-When tuning up your {\tt stereo.default} file, you will find that it
-is very helpful to look at the raw output of the disparity map
+When tuning up your {\tt stereo.default} file, you will find that
+it is very helpful to look at the raw output of the disparity map
initialization step. This can be done using the {\tt disparitydebug}
-tool, which converts the {\tt <output\_prefix>-D.exr} file into a pair
-of normal images that contain the horizontal and vertical components
-of disparity. You can open these in a standard image viewing
-application and see immediately which pixels were matched
-successfully, and which were not. Stereo matching blunders are
-usually also obvious when inspecting these images. With a good
+tool, which converts the \texttt{\textit{output\_prefix}-D.exr}
+file into a pair of normal images that contain the horizontal and
+vertical components of disparity. You can open these in a standard
+image viewing application and see immediately which pixels were
+matched successfully, and which were not. Stereo matching blunders
+are usually also obvious when inspecting these images. With a good
intuition for the effects of various {\tt stereo.default} parameters
and a good intuition for reading the output of {\tt disparitydebug},
it is possible to quickly identify and address most problems.
@@ -196,7 +196,7 @@ \section{Sub-pixel Refinement}
sub-pixel refinement stage based on the \texttt{SUBPIXEL\_MODE} setting.
The first mode is parabola-fitting sub-pixel refinement
-(\texttt{SUBPXEL\_MODE 1}). This technique fits a 2D parabola to
+(\texttt{SUBPIXEL\_MODE 1}). This technique fits a 2D parabola to
points on the correlation cost surface in an 8-connected neighborhood
around the cost value that was the ``best'' as measured during
disparity map initialization. The parabola's minimum can then be
@@ -205,8 +205,8 @@ \section{Sub-pixel Refinement}
This method is easy to implement and extremely fast to compute, but it
exhibits a problem known as pixel-locking: the sub-pixel disparities
-tend toward their integer estimates and can create noticeable "stair
-steps" on surfaces that should be
+tend toward their integer estimates and can create noticeable ``stair
+steps'' on surfaces that should be
smooth \citep{Stein06:attenuating,Szeliski03sampling}. See
e.g. Figure~\ref{fig:parabola_subpixel}. Furthermore, the parabola
subpixel mode is not capable of refining a disparity estimate by more
@@ -257,14 +257,14 @@ \section{Sub-pixel Refinement}
This affine-adaptive behavior is based on the Lucas-Kanade template
tracking algorithm, a classic algorithm in the field of computer
-vision. We have extended this technique; developing a
-Bayesian model that treats the Lucas-Kanade parameters as random
-variables in an Expectation Maximization (EM) framework. This
-statistical model also includes a Gaussian mixture component to
-model image noise that is the basis for the robustness of our
+vision \citep{Baker04:lucas-kanade}. We have extended this technique;
+developing a Bayesian model that treats the Lucas-Kanade parameters
+as random variables in an Expectation Maximization (EM) framework.
+This statistical model also includes a Gaussian mixture component
+to model image noise that is the basis for the robustness of our
algorithm. We will not go into depth on our approach here, but we
-encourage interested readers to read our papers on the
-topic \citep{nefian:bayes_em, broxton:isvc09}.
+encourage interested readers to read our papers on the topic
+\citep{nefian:bayes_em, broxton:isvc09}.
However we do note that, like the computations in the disparity map
initialization stage, we adopt a multi-scale approach for sub-pixel
View
695 docs/book/examples.tex
@@ -1,11 +1,13 @@
\chapter{Data Processing Examples}
\label{ch:examples}
+\definecolor{lgray}{gray}{0.95}
+
This chapter showcases a variety of results that are possible when
-processing different data sets with the Stereo Pipeline. It is also a
-shortened guide that shows the commands and stereo.default files used
-to process data. We hope that these are useful templates that will get
-you started in processing your own data.
+processing different data sets with the Stereo Pipeline. It is also
+a shortened guide that shows the commands and \texttt{stereo.default}
+files used to process data. We hope that these are useful templates
+that will get you started in processing your own data.
\section{Guidelines for Selecting Stereo Pairs}
@@ -15,77 +17,96 @@ \section{Guidelines for Selecting Stereo Pairs}
models. Depending on the characteristics of the mission data set and
the individual images, the degree of acceptable variation will
differ. Significant differences between image characteristics
-increases the liklihood of stereo matching error and artifacts, and
+increases the likelihood of stereo matching error and artifacts, and
these errors will propagate through to the resulting data products.
Although images do not need to be map projected before running the
\texttt{stereo} program, we recommend that you do run {\tt cam2map}
beforehand, especially for image pairs that contain large topographic
-variation (and therefore large disparity differences across the scene,
-\emph{e.g. Valles Marineris}). Map projection is especially necessary
-when processing HiRISE images. This removes the large disparity
-differences between HiRISE images and leaves only the small detail for
-the Stereo Pipeline to compute. Remember that ISIS can work backwards
-through a map-projection when applying the camera model, so the
-geometric integrity of your images will not be sacrified if you map
-project first.
+variation (and therefore large disparity differences across the
+scene, e.g. Valles Marineris). Map projection is especially necessary
+when processing \ac{HiRISE} images. This removes the large disparity
+differences between \ac{HiRISE} images and leaves only the small
+detail for the Stereo Pipeline to compute. Remember that \ac{ISIS}
+can work backwards through a map-projection when applying the camera
+model, so the geometric integrity of your images will not be sacrificed
+if you map project first.
Excessively noisy images will not correlate well, so images should be
photometrically calibrated in whatever fashion suits your purposes. If
there are photometric problems with the images, those photometric
defects can be misinterpreted as topography.
-Remember, in order for \texttt{stereo} to process stereo pairs in ISIS
-CUBE format, the images must have had SPICE data associated by running
-ISIS's \texttt{spiceinit} program run on them first.
+Remember, in order for \texttt{stereo} to process stereo pairs in
+\ac{ISIS} cube format, the images must have had SPICE data associated
+by running ISIS's \texttt{spiceinit} program run on them first.
-\section{Mars Reconaissance Orbiter HiRISE}
+\section{Mars Reconnaissance Orbiter HiRISE}
-HiRISE is one of the most challenging cameras to use when making 3D
-models because HiRISE exposures can be several gigabytes each. Working
+\ac{HiRISE} is one of the most challenging cameras to use when making 3D
+models because \ac{HiRISE} exposures can be several gigabytes each. Working
with this data requires patience as it will take time.
One important fact to know about HiRISE is that it is composed of
multiple linear CCDs that are arranged side by side with some vertical
offsets. These offsets mean that the CCDs will view some of the same
terrain but at a slightly different time and a slightly different
-angle. Mosiacing the CCDs together to a single image is not a simple
+angle. Mosaicking the CCDs together to a single image is not a simple
process and involves living with some imperfections.
-At this time, we recommend mosaicking CCDs using the scripts available
-at your institution (both USGS and University of Arizona have this
-capability). Having said that, we are also providing a script that
-will take raw HiRISE images and combine them into a mosaic name
-\texttt{hiedr2mosaic.py}. Our script takes all red CCDs and projects
-them using the ISIS {\tt noproj} command into the perspective of RED5
-CCD. From there, {\tt hijitreg} is performed to work out the relative
-offsets between CCDs. Finally the CCDs are mosaicked together using
-the average offset listed from {\tt hijitreg} using the {\tt handmos}
-command. Below is an outline of what our script does. It is based on
-the tutorial provided on the USGS ISIS website.
+One cannot simply use the \ac{HiRISE} RDR products, as they do not
+have the required geometric stability. Instead, the \ac{HiRISE}
+EDR products must be assembled using \ac{ISIS} \texttt{noproj}.
+The USGS distributes a script in use by the \ac{HiRISE} team that
+works forward from the team-produced `balance' cubes, which provides
+a de-jittered, noproj'ed mosaic of a single observation, which is
+perfectly suitable for use by the Stereo Pipeline (this script was
+originally engineered to provide input for SOCET SET). However,
+the `balance' cubes are not available to the general public, and
+so we include a program (\texttt{hiedr2mosaic.py}, written in
+\href{http://www.python.org}{Python}) that will take \ac{PDS}
+available \ac{HiRISE} EDR products and walk through the processing
+steps required to provide good input images for \texttt{stereo}.
+
+The program takes all the red CCDs and projects them using the \ac{ISIS}
+{\tt noproj} command into the perspective of the RED5 CCD. From there,
+{\tt hijitreg} is performed to work out the relative offsets between
+CCDs. Finally the CCDs are mosaicked together using the average
+offset listed from {\tt hijitreg} using the {\tt handmos} command.
+Below is an outline of the processing.
\begin{verbatim}
hi2isis # Import HiRISE IMG to Isis
- spiceinit # Attach spice data
hical # Calibrate
- histitch # Turn 20 files into 10
- cubenorm # Remove boundary between histitchs
+ histitch # Assemble whole-CCD images from the channels
spiceinit
spicefit # For good measure
noproj # Project all images into perspective of RED5
hijitreg # Work out alignment between CCDs
handmos # Mosaic to single file
- cubenorm # Clean up divisions
\end{verbatim}
-To use our script, first go to the directory containing all of
-HiRISE's RED \texttt{IMG} files. Then feed the script one of those
-\texttt{IMG} files.
+To use our script, first go to the directory where you have downloaded
+the HiRISE's RED EDR \texttt{IMG} files. You can run the
+\texttt{hiedr2mosaic.py} program without any arguments to view a short
+help statement, with the \texttt{-h} option to view a longer help statement,
+or just run the program on the EDR files like so:
\begin{verbatim}
- hiedr2mosaic.py PSP_??????_????_RED?_?.IMG
+ hiedr2mosaic.py *.IMG
\end{verbatim}
+If you have more than one observation's worth of EDRs in that
+directory, then limit the program to just one observation's EDRs
+at a time, e.g. \texttt{hiedr2mosaic.py PSP\_001513\_1655*IMG}. If you
+run into problems, try using the \texttt{-k} option to retain all of
+the intermediary image files to help track down the issue. The
+\texttt{hiedr2mosaic.py} program will create a single mosaic file
+with the extension \texttt{.mos\_hijitreged.norm.cub}. Be warned that
+the operations carried out by \texttt{hiedr2mosaic.py} can take many
+hours to complete on the very large HiRISE images.
+
+
Finally we recommend map projecting the product and normalizing both
images in the stereo pair using the same dynamic range. Notice that we
map project the second image using the same map settings and crop of
@@ -93,65 +114,30 @@ \section{Mars Reconaissance Orbiter HiRISE}
the {\tt stereo.default} search range can be centered around zero.
\begin{verbatim}
- cam2map f=first.cub t=first.map.cub
- cam2map f=second.cub map=first.map.cub t=second.map.cub matchmap=true
- bandnorm f=first.map.cub t=first.norm.cub
- bandnorm f=second.map.cub t=second.norm.cub
- ls first.norm.cub second.norm.cub > fromlist
- ls first.norm.cub > holdlist
- equalizer fromlist=fromlist holdlist=holdlist
- mkdir result
- stereo first.norm.equ.cub second.norm.equ.cub result/output
+ ISIS 3> cam2map f=first.mos_hijitreged.norm.cub t=first.map.cub
+ ISIS 3> cam2map f=second.mos_hijitreged.norm.cub map=first.map.cub \
+ to=second.map.cub matchmap=true
+ ISIS 3> bandnorm f=first.map.cub t=first.norm.cub
+ ISIS 3> bandnorm f=second.map.cub t=second.norm.cub
+ ISIS 3> ls first.norm.cub second.norm.cub > fromlist
+ ISIS 3> ls first.norm.cub > holdlist
+ ISIS 3> equalizer fromlist=fromlist holdlist=holdlist
+ ISIS 3> mkdir result
+ ISIS 3> stereo first.norm.equ.cub second.norm.equ.cub result/output
\end{verbatim}
-In the future, it is our understanding that the HiRISE team will be
-producing stitch but non-map--projected imagery to the PDS. If this
-happens, most of the above commands will no longer be required.
+In the future, the HiRISE team will be producing de-jittered, noproj'ed
+imagery in the \texttt{extras/} directory of their \ac{PDS} volume.
+When this happens, most of the above commands will no longer be required,
+as you will be able to just run \texttt{cam2map} on their provided imagery.
\subsection{Columbia Hills}
-The following description is taken and shortened from the HiRISE
-instrument website.
-\url{http://hirise.lpl.arizona.edu/PSP_001513_1655}
-
-\begin{quotation}
-This HiRISE image shows the landing site of the Mars Exploration Rover
-Spirit. The impact crater in the upper left-hand portion of the image
-is "Bonneville Crater," which was investigated by Spirit shortly after
-landing. In the lower right-hand portion of the image is "Husband
-Hill," a large hill that Spirit climbed and where it spent much of its
-now nearly three-year mission.
-
-The bright irregularly-shaped feature in the area north-west of
-Bonneville Crater is Spirit's parachute, now lying on the Martian
-surface. Near the parachute is the cone-shaped "backshell" that helped
-protect Spirit's lander during its seven-month journey to Mars. The
-backshell appears relatively undamaged by its impact with the martian
-surface. Wrinkles and folds in the parachute fabric are clearly
-visible.
-
-Immediately south west of Bonneville Crater shows Spirit's lander. The
-crater in the upper left-hand portion of the image, just to the
-northwest of the lander, is the one that the Mars Exploration Rover
-team named "Sleepy Hollow."
-
-The north rim of Bonneville Crater shows the damaged remnant of the
-heat shield that protected the vehicle during the high-speed entry
-through the Martian atmosphere. The heat shield impacted the surface
-after being separated from the vehicle during the final stages of the
-descent.
-
-South of Husband Hill shows the current location of Spirit. Toward the
-top of the image is "Home Plate," a plateau of layered rocks that
-Spirit explored during the early part of its third year on
-Mars. Spirit itself is clearly seen just to the southeast of Home
-Plate. Also visible are the tracks made by the rover before it arrived
-at its current location.
-
-Written by: Steve Squyres
-\end{quotation}
-
-\subsubsection*{Screenshot}
+\ac{HiRISE} observations
+\href{http://hirise.lpl.arizona.edu/PSP_001513_1655}{PSP\_001513\_1655} and
+\href{http://hirise.lpl.arizona.edu/PSP_001777_1650}{PSP\_001777\_1650}
+are on the floor of Gusev Crater and cover the area where the \ac{MER}
+Spirit landed and has roved, including the Columbia Hills.
\begin{figure}[h!]
\centering
@@ -159,33 +145,38 @@ \subsubsection*{Screenshot}
\hfil
\subfigure[{\tt KML Screenshot}]{\includegraphics[width=3in]{images/examples/hirise/chills_hirise_ge_example.png}}
\caption{Example output using HiRISE images PSP\_001513\_1655 and
- PSP\_001777\_1650 of East Mareotis Tholus.}
+ PSP\_001777\_1650 of the Columbia Hills.}
\label{fig:hirise_chills_example}
\end{figure}
\subsubsection*{Commands}
+Download all 20 of the RED EDR \texttt{.IMG} files for each observation.
\begin{verbatim}
- % Download all of the RED IMG for PSP_001513_1655 & %
- % PSP_001777_1650 %
- ~/hiedr2mosaic.py PSP_001513_1655_RED0_0.IMG
- ~/hiedr2mosaic.py PSP_001777_1650_RED0_0.IMG
- cam2map from=PSP_001513_1655_REDmosaic.norm.cub to=PSP_001513_1655_REDmosaic.map.cub
- cam2map from=PSP_001777_1650_REDmosaic.norm.cub map=PSP_001513_1655_REDmosaic.map.cub ...
- to=PSP_001777_1650_REDmosaic.norm.cub matchmap=true
- bandnorm from=PSP_001513_1655_REDmosaic.map.cub to=PSP_001513_1655_REDmosaic.map.norm.cub
- bandnorm from=PSP_001777_1650_REDmosaic.map.cub to=PSP_001777_1650_REDmosaic.map.norm.cub
- ls *.map.norm.cub > fromlist
- ls *1513*.map.norm.cyb > holdlist
- equalizer fromlist=fromlist holdlist=holdlist
- rm *REDmosaic.map.norm.cub *REDmosaic.map.cub
- mkdir result
- stereo PSP_001513_1655.map.norm.equ.cub PSP_001777_1650.map.norm.equ.cub result/output
+ ISIS 3> hiedr2mosaic.py PSP_001513_1655_RED*.IMG
+ ISIS 3> hiedr2mosaic.py PSP_001777_1650_RED*.IMG
+ ISIS 3> cam2map from=PSP_001513_1655_RED.mos_hijitreged.norm.cub \
+ to=PSP_001513_1655_REDmosaic.map.cub
+ ISIS 3> cam2map from=PSP_001777_1650_RED.mos_hijitreged.norm.cub \
+ map=PSP_001513_1655_REDmosaic.map.cub \
+ to=PSP_001777_1650_REDmosaic.norm.cub matchmap=true
+ ISIS 3> bandnorm from=PSP_001513_1655_REDmosaic.map.cub \
+ to=PSP_001513_1655_REDmosaic.map.norm.cub
+ ISIS 3> bandnorm from=PSP_001777_1650_REDmosaic.map.cub \
+ to=PSP_001777_1650_REDmosaic.map.norm.cub
+ ISIS 3> ls *.map.norm.cub > fromlist
+ ISIS 3> ls *1513*.map.norm.cub > holdlist
+ ISIS 3> equalizer fromlist=fromlist holdlist=holdlist
+ ISIS 3> rm *REDmosaic.map.norm.cub *REDmosaic.map.cub
+ ISIS 3> mkdir result
+ ISIS 3> stereo PSP_001513_1655.map.norm.equ.cub \
+ PSP_001777_1650.map.norm.equ.cub result/output
\end{verbatim}
-\subsubsection*{Stereo Default}
+\subsubsection*{stereo.default}
-\begin{verbatim}
+\begin{center}\begin{minipage}{5.5in}
+\begin{Verbatim}[frame=single,fontsize=\small,label=stereo.default for HiRISE Columbia Hills]
### PREPROCESSING
DO_INTERESTPOINT_ALIGNMENT 0
@@ -231,39 +222,15 @@ \subsubsection*{Stereo Default}
NEAR_UNIVERSE_RADIUS 0.0
FAR_UNIVERSE_RADIUS 0.0
-\end{verbatim}
+\end{Verbatim}
+\end{minipage}\end{center}
\subsection{East Mareotis Tholus}
-The description is taken from the HiRISE instrument website.
-\url{http://hirise.lpl.arizona.edu/PSP_001760_2160}
-
-\begin{quotation}
-East Mareotis Tholus is a small volcano in Tempe Terra, Mars. This
-area is on the northeast edge of the Tharsis bulge that was built up
-by many large and small volcanoes.
-
-One of the many questions we hope to address with HiRISE is the
-relative roles of the giant shield volcanoes (such as Olympus Mons)
-and smaller volcanic features (such as East Mareotis Tholus).
-
-The anaglyph covers 4.4 x 6.9 km (2.7 x 4.9 miles) and the topography
-can be viewed using red-blue glasses. The elongated pit at the summit
-of the volcano is where the lava issued forth. The large circular hole
-just to the SW of the vent is an impact crater. The gouges in the
-ground to the SE of the volcano are tectonic fissures (called graben)
-that are now filled with sand dunes. The area is covered with large
-amounts of wind-blown dust, so it is not surprising that lava flows
-and other smaller volcanic features are not visible.
-
-However, the smooth shape of the volcano, and the lack of lava layers
-exposed in the impact crater, allow for the possiblity that this
-volcano is composed largely of ash, rather than lava flows.
-
-Written by: Laszlo P. Keszthelyi
-\end{quotation}
-
-\subsubsection*{Screenshot}
+\ac{HiRISE} observations
+\href{http://hirise.lpl.arizona.edu/PSP_001760_2160}{PSP\_001760\_2160} and
+\href{http://hirise.lpl.arizona.edu/PSP_001364_2160}{PSP\_001364\_2160}
+cover East Mareotis Tholus, a small volcano in Tempe Terra.
\begin{figure}[h!]
\centering
@@ -277,27 +244,32 @@ \subsubsection*{Screenshot}
\subsubsection*{Commands}
+Download all 20 of the RED EDR \texttt{.IMG} files for each observation.
\begin{verbatim}
- % Download all of the RED IMG for PSP_001364_2160 & %
- % PSP_001760_2160 %
- ~/hiedr2mosaic.py PSP_001364_2160_RED0_0.IMG
- ~/hiedr2mosaic.py PSP_001760_2160_RED0_0.IMG
- cam2map from=PSP_001364_2160_REDmosaic.norm.cub to=PSP_001364_2160_REDmosaic.map.cub
- cam2map from=PSP_001760_2160_REDmosaic.norm.cub map=PSP_001364_2160_REDmosaic.map.cub ...
- to=PSP_001760_2160_REDmosaic.map.cub matchmap=true
- bandnorm from=PSP_001364_2160_REDmosaic.map.cub to=PSP_001364_2160_REDmosaic.map.norm.cub
- bandnorm from=PSP_001760_2160_REDmosaic.map.cub to=PSP_001760_2160_REDmosaic.map.norm.cub
- ls *.map.norm.cub > fromlist
- ls *1760*.map.norm.cub > holdlist
- equalizer fromlist=fromlist holdlist=holdlist
- rm *REDmosaic.map.norm.cub *REDmosaic.map.cub
- mkdir result
- stereo PSP_001364_2160.map.norm.equ.cub PSP_001760_2160.map.norm.equ.cub result/output
+ ISIS 3> hiedr2mosaic.py PSP_001364_2160_RED*.IMG
+ ISIS 3> hiedr2mosaic.py PSP_001760_2160_RED*.IMG
+ ISIS 3> cam2map from=PSP_001364_2160_RED.mos_hijitreged.norm.cub \
+ to=PSP_001364_2160_REDmosaic.map.cub
+ ISIS 3> cam2map from=PSP_001760_2160_RED.mos_hijitreged.norm.cub \
+ map=PSP_001364_2160_REDmosaic.map.cub \
+ to=PSP_001760_2160_REDmosaic.map.cub matchmap=true
+ ISIS 3> bandnorm from=PSP_001364_2160_REDmosaic.map.cub \
+ to=PSP_001364_2160_REDmosaic.map.norm.cub
+ ISIS 3> bandnorm from=PSP_001760_2160_REDmosaic.map.cub \
+ to=PSP_001760_2160_REDmosaic.map.norm.cub
+ ISIS 3> ls *.map.norm.cub > fromlist
+ ISIS 3> ls *1760*.map.norm.cub > holdlist
+ ISIS 3> equalizer fromlist=fromlist holdlist=holdlist
+ ISIS 3> rm *REDmosaic.map.norm.cub *REDmosaic.map.cub
+ ISIS 3> mkdir result
+ ISIS 3> stereo PSP_001364_2160.map.norm.equ.cub \
+ PSP_001760_2160.map.norm.equ.cub result/output
\end{verbatim}
-\subsubsection*{Stereo Default}
+\subsubsection*{stereo.default}
-\begin{verbatim}
+\begin{center}\begin{minipage}{5.5in}
+\begin{Verbatim}[frame=single,fontsize=\small,label=stereo.default for HiRISE East Mareotis Tholus]
### PREPROCESSING
DO_INTERESTPOINT_ALIGNMENT 0
@@ -335,7 +307,7 @@ \subsubsection*{Stereo Default}
RM_H_HALF_KERN 5
RM_V_HALF_KERN 5
- RM_MIN_MATCHES 60 # Units = percest
+ RM_MIN_MATCHES 60 # Units = percent
RM_THRESHOLD 3
RM_CLEANUP_PASSES 1
@@ -343,20 +315,21 @@ \subsubsection*{Stereo Default}
NEAR_UNIVERSE_RADIUS 0.0
FAR_UNIVERSE_RADIUS 0.0
-\end{verbatim}
+\end{Verbatim}
+\end{minipage}\end{center}
\subsection{North Terra Meridiani Crop}
-HiRISE website only has to say that this is `Layered Materials within
-a Small Crater'. Hopefully you'll still agree that this is cool.
-
-\subsubsection*{Screenshot}
+\ac{HiRISE} observations
+\href{http://hirise.lpl.arizona.edu/PSP_001981_1825}{PSP\_001981\_1825} and
+\href{http://hirise.lpl.arizona.edu/PSP_002258_1825}{PSP\_002258\_1825}
+show a small crater filled by layered material.
\begin{figure}[h!]
\centering
- \subfigure[{\tt 3D Rendering}]{\includegraphics[width=3in]{images/examples/hirise/nterra_example.png}}
+ \subfigure[{\tt 3D Rendering}]{\includegraphics[height=2.5in]{images/examples/hirise/nterra_example.png}}
\hfil
- \subfigure[{\tt KML Screenshot}]{\includegraphics[width=3in]{images/examples/hirise/nterra_ge_example.png}}
+ \subfigure[{\tt KML Screenshot}]{\includegraphics[height=2.5in]{images/examples/hirise/nterra_ge_example.png}}
\caption{Example output using cropped HiRISE data of North Terra Meridiani.}
\label{fig:hirise_nterra_example}
\end{figure}
@@ -366,33 +339,37 @@ \subsubsection*{Commands}
Notice here that we have applied a crop to select a subset of these
HiRISE images that we are interested in. Cropping is often an
efficient way to go because it greatly reduces the amount of
-computation necessary to get results in a limited area.
-
+computation necessary to get results in a limited area. As always,
+Download all 20 of the RED EDR \texttt{.IMG} files for each observation.
\begin{verbatim}
- % Download all of the IMG for PSP_001981_1825 & %
- % PSP_002258_1825 %
- ~/hiedr2mosaic.py PSP_001981_1825_RED0_0.IMG
- ~/hiedr2mosaic.py PSP_002258_1825_RED0_0.IMG
- cam2map from=PSP_001981_1825_REDmosaic.norm.cub to=PSP_001981_1825_REDmosaic.map.cub
- cam2map from=PSP_002258_1825_REDmosaic.norm.cub map=PSP_001981_1825_REDmosaic.map.cub ...
- to=PSP_002258_1825_REDmosaic.map.cub matchmap=true
- bandnorm from=PSP_001981_1825_REDmosaic.map.cub to=PSP_001981_1825_REDmosaic.map.norm.cub
- bandnorm from=PSP_002258_1825_REDmosaic.map.cub to=PSP_002258_1825_REDmosaic.map.norm.cub
- ls *.map.norm.cub > fromlist
- ls *1981*.map.norm.cub > holdlist
- equalizer fromlist=fromlist holdlist=holdlist
- crop from=PSP_001981_1825_REDmosaic.map.norm.equ.cub to=PSP_001981_1825.crop.cub ...
- sample=7497 line=41318 nsamp=10000 nline=10000
- crop from=PSP_002258_1825_REDmosaic.map.norm.equ.cub to=PSP_002258_1825.crop.cub ...
- sample=7982 line=41310 nsamp=10000 nline=10000
- rm *REDmosaic*.cub
- mkdir result
- stereo PSP_001981_1825.crop.cub PSP_002258_1825.crop.cub result/output
+ ISIS 3> hiedr2mosaic.py PSP_001981_1825_RED*.IMG
+ ISIS 3> hiedr2mosaic.py PSP_002258_1825_RED*.IMG
+ ISIS 3> cam2map from=PSP_001981_1825_RED.mos_hijitreged.norm.cub \
+ to=PSP_001981_1825_REDmosaic.map.cub
+ ISIS 3> cam2map from=PSP_002258_1825_RED.mos_hijitreged.norm.cub \
+ map=PSP_001981_1825_REDmosaic.map.cub \
+ to=PSP_002258_1825_REDmosaic.map.cub matchmap=true
+ ISIS 3> bandnorm from=PSP_001981_1825_REDmosaic.map.cub \
+ to=PSP_001981_1825_REDmosaic.map.norm.cub
+ ISIS 3> bandnorm from=PSP_002258_1825_REDmosaic.map.cub \
+ to=PSP_002258_1825_REDmosaic.map.norm.cub
+ ISIS 3> ls *.map.norm.cub > fromlist
+ ISIS 3> ls *1981*.map.norm.cub > holdlist
+ ISIS 3> equalizer fromlist=fromlist holdlist=holdlist
+ ISIS 3> crop from=PSP_001981_1825_REDmosaic.map.norm.equ.cub \
+ to=PSP_001981_1825.crop.cub sample=7497 line=41318 nsamp=10000 nline=10000
+ ISIS 3> crop from=PSP_002258_1825_REDmosaic.map.norm.equ.cub \
+ to=PSP_002258_1825.crop.cub sample=7982 line=41310 nsamp=10000 nline=10000
+ ISIS 3> rm *REDmosaic*.cub
+ ISIS 3> mkdir result
+ ISIS 3> stereo PSP_001981_1825.crop.cub \
+ PSP_002258_1825.crop.cub result/output
\end{verbatim}
-\subsubsection*{Stereo Default}
+\subsubsection*{stereo.default}
-\begin{verbatim}
+\begin{center}\begin{minipage}{5.5in}
+\begin{Verbatim}[frame=single,fontsize=\small,label=stereo.default for HiRISE North Terra Meridiani Crop]
### PREPROCESSING
DO_INTERESTPOINT_ALIGNMENT 0
@@ -438,16 +415,16 @@ \subsubsection*{Stereo Default}
NEAR_UNIVERSE_RADIUS 0.0
FAR_UNIVERSE_RADIUS 0.0
-\end{verbatim}
+\end{Verbatim}
+\end{minipage}\end{center}
+\vfill
-\section{Mars Reconaissance Orbiter CTX}
+\section{Mars Reconnaissance Orbiter CTX}
\subsection{North Terra Meridiani}
-\subsubsection*{Screenshot}
-
-\begin{figure}[h!]
+\begin{figure}[b!]
\centering
\subfigure[{\tt 3D Rendering}]{\includegraphics[width=3in]{images/examples/ctx/n_terra_meridiani_ctx.png}}
\hfil
@@ -458,22 +435,27 @@ \subsubsection*{Screenshot}
\subsubsection*{Commands}
+Download the \ac{CTX} images P02\_001981\_1823\_XI\_02N356W.IMG and
+P03\_002258\_1817\_XI\_01N356W.IMG from the \ac{PDS}.
\begin{verbatim}
- % Download P02_001981_1823_XI_02N356W.IMG &
- % P03_002258_1817_XI_01N356W.IMG
- mroctx2isis from=P02_001981_1823_XI_02N356W.IMG to=P02_001981_1823_XI_02N356W.cub
- mroctx2isis from=P03_002258_1817_XI_01N356W.IMG to=P03_002258_1817_XI_01N356W.cub
- spiceinit from=P02_001981_1823_XI_02N356W.cub
- spiceinit from=P03_002258_1817_XI_01N356W.cub
- ctxcal from=P02_001981_1823_XI_02N356W.cub to=P02_001981_1823_XI_02N356W.cal.cub
- ctxcal from=P03_002258_1817_XI_01N356W.cub to=P03_002258_1817_XI_01N356W.cal.cub
- cam2map from=P02_001981_1823_XI_02N356W.cal.cub to=P02_001981_1823_XI_02N356W.map.cub
- cam2map from=P03_002258_1817_XI_01N356W.cal.cub to=P03_002258_1817_XI_01N356W.map.cub
+ ISIS 3> mroctx2isis from=P02_001981_1823_XI_02N356W.IMG to=P02_001981_1823.cub
+ ISIS 3> mroctx2isis from=P03_002258_1817_XI_01N356W.IMG to=P03_002258_1817.cub
+ ISIS 3> spiceinit from=P02_001981_1823.cub
+ ISIS 3> spiceinit from=P03_002258_1817.cub
+ ISIS 3> ctxcal from=P02_001981_1823.cub to=P02_001981_1823.cal.cub
+ ISIS 3> ctxcal from=P03_002258_1817.cub to=P03_002258_1817.cal.cub
+ ISIS 3> cam2map from=P02_001981_1823.cal.cub to=P02_001981_1823.map.cub
+ ISIS 3> cam2map from=P03_002258_1817.cal.cub to=P03_002258_1817.map.cub
+ ISIS 3> mkdir result
+ ISIS 3> stereo P02_001981_1823.map.cub P03_002258_1817.map.cub results/out
\end{verbatim}
-\subsubsection*{Stereo Default}
+\vfill
-\begin{verbatim}
+\subsubsection*{stereo.default}
+
+\begin{center}\begin{minipage}{5.5in}
+\begin{Verbatim}[frame=single,fontsize=\small,label=stereo.default for CTX North Terra Meridiani]
### PREPROCESSING
DO_INTERESTPOINT_ALIGNMENT 1
@@ -511,7 +493,7 @@ \subsubsection*{Stereo Default}
RM_H_HALF_KERN 5
RM_V_HALF_KERN 5
- RM_MIN_MATCHES 60 # Units = percest
+ RM_MIN_MATCHES 60 # Units = percent
RM_THRESHOLD 3
RM_CLEANUP_PASSES 1
@@ -519,39 +501,39 @@ \subsubsection*{Stereo Default}
NEAR_UNIVERSE_RADIUS 0.0
FAR_UNIVERSE_RADIUS 0.0
-\end{verbatim}
+\end{Verbatim}
+\end{minipage}\end{center}
\section{Mars Global Surveyor MOC-NA}
In the Stereo Pipeline Tutorial in Chapter~\ref{ch:tutorial}, we
-showed you how to process a MOC-NA stereo pair that covered the
-Galaxius Fluctus channel. In this section we will show you more
-examples, some of which exhibit a problem common to stereo pairs from
-linescan imagers: ``Spacecraft jitter'' is caused by oscillations on
-the spacecraft due to the movement of other spacecraft hardware. All
-spacecraft wobble around to some degree but some, especially Mars
-Global Surveyor, are particularly succeptible.
+showed you how to process a narrow angle \ac{MOC} stereo pair that
+covered a portion of Hrad Vallis. In this section we will show you
+more examples, some of which exhibit a problem common to stereo
+pairs from linescan imagers: ``spacecraft jitter'' is caused by
+oscillations of the spacecraft due to the movement of other spacecraft
+hardware. All spacecraft wobble around to some degree but some,
+especially Mars Global Surveyor, are particularly susceptible.
Jitter causes wave-like distortions along the track of the satellite
-orbit in DEMs produced from linescan camera images. This effect can
-be very subtle or quite pronounced, so it is important to check you
+orbit in \acp{DEM} produced from linescan camera images. This effect can
+be very subtle or quite pronounced, so it is important to check your
data products carefully for any sign of this type of artifact. The
following examples will show the typical distortions created by this
problem.
-Note that the science teams of HiRISE and LROC are actively working on
-detecting and correctly modeling jitter in their respective SPICE
-data. If they succeed in this, the distortions will still being in the
-raw imagery, but the jitter will no longer produce ripple artifacts in
-the DEMs produced using ours or other stereo reconstruction software.
+Note that the science teams of \ac{HiRISE} and \ac{LROC} are actively
+working on detecting and correctly modeling jitter in their respective
+SPICE data. If they succeed in this, the distortions will still
+be present in the raw imagery, but the jitter will no longer produce
+ripple artifacts in the DEMs produced using ours or other stereo
+reconstruction software.
\subsection{Ceraunius Tholus}
-Ceraunius Tholus is a steep volcano that is part of the Uranius group
-on Mars. It can be found at 23.96 N and 262.60 E. This DEM crosses the
-volcano's caldera.
-
-\subsubsection*{Screenshot}
+Ceraunius Tholus is a volcano in northern Tharsis on Mars. It can
+be found at 23.96 N and 262.60 E. This \ac{DEM} crosses the volcano's
+caldera.
\begin{figure}[h!]
\centering
@@ -564,19 +546,20 @@ \subsubsection*{Screenshot}
\subsubsection*{Commands}
+Download the M08/06047 and R07/01361 images from the \ac{PDS}.
\begin{verbatim}
- % Download M0806047.img & R0701361.img
- moc2isis f=M0806047.img t=M0806047.cub mapping=no
- moc2isis f=R0701361.img t=R0701361.cub mapping=no
- cam2map from=M0806047.cub to=M0806047.map.cub
- cam2map from=R0701361.cub map=M0806047.map.cub to=R0701361.map.cub matchmap=true
- mkdir result
- stereo M0806047.map.cub R0701361.map.cub result/output
+ ISIS 3> moc2isis f=M0806047.img t=M0806047.cub mapping=no
+ ISIS 3> moc2isis f=R0701361.img t=R0701361.cub mapping=no
+ ISIS 3> cam2map from=M0806047.cub to=M0806047.map.cub
+ ISIS 3> cam2map from=R0701361.cub map=M0806047.map.cub to=R0701361.map.cub matchmap=true
+ ISIS 3> mkdir result
+ ISIS 3> stereo M0806047.map.cub R0701361.map.cub result/output
\end{verbatim}
-\subsubsection*{Stereo Default}
+\subsubsection*{stereo.default}
-\begin{verbatim}
+\begin{center}\begin{minipage}{5.5in}
+\begin{Verbatim}[frame=single,fontsize=\small,label=stereo.default for MOC Ceraunius Tholus]
### PREPROCESSING
DO_INTERESTPOINT_ALIGNMENT 0
@@ -622,15 +605,14 @@ \subsubsection*{Stereo Default}
NEAR_UNIVERSE_RADIUS 0.0
FAR_UNIVERSE_RADIUS 0.0
-\end{verbatim}
+\end{Verbatim}
+\end{minipage}\end{center}
+\pagebreak
\subsection{North Tharsis}
-The Malin Space Science System's website describes this image as the
-`Throughs and terraces in northern Tharsis'. This DEM is located at
-20.20 N and 118.18 W on Mars.
-
-\subsubsection*{Screenshot}
+These images cover troughs and terraces in northern Tharsis.
+This \ac{DEM} is located at 20.20 N and 118.18 W on Mars.
\begin{figure}[h!]
\centering
@@ -643,19 +625,22 @@ \subsubsection*{Screenshot}
\subsubsection*{Commands}
+Download the M08/03097.img and S07/01420 images from the \ac{PDS}.
\begin{verbatim}
- % Download M0803097.img & S0701420.img
- moc2isis f=M0803097.img t=M0803097.cub mapping=no
- moc2isis f=S0701420.img t=S0701420.cub mapping=no
- cam2map from=M0803097.cub to=M0803097.map.cub
- cam2map from=S0701420.cub map=M0803097.map.cub to=S0701420.map.cub matchmap=true
- mkdr result
- stereo M0803097.map.cub S0701420.map.cub result/output
+ ISIS 3> moc2isis f=M0803097.img t=M0803097.cub mapping=no
+ ISIS 3> moc2isis f=S0701420.img t=S0701420.cub mapping=no
+ ISIS 3> cam2map from=M0803097.cub to=M0803097.map.cub
+ ISIS 3> cam2map from=S0701420.cub map=M0803097.map.cub to=S0701420.map.cub matchmap=true
+ ISIS 3> mkdir result
+ ISIS 3> stereo M0803097.map.cub S0701420.map.cub result/output
\end{verbatim}
-\subsubsection*{Stereo Default}
+\vfill
-\begin{verbatim}
+\subsubsection*{stereo.default}
+
+\begin{center}\begin{minipage}{5.5in}
+\begin{Verbatim}[frame=single,fontsize=\small,label=stereo.default for MOC North Tharsis]
### PREPROCESSING
DO_INTERESTPOINT_ALIGNMENT 0
@@ -701,46 +686,48 @@ \subsubsection*{Stereo Default}
NEAR_UNIVERSE_RADIUS 0.0
FAR_UNIVERSE_RADIUS 0.0
-\end{verbatim}
-
-
-\section{Lunar Reconaissance Orbiter LROC-NA}
-
-\subsection{Lee-Lincoln Scarp}
-
-This stereo pair covers the Taurus-Littrow valley on the Moon where,
-on December 11, 1972, the astronauts of Apollo 17 landed. However,
-this stereo pair does not contain the landing site. It is slightly
-west; focusing on the Lee-Lincoln scarp that is on North Massif. The
-scarp is an 80 m high feature that is the only visible sign of a deep
-fault.
-
-\subsubsection*{Screenshot}
-
-\begin{figure}[h!]
-\centering
- \subfigure[{\tt 3D Rendering}]{\includegraphics[width=3in]{images/examples/lrocna/lroc-na-example.png}}
- \hfil
- \subfigure[{\tt KML Screenshot}]{\includegraphics[width=3in]{images/examples/lrocna/lroc-na-ge_example.png}}
-\caption{Example output possible with a LROC NA stereo pair, using only a single CCDs from observations.}
-\label{fig:lroc-na-example}
-\end{figure}
+\end{Verbatim}
+\end{minipage}\end{center}
+
+\section{Lunar Reconaissance Orbiter LROC NAC}
+
+When \ac{LROC} image data are released, map projection processes
+very similar to those run on other linescan imagers can be used.
+The example \texttt{stereo.default} file would be a good place to
+start from, as well.
+
+% \subsection{Lee-Lincoln Scarp}
+%
+% This stereo pair covers the Taurus-Littrow valley on the Moon where,
+% on December 11, 1972, the astronauts of Apollo 17 landed. However,
+% this stereo pair does not contain the landing site. It is slightly
+% west; focusing on the Lee-Lincoln scarp that is on North Massif. The
+% scarp is an 80~m high feature that is the only visible sign of a deep
+% fault.
+%
+% \begin{figure}[h!]
+% \centering
+% \subfigure[{\tt 3D Rendering}]{\includegraphics[width=3in]{images/examples/lrocna/lroc-na-example.png}}
+% \hfil
+% \subfigure[{\tt KML Screenshot}]{\includegraphics[width=3in]{images/examples/lrocna/lroc-na-ge_example.png}}
+% \caption{Example output possible with a LROC NA stereo pair, using only a single CCDs from observations.}
+% \label{fig:lroc-na-example}
+% \end{figure}