This repository has been archived by the owner on Feb 28, 2024. It is now read-only.
forked from HKUST-Aerial-Robotics/VINS-Mobile
-
Notifications
You must be signed in to change notification settings - Fork 54
/
ViewController.h
89 lines (73 loc) · 2.02 KB
/
ViewController.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
//
// ViewController.h
// VINS_ios
//
// Created by HKUST Aerial Robotics on 2016/10/18.
// Copyright © 2017 HKUST Aerial Robotics. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <opencv2/imgcodecs/ios.h>
#import <opencv2/videoio/cap_ios.h>
#import "feature_tracker.hpp"
#import <mach/mach_time.h>
#import "global_param.hpp"
#import "VINS.hpp"
#include <queue>
#import "draw_result.hpp"
#import <CoreMotion/CoreMotion.h>
#include "keyframe.h"
#include "loop_closure.h"
#include "keyfame_database.h"
#import <sys/utsname.h>
@interface ViewController : UIViewController<CvVideoCameraDelegate,UITextViewDelegate>
{
CvVideoCamera* videoCamera;
BOOL isCapturing;
cv::Ptr<FeatureTracker> feature_tracker;
cv::Size frameSize;
uint64_t prevTime;
NSCondition *_condition;
NSThread *mainLoop;
NSThread *draw;
NSThread *saveData;
NSThread *loop_thread;
NSThread *globalLoopThread;
UITextView *textY;
}
@property (nonatomic, strong) CvVideoCamera* videoCamera;
@property (nonatomic, strong) IBOutlet UIImageView* imageView;
@property (nonatomic, strong) IBOutlet UIImageView* featureImageView;
@property (weak, nonatomic) IBOutlet UIButton *loopButton;
@property (weak, nonatomic) IBOutlet UIButton *reinitButton;
- (IBAction)recordButtonPressed:(id)sender;
- (IBAction)playbackButtonPressed:(id)sender;
@property (weak, nonatomic) IBOutlet UISegmentedControl *switchUI;
@property (nonatomic) BOOL switchUIAREnabled;
- (void)showInputView;
- (void)setVisibleAnimated:(BOOL)visible;
struct IMU_MSG {
NSTimeInterval header;
Vector3d acc;
Vector3d gyr;
};
struct IMG_MSG {
NSTimeInterval header;
map<int, Vector3d> point_clouds;
};
struct IMG_DATA {
NSTimeInterval header;
UIImage *image;
};
struct IMG_DATA_CACHE {
NSTimeInterval header;
cv::Mat equ_image;
UIImage *image;
};
struct VINS_DATA_CACHE {
NSTimeInterval header;
Vector3f P;
Matrix3f R;
};
typedef shared_ptr <IMU_MSG const > ImuConstPtr;
typedef shared_ptr <IMG_MSG const > ImgConstPtr;
@end