@@ -302,9 +302,9 @@ Eigen::Matrix<double, 2, Eigen::Dynamic, Eigen::RowMajor> _dq_db_projection_unce
302302 dq_db.block (0 , frame_start, 2 , 3 ) = dq_dframes[frame] / Nboards;
303303 }
304304
305- Eigen::IOFormat CommaFmt (Eigen::StreamPrecision, Eigen::DontAlignCols, " , " , " \n " , " " , " " );
306- std::cout << " dq_db final:\n "
307- << dq_db.format (CommaFmt) << " \n " ;
305+ // Eigen::IOFormat CommaFmt(Eigen::StreamPrecision, Eigen::DontAlignCols, ", ", "\n", "", "");
306+ // std::cout << "dq_db final:\n"
307+ // << dq_db.format(CommaFmt) << "\n";
308308
309309 return dq_db;
310310}
@@ -343,15 +343,15 @@ double _propagate_calibration_uncertainty(
343343 // Pack the gradient
344344 Eigen::Matrix<double , 2 , Eigen::Dynamic, Eigen::RowMajor> dF_dbpacked = dF_dbunpacked;
345345
346- printf (" \n df_db_unpacked\n " );
347- for (int i = 0 ; i < dF_dbunpacked.rows (); i++)
348- {
349- for (int j = 0 ; j < dF_dbunpacked.cols (); j++)
350- {
351- printf (" %f," , dF_dbpacked (i, j));
352- }
353- printf (" \n " );
354- }
346+ // printf("\ndf_db_unpacked\n");
347+ // for (int i = 0; i < dF_dbunpacked.rows(); i++)
348+ // {
349+ // for (int j = 0; j < dF_dbunpacked.cols(); j++)
350+ // {
351+ // printf("%f,", dF_dbpacked(i, j));
352+ // }
353+ // printf("\n");
354+ // }
355355
356356 // called for each Nstate elements of dF_dbunpacked
357357 for (int i = 0 ; i < dF_dbunpacked.rows (); i++)
@@ -364,15 +364,15 @@ double _propagate_calibration_uncertainty(
364364 problem_selections, &lensmodel);
365365 }
366366
367- printf (" \n df_db_packed\n " );
368- for (int i = 0 ; i < dF_dbpacked.rows (); i++)
369- {
370- for (int j = 0 ; j < dF_dbpacked.cols (); j++)
371- {
372- printf (" %f," , dF_dbpacked (i, j));
373- }
374- printf (" \n " );
375- }
367+ // printf("\ndf_db_packed\n");
368+ // for (int i = 0; i < dF_dbpacked.rows(); i++)
369+ // {
370+ // for (int j = 0; j < dF_dbpacked.cols(); j++)
371+ // {
372+ // printf("%f,", dF_dbpacked(i, j));
373+ // }
374+ // printf("\n");
375+ // }
376376
377377 int Nstate = mrcal_num_states (
378378 1 , 0 , rt_ref_frame.size (), 0 , 0 ,
@@ -489,7 +489,7 @@ double _propagate_calibration_uncertainty(
489489 return worst_direction_stdev (Var_dF) * observed_pixel_uncertainty;
490490}
491491
492- bool projection_uncertainty (mrcal_point3_t pcam,
492+ double projection_uncertainty (mrcal_point3_t pcam,
493493 mrcal_lensmodel_t lensmodel,
494494 std::vector<double > intrinsics)
495495{
@@ -618,15 +618,17 @@ void compute_uncertainty()
618618 }
619619 }
620620
621- fmt::print (" Unprojected: {}, len={}\n " , pcam[pcam.size () - 1 ], pcam.size ());
621+ // fmt::print("Unprojected: {}, len={}\n", pcam[pcam.size() - 1], pcam.size());
622622
623623 for (const auto &p : pcam)
624624 {
625- fmt::print (" pcam: {}\n " , p);
625+ // fmt::print("pcam: {}\n", p);
626626
627- projection_uncertainty (
627+ double uncertainty = projection_uncertainty (
628628 p,
629629 lensmodel,
630630 intrinsics);
631+
632+ fmt::print (" uncertainty: {}\n " , uncertainty);
631633 }
632634}
0 commit comments