Fix original size

Signed-off-by: Micaela Verucchi <micaelaverucchi@gmail.com>
This commit is contained in:
Micaela Verucchi
2020-05-19 16:33:45 +02:00
parent f2991bec5c
commit 9618d5fc7f
4 changed files with 8 additions and 7 deletions
+3 -2
View File
@@ -30,7 +30,7 @@ class DetectionNN {
tk::dnn::NetworkRT *netRT = nullptr;
dnnType *input_d;
cv::Size originalSize;
std::vector<cv::Size> originalSize;
cv::Scalar colors[256];
@@ -103,13 +103,14 @@ class DetectionNN {
if(cur_batches > nBatches)
FatalError("A batch size greater than nBatches cannot be used");
originalSize.clear();
if(VERBOSE) printCenteredTitle(" TENSORRT detection ", '=', 30);
{
TIMER_START
for(int bi=0; bi<cur_batches;++bi){
if(!frames[bi].data)
FatalError("No image data feed to detection");
originalSize = frames[bi].size();
originalSize.push_back(frames[bi].size());
preprocess(frames[bi], bi);
}
TIMER_STOP