Bounding box visualization fix for opening image sequences in the GUI.

This commit is contained in:
Tadas Baltrusaitis 2017-10-29 10:43:25 +00:00
parent 9db16cbb60
commit 569a81ae39

View file

@ -160,6 +160,18 @@ namespace CameraInterop {
this->image_files->push_back(msclr::interop::marshal_as<std::string>(image_files[i]));
}
vid_length = image_files->Count;
// Read the first frame to determine the capture width and height
cv::Mat tmp = cv::imread(this->image_files->at(0));
if (tmp.empty())
{
throw gcnew CaptureFailedException("Failed to open image sequence");
}
this->width = tmp.size().width;
this->height = tmp.size().height;
}
static void split(const std::string &s, char delim, std::vector<string> &elems) {