Commit 78a62e6f authored by Andrey Filippov's avatar Andrey Filippov

before cuda textures update

parent 16b4ece4
...@@ -6198,8 +6198,12 @@ private Panel panel1, ...@@ -6198,8 +6198,12 @@ private Panel panel1,
// TODO Auto-generated catch block // TODO Auto-generated catch block
e.printStackTrace(); e.printStackTrace();
} //final int debugLevel); } //final int debugLevel);
QUAD_CLT.tp.clt_3d_passes = null; // resetCLTPasses(); // so running "Ground truth" after would be OK if (QUAD_CLT.tp != null) {
QUAD_CLT_AUX.tp.clt_3d_passes = null; //.resetCLTPasses(); 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) { if (configPath!=null) {
saveTimestampedProperties( // save config again saveTimestampedProperties( // save config again
......
...@@ -556,7 +556,7 @@ public class QuadCLTCPU { ...@@ -556,7 +556,7 @@ public class QuadCLTCPU {
threadsMax, // maximal number of threads to launch threadsMax, // maximal number of threads to launch
updateStatus, updateStatus,
debugLevel); debugLevel);
if (isMonochrome()) { if (isMonochrome()) { // only [2] is non-zero
this.dsrbg = new double[][] { this.dsrbg = new double[][] {
disparity, disparity,
strength, strength,
......
...@@ -376,7 +376,7 @@ public class TwoQuadCLT { ...@@ -376,7 +376,7 @@ public class TwoQuadCLT {
final int debugLevel) throws Exception final int debugLevel) throws Exception
{ {
this.startTime=System.nanoTime(); this.startTime=System.nanoTime()+0;
String [] sourceFiles=quadCLT_main.correctionsParameters.getSourcePaths(); String [] sourceFiles=quadCLT_main.correctionsParameters.getSourcePaths();
QuadCLT.SetChannels [] set_channels_main = quadCLT_main.setChannels(debugLevel); QuadCLT.SetChannels [] set_channels_main = quadCLT_main.setChannels(debugLevel);
QuadCLT.SetChannels [] set_channels_aux = quadCLT_aux.setChannels(debugLevel); QuadCLT.SetChannels [] set_channels_aux = quadCLT_aux.setChannels(debugLevel);
...@@ -399,7 +399,7 @@ public class TwoQuadCLT { ...@@ -399,7 +399,7 @@ public class TwoQuadCLT {
if (!quadCLT_aux.isLwir() && !(set_channels_aux == null)) { if (!quadCLT_aux.isLwir() && !(set_channels_aux == null)) {
referenceExposures_aux = quadCLT_aux.eyesisCorrections.calcReferenceExposures(debugLevel); referenceExposures_aux = quadCLT_aux.eyesisCorrections.calcReferenceExposures(debugLevel);
} }
for (int nSet = 0; nSet < set_channels_main.length; nSet++){ for (int nSet = 0; nSet < set_channels.length; nSet++){
// check it is the same set for both cameras // check it is the same set for both cameras
/* /*
if (set_channels_aux.length <= nSet ) { if (set_channels_aux.length <= nSet ) {
...@@ -434,42 +434,49 @@ public class TwoQuadCLT { ...@@ -434,42 +434,49 @@ public class TwoQuadCLT {
boolean [][] saturation_imp_aux = ((channelFiles_aux != null) && (clt_parameters.sat_level > 0.0))? new boolean[channelFiles_aux.length][] : null; boolean [][] saturation_imp_aux = ((channelFiles_aux != null) && (clt_parameters.sat_level > 0.0))? new boolean[channelFiles_aux.length][] : null;
double [] scaleExposures_main = (channelFiles_main != null) ? (new double[channelFiles_main.length]) : null; double [] scaleExposures_main = (channelFiles_main != null) ? (new double[channelFiles_main.length]) : null;
double [] scaleExposures_aux = (channelFiles_aux != null) ? (new double[channelFiles_aux.length]) : null; double [] scaleExposures_aux = (channelFiles_aux != null) ? (new double[channelFiles_aux.length]) : null;
ImagePlus [] imp_srcs_main = quadCLT_main.conditionImageSet( ImagePlus [] imp_srcs_main = new ImagePlus [0];
clt_parameters, // EyesisCorrectionParameters.CLTParameters clt_parameters, if (nSet_main >= 0) {
colorProcParameters, // ColorProcParameters colorProcParameters, // imp_srcs_main = quadCLT_main.conditionImageSet(
sourceFiles, // String [] sourceFiles, clt_parameters, // EyesisCorrectionParameters.CLTParameters clt_parameters,
set_channels_main[nSet].name(), // String set_name, colorProcParameters, // ColorProcParameters colorProcParameters, //
referenceExposures_main, // double [] referenceExposures, sourceFiles, // String [] sourceFiles,
channelFiles_main, // int [] channelFiles, set_channels_main[nSet].name(), // String set_name,
scaleExposures_main, //output // double [] scaleExposures referenceExposures_main, // double [] referenceExposures,
saturation_imp_main, //output // boolean [][] saturation_imp, channelFiles_main, // int [] channelFiles,
threadsMax, // int threadsMax, scaleExposures_main, //output // double [] scaleExposures
debugLevel); // int debugLevel); saturation_imp_main, //output // boolean [][] saturation_imp,
threadsMax, // int threadsMax,
ImagePlus [] imp_srcs_aux = quadCLT_aux.conditionImageSet( debugLevel); // int debugLevel);
clt_parameters, // EyesisCorrectionParameters.CLTParameters clt_parameters, ExportForGPUDevelopment.processCLTQuadCorrPairForGPU(
colorProcParameters_aux, // ColorProcParameters colorProcParameters, // save_prefix, // String save_prefix,
sourceFiles, // String [] sourceFiles, quadCLT_main, // QuadCLT quadCLT,
set_channels_aux[nSet].name(), // String set_name, imp_srcs_main, // ImagePlus [] imp_quad,
referenceExposures_aux, // double [] referenceExposures, clt_parameters); // CLTParameters clt_parameters);
channelFiles_aux, // int [] channelFiles, } else {
scaleExposures_aux, //output // double [] scaleExposures System.out.println("No images to export data for the main (RGB) camera");
saturation_imp_aux, //output // boolean [][] saturation_imp, }
threadsMax, // int threadsMax,
debugLevel); // int debugLevel);
// Tempporarily processing individually with the old code ImagePlus [] imp_srcs_aux = new ImagePlus [0];
ExportForGPUDevelopment.processCLTQuadCorrPairForGPU( if (nSet_aux >= 0) {
save_prefix, // String save_prefix, imp_srcs_aux = quadCLT_aux.conditionImageSet(
quadCLT_main, // QuadCLT quadCLT, clt_parameters, // EyesisCorrectionParameters.CLTParameters clt_parameters,
imp_srcs_main, // ImagePlus [] imp_quad, colorProcParameters_aux, // ColorProcParameters colorProcParameters, //
clt_parameters); // CLTParameters clt_parameters); sourceFiles, // String [] sourceFiles,
set_channels_aux[nSet].name(), // String set_name,
ExportForGPUDevelopment.processCLTQuadCorrPairForGPU( referenceExposures_aux, // double [] referenceExposures,
save_prefix, // String save_prefix, channelFiles_aux, // int [] channelFiles,
quadCLT_aux, // QuadCLT quadCLT, scaleExposures_aux, //output // double [] scaleExposures
imp_srcs_aux, // ImagePlus [] imp_quad, saturation_imp_aux, //output // boolean [][] saturation_imp,
clt_parameters); // CLTParameters clt_parameters); threadsMax, // int threadsMax,
debugLevel); // int debugLevel);
ExportForGPUDevelopment.processCLTQuadCorrPairForGPU(
save_prefix, // String save_prefix,
quadCLT_aux, // QuadCLT quadCLT,
imp_srcs_aux, // ImagePlus [] imp_quad,
clt_parameters); // CLTParameters clt_parameters);
} else {
System.out.println("No images to export data for the AUX (LWIR) camera");
}
Runtime.getRuntime().gc(); Runtime.getRuntime().gc();
if (debugLevel >-1) System.out.println("Processing set "+(nSet+1)+" (of "+set_channels_aux.length+") finished at "+ if (debugLevel >-1) System.out.println("Processing set "+(nSet+1)+" (of "+set_channels_aux.length+") finished at "+
...@@ -482,7 +489,9 @@ public class TwoQuadCLT { ...@@ -482,7 +489,9 @@ public class TwoQuadCLT {
return; return;
} }
} }
System.out.println("prepareFilesForGPUDebug(): processing "+(quadCLT_main.getTotalFiles(set_channels_main)+quadCLT_aux.getTotalFiles(set_channels_aux))+" files ("+set_channels_main.length+" file sets) finished at "+ int num_main = ((quadCLT_main != null) && (set_channels_main != null))? quadCLT_main.getTotalFiles(set_channels_main) : 0;
int num_aux = ((quadCLT_aux != null) && (set_channels_aux != null))? quadCLT_aux.getTotalFiles(set_channels_aux) : 0;
System.out.println("prepareFilesForGPUDebug(): processing "+(num_main + num_aux)+" files ("+set_channels.length+" file sets) finished at "+
IJ.d2s(0.000000001*(System.nanoTime()-this.startTime),3)+" sec, --- Free memory="+Runtime.getRuntime().freeMemory()+" (of "+Runtime.getRuntime().totalMemory()+")"); IJ.d2s(0.000000001*(System.nanoTime()-this.startTime),3)+" sec, --- Free memory="+Runtime.getRuntime().freeMemory()+" (of "+Runtime.getRuntime().totalMemory()+")");
} }
......
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