1/* Copyright 2016 The TensorFlow Authors. All Rights Reserved.
2
3Licensed under the Apache License, Version 2.0 (the "License");
4you may not use this file except in compliance with the License.
5You may obtain a copy of the License at
6
7    http://www.apache.org/licenses/LICENSE-2.0
8
9Unless required by applicable law or agreed to in writing, software
10distributed under the License is distributed on an "AS IS" BASIS,
11WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12See the License for the specific language governing permissions and
13limitations under the License.
14==============================================================================*/
15
16#ifndef TENSORFLOW_EXAMPLES_ANDROID_JNI_OBJECT_TRACKING_KEYPOINT_H_
17#define TENSORFLOW_EXAMPLES_ANDROID_JNI_OBJECT_TRACKING_KEYPOINT_H_
18
19#include "tensorflow/examples/android/jni/object_tracking/geom.h"
20#include "tensorflow/examples/android/jni/object_tracking/image-inl.h"
21#include "tensorflow/examples/android/jni/object_tracking/image.h"
22#include "tensorflow/examples/android/jni/object_tracking/logging.h"
23#include "tensorflow/examples/android/jni/object_tracking/time_log.h"
24#include "tensorflow/examples/android/jni/object_tracking/utils.h"
25
26#include "tensorflow/examples/android/jni/object_tracking/config.h"
27
28namespace tf_tracking {
29
30// For keeping track of keypoints.
31struct Keypoint {
32  Keypoint() : pos_(0.0f, 0.0f), score_(0.0f), type_(0) {}
33  Keypoint(const float x, const float y)
34      : pos_(x, y), score_(0.0f), type_(0) {}
35
36  Point2f pos_;
37  float score_;
38  uint8_t type_;
39};
40
41inline std::ostream& operator<<(std::ostream& stream, const Keypoint keypoint) {
42  return stream << "[" << keypoint.pos_ << ", "
43      << keypoint.score_ << ", " << keypoint.type_ << "]";
44}
45
46}  // namespace tf_tracking
47
48#endif  // TENSORFLOW_EXAMPLES_ANDROID_JNI_OBJECT_TRACKING_KEYPOINT_H_
49