Added multicameras support for F2F odometry / OpticalFlow

This commit is contained in:
matlabbe
2023-10-25 14:54:20 -07:00
parent 71bb0cf226
commit 64962e8e3d
3 changed files with 63 additions and 11 deletions

View File

@@ -74,15 +74,15 @@ Transform OdometryF2F::computeTransform(
UTimer timer;
Transform output;
if(!data.rightRaw().empty() &&
(data.stereoCameraModels().size() != 1 || !data.stereoCameraModels()[0].isValidForProjection()))
(data.stereoCameraModels().empty() || !data.stereoCameraModels()[0].isValidForProjection()))
{
UERROR("Calibrated stereo camera required (multi-cameras not supported)");
UERROR("Calibrated stereo camera required.");
return output;
}
if(!data.depthRaw().empty() &&
(data.cameraModels().size() != 1 || !data.cameraModels()[0].isValidForProjection()))
(data.cameraModels().empty() || !data.cameraModels()[0].isValidForProjection()))
{
UERROR("Calibrated camera required (multi-cameras not supported).");
UERROR("Calibrated camera required.");
return output;
}