MLECO-2946: Use cmake option to select which image display on LCD

Signed-off-by: Isabella Gottardi <isabella.gottardi@arm.com>
Change-Id: I076c3431e8106ff9430e66727607438c36d1acbc
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 @@
 
         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 @@
             /* 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. */