mirror of
https://github.com/introlab/rtabmap.git
synced 2026-10-05 17:47:49 +08:00
Fixed build errors with log2 not defined on some os
This commit is contained in:
@@ -3425,6 +3425,7 @@ Signature * Memory::createSignature(const SensorData & data, const Transform & p
|
||||
UASSERT(keypoints3D.size() == 0 || keypoints3D.size() == wordIds.size());
|
||||
unsigned int i=0;
|
||||
float decimationRatio = preDecimation / _imagePostDecimation;
|
||||
double log2value = log(preDecimation)/log(2);
|
||||
for(std::list<int>::iterator iter=wordIds.begin(); iter!=wordIds.end() && i < keypoints.size(); ++iter, ++i)
|
||||
{
|
||||
cv::KeyPoint kpt = keypoints[i];
|
||||
@@ -3434,7 +3435,7 @@ Signature * Memory::createSignature(const SensorData & data, const Transform & p
|
||||
kpt.pt.x *= decimationRatio;
|
||||
kpt.pt.y *= decimationRatio;
|
||||
kpt.size *= decimationRatio;
|
||||
kpt.octave += log2(preDecimation);
|
||||
kpt.octave += log2value;
|
||||
}
|
||||
words.insert(std::pair<int, cv::KeyPoint>(*iter, kpt));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user