Skip to content

Commit

Permalink
check that the depth images match as well
Browse files Browse the repository at this point in the history
  • Loading branch information
ewfuentes committed Nov 22, 2024
1 parent 23f4bdb commit 62908d5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions experimental/overhead_matching/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ cc_test(
deps = [
":spectacular_log",
"@com_google_googletest//:gtest_main",
"@fmt",
]
)
6 changes: 6 additions & 0 deletions experimental/overhead_matching/spectacular_log_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <iostream>
#include <sstream>

#include "fmt/format.h"
#include "gtest/gtest.h"
#include "opencv2/opencv.hpp"

Expand Down Expand Up @@ -58,7 +59,12 @@ TEST(SpectacularLogTest, happy_case) {

const auto frame = log.get_frame(frame_id).value();

const std::filesystem::path depth_path(log_path /
fmt::format("frames2/{:08d}.png", frame_id));
const cv::Mat depth_frame = cv::imread(depth_path, cv::IMREAD_GRAYSCALE);

EXPECT_TRUE(images_equal(expected_frame, frame.rgb_frame));
EXPECT_TRUE(images_equal(depth_frame, frame.depth_frame));

for (int i = 0; i < FRAME_SKIP - 1; i++) {
video.grab();
Expand Down

0 comments on commit 62908d5

Please sign in to comment.