MaxstARSDK
MasCameraDevice.h
Go to the documentation of this file.
1 //
2 // MasCameraDevice.h
3 // MaxstAR
4 //
5 // Created by Kimseunglee on 2017. 11. 23..
6 // Copyright © 2017년 Maxst. All rights reserved.
7 //
8 
9 #import <Foundation/Foundation.h>
10 #import "MasTrackedImage.h"
11 #import <simd/SIMD.h>
12 
16 @interface MasCameraDevice : NSObject
17 
24 typedef NS_ENUM(int, MasFocusMode) {
27 };
28 
35 typedef NS_ENUM(int, MasFlipDirection) {
36  HORIZONTAL = 0,
37  VERTICAL = 1,
38 };
39 
51 typedef NS_ENUM(int, MasResultCode) {
52  Success = 0,
53 
54  CameraPermissionIsNotResolved = 100,
55  CameraDevicedRestriced = 101,
56  CameraPermissionIsNotGranted = 102,
57  CameraAlreadyOpened = 103,
58 
59  TrackerAlreadyStarted = 200,
60 
61  UnknownError = 1000,
62 };
63 
71 - (MasResultCode)start:(int)cameraId width:(int)width height:(int)height;
72 
73 - (MasResultCode)start:(NSString *)path;
74 
78 - (void)stop;
79 
83 - (void)setFusionEnable;
84 
89 - (int)getWidth;
90 
95 - (int)getHeight;
96 
101 - (bool)setFocusMode:(MasFocusMode)mode;
102 
108 - (bool)setZoom:(float)zoomScale;
109 
114 - (int)getMaxZoomValue;
115 
119 - (bool)setFlashLightMode:(bool)toggle;
120 
124 - (bool)setAutoWhiteBalanceLock:(bool)toggle;
125 
131 - (void)flipVideo:(MasFlipDirection)direction toggle:(bool)toggle;
132 
138 - (void)setClippingPlane:(float)near far:(float)far;
139 
140 
145 - (bool)isFlipHorizontal;
146 
147 
152 - (bool)isFlipVertical;
153 
154 
159 - (void)setCalibrationData:(NSString *)filePath;
160 
169 - (void)setNewFrame:(Byte *)data length:(int)length width:(int)width height:(int)height format:(MasColorFormat)format;
170 
180 - (void)setNewFrameAndTimestamp:(Byte *)data length:(int)length width:(int)width height:(int)height format:(MasColorFormat)format timestamp:(unsigned long long int)timestamp;
181 
186 - (matrix_float4x4)getProjectionMatrix;
187 
192 - (matrix_float4x4)getBackgroundPlaneProjectionMatrix;
193 
194 
199 - (float *)getBackgroundPlaneInfo;
200 
205 - (NSString *)getCameraIntrinsic;
206 @end
class for camera device handling
Definition: MasCameraDevice.h:17
MasResultCode
Camera Open State @constant Success @constant CameraPermissionIsNotResolved @constant CameraDevicedRe...
Definition: MasCameraDevice.h:51
MasFlipDirection
Video data flip direction @constant HORIZONTAL Flip video horizontally @constant VERTICAL Flip video ...
Definition: MasCameraDevice.h:35
@ FOCUS_MODE_CONTINUOUS_AUTO
Definition: MasCameraDevice.h:25
@ FOCUS_MODE_AUTO
Definition: MasCameraDevice.h:26