raulmur / ORB_SLAM2

Real-Time SLAM for Monocular, Stereo and RGB-D Cameras, with Loop Detection and Relocalization Capabilities
Other
9.17k stars 4.69k forks source link

Why use float Type to store Descriptor Distances #1081

Open gitouni opened 1 year ago

gitouni commented 1 year ago

Please see here in MapPoint.cc.

I'm confused with why the author used float type to define a 2-D array Distances instead of using int type, since the function ORBmatcher::DescriptorDistance just returns int types. Furthermore, is it safe to straightforwardly give the pointer of float type Distances to the int type array vDists?

Could anyboday reasoning this operation? Any help will be appreciated.