diff options
Diffstat (limited to 'source/use_case/object_detection/include/UseCaseHandler.hpp')
-rw-r--r-- | source/use_case/object_detection/include/UseCaseHandler.hpp | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/source/use_case/object_detection/include/UseCaseHandler.hpp b/source/use_case/object_detection/include/UseCaseHandler.hpp index 9fe716f..43fb6bf 100644 --- a/source/use_case/object_detection/include/UseCaseHandler.hpp +++ b/source/use_case/object_detection/include/UseCaseHandler.hpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright 2022 Arm Limited and/or its affiliates <open-source-office@arm.com> + * SPDX-FileCopyrightText: Copyright 2022, 2024 Arm Limited and/or its affiliates <open-source-office@arm.com> * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,11 +17,39 @@ #ifndef OBJ_DET_HANDLER_HPP #define OBJ_DET_HANDLER_HPP +#if VSI_ENABLED +#include "DetectionResult.hpp" +#include <vector> +#endif + +#include <cstdint> #include "AppContext.hpp" namespace arm { namespace app { +#if VSI_ENABLED + typedef object_detection::DetectionResult OdResults; + + /** + * @brief Draw boxe(s) detected by the model. + * @param[in] image Pointer to the image. + * @param[in] imageWidth Image width. + * @param[in] imageHeight Image height. + * @param[in] results A vector of detection results. + **/ + void DrawDetectionBoxesVsi(uint8_t* image, + const uint32_t imageWidth, + const uint32_t imageHeight, + const std::vector<OdResults>& results); + /** + * @brief Handles the inference event when using VSI. + * @param[in] ctx Pointer to the application context. + * @return true or false based on execution success. + **/ + bool ObjectDetectionHandlerVsi(ApplicationContext& ctx); +#endif + /** * @brief Handles the inference event. * @param[in] ctx Pointer to the application context. |