-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOpenCVWrapper.h
More file actions
77 lines (60 loc) · 1.86 KB
/
OpenCVWrapper.h
File metadata and controls
77 lines (60 loc) · 1.86 KB
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
//
// OpenCVWrapper.h
// FullBodyTrack
//
// Created by DJ Figueroa on 8/5/20.
//
#import "OpenCVWrapper.h"
#import <CoreGraphics/CoreGraphics.h>
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <AVFoundation/AVFoundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface CameraPropertiesObjC: NSObject
@property NSNumber* fx;
@property NSNumber* fy;
@property NSNumber* cx;
@property NSNumber* cy;
@property NSArray<NSNumber*>* distCoeffs;
@end
@interface CVImgOutput: NSObject
@property UIImage* outputImage;
@property CGImageRef outputCGImage;
@property double outputTime;
@end
@interface ChArUcoBoardResult: CVImgOutput
@property bool boardFound;
@end
@interface TrackerObj: NSObject
@property NSString* tracker_id;
@property NSDictionary<NSNumber*, NSArray<NSArray<NSNumber*>*>*>* markers;
@end
@interface TrackerLocation: NSObject
typedef struct Vector3d {
double x, y, z;
} Vector3d;
@property NSString* tracker_id;
@property bool visible;
@property Vector3d rvec;
@property Vector3d tvec;
@end
@interface TrackerResult: CVImgOutput
@property NSArray<TrackerLocation*>* trackers;
@end
@interface OpenCVWrapper : NSObject
+ (void) initialize;
+ (Vector3d) rvecFromPitch: (double) pitch yaw: (double) yaw roll: (double) roll;
+ (void) setCameraPropeties: (CameraPropertiesObjC*) properties;
+ (void) setShowPreviewWindow: (bool) preview;
+ (void) setCameraRefine: (bool) refine;
+ (void) addTracker: (TrackerObj*) tracker;
+ (bool) removeTracker: (TrackerObj*) tracker;
+ (NSString *) openCVVersionString;
+ (int) boardsCaptured;
+ (void) setDictionaryFromString: (NSString *) dictionary;
+ (CVImgOutput*) getMarkersFromBuffer: (CVImageBufferRef) buffer;
+ (TrackerResult*) getTrackersFromBuffer: (CVImageBufferRef) buffer;
+ (ChArUcoBoardResult*) findChArUcoBoard: (CVImageBufferRef) buffer saveResult: (bool) save;
+ () calibrateStoredBoards;
@end
NS_ASSUME_NONNULL_END