| 86 | } |
| 87 | |
| 88 | void Image::Downsize(const size_t max_width, const size_t max_height) { |
| 89 | if (width_ <= max_width && height_ <= max_height) { |
| 90 | return; |
| 91 | } |
| 92 | const float factor_x = static_cast<float>(max_width) / width_; |
| 93 | const float factor_y = static_cast<float>(max_height) / height_; |
| 94 | Rescale(std::min(factor_x, factor_y)); |
| 95 | } |
| 96 | |
| 97 | void ComputeRelativePose(const float R1[9], |
| 98 | const float T1[3], |