From e76a6910018c78ffb77228396458065397cdf270 Mon Sep 17 00:00:00 2001 From: Isabella Gottardi Date: Wed, 16 Feb 2022 10:42:32 +0000 Subject: MLECO-2946: Use cmake option to select which image display on LCD Signed-off-by: Isabella Gottardi Change-Id: I076c3431e8106ff9430e66727607438c36d1acbc --- source/use_case/object_detection/src/UseCaseHandler.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/source/use_case/object_detection/src/UseCaseHandler.cc b/source/use_case/object_detection/src/UseCaseHandler.cc index 257da4f..27d767d 100644 --- a/source/use_case/object_detection/src/UseCaseHandler.cc +++ b/source/use_case/object_detection/src/UseCaseHandler.cc @@ -95,7 +95,6 @@ namespace app { const uint32_t nCols = inputShape->data[arm::app::YoloFastestModel::ms_inputColsIdx]; const uint32_t nRows = inputShape->data[arm::app::YoloFastestModel::ms_inputRowsIdx]; - const uint32_t nPresentationChannels = channelsImageDisplayed; /* Get pre/post-processing objects. */ auto& postp = ctx.Get("postprocess"); @@ -114,10 +113,10 @@ namespace app { /* Convert to gray scale and populate input tensor. */ image::RgbToGrayscale(curr_image, dstPtr, copySz); - /* Display original image on the LCD. */ + /* Display image on the LCD. */ platform.data_psn->present_data_image( - curr_image, - nCols, nRows, nPresentationChannels, + (channelsImageDisplayed == 3) ? curr_image : dstPtr, + nCols, nRows, channelsImageDisplayed, dataPsnImgStartX, dataPsnImgStartY, dataPsnImgDownscaleFactor); /* If the data is signed. */ -- cgit v1.2.1