targets_vf_combo,// final double [][][] all_tiles,
targets_vf_combo,// final double [][][] all_tiles,
ba_xy,// final double [][][][] ba_xy,
max_mismatch,// final double max_mismatch,
ignore_mismatch,// final boolean ignore_mismatch
mismatch_ba,// final double [][][] mismatch_ba,
remain,// final int [] remain,
remain,// final int [] remain,
cuasMotion.tilesX);// final int tilesX)
cuasMotion.tilesX);// final int tilesX)
// synchronize targets_lma_combo with targets_vf_combo
// synchronize targets_lma_combo with targets_vf_combo
...
@@ -3889,11 +4172,21 @@ public class CuasMotion {
...
@@ -3889,11 +4172,21 @@ public class CuasMotion {
float[][]background=fpixels;
float[][]background=fpixels;
Stringra_bg_suffix=(ra_background?"-RABG":"");
Stringra_bg_suffix=(ra_background?"-RABG":"");
if(mismatch_ba!=null){
ra_bg_suffix+="-DBG";
}
if(ra_background){
if(ra_background){
background=runningAverage(
if(cuas_gaussian_ra){
fpixels,// final float [][] fpixels,
background=runningGaussian(
corr_pairs,// final int ra_length,
fpixels,// final float [][] fpixels,
cuasMotion.gpu_max_width);// final int width)
corr_pairs,// final int ra_length,
cuasMotion.gpu_max_width);// final int width)
}else{
background=runningAverage(
fpixels,// final float [][] fpixels,
corr_pairs,// final int ra_length,
cuasMotion.gpu_max_width);// final int width)
}
}
}
...
@@ -3907,7 +4200,7 @@ public class CuasMotion {
...
@@ -3907,7 +4200,7 @@ public class CuasMotion {
targets_lma_combo,// final double [][][] target_positions,
targets_lma_combo,// final double [][][] target_positions,
background,// final float [][] background, // background image
background,// final float [][] background, // background image
frame0,// final int frame0,
frame0,// final int frame0,
corr_inc,// final int frame_step,
corr_inc,// final int frame_step,
velocity_scale,// final double velocity_scale, // 1.0/(disparity in frames)
velocity_scale,// final double velocity_scale, // 1.0/(disparity in frames)
targets60hz,// final double [][][] targets60hz,
targets60hz,// final double [][][] targets60hz,
batch_mode,// final boolean batch_mode,
batch_mode,// final boolean batch_mode,
...
@@ -3933,6 +4226,7 @@ public class CuasMotion {
...
@@ -3933,6 +4226,7 @@ public class CuasMotion {
target_type,// final int target_type, // = 0; // 0 - unknown, 1 - known, 2 - friend, 3 - foe
target_type,// final int target_type, // = 0; // 0 - unknown, 1 - known, 2 - friend, 3 - foe
replaced_targets,// final float [][] fpixels,
replaced_targets,// final float [][] fpixels,
targets60hz,// final double [][][] targets60hz,
targets60hz,// final double [][][] targets60hz,
mismatch_ba,// final double [][][] mismatch_ba, if not null (in debug mode) print data in the image. this is [keyframes]
frame0,// final int frame0,
frame0,// final int frame0,
corr_inc,// final int frame_step,
corr_inc,// final int frame_step,
cuasMotion.gpu_max_width,// final int width,
cuasMotion.gpu_max_width,// final int width,
...
@@ -3962,12 +4256,15 @@ public class CuasMotion {
...
@@ -3962,12 +4256,15 @@ public class CuasMotion {
publicstaticdouble[][][]filterIsolatedTargets(
publicstaticdouble[][][]filterIsolatedTargets(
finaldouble[][][]all_tiles,
finaldouble[][][]all_tiles,
finalint[]remain,
finaldouble[][][][]ba_xy,
finaldoublemax_mismatch,// if <=0, do not calculate mismatch_ba and filter
finalbooleanignore_mismatch,
finaldouble[][][]mismatch_ba,// if not null, will provide mismatches (before, after) and still keep them. Then output debug data in the final image with targets