booleangenerate_output=clt_parameters.imp.cuas_generate;// generate and save targets Tiff and/or video files
booleangenerate_csv=clt_parameters.imp.cuas_generate_csv;// generate and save targets as csv file
booleanclean_video=clt_parameters.imp.cuas_clean_video;//true;// save video without any debug information for targets, output in TIFF files. False - same output for video and TIFFs
ImagePlusimp_targets=prepareFpixels();
double[][]combo_dsi=center_CLT.comboFromMain();
double[][]dls={
combo_dsi[OpticalFlow.COMBO_DSN_INDX_DISP],// **** null on second scene sequence
combo_dsi[OpticalFlow.COMBO_DSN_INDX_LMA],
combo_dsi[OpticalFlow.COMBO_DSN_INDX_STRENGTH]
};
double[][]ds=OpticalFlow.conditionInitialDS(
true,// boolean use_conf, // use configuration parameters, false - use following
Stringdisparity_path=center_CLT.getImageName()+CuasMotion.getParametersSuffixRanging(clt_parameters,TARGET_GLOBALS_SUFFIX);// may later be directly provided (e.g. select specific version)
Stringdisparity_path=getCenter_CLT().getImageName()+CuasMotion.getParametersSuffixRanging(clt_parameters,TARGET_GLOBALS_SUFFIX);// may later be directly provided (e.g. select specific version)
if(disparity_path.indexOf(Prefs.getFileSeparator())<0){// now always
// String disparity_path = model_prefix+TARGET_DISPARITIES_SUFFIX; // may later be directly provided (e.g. select specific version)
Stringdisparity_path=center_CLT.getImageName()+CuasMotion.getParametersSuffixRanging(clt_parameters,TARGET_DISPARITIES_SUFFIX);// may later be directly provided (e.g. select specific version)
Stringdisparity_path=getCenter_CLT().getImageName()+CuasMotion.getParametersSuffixRanging(clt_parameters,TARGET_DISPARITIES_SUFFIX);// may later be directly provided (e.g. select specific version)
if(disparity_path.indexOf(Prefs.getFileSeparator())<0){// now always
doublecuas_initial_disparity=clt_parameters.imp.cuas_initial_disparity;// 1.0; // Start correlation with this disparity (in addition to infinity) after reset
doublecuas_infinity=clt_parameters.imp.cuas_infinity;// 0.63; // disparity at infinity for targets
finalinttilesX=center_CLT.getTilesX();
finalinttilesX=getCenter_CLT().getTilesX();
// final int tilesY = center_CLT.getTilesY();
// final int frame_center = cuasMotion.getFrameCenter(nseq); // for debug only
doublecuas_initial_disparity=clt_parameters.imp.cuas_initial_disparity;// 1.0; // Start correlation with this disparity (in addition to infinity) after reset
doublecuas_infinity=clt_parameters.imp.cuas_infinity;// 0.63; // disparity at infinity for targets
finalinttilesX=center_CLT.getTilesX();
finalinttilesY=center_CLT.getTilesY();
finalinttilesX=getCenter_CLT().getTilesX();
finalinttilesY=getCenter_CLT().getTilesY();
finalintframe_center=cuasMotion.getFrameCenter(nseq);// for debug only
thrownewIllegalArgumentException("Kernel length = "+kernel.length+" does not match kernel size (2*"+kernel2d_rad+"+1) * (2*"+kernel2d_rad+"+1) ="+(kernel_size*kernel_size));
}
}
/*
private void setupConvolve3d(
final double [] hist_weights, // same
final int decim_pix,
final int decim_vel,
final int rad_vel){
final int num_subpix = decim_pix * decim_pix;
final int num_layers = hist_weights.length;
final int num_src_vel = (2*this.kernel3d3_rad+1)*(2*this.kernel3d3_rad+1);
final int num_dst_vel = (2*rad_vel+1)*(2*rad_vel+1);
final double [][][][][] kern3d = new double [num_subpix][num_layers][][][];
for (int nsubpix_y = 0; nsubpix_y<decim_pix; nsubpix_y++) {
for (int nsubpix_x = 0; nsubpix_x<decim_pix; nsubpix_x++) {
int nsubpix = nsubpix_x + nsubpix_y * decim_pix;
for (int nlayer = 0; nlayer < num_layers; nlayer++) {
int pix_rng = 2 * nlayer; // from -pix_rng to +pix_rng+1 inclusive
int num_src_pix = 2 * pix_rng + 2;
kern3d[nsubpix][nlayer] = new double [num_src_pix * num_src_pix][num_src_vel][num_dst_vel];
// first calculate total energy, then how that apply this energy to specific velocity? how to mix mutual positions and
// source direction
// for nlayer > 0 use mutual position, for layer 0 use source direction
// Certain?
if (nlayer == 0) { // same layer - use source direction
} else { // one of the earliest layers - use mutual position
}
}
}
}
}
*/
publicdouble[][][]convolve3d(
finaldouble[][][]data,// outer index - historic layers, [0] - latest, second index - pixel, third - direction ([9])
double[][][]result_in){
...
...
@@ -307,14 +298,17 @@ public class CuasRTUtils {
double[][]result_in,
finaldoublew_now,// normally 0.5, so center will propagate to the next pyramid levels
finaldoublew_prev,// normally 0.5, so center will propagate to the next pyramid levels
if(properties.getProperty(prefix+"curt_temp_weights")!=null)this.curt_temp_weights=IntersceneMatchParameters.StringToDoubles(properties.getProperty(prefix+"curt_temp_weights"),0);// use 0
System.out.println("Failed target detection. Probably, radar mode was selected but target file does not exist (created with \"CUAS Combine\" command)");