mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 01:20:25 +08:00
Merge branch '0.11.0' of github.com:introlab/rtabmap into 0.11.0
This commit is contained in:
@@ -28,12 +28,14 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#ifndef REGISTRATION_H_
|
||||
#define REGISTRATION_H_
|
||||
|
||||
#include "rtabmap/core/RtabmapExp.h" // DLL export/import defines
|
||||
|
||||
#include <rtabmap/core/Parameters.h>
|
||||
#include <rtabmap/core/Signature.h>
|
||||
|
||||
namespace rtabmap {
|
||||
|
||||
class Registration
|
||||
class RTABMAP_EXP Registration
|
||||
{
|
||||
public:
|
||||
virtual ~Registration() {}
|
||||
|
||||
@@ -28,13 +28,15 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#ifndef REGISTRATIONICP_H_
|
||||
#define REGISTRATIONICP_H_
|
||||
|
||||
#include "rtabmap/core/RtabmapExp.h" // DLL export/import defines
|
||||
|
||||
#include <rtabmap/core/Registration.h>
|
||||
#include <rtabmap/core/Signature.h>
|
||||
|
||||
namespace rtabmap {
|
||||
|
||||
// Geometrical registration
|
||||
class RegistrationIcp : public Registration
|
||||
class RTABMAP_EXP RegistrationIcp : public Registration
|
||||
{
|
||||
public:
|
||||
RegistrationIcp(const ParametersMap & parameters = ParametersMap());
|
||||
|
||||
@@ -28,13 +28,15 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#ifndef REGISTRATIONVIS_H_
|
||||
#define REGISTRATIONVIS_H_
|
||||
|
||||
#include "rtabmap/core/RtabmapExp.h" // DLL export/import defines
|
||||
|
||||
#include <rtabmap/core/Registration.h>
|
||||
#include <rtabmap/core/Signature.h>
|
||||
|
||||
namespace rtabmap {
|
||||
|
||||
// Visual registration
|
||||
class RegistrationVis : public Registration
|
||||
class RTABMAP_EXP RegistrationVis : public Registration
|
||||
{
|
||||
public:
|
||||
RegistrationVis(const ParametersMap & parameters = ParametersMap());
|
||||
|
||||
@@ -376,9 +376,9 @@ void Feature2D::parseParameters(const ParametersMap & parameters)
|
||||
{
|
||||
std::vector<float> tmpValues(4);
|
||||
unsigned int i=0;
|
||||
for(std::list<std::string>::iterator iter = strValues.begin(); iter!=strValues.end(); ++iter)
|
||||
for(std::list<std::string>::iterator jter = strValues.begin(); jter!=strValues.end(); ++jter)
|
||||
{
|
||||
tmpValues[i] = uStr2Float(*iter);
|
||||
tmpValues[i] = uStr2Float(*jter);
|
||||
++i;
|
||||
}
|
||||
|
||||
|
||||
@@ -192,7 +192,7 @@ bool importPoses(
|
||||
std::string str;
|
||||
std::getline(file, str);
|
||||
|
||||
if(str.front() == '#' || str.empty())
|
||||
if(str.at(0) == '#' || str.empty())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -209,11 +209,11 @@ Transform RegistrationVis::computeTransformationMod(
|
||||
// just some checks to make sure that input data are ok
|
||||
UASSERT((fromSignature.getWords().empty() && fromSignature.getWords3().empty())||
|
||||
(fromSignature.getWords().size() == fromSignature.getWords3().size()));
|
||||
UASSERT(fromSignature.sensorData().keypoints().size() == fromSignature.sensorData().descriptors().rows ||
|
||||
UASSERT((int)fromSignature.sensorData().keypoints().size() == fromSignature.sensorData().descriptors().rows ||
|
||||
fromSignature.sensorData().descriptors().rows == 0);
|
||||
UASSERT((toSignature.getWords().empty() && toSignature.getWords3().empty())||
|
||||
(toSignature.getWords().size() == toSignature.getWords3().size()));
|
||||
UASSERT(toSignature.sensorData().keypoints().size() == toSignature.sensorData().descriptors().rows ||
|
||||
UASSERT((int)toSignature.sensorData().keypoints().size() == toSignature.sensorData().descriptors().rows ||
|
||||
toSignature.sensorData().descriptors().rows == 0);
|
||||
UASSERT(fromSignature.sensorData().imageRaw().type() == CV_8UC1 ||
|
||||
fromSignature.sensorData().imageRaw().type() == CV_8UC3);
|
||||
@@ -405,7 +405,7 @@ Transform RegistrationVis::computeTransformationMod(
|
||||
UDEBUG("kptsTo=%d", (int)kptsTo.size());
|
||||
cv::Mat descriptorsFrom;
|
||||
cv::Mat descriptorsTo;
|
||||
if(fromSignature.getWords().empty() && fromSignature.sensorData().descriptors().rows == kptsFrom.size())
|
||||
if(fromSignature.getWords().empty() && fromSignature.sensorData().descriptors().rows == (int)kptsFrom.size())
|
||||
{
|
||||
descriptorsFrom = fromSignature.sensorData().descriptors();
|
||||
}
|
||||
@@ -413,7 +413,7 @@ Transform RegistrationVis::computeTransformationMod(
|
||||
{
|
||||
descriptorsFrom = detector->generateDescriptors(fromSignature.sensorData().imageRaw(), kptsFrom);
|
||||
}
|
||||
if(toSignature.getWords().empty() && toSignature.sensorData().descriptors().rows == kptsTo.size())
|
||||
if(toSignature.getWords().empty() && toSignature.sensorData().descriptors().rows == (int)kptsTo.size())
|
||||
{
|
||||
descriptorsTo = toSignature.sensorData().descriptors();
|
||||
}
|
||||
|
||||
@@ -161,7 +161,6 @@ std::vector<cv::Point2f> calcStereoCorrespondences(
|
||||
{
|
||||
int oi=0;
|
||||
float bestScore = -1.0f;
|
||||
float secondBest = -1.0f;
|
||||
int bestScoreIndex = -1;
|
||||
int tmpMinDisparity = minDisparity;
|
||||
int tmpMaxDisparity = maxDisparity;
|
||||
@@ -175,7 +174,6 @@ std::vector<cv::Point2f> calcStereoCorrespondences(
|
||||
|
||||
oi=0;
|
||||
bestScore = -1.0f;
|
||||
secondBest = -1.0f;
|
||||
bestScoreIndex = -1;
|
||||
int localMaxDisparity = -tmpMaxDisparity / (1<<level);
|
||||
int localMinDisparity = -tmpMinDisparity / (1<<level);
|
||||
@@ -214,7 +212,6 @@ std::vector<cv::Point2f> calcStereoCorrespondences(
|
||||
scores[oi] = ssdApproach?ssd(windowLeft, windowRight):sad(windowLeft, windowRight);
|
||||
if(scores[oi] > 0 && (bestScore < 0.0f || scores[oi] < bestScore))
|
||||
{
|
||||
secondBest = bestScore;
|
||||
bestScoreIndex = oi;
|
||||
bestScore = scores[oi];
|
||||
}
|
||||
|
||||
@@ -362,7 +362,7 @@ std::map<int, cv::Point3f> generateWords3DMono(
|
||||
int oi=0;
|
||||
for(unsigned int i=0; i<indexes.size(); ++i)
|
||||
{
|
||||
std::multimap<int, cv::Point3f>::iterator iter = words3D.find(indexes[i]);
|
||||
std::map<int, cv::Point3f>::iterator iter = words3D.find(indexes[i]);
|
||||
if(util3d::isFinite(iter->second))
|
||||
{
|
||||
iter->second.x *= scale;
|
||||
|
||||
Reference in New Issue
Block a user