Commit 064ff7ca authored by Andrey Filippov's avatar Andrey Filippov

reducing number of SfM pairs if do not fit

parent b4b58042
...@@ -5041,6 +5041,13 @@ public class OpticalFlow { ...@@ -5041,6 +5041,13 @@ public class OpticalFlow {
*/ */
// int num_avg_pairs = 16; // number of scene pairs to average // int num_avg_pairs = 16; // number of scene pairs to average
int num_avg_pairs = clt_parameters.imp.sfm_num_pairs; // number of scene pairs to average int num_avg_pairs = clt_parameters.imp.sfm_num_pairs; // number of scene pairs to average
if (num_avg_pairs > ((last_index - earliest_scene)/2)) {
num_avg_pairs = (last_index - earliest_scene)/2;
if (debugLevel > -3) {
System.out.println("**** The specified num_avg_pairs="+clt_parameters.imp.sfm_num_pairs+
" is more than half-range. Reducing to "+num_avg_pairs);
}
}
QuadCLT[][][] scenes_seq_pairs = new QuadCLT[3][num_avg_pairs][2]; QuadCLT[][][] scenes_seq_pairs = new QuadCLT[3][num_avg_pairs][2];
for (int i = 0; i < num_avg_pairs; i++) { for (int i = 0; i < num_avg_pairs; i++) {
scenes_seq_pairs[0][i][0] = quadCLTs[ref_index + num_avg_pairs - 1 - i]; scenes_seq_pairs[0][i][0] = quadCLTs[ref_index + num_avg_pairs - 1 - i];
...@@ -5151,7 +5158,7 @@ public class OpticalFlow { ...@@ -5151,7 +5158,7 @@ public class OpticalFlow {
!batch_mode, // boolean test_motion_blur, !batch_mode, // boolean test_motion_blur,
debugLevel) ; // int debugLevel) debugLevel) ; // int debugLevel)
// should update earliest_scene // should update earliest_scene
if ((ref_index - earliest_scene + 1) < min_num_scenes) { if ((last_index - earliest_scene + 1) < min_num_scenes) {
System.out.println("After reAdjustPairsLMAInterscene() total number of useful scenes = "+(ref_index - earliest_scene + 1)+ System.out.println("After reAdjustPairsLMAInterscene() total number of useful scenes = "+(ref_index - earliest_scene + 1)+
" < "+min_num_scenes+". Scrapping this series."); " < "+min_num_scenes+". Scrapping this series.");
if (start_ref_pointers != null) { if (start_ref_pointers != null) {
......
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