Permalink
Browse files

stereo: Replace stereo.default reading code

We now use Boost Program options for everything. This allows settings
to be set from both the stereo.default file as well as from the
terminal.

Kernel sizes and search ranges are now also defined from a single
flag.
  • Loading branch information...
Zack Moratto
Zack Moratto committed May 21, 2012
1 parent 42829eb commit 1888a32678f8d58d16024d015b097cfd0c81977a
View
@@ -1,97 +1,81 @@
-#############################
-## PREPROCESSING ##
-#############################
+# -*- mode: sh -*-
+
+# Pre-Processing / stereo_pprc
+################################################################
# Pre-alignment options
#
# Available choices are (however not all are supported by all sessions):
# NONE (Recommended for anything map projected)
# EPIPOLAR (Recommended for Pinhole Sessions)
# HOMOGRAPHY (Recommended for ISIS and DG Sessions)
+alignment-method none
-# Normalization options
-
-FORCE_USE_ENTIRE_RANGE 1
-DO_INDIVIDUAL_NORMALIZATION 0
+# Intensity Normalization
+force-use-entire-range # Use entire input range
# Select a preprocessing filter:
#
# 0 - None
# 1 - Subtracted Mean
# 2 - Laplacian of Gaussian (recommended)
-
-PREPROCESSING_FILTER_MODE 2
+prefilter-mode 2
# Kernel size (1-sigma) for pre-processing
#
# Recommend 1.4 px for Laplacian of Gaussian
# Recommend 25 px for Subtracted Mean
+prefilter-kernel-width 1.4
-SLOG_KERNEL_WIDTH 1.4
-#########################################################################
-########################### CORRELATION ###########################
-#########################################################################
+# Integer Correlation / stereo_corr
+################################################################
# Select a cost function to use for initialization:
#
# 0 - absolute difference (fast)
# 1 - squared difference (faster .. but usually bad)
# 2 - normalized cross correlation (recommended)
-
-COST_MODE 0
+cost-mode 0
# Initialization step: correlation kernel size
-
-H_KERNEL 25
-V_KERNEL 25
+corr-kernel 25 25
# Initializaion step: correlation search range
#
# Uncomment the following to use explicit search ranges. Otherwise, a
# value will be choosen for you.
-#H_CORR_MIN -100
-#H_CORR_MAX 100
-#V_CORR_MIN -100
-#V_CORR_MAX 100
+# corr-search -100 -100 100 100
+
+# Subpixel Refinement / stereo_rfne
+################################################################
# Subpixel step: subpixel modes
#
# 0 - disable subpixel correlation (fastest)
# 1 - parabola fitting (draft mode - not as accurate)
# 2 - affine adaptive window, bayes EM weighting (slower, but much more accurate)
-
-SUBPIXEL_MODE 2
+subpixel-mode 1
# Subpixel step: correlation kernel size
+subpixel-kernel 25 25
-SUBPIXEL_H_KERNEL 25
-SUBPIXEL_V_KERNEL 25
-
-#########################################################################
-############################ FILTERING ############################
-#########################################################################
+# Post Filtering / stereo_fltr
+################################################################
# Fill in holes up to 100,000 pixels in size with an inpainting method
-
-FILL_HOLES 1
+# disable-fill-holes
# Automatic "erode" low confidence pixels
+rm-half-kernel 5 5
+rm-min-matches 60
+rm-threshold 3
+rm-cleanup-passes 1
-RM_H_HALF_KERN 5 # Note: a 5*5 halfkernel = 11*11 kernel -> 121 pixels
-RM_V_HALF_KERN 5
-RM_MIN_MATCHES 60 # Units = percent
-RM_THRESHOLD 3
-RM_CLEANUP_PASSES 1
-
-
-#########################################################################
-######################### POST_PROCESSING #########################
-#########################################################################
+# Triangulation / stereo_tri
+################################################################
# Size max of the universe in meters and altitude off the ground.
# Setting both values to zero turns this post-processing step off.
-
-NEAR_UNIVERSE_RADIUS 0.0
-FAR_UNIVERSE_RADIUS 0.0
-
+near-universe-radius 0.0
+far-universe-radius 0.0
View
@@ -1,96 +1,81 @@
-#############################
-## PREPROCESSING ##
-#############################
+# -*- mode: sh -*-
+
+# Pre-Processing / stereo_pprc
+################################################################
# Pre-alignment options
#
# Available choices are (however not all are supported by all sessions):
# NONE (Recommended for anything map projected)
# EPIPOLAR (Recommended for Pinhole Sessions)
# HOMOGRAPHY (Recommended for ISIS and DG Sessions)
+alignment-method homography
-ALIGNMENT_METHOD HOMOGRAPHY
-
-# Normalization options
-
-FORCE_USE_ENTIRE_RANGE 1
-DO_INDIVIDUAL_NORMALIZATION 0
+# Intensity Normalization
+force-use-entire-range # Use entire input range
# Select a preprocessing filter:
#
# 0 - None
# 1 - Subtracted Mean
# 2 - Laplacian of Gaussian (recommended)
-
-PREPROCESSING_FILTER_MODE 2
+prefilter-mode 2
# Kernel size (1-sigma) for pre-processing
#
# Recommend 1.4 px for Laplacian of Gaussian
# Recommend 25 px for Subtracted Mean
+prefilter-kernel-width 1.4
-SLOG_KERNEL_WIDTH 1.4
-#########################################################################
-########################### CORRELATION ###########################
-#########################################################################
+# Integer Correlation / stereo_corr
+################################################################
# Select a cost function to use for initialization:
#
# 0 - absolute difference (fast)
# 1 - squared difference (faster .. but usually bad)
# 2 - normalized cross correlation (recommended)
-
-COST_MODE 0
+cost-mode 0
# Initialization step: correlation kernel size
+corr-kernel 25 25
-H_KERNEL 25
-V_KERNEL 25
+# Initializaion step: correlation search range
+#
+# Uncomment the following to use explicit search ranges. Otherwise, a
+# value will be choosen for you.
+# corr-search -100 -100 100 100
-# Initializaion step: correlation window size
-#H_CORR_MIN -100
-#H_CORR_MAX 100
-#V_CORR_MIN -100
-#V_CORR_MAX 100
+# Subpixel Refinement / stereo_rfne
+################################################################
# Subpixel step: subpixel modes
#
# 0 - disable subpixel correlation (fastest)
# 1 - parabola fitting (draft mode - not as accurate)
# 2 - affine adaptive window, bayes EM weighting (slower, but much more accurate)
-
-SUBPIXEL_MODE 2
+subpixel-mode 2
# Subpixel step: correlation kernel size
+subpixel-kernel 25 25
-SUBPIXEL_H_KERNEL 25
-SUBPIXEL_V_KERNEL 25
-
-#########################################################################
-############################ FILTERING ############################
-#########################################################################
+# Post Filtering / stereo_fltr
+################################################################
# Fill in holes up to 100,000 pixels in size with an inpainting method
-
-FILL_HOLES 1
+# disable-fill-holes
# Automatic "erode" low confidence pixels
+rm-half-kernel 5 5
+rm-min-matches 60
+rm-threshold 3
+rm-cleanup-passes 1
-RM_H_HALF_KERN 5 # Note: a 5*5 halfkernel = 11*11 kernel -> 121 pixels
-RM_V_HALF_KERN 5
-RM_MIN_MATCHES 60 # Units = percent
-RM_THRESHOLD 3
-RM_CLEANUP_PASSES 1
-
-
-#########################################################################
-######################### POST_PROCESSING #########################
-#########################################################################
+# Triangulation / stereo_tri
+################################################################
# Size max of the universe in meters and altitude off the ground.
# Setting both values to zero turns this post-processing step off.
-
-NEAR_UNIVERSE_RADIUS 0.0
-FAR_UNIVERSE_RADIUS 0.0
-
+near-universe-radius 0.0
+far-universe-radius 0.0
View
@@ -1,95 +1,79 @@
-#############################
-## PREPROCESSING ##
-#############################
+# -*- mode: sh -*-
+
+# Pre-Processing / stereo_pprc
+################################################################
# Pre-alignment options
#
# Available choices are (however not all are supported by all sessions):
# NONE (Recommended for anything map projected)
# EPIPOLAR (Recommended for Pinhole Sessions)
# HOMOGRAPHY (Recommended for ISIS and DG Sessions)
+alignment-method homography
-ALIGNMENT_METHOD HOMOGRAPHY
-
-# Normalization options
-
-FORCE_USE_ENTIRE_RANGE 1
-DO_INDIVIDUAL_NORMALIZATION 0
+# Intensity Normalization
+force-use-entire-range # Use entire input range
# Select a preprocessing filter:
#
# 0 - None
# 1 - Subtracted Mean
# 2 - Laplacian of Gaussian (recommended)
-
-PREPROCESSING_FILTER_MODE 2
+prefilter-mode 2
# Kernel size (1-sigma) for pre-processing
#
# Recommend 1.4 px for Laplacian of Gaussian
# Recommend 25 px for Subtracted Mean
+prefilter-kernel-width 1.4
-SLOG_KERNEL_WIDTH 1.4
-
-#########################################################################
-########################### CORRELATION ###########################
-#########################################################################
+# Integer Correlation / stereo_corr
+################################################################
# Select a cost function to use for initialization:
#
# 0 - absolute difference (fast)
# 1 - squared difference (faster .. but usually bad)
# 2 - normalized cross correlation (recommended)
-
-COST_MODE 0
+cost-mode 0
# Initialization step: correlation kernel size
+corr-kernel 25 25
-H_KERNEL 25
-V_KERNEL 25
+# Initializaion step: correlation window size
+corr-search -80 -2 20 2
-# Not specifying search range so that it is fully automatic
+# Subpixel Refinement / stereo_rfne
+################################################################
# Subpixel step: subpixel modes
#
# 0 - disable subpixel correlation (fastest)
# 1 - parabola fitting (draft mode - not as accurate)
# 2 - affine adaptive window, bayes EM weighting (slower, but much more accurate)
-
-# We recommend Bayes-EM but that will take a lot of processing time
-SUBPIXEL_MODE 1
+subpixel-mode 1
# Subpixel step: correlation kernel size
+subpixel-kernel 25 25
-SUBPIXEL_H_KERNEL 25
-SUBPIXEL_V_KERNEL 25
-
-#########################################################################
-############################ FILTERING ############################
-#########################################################################
+# Post Filtering / stereo_fltr
+################################################################
# Fill in holes up to 100,000 pixels in size with an inpainting method
-
-FILL_HOLES 1
+# disable-fill-holes
# Automatic "erode" low confidence pixels
+rm-half-kernel 5 5
+rm-min-matches 60
+rm-threshold 3
+rm-cleanup-passes 1
-RM_H_HALF_KERN 5 # Note: a 5*5 halfkernel = 11*11 kernel -> 121 pixels
-RM_V_HALF_KERN 5
-RM_MIN_MATCHES 60 # Units = percent
-RM_THRESHOLD 3
-RM_CLEANUP_PASSES 1
-
-
-#########################################################################
-######################### POST_PROCESSING #########################
-#########################################################################
+# Triangulation / stereo_tri
+################################################################
# Size max of the universe in meters and altitude off the ground.
# Setting both values to zero turns this post-processing step off.
+near-universe-radius 0.0
+far-universe-radius 0.0
-NEAR_UNIVERSE_RADIUS 0.0
-FAR_UNIVERSE_RADIUS 0.0
-
-TIF_COMPRESS DEFLATE
Oops, something went wrong.

0 comments on commit 1888a32

Please sign in to comment.