Adding OpenCV's GPU GFTT/ OpticalFlow and CudaSift support (#1330)

* Adding GFTT and SIFT Cuda support

* Working CudaSift

* Disable cudasift option when not available

* Added check to avoid re-allocating gpu memory everytime parseParameters is called. Added workaround of to detect/ignore invalid descriptors

* Added SIFT/PreciseUpscale and SIFT/Upscale parameters. Adjusted max octave to behave more like opencv

* Refactored how maximum features are thresholded, to be more similar to OpenCV version

* Updated loop closure benchmark scripts

* Cuda optical flow tmp commit

* Added Stereo/Gpu Vis/CorFlowGpu parameters (optical flow gpu integration for F2F odom and stereo correspondences)

* Fixed build without opencv cuda

* Fixed build with Opencv 4.10

* ZED: updated parameters to match zed sdk 4

* MRPT requires C++17

* updated max octave limit CudaSift
This commit is contained in:
matlabbe
2024-09-13 14:22:54 -07:00
committed by GitHub
parent f3ccfcb452
commit 69ac21f811
37 changed files with 2253 additions and 1375 deletions
+8 -7
View File
@@ -211,7 +211,7 @@ void OdometryViewer::processData(const rtabmap::OdometryEvent & odom)
cloudView_->setBackgroundColor(Qt::black);
}
timeLabel_->setText(QString("%1 s").arg(odom.info().timeEstimation));
timeLabel_->setText(QString("%1 s").arg(odom.info().timeEstimation));
if(cloudShown_->isChecked() &&
!odom.data().imageRaw().empty() &&
@@ -219,8 +219,8 @@ void OdometryViewer::processData(const rtabmap::OdometryEvent & odom)
(odom.data().stereoCameraModels().size() || odom.data().cameraModels().size()))
{
UDEBUG("New pose = %s, quality=%d", odom.pose().prettyPrint().c_str(), quality);
if(!odom.data().depthRaw().empty())
if(!odom.data().depthRaw().empty())
{
if(odom.data().imageRaw().cols % decimationSpin_->value() == 0 &&
odom.data().imageRaw().rows % decimationSpin_->value() == 0)
@@ -238,14 +238,14 @@ void OdometryViewer::processData(const rtabmap::OdometryEvent & odom)
}
}
else
{
validDecimationValue_ = decimationSpin_->value();
{
validDecimationValue_ = decimationSpin_->value();
}
// visualization: buffering the clouds
// Create the new cloud
pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloud;
pcl::IndicesPtr validIndices(new std::vector<int>);
pcl::IndicesPtr validIndices(new std::vector<int>);
cloud = util3d::cloudRGBFromSensorData(
odom.data(),
validDecimationValue_,
@@ -257,7 +257,7 @@ void OdometryViewer::processData(const rtabmap::OdometryEvent & odom)
if(voxelSpin_->value())
{
cloud = util3d::voxelize(cloud, validIndices, voxelSpin_->value());
}
}
if(cloud->size())
{
@@ -489,6 +489,7 @@ void OdometryViewer::processData(const rtabmap::OdometryEvent & odom)
imageView_->update();
cloudView_->update();
cloudView_->refreshView();
QApplication::processEvents();
processingData_ = false;
}