Michael Levit | 06fcf75 | 2022-01-12 11:53:46 +0200 | [diff] [blame] | 1 | /* |
Isabella Gottardi | 3107aa2 | 2022-01-27 16:39:37 +0000 | [diff] [blame] | 2 | * Copyright (c) 2022 Arm Limited. All rights reserved. |
Michael Levit | 06fcf75 | 2022-01-12 11:53:46 +0200 | [diff] [blame] | 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_RESULT_HPP |
| 18 | #define DETECTION_RESULT_HPP |
| 19 | |
| 20 | |
| 21 | namespace arm { |
| 22 | namespace app { |
Isabella Gottardi | 3107aa2 | 2022-01-27 16:39:37 +0000 | [diff] [blame] | 23 | namespace object_detection { |
Michael Levit | 06fcf75 | 2022-01-12 11:53:46 +0200 | [diff] [blame] | 24 | |
| 25 | /** |
| 26 | * @brief Class representing a single detection result. |
| 27 | */ |
| 28 | class DetectionResult { |
| 29 | public: |
Isabella Gottardi | 3107aa2 | 2022-01-27 16:39:37 +0000 | [diff] [blame] | 30 | /** |
| 31 | * @brief Constructor |
| 32 | * @param[in] normalisedVal Result normalized value |
| 33 | * @param[in] x0 Top corner x starting point |
| 34 | * @param[in] y0 Top corner y starting point |
| 35 | * @param[in] w Detection result width |
| 36 | * @param[in] h Detection result height |
| 37 | **/ |
Michael Levit | 06fcf75 | 2022-01-12 11:53:46 +0200 | [diff] [blame] | 38 | DetectionResult(double normalisedVal,int x0,int y0, int w,int h) : |
| 39 | m_normalisedVal(normalisedVal), |
| 40 | m_x0(x0), |
| 41 | m_y0(y0), |
| 42 | m_w(w), |
Isabella Gottardi | 3107aa2 | 2022-01-27 16:39:37 +0000 | [diff] [blame] | 43 | m_h(h) |
Michael Levit | 06fcf75 | 2022-01-12 11:53:46 +0200 | [diff] [blame] | 44 | { |
| 45 | } |
Isabella Gottardi | 3107aa2 | 2022-01-27 16:39:37 +0000 | [diff] [blame] | 46 | |
| 47 | DetectionResult() = default; |
| 48 | ~DetectionResult() = default; |
| 49 | |
| 50 | double m_normalisedVal{0.0}; |
| 51 | int m_x0{0}; |
| 52 | int m_y0{0}; |
| 53 | int m_w{0}; |
| 54 | int m_h{0}; |
Michael Levit | 06fcf75 | 2022-01-12 11:53:46 +0200 | [diff] [blame] | 55 | }; |
| 56 | |
Isabella Gottardi | 3107aa2 | 2022-01-27 16:39:37 +0000 | [diff] [blame] | 57 | } /* namespace object_detection */ |
Michael Levit | 06fcf75 | 2022-01-12 11:53:46 +0200 | [diff] [blame] | 58 | } /* namespace app */ |
| 59 | } /* namespace arm */ |
| 60 | |
| 61 | #endif /* DETECTION_RESULT_HPP */ |