Skip to content
Snippets Groups Projects
Commit fcaaae14 authored by Nicolas Pope's avatar Nicolas Pope
Browse files

Fixes to file recording

parent 93f4a9e1
No related branches found
No related tags found
No related merge requests found
Pipeline #26335 passed
...@@ -444,6 +444,7 @@ void runCameraCalibration( ftl::Configurable* root, ...@@ -444,6 +444,7 @@ void runCameraCalibration( ftl::Configurable* root,
int iter = 0; int iter = 0;
Mat show; Mat show;
cv::Mat show2;
vector<int> visible; vector<int> visible;
vector<vector<Point2d>> points(n_cameras); vector<vector<Point2d>> points(n_cameras);
...@@ -536,6 +537,8 @@ void runCameraCalibration( ftl::Configurable* root, ...@@ -536,6 +537,8 @@ void runCameraCalibration( ftl::Configurable* root,
stack(rgb, show); stack(rgb, show);
cv::namedWindow("Cameras", cv::WINDOW_KEEPRATIO | cv::WINDOW_NORMAL); cv::namedWindow("Cameras", cv::WINDOW_KEEPRATIO | cv::WINDOW_NORMAL);
//cv::resize(show, show2, cv::Size(float(show.cols) / float(show.rows) * 1080.0f, 1080));
cv::resizeWindow("Cameras", cv::Size(2*1920,1080));
cv::imshow("Cameras", show); cv::imshow("Cameras", show);
} }
cv::destroyWindow("Cameras"); cv::destroyWindow("Cameras");
......
...@@ -41,7 +41,7 @@ bool File::_checkFile() { ...@@ -41,7 +41,7 @@ bool File::_checkFile() {
int count = 10; int count = 10;
int64_t ts = -1000; int64_t ts = -1000;
int min_ts_diff = 1000; int min_ts_diff = 1000;
first_ts_ = 10000000; first_ts_ = 10000000000000ll;
while (count > 0) { while (count > 0) {
std::tuple<ftl::codecs::StreamPacket,ftl::codecs::Packet> data; std::tuple<ftl::codecs::StreamPacket,ftl::codecs::Packet> data;
...@@ -54,6 +54,8 @@ bool File::_checkFile() { ...@@ -54,6 +54,8 @@ bool File::_checkFile() {
if (spkt.timestamp < first_ts_) first_ts_ = spkt.timestamp; if (spkt.timestamp < first_ts_) first_ts_ = spkt.timestamp;
//LOG(INFO) << "TIMESTAMP: " << spkt.timestamp;
if (spkt.timestamp > 0 && int(spkt.channel) < 32) { if (spkt.timestamp > 0 && int(spkt.channel) < 32) {
if (spkt.timestamp > ts) { if (spkt.timestamp > ts) {
--count; --count;
...@@ -104,7 +106,7 @@ bool File::post(const ftl::codecs::StreamPacket &s, const ftl::codecs::Packet &p ...@@ -104,7 +106,7 @@ bool File::post(const ftl::codecs::StreamPacket &s, const ftl::codecs::Packet &p
ftl::codecs::StreamPacket s2 = s; ftl::codecs::StreamPacket s2 = s;
// Adjust timestamp relative to start of file. // Adjust timestamp relative to start of file.
s2.timestamp -= timestart_; //s2.timestamp -= timestart_;
auto data = std::make_tuple(s2,p); auto data = std::make_tuple(s2,p);
msgpack::sbuffer buffer; msgpack::sbuffer buffer;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment