mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 17:40:23 +08:00
transform features after source images decimation (#1154)
This commit is contained in:
@@ -458,6 +458,17 @@ void CameraThread::postUpdate(SensorData * dataPtr, CameraInfo * info) const
|
||||
{
|
||||
data.setStereoImage(image, depthOrRight, stereoModels);
|
||||
}
|
||||
|
||||
std::vector<cv::KeyPoint> kpts = data.keypoints();
|
||||
double log2value = log(double(_imageDecimation))/log(2.0);
|
||||
for(unsigned int i=0; i<kpts.size(); ++i)
|
||||
{
|
||||
kpts[i].pt.x /= _imageDecimation;
|
||||
kpts[i].pt.y /= _imageDecimation;
|
||||
kpts[i].size /= _imageDecimation;
|
||||
kpts[i].octave -= log2value;
|
||||
}
|
||||
data.setFeatures(kpts, data.keypoints3D(), data.descriptors());
|
||||
}
|
||||
if(info) info->timeImageDecimation = timer.ticks();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user