Could inverse extrinsics

This commit is contained in:
John Zhao
2018-04-29 14:47:35 +08:00
parent 77837933bc
commit f3d6fcdcb9
3 changed files with 14 additions and 4 deletions

View File

@@ -164,8 +164,13 @@ Extrinsics Device::GetExtrinsics(const Stream &from, const Stream &to) const {
try {
return stream_from_extrinsics_.at(from).at(to);
} catch (const std::out_of_range &e) {
LOG(WARNING) << "Extrinsics from " << from << " to " << to << " not found";
return {};
try {
return stream_from_extrinsics_.at(to).at(from).Inverse();
} catch (const std::out_of_range &e) {
LOG(WARNING) << "Extrinsics from " << from << " to " << to
<< " not found";
return {};
}
}
}