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

Function BlobColumnToStringStream

src/colmap/scene/database_sqlite.cc:248–261  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

246}
247
248std::optional<std::stringstream> BlobColumnToStringStream(
249 sqlite3_stmt* sql_stmt, const int col) {
250 const size_t num_bytes =
251 static_cast<size_t>(sqlite3_column_bytes(sql_stmt, col));
252 if (num_bytes == 0) {
253 return std::nullopt;
254 }
255 std::string sensor_data(num_bytes, '\0');
256 std::memcpy(
257 sensor_data.data(), sqlite3_column_blob(sql_stmt, col), num_bytes);
258 std::stringstream stream;
259 stream << sensor_data;
260 return stream;
261}
262
263Rigid3d ReadRigid3dFromStringStream(std::stringstream* stream) {
264 Rigid3d tform;

Callers 1

ReadRigRowsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected