doubleweight_var=1.0;// weight of variance data (old, detects thin wires?)
doubleweight_Y=1.0;// weight of average intensity
doubleweight_RBmG=5.0;// weight of average color difference (0.5*(R+B)-G), shoukld be ~5*weight_Y
publicMacroCorrelation(
TileProcessortp,
doubletrusted_correlation){
doubletrusted_correlation,
doubleweight_var,// = 1.0; // weight of variance data (old, detects thin wires?)
doubleweight_Y,// = 1.0; // weight of average intensity
doubleweight_RBmG// = 5.0; // weight of average color difference (0.5*(R+B)-G), shoukld be ~5*weight_Y
){
this.weight_var=weight_var;// weight of variance data (old, detects thin wires?)
this.weight_Y=weight_Y;// weight of average intensity
this.weight_RBmG=weight_RBmG;// = 5.0; // weight of average color difference (0.5*(R+B)-G), shoukld be ~5*weight_Y
this.tp=tp;
finalintpTilesX=tp.getTilesX();
finalintpTilesY=tp.getTilesY();
...
...
@@ -61,12 +73,30 @@ public class MacroCorrelation {
finaldoublemacro_disparity_step,
finalintdebugLevel){
double[][][]input_data=CLTMacroSetData(// perform single pass according to prepared tiles operations and disparity
src_scan,// final CLTPass3d src_scan, // results of the normal correlations (now expecting infinity)
null);// final double [][][] other_channels, // other channels to correlate, such as average RGB (first index - subcamera, 2-nd - channel, 3-rd - pixel)
src_scan);// final CLTPass3d src_scan, // results of the normal correlations (now expecting infinity)
// final double weight_var = 1.0; // 1.0; // weight of variance data (old, detects thin wires?)
// final double weight_Y = 1.0; // weight of average intensity
// final double weight_RBmG = 5.0; // weight of average color difference (0.5*(R+B)-G), shoukld be ~5*weight_Y
// TODO: Make double pass - with only weight_var (thin wires) and weight_Y, weight_RBmG - larger objects
// just use two instances of MacroCorrelation, run one after another (move code to MacroCorrelation class)
// and then join
MacroCorrelationmc=newMacroCorrelation(
tp,
clt_parameters.mc_disp8_trust);
clt_parameters.mc_disp8_trust,
clt_parameters.mc_weight_var,// final double weight_var, // weight of variance data (old, detects thin wires?)
clt_parameters.mc_weight_Y,// final double weight_Y, // weight of average intensity
clt_parameters.mc_weight_RBmG// final double weight_RBmG, // weight of average color difference (0.5*(R+B)-G), shoukld be ~5*weight_Y
);
double[][][]input_data=mc.CLTMacroSetData(// perform single pass according to prepared tiles operations and disparity
bgnd_data,// final CLTPass3d src_scan, // results of the normal correlations (now expecting infinity)
null);// final double [][][] other_channels, // other channels to correlate, such as average RGB (first index - subcamera, 2-nd - channel, 3-rd - pixel)
bgnd_data);// final CLTPass3d src_scan, // results of the normal correlations (now expecting infinity)
// null); // final double [][][] other_channels, // other channels to correlate, such as average RGB (first index - subcamera, 2-nd - channel, 3-rd - pixel)
TileProcessormtp=mc.CLTMacroScan(// perform single pass according to prepared tiles operations and disparity
publicdouble[][]rig_disparity_strength=null;// Disparity and strength created by a two-camera rig, with disparity scale and distortions of the main camera
...
...
@@ -2241,10 +2247,22 @@ public class TileProcessor {
publicdouble[][]getShowScan(
CLTPass3dscan)
{
intNUM_SLICES=getScanTitles().length;
intthis_IMG_TONE_RGB=21;
doublecorr_red=0.5;// Red to green correlation weight
doublecorr_blue=0.2;// Blue to green correlation weight
doublescale_diff=5.0;// scale 0.5*(r+b)-G to match Y
double[]col_weights=newdouble[3];
col_weights[2]=1.0/(1.0+corr_red+corr_blue);// green color
col_weights[0]=corr_red*col_weights[2];
col_weights[1]=corr_blue*col_weights[2];
intthis_IMG_TONE_RGB_R=this_IMG_TONE_RGB+0;
intthis_IMG_TONE_RGB_B=this_IMG_TONE_RGB+4;
intthis_IMG_TONE_RGB_G=this_IMG_TONE_RGB+8;
intthis_IMG_TONE_RGB_Y=this_IMG_TONE_RGB+12;
intthis_IMG_TONE_RGB_DIFF=this_IMG_TONE_RGB+16;
inttlen=tilesX*tilesY;
double[][]dbg_img=newdouble[NUM_SLICES][];
...
...
@@ -2272,6 +2290,9 @@ public class TileProcessor {