| 1406 | } |
| 1407 | |
| 1408 | void WriteSolidColorImages(const Reconstruction& reconstruction, |
| 1409 | const std::filesystem::path& image_path, |
| 1410 | const BitmapColor<uint8_t>& color) { |
| 1411 | for (const auto& image_id : reconstruction.RegImageIds()) { |
| 1412 | const auto& image = reconstruction.Image(image_id); |
| 1413 | const auto& camera = reconstruction.Camera(image.CameraId()); |
| 1414 | Bitmap bitmap(camera.width, camera.height, /*as_rgb=*/true); |
| 1415 | bitmap.Fill(color); |
| 1416 | bitmap.Write(image_path / image.Name()); |
| 1417 | } |
| 1418 | } |
| 1419 | |
| 1420 | TEST(Reconstruction, ExtractColorsForAllImages) { |
| 1421 | Reconstruction reconstruction; |