summaryrefslogtreecommitdiffhomepage
path: root/tracker-ht/ht-api.h
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-10-30 09:01:32 +0100
committerStanislaw Halik <sthalik@misaki.pl>2015-10-30 09:01:32 +0100
commitd785d3616500d5846ac8c5f5a6347da832a593b4 (patch)
treeac670a125c5b880ad7e4b4f24a8635da4e66f0da /tracker-ht/ht-api.h
parent232c2ba8aca7900eaa950c48813ddfaca8a749a8 (diff)
parent9b736d361bcde7a2ddaf3fe54b471c0e658e94f4 (diff)
Merge branch 'unstable' into trackhat
* unstable: cmake: cleanup hydra rename gui directory move to subdirectory-based build system cmake: switch to GNU CC 5.2.0 in mingw-w64 toolchain file rift-080: forgot ovr_Initialize() rift 025: fix name
Diffstat (limited to 'tracker-ht/ht-api.h')
-rw-r--r--tracker-ht/ht-api.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/tracker-ht/ht-api.h b/tracker-ht/ht-api.h
new file mode 100644
index 00000000..4629a00b
--- /dev/null
+++ b/tracker-ht/ht-api.h
@@ -0,0 +1,51 @@
+#pragma once
+#ifndef HT_API
+# if defined(_WIN32) && !defined(MINGW)
+# define HT_API(t) __declspec(dllexport) t __stdcall
+# else
+# define HT_API(t) t
+# endif
+#endif
+#if !defined(_WIN32) && !defined(_isnan)
+# define _isnan isnan
+#endif
+#include <opencv2/core.hpp>
+#include <opencv2/highgui.hpp>
+struct ht_context;
+typedef struct ht_context headtracker_t;
+
+typedef struct ht_config {
+ float field_of_view;
+ float classification_delay;
+ int pyrlk_pyramids;
+ int pyrlk_win_size_w;
+ int pyrlk_win_size_h;
+ float ransac_max_inlier_error;
+ float ransac_max_reprojection_error;
+ int max_keypoints;
+ float keypoint_distance;
+ int force_width;
+ int force_height;
+ int force_fps;
+ int camera_index;
+ bool debug;
+ int ransac_num_iters;
+ float ransac_min_features;
+ float ransac_max_mean_error;
+ float ransac_abs_max_mean_error;
+ float flandmark_delay;
+ double dist_coeffs[5];
+} ht_config_t;
+
+typedef struct {
+ double rotx, roty, rotz;
+ double tx, ty, tz;
+ bool filled;
+} ht_result_t;
+
+HT_API(headtracker_t*) ht_make_context(const ht_config_t* config, const char* filename);
+HT_API(void) ht_free_context(headtracker_t* ctx);
+HT_API(const cv::Mat) ht_get_bgr_frame(headtracker_t* ctx);
+HT_API(bool) ht_cycle(headtracker_t* ctx, ht_result_t* euler);
+HT_API(void) ht_reset(headtracker_t* ctx);
+HT_API(cv::VideoCapture*) ht_capture(headtracker_t* ctx);