@@ -251,7 +251,7 @@ opengv::sac_problems::relative_pose::MultiNoncentralRelativePoseSacProblem::
251
251
opengv::sac_problems::relative_pose::CentralRelativePoseSacProblem
252
252
centralProblem (_adapter, algorithm);
253
253
returnValue = centralProblem.computeModelCoefficients (
254
- _adapter.convertMultiIndices (indices),outModel);
254
+ _adapter.convertMultiIndices (indices),outModel);
255
255
256
256
// The transformation has been computed from cam to cam now, so transform
257
257
// that into the body frame
@@ -281,30 +281,30 @@ opengv::sac_problems::relative_pose::
281
281
282
282
for ( size_t camIndex = 0 ; camIndex < indices.size (); camIndex++ )
283
283
{
284
+ translation_t cam1Offset = _adapter.getCamOffset (camIndex);
285
+ rotation_t cam1Rotation = _adapter.getCamRotation (camIndex);
286
+ translation_t cam2Offset = _adapter.getCamOffset (camIndex);
287
+ rotation_t cam2Rotation = _adapter.getCamRotation (camIndex);
288
+
289
+ translation_t directTranslation =
290
+ cam1Rotation.transpose () *
291
+ ((translation - cam1Offset) + rotation * cam2Offset);
292
+ rotation_t directRotation =
293
+ cam1Rotation.transpose () * rotation * cam2Rotation;
294
+
295
+ _adapter.sett12 (directTranslation);
296
+ _adapter.setR12 (directRotation);
297
+
298
+ transformation_t inverseSolution;
299
+ inverseSolution.block <3 ,3 >(0 ,0 ) = directRotation.transpose ();
300
+ inverseSolution.col (3 ) =
301
+ -inverseSolution.block <3 ,3 >(0 ,0 )*directTranslation;
302
+
284
303
for (
285
304
size_t correspondenceIndex = 0 ;
286
305
correspondenceIndex < indices[camIndex].size ();
287
306
correspondenceIndex++ )
288
307
{
289
- translation_t cam1Offset = _adapter.getCamOffset (camIndex);
290
- rotation_t cam1Rotation = _adapter.getCamRotation (camIndex);
291
- translation_t cam2Offset = _adapter.getCamOffset (camIndex);
292
- rotation_t cam2Rotation = _adapter.getCamRotation (camIndex);
293
-
294
- translation_t directTranslation =
295
- cam1Rotation.transpose () *
296
- ((translation - cam1Offset) + rotation * cam2Offset);
297
- rotation_t directRotation =
298
- cam1Rotation.transpose () * rotation * cam2Rotation;
299
-
300
- _adapter.sett12 (directTranslation);
301
- _adapter.setR12 (directRotation);
302
-
303
- transformation_t inverseSolution;
304
- inverseSolution.block <3 ,3 >(0 ,0 ) = directRotation.transpose ();
305
- inverseSolution.col (3 ) =
306
- -inverseSolution.block <3 ,3 >(0 ,0 )*directTranslation;
307
-
308
308
p_hom.block <3 ,1 >(0 ,0 ) =
309
309
opengv::triangulation::triangulate2 (
310
310
_adapter,
0 commit comments