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

Method Fill

src/colmap/sensor/bitmap.cc:220–232  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

218}
219
220void Bitmap::Fill(const BitmapColor<uint8_t>& color) {
221 if (IsGrey()) {
222 std::fill(data_.begin(), data_.end(), color.r);
223 } else {
224 THROW_CHECK_EQ(data_.size() % 3, 0);
225 size_t i = 0;
226 while (i < data_.size()) {
227 data_[i++] = color.r;
228 data_[i++] = color.g;
229 data_[i++] = color.b;
230 }
231 }
232}
233
234std::optional<BitmapColor<uint8_t>> Bitmap::InterpolateNearestNeighbor(
235 const double x, const double y) const {

Callers 3

WriteSolidColorImagesFunction · 0.45
SynthesizeImagesFunction · 0.45
TESTFunction · 0.45

Calls 3

sizeMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by 2

WriteSolidColorImagesFunction · 0.36
TESTFunction · 0.36