Home > Matching_SYM_LSM > src > 2D_LSM_62 > 2D_LSM_62_sym_Functions > image_pair_set_parameters.m

image_pair_set_parameters

PURPOSE ^

% sets all control parameters

SYNOPSIS ^

function par = image_pair_set_parameters(par);

DESCRIPTION ^

% sets all control parameters

 par.BOUND             boundary, constant
 par.init_rand         initial random number
 par.readX             0/1: read coordinates
 par.type_data         type of image generation
 par.test_symmetry     0/1: test on symmetry
 par.im_path           path for images
 par.Image_name_l      name of left image
 par.Image_name_r      name of right image
 par.pt_path           path for image coordiantes
 par.plot_type         in [0,1,2]: control of output
 par.plot_params.f1    background of keypoint
 par.plot_params.f2    foreground of keypoint
 par.R_a               1x2, approximate radiometric transformation
 par.factor_s          factor for window size Nfr=f*sigma_Lowe
 par.sigma_smooth      smoothing parameter for f
 par.max_iter          maximum number of iterations
 par.Nf_MIN            minimum size of overlap (radius of f)
 par.S                 significance level
 par.Diff_filter       kernel for bi-cubic interpolation error

 wf 7/2020

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function par = image_pair_set_parameters(par);
0002 %% sets all control parameters
0003 %
0004 % par.BOUND             boundary, constant
0005 % par.init_rand         initial random number
0006 % par.readX             0/1: read coordinates
0007 % par.type_data         type of image generation
0008 % par.test_symmetry     0/1: test on symmetry
0009 % par.im_path           path for images
0010 % par.Image_name_l      name of left image
0011 % par.Image_name_r      name of right image
0012 % par.pt_path           path for image coordiantes
0013 % par.plot_type         in [0,1,2]: control of output
0014 % par.plot_params.f1    background of keypoint
0015 % par.plot_params.f2    foreground of keypoint
0016 % par.R_a               1x2, approximate radiometric transformation
0017 % par.factor_s          factor for window size Nfr=f*sigma_Lowe
0018 % par.sigma_smooth      smoothing parameter for f
0019 % par.max_iter          maximum number of iterations
0020 % par.Nf_MIN            minimum size of overlap (radius of f)
0021 % par.S                 significance level
0022 % par.Diff_filter       kernel for bi-cubic interpolation error
0023 %
0024 % wf 7/2020
0025 
0026 par.BOUND     = 3;
0027 
0028 % --- initial random number --------------------------------------------
0029 % --- initiate random numbers ------------------------------------------
0030 par.init_rand    = 4;
0031 par.init_rand=init_rand_seed(par.init_rand);
0032 
0033 % --- read coordinates from file? ------- -------------------------------
0034 par.readX = 1;
0035 %par.readX = 0;
0036 
0037 % --- Test symmetry ----------------------------------------------------
0038 par.test_symmetry=0;
0039 
0040 % --- type data --------------------------------------------------------
0041 if par.type_data == 0
0042     % par.type_data = 1;  % Desert
0043     par.type_data = 2;  % Stockholm
0044     % par.type_data = 3;  % % Peking
0045     % par.type_data = 4;   % % Prag
0046 end
0047 
0048 switch par.type_data
0049     case 1
0050         % Desert
0051         par.im_path = 'example_data/Images/';
0052         par.Image_name_l = 'IMG_6703-a.JPG';
0053         par.Image_name_r = 'IMG_6705-a.JPG';
0054     case 2
0055         % Stockholm
0056         par.im_path = 'example_data/Images';
0057         par.Image_name_l = 'IMG_1557-a.JPG';
0058         par.Image_name_r = 'IMG_1560-a.JPG';
0059     case 3
0060         % Peking
0061         par.im_path = 'example_data/Images';
0062         par.Image_name_l = 'IMG_1134-a.JPG';
0063         par.Image_name_r = 'IMG_1137-a.JPG';
0064     case 4
0065         % Prag
0066         par.im_path = 'example_data/Images';
0067         par.Image_name_l = 'IMG_8893-a.JPG';
0068         par.Image_name_r = 'IMG_8892-a.JPG';
0069         
0070         
0071 end
0072 par.pt_path = 'example_data/ImageCoordinates/';
0073 
0074 % --- output level -----------------------------------------------------
0075 par.plot_type = 1;
0076 
0077 % --- linewidths for plotting rectangles -------------------------------
0078 par.plot_params.f1 = 9;    % black (background)
0079 par.plot_params.f2 = 4;    % yellow (foreground)
0080 
0081 % --- Approximate radiometric affinity h = b7*y + b8 -------------------
0082 par.R_a             = [1,0];
0083 
0084 % --- size of window/scale ---------------------------------------------
0085 par.factor_s = 4;
0086 
0087 % -- minimum size of overlap (radius of f) -----------------------------
0088 par.Nf_MIN = 4;
0089 
0090 % ---  smoothing kernel ------------------------------------------------
0091 par.sigma_smooth        = 0;
0092 
0093 % --- maximum number of iterations ------------------------------------
0094 par.max_iter  = 7;
0095 
0096 % --- significance level ----------------------------------------------
0097 par.S = 0.999;
0098 
0099 
0100 % kernel for estimating interpolation error
0101 par.Diff_filter = [ ...
0102     [  1/65536,   -9/32768,   63/65536,   41/16384,   63/65536,   -9/32768,  1/65536]; ...
0103     [ -9/32768,   81/16384, -567/32768,  -369/8192, -567/32768,   81/16384, -9/32768]; ...
0104     [ 63/65536, -567/32768, 3969/65536, 2583/16384, 3969/65536, -567/32768, 63/65536]; ...
0105     [ 41/16384,  -369/8192, 2583/16384, -2415/4096, 2583/16384,  -369/8192, 41/16384]; ...
0106     [ 63/65536, -567/32768, 3969/65536, 2583/16384, 3969/65536, -567/32768, 63/65536]; ...
0107     [ -9/32768,   81/16384, -567/32768,  -369/8192, -567/32768,   81/16384, -9/32768]; ...
0108     [  1/65536,   -9/32768,   63/65536,   41/16384,   63/65536,   -9/32768,  1/65536]];
0109 
0110 end
0111

Generated on Sun 19-Jul-2020 23:00:25 by m2html © 2005