Working calibration
This commit is contained in:
@@ -189,6 +189,7 @@ int main() {
|
||||
|
||||
auto [fx, fy, cx, cy, distortion] = reload_calibration();
|
||||
|
||||
int64_t frame_id = 0;
|
||||
while (true) {
|
||||
auto event = dora_node.events->next();
|
||||
auto type = event_type(event);
|
||||
@@ -237,6 +238,12 @@ int main() {
|
||||
image_metadata->set_float("cx", cx);
|
||||
image_metadata->set_float("cy", cy);
|
||||
image_metadata->set_list_float("distortion", make_distortion(distortion));
|
||||
image_metadata->set_int("frame_id", frame_id++);
|
||||
image_metadata->set_int("timestamp_ns", static_cast<int64_t>(
|
||||
std::chrono::duration_cast<std::chrono::nanoseconds>(
|
||||
std::chrono::steady_clock::now().time_since_epoch()
|
||||
).count()
|
||||
));
|
||||
|
||||
auto image_result = send_output_with_metadata(
|
||||
dora_node.send_output, "image_bgr", image_slice, std::move(image_metadata));
|
||||
|
||||
Reference in New Issue
Block a user