intphoto_min_good=clt_parameters.photo_min_good;// 1000; // Minimal number of good pixels for photometric calibration
intphoto_min_good=clt_parameters.photo_min_good;// 1000; // Minimal number of good pixels for photometric calibration
doublephoto_min_strength=clt_parameters.photo_min_strength;// 0.0; // maybe add to filter out weak tiles
doublephoto_min_strength=clt_parameters.photo_min_strength;// 0.0; // maybe add to filter out weak tiles
...
@@ -3802,7 +3800,156 @@ public class OpticalFlow {
...
@@ -3802,7 +3800,156 @@ public class OpticalFlow {
doublephoto_std_2=clt_parameters.photo_std_2;// 200.0; // Minimal standard deviation of the filtered values for poly order 2
doublephoto_std_2=clt_parameters.photo_std_2;// 200.0; // Minimal standard deviation of the filtered values for poly order 2
intphoto_offs_set=clt_parameters.photo_offs_set;// 0; // 0 - keep weighted offset average, 1 - balance result image, 2 - set weighted average to specific value
intphoto_offs_set=clt_parameters.photo_offs_set;// 0; // 0 - keep weighted offset average, 1 - balance result image, 2 - set weighted average to specific value
doublephoto_offs=clt_parameters.photo_offs;// 21946; // weighted average offset target value, if photo_offs_set (and not photo_offs_balance)
doublephoto_offs=clt_parameters.photo_offs;// 21946; // weighted average offset target value, if photo_offs_set (and not photo_offs_balance)
// boolean photo_debug = clt_parameters.photo_debug; // false; // Generate images and text
// preparing same format as after combo, filling in only needed data
for(intnrecalib=0;nrecalib<photo_num_full;nrecalib++){// maybe need to correct just offsets?
intpoly_order=photo_order;
if((poly_order>1)&&(nrecalib==0)){
poly_order=1;
}
booleanok=QuadCLT.calibratePhotometric2(
clt_parameters,// CLTParameters clt_parameters,
quadCLT_ref,// final QuadCLT ref_scene, will set photometric calibration to this scene
photo_min_strength,// final double min_strength,
photo_max_diff,// final double max_diff, // 30.0
poly_order,// final int photo_order, // 0 - offset only, 1 - linear, 2 - quadratic
photo_std_1,// final double photo_std_1, // 50.0; // Minimal standard deviation of the filtered values for poly order 1
photo_std_2,// final double photo_std_2, // 200.0; // Minimal standard deviation of the filtered values for poly order 2
photo_offs_set,// final int photo_offs_set,// 0; // 0 - keep weighted offset average, 1 - balance result image, 2 - set weighted average to specific value
photo_offs,// final double photo_offs, // 21946; // weighted average offset target value, if photo_offs_set (and not photo_offs_balance)
photo_num_refines,// final int num_refines, // 2
photo_min_good,// final int min_good, // minimal number of "good" pixels
quadCLT_ref,// final QuadCLT ref_scene, will set photometric calibration to this scene
photo_min_strength,// final double min_strength,
photo_max_diff,// final double max_diff, // 30.0
1,// poly_order, // final int photo_order, // 0 - offset only, 1 - linear, 2 - quadratic
photo_std_1,// final double photo_std_1, // 50.0; // Minimal standard deviation of the filtered values for poly order 1
photo_std_2,// final double photo_std_2, // 200.0; // Minimal standard deviation of the filtered values for poly order 2
photo_offs_set,// final int photo_offs_set,// 0; // 0 - keep weighted offset average, 1 - balance result image, 2 - set weighted average to specific value
photo_offs,// final double photo_offs, // 21946; // weighted average offset target value, if photo_offs_set (and not photo_offs_balance)
photo_num_refines,// final int num_refines, // 2
photo_min_good,// final int min_good, // minimal number of "good" pixels
threadsMax,// final int threadsMax, // int threadsMax,
updateStatus,// final boolean updateStatus,
for(intnrecalib=0;nrecalib<photo_num_full;nrecalib++){// maybe need to correct just offsets?
debugLevel);// final int debugLevel)
intpoly_order=photo_order;
ran_photo_each=true;// will need to re-run after blue sky detection
if((poly_order>1)&&(nrecalib==0)){
poly_order=1;
}
booleanok=QuadCLT.calibratePhotometric2(
clt_parameters,// CLTParameters clt_parameters,
quadCLT_ref,// final QuadCLT ref_scene, will set photometric calibration to this scene
photo_min_strength,// final double min_strength,
photo_max_diff,// final double max_diff, // 30.0
poly_order,// final int photo_order, // 0 - offset only, 1 - linear, 2 - quadratic
photo_std_1,// final double photo_std_1, // 50.0; // Minimal standard deviation of the filtered values for poly order 1
photo_std_2,// final double photo_std_2, // 200.0; // Minimal standard deviation of the filtered values for poly order 2
photo_offs_set,// final int photo_offs_set,// 0; // 0 - keep weighted offset average, 1 - balance result image, 2 - set weighted average to specific value
photo_offs,// final double photo_offs, // 21946; // weighted average offset target value, if photo_offs_set (and not photo_offs_balance)
photo_num_refines,// final int num_refines, // 2
photo_min_good,// final int min_good, // minimal number of "good" pixels
quadCLT_ref,// final QuadCLT ref_scene, will set photometric calibration to this scene
photo_min_strength,// final double min_strength,
photo_max_diff,// final double max_diff, // 30.0
1,// poly_order, // final int photo_order, // 0 - offset only, 1 - linear, 2 - quadratic
photo_std_1,// final double photo_std_1, // 50.0; // Minimal standard deviation of the filtered values for poly order 1
photo_std_2,// final double photo_std_2, // 200.0; // Minimal standard deviation of the filtered values for poly order 2
photo_offs_set,// final int photo_offs_set,// 0; // 0 - keep weighted offset average, 1 - balance result image, 2 - set weighted average to specific value
photo_offs,// final double photo_offs, // 21946; // weighted average offset target value, if photo_offs_set (and not photo_offs_balance)
photo_num_refines,// final int num_refines, // 2
photo_min_good,// final int min_good, // minimal number of "good" pixels
quadCLT_main,// QuadCLT quadCLT_main, // tiles should be set
quadCLT_ref,// QuadCLT quadCLT_ref, // tiles should be set
dsi,// final double [][] dsi,
// just once?
clt_parameters.photo_num_full,// int photo_num_full =
batch_mode,// final boolean batch_mode,
threadsMax,// final int threadsMax, // int threadsMax,
updateStatus,// final boolean updateStatus,
debugLevel);// final int debugLevel)
}
}
}
}
}
...
@@ -4179,7 +4245,8 @@ public class OpticalFlow {
...
@@ -4179,7 +4245,8 @@ public class OpticalFlow {
intphoto_offs_set=clt_parameters.photo_offs_set;// 0; // 0 - keep weighted offset average, 1 - balance result image, 2 - set weighted average to specific value
intphoto_offs_set=clt_parameters.photo_offs_set;// 0; // 0 - keep weighted offset average, 1 - balance result image, 2 - set weighted average to specific value
doublephoto_offs=clt_parameters.photo_offs;// 21946; // weighted average offset target value, if photo_offs_set (and not photo_offs_balance)
doublephoto_offs=clt_parameters.photo_offs;// 21946; // weighted average offset target value, if photo_offs_set (and not photo_offs_balance)
booleanphoto_debug=clt_parameters.photo_debug;// false; // Generate images and text
booleanphoto_debug=clt_parameters.photo_debug;// false; // Generate images and text
boolean[]ref_blue_sky=null;// turn off "lma" in the ML output
boolean[]ref_blue_sky=quadCLTs[ref_index].getBlueSky();// null; // turn off "lma" in the ML output
for(intnrecalib=0;nrecalib<photo_num_full;nrecalib++){// maybe need to correct just offsets?
updateStatus,// final boolean updateStatus,
intpoly_order=photo_order;
debugLevel);// final int debugLevel)
if((poly_order>1)&&(nrecalib==0)){
ran_photo_each=true;// will need to re-run after blue sky detection
poly_order=1;
}
booleanok=QuadCLT.calibratePhotometric2(
clt_parameters,// CLTParameters clt_parameters,
quadCLTs[ref_index],// final QuadCLT ref_scene, will set photometric calibration to this scene
photo_min_strength,// final double min_strength,
photo_max_diff,// final double max_diff, // 30.0
poly_order,// final int photo_order, // 0 - offset only, 1 - linear, 2 - quadratic
photo_std_1,// final double photo_std_1, // 50.0; // Minimal standard deviation of the filtered values for poly order 1
photo_std_2,// final double photo_std_2, // 200.0; // Minimal standard deviation of the filtered values for poly order 2
photo_offs_set,// final int photo_offs_set,// 0; // 0 - keep weighted offset average, 1 - balance result image, 2 - set weighted average to specific value
photo_offs,// final double photo_offs, // 21946; // weighted average offset target value, if photo_offs_set (and not photo_offs_balance)
photo_num_refines,// final int num_refines, // 2
photo_min_good,// final int min_good, // minimal number of "good" pixels
quadCLTs[ref_index],// final QuadCLT ref_scene, will set photometric calibration to this scene
photo_min_strength,// final double min_strength,
photo_max_diff,// final double max_diff, // 30.0
1,// poly_order, // final int photo_order, // 0 - offset only, 1 - linear, 2 - quadratic
photo_std_1,// final double photo_std_1, // 50.0; // Minimal standard deviation of the filtered values for poly order 1
photo_std_2,// final double photo_std_2, // 200.0; // Minimal standard deviation of the filtered values for poly order 2
photo_offs_set,// final int photo_offs_set,// 0; // 0 - keep weighted offset average, 1 - balance result image, 2 - set weighted average to specific value
photo_offs,// final double photo_offs, // 21946; // weighted average offset target value, if photo_offs_set (and not photo_offs_balance)
photo_num_refines,// final int num_refines, // 2
photo_min_good,// final int min_good, // minimal number of "good" pixels