[136] | 1 | #ifndef CANDIDATE_H_
|
---|
| 2 | #define CANDIDATE_H_
|
---|
| 3 |
|
---|
| 4 |
|
---|
| 5 | /* lib3dv/candidate.h
|
---|
| 6 | *
|
---|
| 7 | * Copyright (C) 2013 VisLab
|
---|
| 8 | *
|
---|
| 9 | * This file is part of lib3dv; you can redistribute it and/or modify
|
---|
| 10 | * it under the terms of the GNU Lesser General Public License as published by
|
---|
| 11 | * the Free Software Foundation; either version 3 of the License, or (at
|
---|
| 12 | * your option) any later version.
|
---|
| 13 | *
|
---|
| 14 | * This program is distributed in the hope that it will be useful, but
|
---|
| 15 | * WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
| 17 | * General Public License for more details.
|
---|
| 18 | *
|
---|
| 19 | * You should have received a copy of the GNU Lesser General Public License
|
---|
| 20 | * along with this program; if not, see <http://www.gnu.org/licenses/>.
|
---|
| 21 | */
|
---|
| 22 |
|
---|
| 23 | #include <stdint.h>
|
---|
| 24 | #include <lib3dv/point.h>
|
---|
| 25 |
|
---|
| 26 | namespace lib3dv
|
---|
| 27 | {
|
---|
| 28 |
|
---|
| 29 | /**
|
---|
| 30 | * @brief Possible category types.
|
---|
| 31 | **/
|
---|
| 32 | struct category_type
|
---|
| 33 | {
|
---|
| 34 | enum types
|
---|
| 35 | {
|
---|
| 36 | UNKNOWN=0, ///< Unknow category.
|
---|
| 37 | PEDESTRIAN, ///< Pedestrian category, blue rectangle in the client display.
|
---|
| 38 | CAR, ///< Car category, red rectangle in the client display.
|
---|
| 39 | NUM
|
---|
| 40 | };
|
---|
| 41 | };
|
---|
| 42 |
|
---|
| 43 | /**
|
---|
| 44 | * @brief A candidate detected by the device.
|
---|
| 45 | *
|
---|
| 46 | * A candidate is defined by a rectangle in the right image coordinate.
|
---|
| 47 | */
|
---|
| 48 | struct candidate
|
---|
| 49 | {
|
---|
| 50 | uint32_t m_guid; ///< Unique ID associated with the candidate in the current frame.
|
---|
| 51 | uint16_t m_x0; ///< x coordinate of the upper left rectangle corner in the right image.
|
---|
| 52 | uint16_t m_y0; ///< y coordinate of the upper left rectangle corner in the right image.
|
---|
| 53 | uint16_t m_x1; ///< x coordinate of the bottom right rectangle corner in the right image.
|
---|
| 54 | uint16_t m_y1; ///< y coordinate of the bottom right rectangle corner in the right image.
|
---|
| 55 | float m_confidence; ///< Confidence of the detection.
|
---|
| 56 | point3 m_wp_lb; ///< Candidate world position. The position is relative to the bottom center point of the rectangle.
|
---|
| 57 | category_type::types m_category; ///< Candidate Category. @see lib3dv::category_type::types
|
---|
| 58 | };
|
---|
| 59 | }
|
---|
| 60 |
|
---|
| 61 |
|
---|
| 62 | #endif /* CANDIDATE_H_ */
|
---|