Fixed F2F-Optical flow not creating keyframes bug

This commit is contained in:
matlabbe
2021-09-03 15:33:22 -04:00
parent 371a3ef851
commit c43118cde8

View File

@@ -240,7 +240,7 @@ Transform OdometryF2F::computeTransform(
{ {
UDEBUG("Update key frame"); UDEBUG("Update key frame");
int features = newFrame.getWordsDescriptors().rows; int features = newFrame.getWordsDescriptors().rows;
if(!refFrame_.sensorData().isValid()) if(!refFrame_.sensorData().isValid() || (features==0 && registrationPipeline_->isImageRequired()))
{ {
newFrame = Signature(data); newFrame = Signature(data);
// this will generate features only for the first frame or if optical flow was used (no 3d words) // this will generate features only for the first frame or if optical flow was used (no 3d words)