diff options
author | CNLohr <charles@cnlohr.com> | 2018-03-26 17:22:59 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-26 17:22:59 -0400 |
commit | 325f8f01b7cdae59ee481fe5e04e8b6b85ee8838 (patch) | |
tree | 6598f0185c010dc3d48067060a6303d9e58ce74f /src/poser_sba.c | |
parent | 18e717642be3af3b9f72b630dcad68ca17c32dc9 (diff) | |
parent | 4c373617220aca69a4acb7a32c12457a057f4e48 (diff) | |
download | libsurvive-325f8f01b7cdae59ee481fe5e04e8b6b85ee8838.tar.gz libsurvive-325f8f01b7cdae59ee481fe5e04e8b6b85ee8838.tar.bz2 |
Merge pull request #118 from dpeter99/master
Fixed the Windows build
Diffstat (limited to 'src/poser_sba.c')
-rw-r--r-- | src/poser_sba.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/poser_sba.c b/src/poser_sba.c index 82fbd56..069e1d0 100644 --- a/src/poser_sba.c +++ b/src/poser_sba.c @@ -47,7 +47,7 @@ void metric_function(int j, int i, double *aj, double *xij, void *adata) { SurviveObject *so = ctx->so; SurvivePose obj2world = ctx->obj_pose; - FLT sensorInWorld[3] = {}; + FLT sensorInWorld[3] = {0}; ApplyPoseToPoint(sensorInWorld, &obj2world, &so->sensor_locations[i * 3]); survive_reproject_from_pose_with_config(so->ctx, &ctx->calibration_config, j, (SurvivePose *)aj, sensorInWorld, xij); @@ -213,7 +213,7 @@ static double run_sba_find_3d_structure_single_sweep(survive_calibration_config pdl->hdr.pt = hdr.pt; pdl->hdr.rawposeproc = sba_set_position; - sba_set_position_t locations = {}; + sba_set_position_t locations = {0}; pdl->hdr.userdata = &locations; driver(so, &pdl->hdr); pdl->hdr = hdr; @@ -229,8 +229,8 @@ static double run_sba_find_3d_structure_single_sweep(survive_calibration_config } } - double opts[SBA_OPTSSZ] = {}; - double info[SBA_INFOSZ] = {}; + double opts[SBA_OPTSSZ] = {0}; + double info[SBA_INFOSZ] = {0}; sba_context_single_sweep ctx = {.hdr = {options, &pdl->hdr, so}, .acode = acode, .lh = lh}; @@ -309,7 +309,7 @@ static double run_sba_find_3d_structure(SBAData *d, survive_calibration_config o pdl->hdr.pt = hdr.pt; pdl->hdr.rawposeproc = sba_set_position; - sba_set_position_t locations = {}; + sba_set_position_t locations = {0}; pdl->hdr.userdata = &locations; driver(so, &pdl->hdr); pdl->hdr = hdr; @@ -326,8 +326,8 @@ static double run_sba_find_3d_structure(SBAData *d, survive_calibration_config o } } - double opts[SBA_OPTSSZ] = {}; - double info[SBA_INFOSZ] = {}; + double opts[SBA_OPTSSZ] = {0}; + double info[SBA_INFOSZ] = {0}; sba_context ctx = {options, &pdl->hdr, so}; @@ -402,7 +402,7 @@ static double run_sba(survive_calibration_config options, PoserDataFullScene *pd } else { SV_INFO("Not using a seed poser for SBA; results will likely be way off"); for (int i = 0; i < 2; i++) { - so->ctx->bsd[i].Pose = (SurvivePose){}; + so->ctx->bsd[i].Pose = (SurvivePose){0}; so->ctx->bsd[i].Pose.Rot[0] = 1.; } } @@ -410,8 +410,8 @@ static double run_sba(survive_calibration_config options, PoserDataFullScene *pd // PoserCharlesSlow(so, (PoserData *)pdfs); } - double opts[SBA_OPTSSZ] = {}; - double info[SBA_INFOSZ] = {}; + double opts[SBA_OPTSSZ] = {0}; + double info[SBA_INFOSZ] = {0}; opts[0] = SBA_INIT_MU; opts[1] = SBA_STOP_THRESH; @@ -438,14 +438,13 @@ static double run_sba(survive_calibration_config options, PoserDataFullScene *pd info); // info if (status >= 0) { - SurvivePose additionalTx = {}; + SurvivePose additionalTx = {0}; for (int i = 0; i < NUM_LIGHTHOUSES; i++) { if (quatmagnitude(sbactx.camera_params[i].Rot) != 0) { PoserData_lighthouse_pose_func(&pdfs->hdr, so, i, &additionalTx, &sbactx.camera_params[i], &sbactx.obj_pose); } } - } else { SurviveContext *ctx = so->ctx; SV_INFO("SBA was unable to run %d", status); |