mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 17:40:23 +08:00
Added parameter Mem/RotateImagesUpsideUp
This commit is contained in:
@@ -330,6 +330,7 @@ private:
|
||||
bool _rehearsalWeightIgnoredWhileMoving;
|
||||
bool _useOdometryFeatures;
|
||||
bool _useOdometryGravity;
|
||||
bool _rotateImagesUpsideUp;
|
||||
bool _createOccupancyGrid;
|
||||
int _visMaxFeatures;
|
||||
bool _imagesAlreadyRectified;
|
||||
|
||||
@@ -231,6 +231,7 @@ class RTABMAP_CORE_EXPORT Parameters
|
||||
RTABMAP_PARAM(Mem, UseOdomFeatures, bool, true, "Use odometry features instead of regenerating them.");
|
||||
RTABMAP_PARAM(Mem, UseOdomGravity, bool, false, uFormat("Use odometry instead of IMU orientation to add gravity links to new nodes created. We assume that odometry is already aligned with gravity (e.g., we are using a VIO approach). Gravity constraints are used by graph optimization only if \"%s\" is not zero.", kOptimizerGravitySigma().c_str()));
|
||||
RTABMAP_PARAM(Mem, CovOffDiagIgnored, bool, true, "Ignore off diagonal values of the covariance matrix.");
|
||||
RTABMAP_PARAM(Mem, RotateImagesUpsideUp, bool, false, "Rotate images so that upside is up if they are not already. This can be useful in case the robots don't have all same camera orientation but are using the same map, so that not rotation-invariant visual features can still be used across the fleet.");
|
||||
|
||||
// KeypointMemory (Keypoint-based)
|
||||
RTABMAP_PARAM(Kp, NNStrategy, int, 1, "kNNFlannNaive=0, kNNFlannKdTree=1, kNNFlannLSH=2, kNNBruteForce=3, kNNBruteForceGPU=4");
|
||||
|
||||
@@ -33,6 +33,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include <opencv2/core/core.hpp>
|
||||
#include <rtabmap/core/Transform.h>
|
||||
#include <rtabmap/core/Parameters.h>
|
||||
#include <rtabmap/core/CameraModel.h>
|
||||
#include <vector>
|
||||
|
||||
namespace rtabmap
|
||||
@@ -163,6 +164,25 @@ void RTABMAP_CORE_EXPORT NMS(
|
||||
cv::Mat & descriptorsOut,
|
||||
int border, int dist_thresh, int img_width, int img_height);
|
||||
|
||||
/**
|
||||
* @brief Rotate images and camera model so that the top of the image is up.
|
||||
*
|
||||
* The roll value of local transform of the camera model is used to estimate
|
||||
* if the images have to be rotated. If there is a pitch value higher than
|
||||
* 45 deg, the original images and camera model will be returned (no rotation will happen).
|
||||
* The return local transform of the camera model is updated accordingly. The distortion
|
||||
* model is ignored and won't be transfered to modified camera model, so this function
|
||||
* expects already rectified images.
|
||||
*
|
||||
* @param model a valid camera model
|
||||
* @param rgb a rgb/grayscale image (set cv::Mat() if not used)
|
||||
* @param depth a depth image (set cv::Mat() if not used)
|
||||
*/
|
||||
void RTABMAP_CORE_EXPORT rotateImagesUpsideUpIfNecessary(
|
||||
CameraModel & model,
|
||||
cv::Mat & rgb,
|
||||
cv::Mat & depth);
|
||||
|
||||
} // namespace util3d
|
||||
} // namespace rtabmap
|
||||
|
||||
|
||||
Reference in New Issue
Block a user