diff options
author | Isabella Gottardi <isabella.gottardi@arm.com> | 2022-02-16 10:42:32 +0000 |
---|---|---|
committer | Isabella Gottardi <isabella.gottardi@arm.com> | 2022-02-16 10:42:32 +0000 |
commit | e76a6910018c78ffb77228396458065397cdf270 (patch) | |
tree | b3faadabaa8dfd388d95dcad3b5d83489e60d07c /source/use_case/object_detection/src | |
parent | 9c54990fac1fd1949df3f021e81bec28bce28903 (diff) | |
download | ml-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
Diffstat (limited to 'source/use_case/object_detection/src')
-rw-r--r-- | source/use_case/object_detection/src/UseCaseHandler.cc | 7 |
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. */ |