MLECO-3186: Each use case should same namespace convention as KWS and ASR

Certain UCs required additional work due to case context variables which also
became part of a namespace in generated files.
Solution was to declare these extra variables as part of the UC namespace in the respective model.hpp files.
Additional changes to standardise use of namespaces may be required - proposing new task.

Minor typo and rewording of customizing.md in relevant sections included.

Signed-off-by: Liam Barry <liam.barry@arm.com>
Change-Id: Ie78f82a30be252cb841136ea5115f21fc8d762cb
diff --git a/source/use_case/object_detection/src/MainLoop.cc b/source/use_case/object_detection/src/MainLoop.cc
index 4d70d2d..dc9b693 100644
--- a/source/use_case/object_detection/src/MainLoop.cc
+++ b/source/use_case/object_detection/src/MainLoop.cc
@@ -23,14 +23,15 @@
 #include "BufAttributes.hpp"        /* Buffer attributes to be applied */
 
 namespace arm {
-    namespace app {
-        static uint8_t  tensorArena[ACTIVATION_BUF_SZ] ACTIVATION_BUF_ATTRIBUTE;
-    } /* namespace app */
+namespace app {
+    static uint8_t tensorArena[ACTIVATION_BUF_SZ] ACTIVATION_BUF_ATTRIBUTE;
+    namespace object_detection {
+        extern uint8_t* GetModelPointer();
+        extern size_t GetModelLen();
+    } /* namespace object_detection */
+} /* namespace app */
 } /* namespace arm */
 
-extern uint8_t* GetModelPointer();
-extern size_t GetModelLen();
-
 static void DisplayDetectionMenu()
 {
     printf("\n\n");
@@ -52,8 +53,8 @@
     /* Load the model. */
     if (!model.Init(arm::app::tensorArena,
                     sizeof(arm::app::tensorArena),
-                    GetModelPointer(),
-                    GetModelLen())) {
+                    arm::app::object_detection::GetModelPointer(),
+                    arm::app::object_detection::GetModelLen())) {
         printf_err("Failed to initialise model\n");
         return;
     }
diff --git a/source/use_case/object_detection/src/UseCaseHandler.cc b/source/use_case/object_detection/src/UseCaseHandler.cc
index 4d0877a..e9bcd4a 100644
--- a/source/use_case/object_detection/src/UseCaseHandler.cc
+++ b/source/use_case/object_detection/src/UseCaseHandler.cc
@@ -27,6 +27,9 @@
 
 namespace arm {
 namespace app {
+    namespace object_detection {
+        extern const int channelsImageDisplayed;
+    } /* namespace object_detection */
 
     /**
      * @brief           Presents inference results along using the data presentation
@@ -122,9 +125,13 @@
 
             /* Display image on the LCD. */
             hal_lcd_display_image(
-                (channelsImageDisplayed == 3) ? currImage : dstPtr,
-                inputImgCols, inputImgRows, channelsImageDisplayed,
-                dataPsnImgStartX, dataPsnImgStartY, dataPsnImgDownscaleFactor);
+                (arm::app::object_detection::channelsImageDisplayed == 3) ? currImage : dstPtr,
+                inputImgCols,
+                inputImgRows,
+                arm::app::object_detection::channelsImageDisplayed,
+                dataPsnImgStartX,
+                dataPsnImgStartY,
+                dataPsnImgDownscaleFactor);
 
             /* Display message on the LCD - inference running. */
             hal_lcd_display_text(str_inf.c_str(), str_inf.size(),
diff --git a/source/use_case/object_detection/usecase.cmake b/source/use_case/object_detection/usecase.cmake
index 850e7fc..b0a07d5 100644
--- a/source/use_case/object_detection/usecase.cmake
+++ b/source/use_case/object_detection/usecase.cmake
@@ -76,4 +76,4 @@
     MODEL_PATH ${${use_case}_MODEL_TFLITE_PATH}
     DESTINATION ${SRC_GEN_DIR}
     EXPRESSIONS ${EXTRA_MODEL_CODE}
-    )
+    NAMESPACE   "arm" "app" "object_detection")