37 #include <vlSDK/vlSDKDef.h>
39 #import <Foundation/Foundation.h>
40 #if defined(__arm__) || defined(__arm64__)
41 #define vlSDKFOR_IPHONE
44 #ifdef vlSDKFOR_IPHONE
45 #import <UIKit/UIKit.h>
48 #import <Metal/Metal.h>
49 #import <CoreImage/CoreImage.h>
87 float _InitInlierRatio;
88 int _InitNumOfCorresp;
89 float _TrackingInlierRatio;
90 int _TrackingNumOfCorresp;
92 int _NumberOfPatternRecognitions;
93 int _NumberOfTemplates;
94 int _NumberOfTemplatesDynamic;
95 int _NumberOfTemplatesStatic;
96 int _NumberOfLineModels;
97 float _AutoInitSetupProgress;
98 int _TrackingImageWidth;
99 int _TrackingImageHeight;
107 NSString* _WorldMappingStatus;
113 NSArray<vlTrackingObjectState*>* objects;
114 NSArray<vlTrackingDeviceState*>* inputs;
157 - (NSString * _Nullable)toString;
160 FOUNDATION_EXPORT VL_SDK_API
@interface VLIssue:NSObject {
168 FOUNDATION_EXPORT VL_SDK_API
@interface VLIssues:NSObject {
170 NSArray<VLIssue *> *issues;
174 -(BOOL)hasCode:(
int)code;
197 -(NSMutableData * _Nonnull )onGetDebugImageBufferWithWidth:(
int)width andHeight:(
int)height andBytesPerPixel:(
int)bytesPerPixel;
207 -(void)onRawDebugImageBuffer:(NSData * _Nonnull)data withWidth:(
int)width andHeight:(
int)height andBytesPerPixel:(
int)bytesPerPixel;
215 -(void)onMetalDebugImageTexture:(_Nonnull
id<MTLTexture>)texture withRotationMatrix:(
float * _Nonnull)m;
223 -(void)onCGDebugImageRef:(CGImageRef _Nonnull)texture withRotationMatrix:(
float * _Nonnull)m;
234 -(NSMutableData * _Nonnull )onGetImageBufferWithWidth:(
int)width andHeight:(
int)height andBytesPerPixel:(
int)bytesPerPixel;
244 -(void)onRawImageBuffer:(NSData * _Nonnull)data withWidth:(
int)width andHeight:(
int)height andBytesPerPixel:(
int)bytesPerPixel;
252 -(void)onMetalImageTexture:(_Nonnull
id<MTLTexture>)texture withRotationMatrix:(
float * _Nonnull)m;
260 -(void)onCGImageRef:(CGImageRef _Nonnull)texture withRotationMatrix:(
float * _Nonnull)m;
269 -(void)onTrackerInitialized:(
bool)worked;
279 -(void)onIssuesTriggered:(
VLIssues* _Nullable)warnings andErrors:(
VLIssues* _Nullable)errors;
286 -(void)onExtrinsicData:(
float * _Nonnull)data isValid:(
bool)valid;
292 -(void)onIntrinsicData:(
float * _Nonnull)data;
303 -(void)onIntrinsicDataWithWidth:(
float)width height:(
float)height cx:(
float)cx cy:(
float)cy fx:(
float)fx fy:(
float)fy;
311 -(void)onLog:(NSString * _Nonnull)logString;
317 -(void)onTrackingPaused:(BOOL)worked;
350 -(void)onInitPose:(
float * _Nonnull)t andQ:(
float* _Nonnull)q;
355 -(void)onInitPoseMatrix:(
float * _Nonnull)m;
361 -(void)onResetTracking:(BOOL)hard;
370 -(void) onCalibrationResults:(NSString * _Nullable)json;
378 -(void) onGetAttribute:(NSString *_Nonnull)name withValue:(NSString *_Nonnull)value;
382 -(void)onModelRemoved:(NSString * _Nullable)json withError:(NSString * _Nullable)errorJson;
383 -(void)onRawModelAdded:(NSString * _Nullable)json withError:(NSString * _Nullable)errorJson;
391 FOUNDATION_EXPORT VL_SDK_API
@interface vlSDK : NSObject {
400 -(
id _Nonnull) initTrackerWithURI:(NSString* _Nonnull)uri andDelegate:(
id _Nullable)delegate __attribute((deprecated("Use functions that also set licensePath or licenseData")));
409 -(
id _Nonnull) initTrackerWithURI:(NSString* _Nonnull)uri andLicensePath:(NSString* _Nonnull)licensePath andDelegate:(
id _Nullable)delegate;
418 -(
id _Nonnull) initTrackerWithURI:(NSString* _Nonnull)uri andLicenseData:(NSString* _Nonnull)licenseData andDelegate:(
id _Nullable)delegate;
429 -(
id _Nonnull) initTrackerWithURI:(NSString* _Nonnull)uri andDelegate:(_Nullable
id)delegate withOptions:(NSDictionary * _Nullable)options __attribute((deprecated("Use functions that also set licensePath or licenseData")));
441 -(
id _Nonnull) initTrackerWithURI:(NSString* _Nonnull)uri andLicensePath:(NSString* _Nonnull)licensePath andDelegate:(_Nullable
id)delegate withOptions:(NSDictionary * _Nullable)options;
453 -(
id _Nonnull) initTrackerWithURI:(NSString* _Nonnull)uri andLicenseData:(NSString* _Nonnull)licenseData andDelegate:(_Nullable
id)delegate withOptions:(NSDictionary * _Nullable)options;
491 -(void) pause:(BOOL)enable;
504 #ifdef vlSDKFOR_IPHONE
510 -(void) setDeviceOrientation:(UIDeviceOrientation)orientation withWidth:(
int)width andHeight:(
int)height;
516 -(void) windowResized:(CGSize)size;
524 -(void) setLogLevel:(
int)level;
530 -(void) setFPS:(
unsigned int)fps;
538 -(void) setNearPlane:(
float)near andFarPlane:(
float)far;
545 -(void) setInitPose:(
float * _Nonnull)t andQ:(
float* _Nonnull)q;
551 -(void) setInitPoseFromMatrix:(
float * _Nonnull)m;
559 -(void) configureExtrinsicCameraInverted:(BOOL)invert;
583 -(BOOL) getLastExtrinsic:(
float * _Nonnull)m;
590 -(void) applyInitPoseCorrectionWithAxis:(
float* _Nonnull)axis andAngle:(
float)angle;
598 -(void) getInitPoseCorrectionWithAxis:(
float* _Nonnull)axis andAngle:(
float* _Nonnull)angle;
606 -(BOOL) enableDebugImage;
611 -(BOOL) disableDebugImage;
613 #ifdef vlSDKFOR_IPHONE
617 -(void)startAlignInitPoseWithSensor;
622 -(void)stopAlignInitPoseWithSensor;
625 #ifdef vlSDKFOR_IPHONE
630 -(UIImage * _Nullable)getLastImage;
636 -(NSImage * _Nullable) getLastImage;
646 -(void)setAttributeCommand:(NSString * _Nonnull)attribute withFloatValue:(
float)value;
654 -(void)setAttributeCommand:(NSString * _Nonnull)attribute withStringValue:(NSString * _Nonnull)value;
661 -(void)getAttributeRequest:(NSString * _Nonnull)attribute;
669 -(void)setCalibrationCommand:(NSString * _Nonnull)command;
676 -(void)writeCalibrationDB:(NSString * _Nonnull)uri;
684 -(NSString * _Nullable)getTrackerType;
692 -(NSString * _Nullable)getDeviceType;
705 -(void)writeInitData:(NSString *_Nonnull)uri;
717 -(void)readInitData:(NSString *_Nonnull)uri;
722 -(void)resetInitData;
728 -(void)setModel:(NSString *_Nonnull)name property:(NSString *_Nonnull)property state:(
bool)enable;
735 -(void)requestModelProperties;
740 -(void)requestModelData:(NSString*_Nonnull)name withOptions:(NSString *_Nonnull)options;
746 -(void)removeModel:(NSString*_Nonnull)nameURI;
784 -(BOOL)addRawModelWithStruct:(NSString *_Nonnull)struc andData:(NSData*_Nonnull)data;
787 -(void)pushJsonAndBinaryCommand:(NSString *_Nonnull)struc andData:(NSData*_Nonnull)data;
788 -(void)pushJsonCommand:(NSString *_Nonnull)json;
789 -(void)writeLineModelData:(NSString *_Nonnull)uri;
790 -(void)readLineModelData:(NSString *_Nonnull)uri;
Definition: vlSDK_Apple.h:160
Definition: vlSDK_Apple.h:168
Properties of models managed by the visionlib. The model properties can be queried by calling request...
Definition: vlSDK_Apple.h:125
NSString * modelHash
The model hash code for licensing of the model.
Definition: vlSDK_Apple.h:132
NSString * name
The name which has either been automatically assigned, or is coming from the model definitions,...
Definition: vlSDK_Apple.h:135
int subMeshCount
Stats of the model regarding the number of mehes.
Definition: vlSDK_Apple.h:144
int triangleCount
Stats of the model regarding the number of triangles used.
Definition: vlSDK_Apple.h:147
bool occluder
If the model will occlude other parts as an invisible part.
Definition: vlSDK_Apple.h:141
NSString * uri
The URI of the object that has been referenced.
Definition: vlSDK_Apple.h:138
bool enabled
If the model is expected to be shown.
Definition: vlSDK_Apple.h:129
Convenient function for using the vlSDK in a simple manner. @discussion The vlSDK wrapper uses the C-...
Definition: vlSDK_Apple.h:391
Definition: vlSDK_Apple.h:104
Definition: vlSDK_Apple.h:82
Definition: vlSDK_Apple.h:111
Listener for all callbacks of the visionLib.
Definition: vlSDK_Apple.h:185
void onSteppedFrame()
Receive the stepped state. @discussion Will be called, when the SDK has stepped one frame forward....