MCPcopy Create free account
hub / github.com/colmap/colmap / WriteSolidColorImages

Function WriteSolidColorImages

src/colmap/scene/reconstruction_test.cc:1408–1418  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1406}
1407
1408void 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
1420TEST(Reconstruction, ExtractColorsForAllImages) {
1421 Reconstruction reconstruction;

Callers 1

TESTFunction · 0.85

Calls 5

RegImageIdsMethod · 0.80
CameraIdMethod · 0.80
ImageMethod · 0.45
FillMethod · 0.45
WriteMethod · 0.45

Tested by

no test coverage detected