| 47 | } |
| 48 | |
| 49 | void L1RootNormalizeFeatureDescriptors( |
| 50 | FeatureDescriptorsFloatData* descriptors) { |
| 51 | for (Eigen::Index r = 0; r < descriptors->rows(); ++r) { |
| 52 | descriptors->row(r) *= 1 / descriptors->row(r).lpNorm<1>(); |
| 53 | descriptors->row(r) = descriptors->row(r).array().sqrt(); |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | FeatureDescriptorsData FeatureDescriptorsToUnsignedByte( |
| 58 | const Eigen::Ref<const FeatureDescriptorsFloatData>& descriptors) { |