| 84 | } |
| 85 | |
| 86 | FeatureKeypointsBlob FeatureKeypointsToBlob(const FeatureKeypoints& keypoints) { |
| 87 | const FeatureKeypointsBlob::Index kNumCols = 6; |
| 88 | FeatureKeypointsBlob blob(keypoints.size(), kNumCols); |
| 89 | for (size_t i = 0; i < keypoints.size(); ++i) { |
| 90 | blob(i, 0) = keypoints[i].x; |
| 91 | blob(i, 1) = keypoints[i].y; |
| 92 | blob(i, 2) = keypoints[i].a11; |
| 93 | blob(i, 3) = keypoints[i].a12; |
| 94 | blob(i, 4) = keypoints[i].a21; |
| 95 | blob(i, 5) = keypoints[i].a22; |
| 96 | } |
| 97 | return blob; |
| 98 | } |
| 99 | |
| 100 | FeatureKeypoints FeatureKeypointsFromBlob(const FeatureKeypointsBlob& blob) { |
| 101 | FeatureKeypoints keypoints(static_cast<size_t>(blob.rows())); |
no test coverage detected