From 40f6d65aa565db026d600de69418e3a88c58d821 Mon Sep 17 00:00:00 2001 From: Matthew Woehlke Date: Tue, 2 Jun 2020 15:39:30 -0400 Subject: [PATCH] Sort video frames by time Enable the option to tell video_input_image_list to sort the set of frames according to their timestamps. This will alter their frame numbers and may prevent some potential issues that could arise particularly with pipelines because we generally process things in temporal order and expect that to match frame order. (In particular, there are some places that we expect things to arrive in temporal order that try to append to KWIVER tracks, which will fail if the frame number order does not match the temporal order.) Note that this "depends" on Kitware/kwiver#1007, which adds the aforementioned functionality to KWIVER. Things will still run without that, but this change won't do anything. --- sealtk/noaa/core/ImageListVideoSourceFactory.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/sealtk/noaa/core/ImageListVideoSourceFactory.cpp b/sealtk/noaa/core/ImageListVideoSourceFactory.cpp index 575edcc..77e423a 100644 --- a/sealtk/noaa/core/ImageListVideoSourceFactory.cpp +++ b/sealtk/noaa/core/ImageListVideoSourceFactory.cpp @@ -53,6 +53,7 @@ kwiver::vital::config_block_sptr ImageListVideoSourceFactory::config( { auto config = kwiver::vital::config_block::empty_config(); config->set_value("video_reader:type", "image_list"); + config->set_value("video_reader:image_list:sort_by_time", "true"); config->set_value("video_reader:image_list:image_reader:type", config::videoReader); if (*config::videoReaderPassthrough)