function p = h3d_params % function p = h3d_parameters % % Returns a struct containing all the parameters used by the code. p = struct; p = add(p, 'max_norm', 8, 'Maximum norm for input points (m).'); p = add(p, 'rho_cell_size', 0.03, 'Size of a rho cell when computing the spectrum. (m)'); p = add(p, 'angular_cell_size_deg', 3, 'Approximate angular resolution of the HS.'); p = add(p, 'upsample', 1, 'Upsampling factor for the HS to pass to interp2(). No upsampling = 0, double = 1, etc.'); p = add(p, 'guess_rot_max_peaks1', 2, 'Number of peaks in HS1 to consider while guessing rotations.' ); p = add(p, 'guess_rot_max_peaks2', 6, 'Number of peaks in HS2 to consider while guessing rotations.' ); p = add(p, 'guess_rot_first_corr_num_hyp', 3, 'How many different hypotheses to consider for the first correlation of 360 deg. Note spectrum is 180deg-periodic, so it makes sense to have at least 2.'); p = add(p, 'guess_rot_max_correction_deg', 6, 'Max angular correction after the first (first is 360deg)'); p = add(p, 'guess_rot_num_compensations', 4, 'Number of local compensations, after the big one'); p = add(p, 'guess_rot_merge_hyp_threshold_deg', 5, 'Threshold under which two rotations hypotheses are merged into one.'); p = add(p, 'cyl_amplitude_deg', 150, 'Fascia intorno equatore' ); p = add(p, 'cyl_num_alpha_steps', 15, 'Number of alpha steps in the cylinder'); p = add(p, 'cyl_num_beta_steps', 256, 'Number of beta steps in the cylinder'); p = add(p, 'guess_tran_max_directions', 8, 'Number of directions to use'); p = add(p, 'guess_tran_max_num_hyp', 4, 'Maximum number of hypotheses per direction'); p = add(p, 'guess_tran_two_birds_one_stone',1, 'Use when doing HT with normals'); p = add(p, 'hausdorff_num_points', 200, 'Number of points to use for Hausdorff distance'); p = add(p, 'hausdorff_plausible_threshold', 0.3, 'Plausibility threshold for Hausdorff'); p = add(p, 'debug_true_R', 0, 'True rotation (for debugging purposes)'); p = add(p, 'debug_true_T', 0, 'True translation (for debugging purposes)'); p = add(p, 'debug_compensation_show', 1, 'Show figures while doing rotation compensation'); p = add(p, 'debug_show_translation', 0, 'Show the correlations for the translation (note this crashes Matlab for many figures are generated)'); function p = add(p, name, default, desc) if not(isfield(p,'system')) p.system = struct; p.system.defaults = struct; p.system.descriptions = struct; p.system.order = {}; end if isfield(p, name) error(sprintf('Already have a parameters "%s"\n', name)); end p.(name) = default; p.system.defaults.(name) = default; p.system.descriptions.(name) = desc; n = numel(p.system.order); p.system.order{n+1} = name;