summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsabella Gottardi <isabella.gottardi@arm.com>2022-02-16 10:42:32 +0000
committerIsabella Gottardi <isabella.gottardi@arm.com>2022-02-16 10:42:32 +0000
commite76a6910018c78ffb77228396458065397cdf270 (patch)
treeb3faadabaa8dfd388d95dcad3b5d83489e60d07c
parent9c54990fac1fd1949df3f021e81bec28bce28903 (diff)
downloadml-embedded-evaluation-kit-e76a6910018c78ffb77228396458065397cdf270.tar.gz
MLECO-2946: Use cmake option to select which image display on LCD
Signed-off-by: Isabella Gottardi <isabella.gottardi@arm.com> Change-Id: I076c3431e8106ff9430e66727607438c36d1acbc
-rw-r--r--source/use_case/object_detection/src/UseCaseHandler.cc7
1 files 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<object_detection::DetectorPostprocessing&>("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. */