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

Function ArrayFromDepthMap

src/pycolmap/mvs/depth_map.cc:19–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17#endif
18
19py::array_t<float> ArrayFromDepthMap(const DepthMap& self) {
20 const std::vector<ssize_t> shape = {static_cast<ssize_t>(self.GetHeight()),
21 static_cast<ssize_t>(self.GetWidth())};
22 py::array_t<float> output(shape);
23 py::buffer_info output_info = output.request();
24 float* output_ptr = reinterpret_cast<float*>(output_info.ptr);
25 std::memcpy(output_ptr, self.GetPtr(), self.GetNumBytes());
26 return output;
27}
28
29DepthMap DepthMapFromArray(py::array_t<float, py::array::c_style> array,
30 float depth_min,

Callers

nothing calls this directly

Calls 4

GetHeightMethod · 0.45
GetWidthMethod · 0.45
GetPtrMethod · 0.45
GetNumBytesMethod · 0.45

Tested by

no test coverage detected