Class BlindDeblur

All Implemented Interfaces:
ActionListener, WindowListener, Runnable, EventListener

public class BlindDeblur extends AlgorithmBase
Author:
ilb Ported to Java by William Gandler Title: Matlab Code for Fast Blind Removal of Non-Uniform Camera Shake Blur Author: Oliver Whyte invalid input: '<'oawhyte@gmail.com> Version: 1.0 Date: Sept 17, 2014 Copyright: 2012, Oliver Whyte URL: http://www.di.ens.fr/willow/research/deblurring/, http://www.di.ens.fr/willow/research/saturation/ Matlab Code for Fast Blind Removal of Non-Uniform Camera Shake Blur =================================================================== This package contains code to perform fast blind deblurring of images degraded by camera shake, using the MAP algorithm described in our IJCV 2012 paper [][#Whyte12], and the fast approximation of spatially-varying blur described in our CPCV 2011 paper [][#Whyte11]. Please cite these papers if using this code in an academic publication. Please send bug reports to invalid input: '<'oawhyte@gmail.com> [#Whyte11]: O. Whyte, J. Sivic, and A. Zisserman. "Deblurring Shaken and Partially Saturated Images". In Proc. CPCV Workshop, with ICCV, 2011. [#Whyte12]: O. Whyte, J. Sivic, A. Zisserman, and J. Ponce. "Non-uniform Deblurring for Shaken Images". IJCV, 2011 (accepted). ## 1 Acknowledgements ## This package includes modified versions of code published by several other authors: Sparse Deconvolution code of Levin et al. Downloaded from invalid input: '<'http://groups.csail.mit.edu/graphics/CodedAperture/DeconvolutionCode.html> Fast Deconvolution code of Krishnan and Fergus. Downloaded from invalid input: '<'http://cs.nyu.edu/~dilip/research/fast-deconvolution/> FFT-based Poisson image blending by Amit Agrawal. Downloaded May 2008 from invalid input: '<'http://www.umiacs.umd.edu/~aagrawal/ICCV2007Course/PseudoCode.PDF> Shock-filter code of Guy Gilboa. Downloaded from invalid input: '<'http://visl.technion.ac.il/~gilboa/PDE-filt/shock.m> LARS-LASSO code of Karl Skoglund. Most recent version available at invalid input: '<'http://www.imm.dtu.dk/projects/spasm/> ## 3 License ## Copyright (c) 2012, Oliver Whyte Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  • Field Details

    • logFile

      private String logFile
    • max_dim

      private int max_dim
    • synthetic

      private boolean synthetic
    • results_root

      private String results_root
    • output_name

      private String output_name
    • output_directory_name

      private String output_directory_name
    • output_directory

      private File output_directory
    • blurryImageFileDirectory

      private String blurryImageFileDirectory
    • blurryImageFileName

      private String blurryImageFileName
    • blurryImageExtension

      private String blurryImageExtension
    • trueImageFileDirectory

      private String trueImageFileDirectory
    • trueImageFileName

      private String trueImageFileName
    • trueImageExtension

      private String trueImageExtension
    • israw_true

      private boolean israw_true
    • israw_blurry

      private boolean israw_blurry
    • focalLengthTrue

      private double focalLengthTrue
    • focalLength35True

      private double focalLength35True
    • cameraMakeTrue

      private String cameraMakeTrue
    • cameraModelTrue

      private String cameraModelTrue
    • exposureTimeTrue

      private double exposureTimeTrue
    • FNumberTrue

      private double FNumberTrue
    • ISOSpeedRatingTrue

      private double ISOSpeedRatingTrue
    • focalLengthBlurry

      private double focalLengthBlurry
    • focalLength35Blurry

      private double focalLength35Blurry
    • cameraMakeBlurry

      private String cameraMakeBlurry
    • cameraModelBlurry

      private String cameraModelBlurry
    • exposureTimeBlurry

      private double exposureTimeBlurry
    • FNumberBlurry

      private double FNumberBlurry
    • ISOSpeedRatingBlurry

      private double ISOSpeedRatingBlurry
    • blurryImage

      private ModelImage blurryImage
    • correctedImage

      private ModelImage correctedImage
    • trueImage

      private ModelImage trueImage
    • config_name

      private String config_name
    • do_display

      private boolean do_display
    • save_intermediate_images

      private int save_intermediate_images
    • save_mat

      private boolean save_mat
    • save_intermediate_pyramids

      private boolean save_intermediate_pyramids
    • israw

      private boolean israw
    • bi_sigma_spatial0

      private double bi_sigma_spatial0
    • bi_sigma_range0

      private double bi_sigma_range0
    • bi_size

      private int bi_size
    • shock_dt0

      private int shock_dt0
    • shock_iters

      private int shock_iters
    • param_decrease

      private double param_decrease
    • grad_dir_bins

      private int grad_dir_bins
    • grad_dir_quant

      private double grad_dir_quant
    • grad_thresh_decrease

      private double grad_thresh_decrease
    • r

      private int r
    • non_uniform

      private boolean non_uniform
    • num_vert_regions

      private int num_vert_regions
    • num_horz_regions

      private int num_horz_regions
    • omega0

      private double omega0
    • omega1

      private double omega1
    • omega2

      private double omega2
    • alpha

      private double alpha
    • kf_lambda

      private double kf_lambda
    • kf_exponent

      private double kf_exponent
    • kernel_threshold

      private double kernel_threshold
    • beta

      private double beta
    • num_cg_iters

      private int num_cg_iters
    • theta_pre

      private double[] theta_pre
    • pixels_per_theta_step

      private int pixels_per_theta_step
    • BLUR_KERNEL_SIZE

      private int BLUR_KERNEL_SIZE
    • blur_x_lims

      private int[] blur_x_lims
    • blur_y_lims

      private int[] blur_y_lims
    • blur_z_lims

      private int[] blur_z_lims
    • scale_ratio_i

      private double scale_ratio_i
    • scale_ratio_k

      private double scale_ratio_k
    • max_levels

      private int max_levels
    • num_iters

      private int[] num_iters
    • recenter_kernel

      private int recenter_kernel
    • kernel_dilate_radius

      private int kernel_dilate_radius
    • sat_thresh

      private double sat_thresh
    • kernel_method

      private String kernel_method
    • image_method

      private String image_method
    • image_method_final

      private Vector<String> image_method_final
    • do_estimate_kernel

      private boolean do_estimate_kernel
    • do_deblur

      private boolean[] do_deblur
    • do_color

      private boolean[] do_color
    • estimate_kernel_from

      private String estimate_kernel_from
    • deconv_maxit

      private int deconv_maxit
    • deconv_maxit_final

      private int deconv_maxit_final
    • threshold_kernel

      private boolean threshold_kernel
    • focal_length_in_35mm_true

      private double focal_length_in_35mm_true
    • focal_length_in_35mm_shake

      private double focal_length_in_35mm_shake
    • first_level

      private int first_level
    • final_level

      private int final_level
    • BtB_method

      private String BtB_method
    • max_nonzeros_w

      private int max_nonzeros_w
    • update_saturation_mask

      private boolean update_saturation_mask
    • fast_approx

      private boolean fast_approx
    • cameraModelList

      private Vector<BlindDeblur.Pair<String,Double>> cameraModelList
    • SYNTHETIC_BLUR_SIZE

      private int SYNTHETIC_BLUR_SIZE
    • SYNTHETIC_NOISE_STD

      private double SYNTHETIC_NOISE_STD
    • resp_params

      private Vector<BlindDeblur.Pair<String,Double>> resp_params
    • respfn

    • tgs_z_factor

      double tgs_z_factor
    • respfn_default

      BiFunction<Double,Double,Double> respfn_default
    • invrespfn_default

      BiFunction<Double,Double,Double> invrespfn_default
    • respfn_canon

    • invrespfn_canon

      BiFunction<Double,Double,Double> invrespfn_canon
    • respfn_linear

      BiFunction<Double,Double,Double> respfn_linear
    • invrespfn_linear

      BiFunction<Double,Double,Double> invrespfn_linear
  • Constructor Details

  • Method Details

    • initCameraModelList

      private void initCameraModelList()
    • default_config

      private void default_config()
    • runAlgorithm

      public void runAlgorithm()
      Description copied from class: AlgorithmBase
      Actually runs the algorithm. Implemented by inheriting algorithms.
      Specified by:
      runAlgorithm in class AlgorithmBase
    • linear2srgb

      private double linear2srgb(double imlinear)
    • srgb2linear

      private double srgb2linear(double imsrgb)
    • make_kernel_pyramid

      private void make_kernel_pyramid(Vector<double[][][]> pyr_kernel, Vector<double[][][][]> pyr_tt, Vector<double[]> pyr_tgs, double[] theta_x_lims, double[] theta_y_lims, double[] theta_z_lims, double[] tgs, double scale_ratio_k, int max_levels, boolean non_uniform, double[][][] init_kernel, boolean chain_downsampling, double[][] init_tt)