blob: 8ef48ac2e3e79f881e01c4499a033bf2191fad68 [file] [log] [blame]
Michael Levit06fcf752022-01-12 11:53:46 +02001/*
2 * Copyright (c) 2021 Arm Limited. All rights reserved.
3 * SPDX-License-Identifier: Apache-2.0
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17#ifndef DETECTION_USE_CASE_UTILS_HPP
18#define DETECTION_USE_CASE_UTILS_HPP
19
20#include "hal.h"
21#include "DetectionResult.hpp"
22#include "UseCaseHandler.hpp" /* Handlers for different user options. */
23#include <inttypes.h>
24#include <vector>
25
26
27void DisplayDetectionMenu();
28
29namespace image{
30
31
32 /**
33 * @brief Presents inference results using the data presentation
34 * object.
35 * @param[in] platform Reference to the hal platform object.
36 * @param[in] results Vector of detection results to be displayed.
37 * @return true if successful, false otherwise.
38 **/
39 bool PresentInferenceResult(hal_platform & platform,
40 const std::vector < arm::app::DetectionResult > & results);
41
42
43 /**
44 * @brief Presents inference results along with the inference time using the data presentation
45 * object.
46 * @param[in] platform Reference to the hal platform object.
47 * @param[in] results Vector of detection results to be displayed.
48 * @param[in] infTimeMs Inference time in ms.
49 * @return true if successful, false otherwise.
50 **/
51 bool PresentInferenceResult(hal_platform & platform,
52 const std::vector < arm::app::DetectionResult > & results,
53 const time_t infTimeMs);
54
55 /**
56 * @brief Presents inference results along with the inference time using the data presentation
57 * object.
58 * @param[in] platform Reference to the hal platform object.
59 * @param[in] results Vector of detection results to be displayed.
60 * @param[in] infTimeMs Inference time in ms.
61 * @return true if successful, false otherwise.
62 **/
63 bool PresentInferenceResult(hal_platform & platform,
64 const std::vector < arm::app::DetectionResult > & results,
65 bool profilingEnabled,
66 const time_t infTimeMs = 0);
67 }
68
69
70
71
72#endif /* DETECTION_USE_CASE_UTILS_HPP */