doublephoto_min_strength=clt_parameters.photo_min_strength;// 0.0; // maybe add to filter out weak tiles
doublephoto_max_diff=clt_parameters.photo_max_diff;// 40.0; // To filter mismatches. Normal (adjusted) have RMSE ~9
intphoto_order=clt_parameters.photo_order;
doublephoto_std_1=clt_parameters.photo_std_1;// 50.0; // Minimal standard deviation of the filtered values for poly order 1
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
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
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;
}
QuadCLT.calibratePhotometric2(
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)
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)
// Re-read reference and other scenes using new offsets
// quadCLTs[ref_index].saveQuadClt(); // to re-load new set of Bayer images to the GPU (do nothing for CPU) and Geometry
quadCLTs[ref_index].setQuadClt();// should work even when the data is new for the same scene
quadCLTs[ref_index]=(QuadCLT)quadCLT_main.spawnQuadCLT(// restores dsi from "DSI-MAIN"
set_channels[ref_index].set_name,
...
...
@@ -4826,6 +4850,10 @@ public class OpticalFlow {
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)