Commit c2de0cdf authored by Andrey Filippov's avatar Andrey Filippov

cleanup

parent 695dfdbd
......@@ -5011,39 +5011,47 @@ private Panel panel1,
public boolean getPairImages2() {
if (!prepareRigImages()) return false;
String configPath=getSaveCongigPath();
if (configPath.equals("ABORT")) return false;
String configPath=getSaveCongigPath();
if (configPath.equals("ABORT")) return false;
if (DEBUG_LEVEL > -2){
System.out.println("++++++++++++++ Calculating combined correlations ++++++++++++++");
}
try {
TWO_QUAD_CLT.processCLTQuadCorrPairs(
QUAD_CLT, // QuadCLT quadCLT_main,
QUAD_CLT_AUX, // QuadCLT quadCLT_aux,
CLT_PARAMETERS, // EyesisCorrectionParameters.DCTParameters dct_parameters,
DEBAYER_PARAMETERS, //EyesisCorrectionParameters.DebayerParameters debayerParameters,
COLOR_PROC_PARAMETERS, //EyesisCorrectionParameters.ColorProcParameters colorProcParameters,
// CHANNEL_GAINS_PARAMETERS, //CorrectionColorProc.ColorGainsParameters channelGainParameters,
// CHANNEL_GAINS_PARAMETERS_AUX, //CorrectionColorProc.ColorGainsParameters channelGainParameters_aux,
RGB_PARAMETERS, //EyesisCorrectionParameters.RGBParameters rgbParameters,
THREADS_MAX, //final int threadsMax, // maximal number of threads to launch
UPDATE_STATUS, //final boolean updateStatus,
DEBUG_LEVEL);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
} //final int debugLevel);
QUAD_CLT.tp.clt_3d_passes = null; // resetCLTPasses(); // so running "Ground truth" after would be OK
QUAD_CLT_AUX.tp.clt_3d_passes = null; //.resetCLTPasses();
if (DEBUG_LEVEL > -2){
System.out.println("++++++++++++++ Calculating combined correlations ++++++++++++++");
}
// reset if ran after 3d model to save memory
if (QUAD_CLT.tp != null) {
QUAD_CLT.tp.clt_3d_passes = null; // resetCLTPasses();
}
if (QUAD_CLT_AUX.tp != null) {
QUAD_CLT_AUX.tp.clt_3d_passes = null; // resetCLTPasses();
}
if (configPath!=null) {
saveTimestampedProperties( // save config again
configPath, // full path or null
null, // use as default directory if path==null
true,
PROPERTIES);
}
try {
TWO_QUAD_CLT.processCLTQuadCorrPairs(
QUAD_CLT, // QuadCLT quadCLT_main,
QUAD_CLT_AUX, // QuadCLT quadCLT_aux,
CLT_PARAMETERS, // EyesisCorrectionParameters.DCTParameters dct_parameters,
DEBAYER_PARAMETERS, //EyesisCorrectionParameters.DebayerParameters debayerParameters,
COLOR_PROC_PARAMETERS, //EyesisCorrectionParameters.ColorProcParameters colorProcParameters,
// CHANNEL_GAINS_PARAMETERS, //CorrectionColorProc.ColorGainsParameters channelGainParameters,
// CHANNEL_GAINS_PARAMETERS_AUX, //CorrectionColorProc.ColorGainsParameters channelGainParameters_aux,
RGB_PARAMETERS, //EyesisCorrectionParameters.RGBParameters rgbParameters,
THREADS_MAX, //final int threadsMax, // maximal number of threads to launch
UPDATE_STATUS, //final boolean updateStatus,
DEBUG_LEVEL);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
} //final int debugLevel);
QUAD_CLT.tp.clt_3d_passes = null; // resetCLTPasses(); // so running "Ground truth" after would be OK
QUAD_CLT_AUX.tp.clt_3d_passes = null; //.resetCLTPasses();
if (configPath!=null) {
saveTimestampedProperties( // save config again
configPath, // full path or null
null, // use as default directory if path==null
true,
PROPERTIES);
}
return true;
}
......
......@@ -8915,28 +8915,15 @@ public class QuadCLT {
int image_width = imp.getWidth();
int image_height = imp.getHeight();
double scale_h = 1.0 * correctionsParameters.thumb_width/image_width;
double scale_v = 1.0 * correctionsParameters.thumb_height/image_height;
// double scale = Math.min(scale_h, scale_v) /correctionsParameters.thumb_size;
double scale = scale_h / correctionsParameters.thumb_size;
double scale_h = 1.0 * (correctionsParameters.thumb_width + 1)/image_width;
double scale_v = 1.0 * (correctionsParameters.thumb_height + 1)/image_height;
double scale = ((scale_h > scale_v) ? scale_h : scale_v) / correctionsParameters.thumb_size;
// ImageProcessor ip = imp.getChannelProcessor();
ImageProcessor ip = imp.getProcessor().duplicate();
ip.setInterpolationMethod(ImageProcessor.BICUBIC);
// ip.setInterpolationMethod(ImageProcessor.BILINEAR);
ip.blurGaussian(2.0);
ip.scale(scale, scale);
// Rectangle rs = new Rectangle(
// (int)Math.round(0.5*image_width*(1.0-scale)),
// (int)Math.round(0.5*image_height*(1.0-scale)),
// (int)Math.round(image_width*scale),
// (int)Math.round(image_height*scale));
// int scaled_width = rs.width; // ip.getWidth();
// int scaled_height = rs.height; // ip.getHeight();
// int lm = (int) Math.round ((scaled_width-correctionsParameters.thumb_width)* correctionsParameters.thumb_h_center);
// int tm = (int) Math.round ((scaled_height-correctionsParameters.thumb_height)* correctionsParameters.thumb_v_center);
int lm = (int) Math.round (((image_width*scale)-correctionsParameters.thumb_width)* correctionsParameters.thumb_h_center + (0.5*image_width*(1.0-scale)));
int tm = (int) Math.round (((image_height*scale)-correctionsParameters.thumb_height)* correctionsParameters.thumb_v_center + (0.5*image_height*(1.0-scale)));
Rectangle r = new Rectangle(lm,tm,correctionsParameters.thumb_width,correctionsParameters.thumb_height);
......
This diff is collapsed.
This diff is collapsed.
......@@ -5377,7 +5377,7 @@ public class TileProcessor {
clt_parameters.batch_run?-1:1, // -1, // debugLevel, // final int debugLevel)
clt_parameters.tileX,
clt_parameters.tileY);
// showDoubleFloatArrays sdfa_instance = null;
// showDoubleFloatArrays sdfa_instance = null; - already no state capitol plane
// if (debugLevel > -1) sdfa_instance = new showDoubleFloatArrays(); // just for debugging?
......
......@@ -4921,7 +4921,6 @@ if (debugLevel > -100) return true; // temporarily !
double disparity_offset,
QuadCLT quadCLT_main, // tiles should be set
QuadCLT quadCLT_aux,
// double [][] src_bimap,
double [] disparity,
double [] strength,
EyesisCorrectionParameters.CLTParameters clt_parameters,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment