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 float _Total3DFeatureCount;
93 int _NumberOfPatternRecognitions;
94 int _NumberOfTemplates;
95 int _NumberOfTemplatesDynamic;
96 int _NumberOfTemplatesStatic;
97 int _NumberOfLineModels;
98 float _AutoInitSetupProgress;
99 int _TrackingImageWidth;
100 int _TrackingImageHeight;
108 NSString* _WorldMappingStatus;
114 NSArray<vlTrackingObjectState*>* objects;
115 NSArray<vlTrackingDeviceState*>* inputs;
158 - (NSString *)toString;
171 NSArray<vlTrackingIssue *> *issues;
175 -(BOOL)hasCode:(
int)code;
186 FOUNDATION_EXPORT VL_SDK_API
@protocol vlFrameListenerInterface <NSObject>
198 -(NSMutableData * _Nonnull )onGetDebugImageBufferWithWidth:(
int)width andHeight:(
int)height andBytesPerPixel:(
int)bytesPerPixel;
208 -(void)onRawDebugImageBuffer:(NSData * _Nonnull)data withWidth:(
int)width andHeight:(
int)height andBytesPerPixel:(
int)bytesPerPixel;
216 -(void)onMetalDebugImageTexture:(_Nonnull
id<MTLTexture>)texture withRotationMatrix:(
float * _Nonnull)m;
224 -(void)onCGDebugImageRef:(CGImageRef _Nonnull)texture withRotationMatrix:(
float * _Nonnull)m;
235 -(NSMutableData * _Nonnull )onGetImageBufferWithWidth:(
int)width andHeight:(
int)height andBytesPerPixel:(
int)bytesPerPixel;
245 -(void)onRawImageBuffer:(NSData * _Nonnull)data withWidth:(
int)width andHeight:(
int)height andBytesPerPixel:(
int)bytesPerPixel;
255 -(void)onMetalImageTexture:(_Nonnull
id<MTLTexture>)texture withRotationMatrix:(
float * _Nonnull)m;
265 -(void)onCGImageRef:(CGImageRef _Nonnull)texture withRotationMatrix:(
float * _Nonnull)m;
274 -(void)onTrackerInitialized:(
bool)worked;
291 -(void)onExtrinsicData:(
float * _Nonnull)data isValid:(
bool)valid;
297 -(void)onIntrinsicData:(
float * _Nonnull)data;
308 -(void)onIntrinsicDataWithWidth:(
float)width height:(
float)height cx:(
float)cx cy:(
float)cy fx:(
float)fx fy:(
float)fy;
316 -(void)onLog:(NSString * _Nonnull)logString;
322 -(void)onTrackingPaused:(BOOL)worked;
327 -(void)onSteppedFrame;
355 -(void)onInitPose:(
float * _Nonnull)t andQ:(
float* _Nonnull)q;
360 -(void)onInitPoseMatrix:(
float * _Nonnull)m;
366 -(void)onResetTracking:(BOOL)hard;
375 -(void) onCalibrationResults:(NSString * _Nullable)json;
383 -(void) onGetAttribute:(NSString *_Nonnull)name withValue:(NSString *_Nonnull)value;
387 -(void)onModelRemoved:(NSString * _Nullable)json withError:(NSString * _Nullable)errorJson;
388 -(void)onRawModelAdded:(NSString * _Nullable)json withError:(NSString * _Nullable)errorJson;
396 FOUNDATION_EXPORT VL_SDK_API
@interface vlSDK : NSObject {
405 -(
id _Nonnull) initTrackerWithURI:(NSString* _Nonnull)uri andDelegate:(
id _Nullable)delegate __attribute((deprecated(
"Use functions that also set licensePath or licenseData")));
414 -(
id _Nonnull) initTrackerWithURI:(NSString* _Nonnull)uri andLicensePath:(NSString* _Nonnull)licensePath andDelegate:(
id _Nullable)delegate;
423 -(
id _Nonnull) initTrackerWithURI:(NSString* _Nonnull)uri andLicenseData:(NSString* _Nonnull)licenseData andDelegate:(
id _Nullable)delegate;
434 -(
id _Nonnull) initTrackerWithURI:(NSString* _Nonnull)uri andDelegate:(_Nullable id)delegate withOptions:(NSDictionary * _Nullable)options __attribute((deprecated(
"Use functions that also set licensePath or licenseData")));
446 -(
id _Nonnull) initTrackerWithURI:(NSString* _Nonnull)uri andLicensePath:(NSString* _Nonnull)licensePath andDelegate:(_Nullable
id)delegate withOptions:(NSDictionary * _Nullable)options;
458 -(
id _Nonnull) initTrackerWithURI:(NSString* _Nonnull)uri andLicenseData:(NSString* _Nonnull)licenseData andDelegate:(_Nullable
id)delegate withOptions:(NSDictionary * _Nullable)options;
496 -(void) pause:(BOOL)enable;
509 #ifdef vlSDKFOR_IPHONE 515 -(void) setDeviceOrientation:(UIDeviceOrientation)orientation withWidth:(int)width andHeight:(
int)height;
521 -(void) windowResized:(CGSize)size;
529 -(void) setLogLevel:(
int)level;
535 -(void) setFPS:(
unsigned int)fps;
543 -(void) setNearPlane:(
float)near andFarPlane:(float)far;
550 -(void) setInitPose:(
float * _Nonnull)t andQ:(
float* _Nonnull)q;
556 -(void) setInitPoseFromMatrix:(
float * _Nonnull)m;
564 -(void) configureExtrinsicCameraInverted:(BOOL)invert;
588 -(BOOL) getLastExtrinsic:(
float * _Nonnull)m;
595 -(void) applyInitPoseCorrectionWithAxis:(
float* _Nonnull)axis andAngle:(float)angle;
603 -(void) getInitPoseCorrectionWithAxis:(
float* _Nonnull)axis andAngle:(
float* _Nonnull)angle;
611 -(BOOL) enableDebugImage;
616 -(BOOL) disableDebugImage;
618 #ifdef vlSDKFOR_IPHONE 622 -(void)startAlignInitPoseWithSensor;
627 -(void)stopAlignInitPoseWithSensor;
630 #ifdef vlSDKFOR_IPHONE 635 -(UIImage * _Nullable)getLastImage;
641 -(NSImage * _Nullable) getLastImage;
651 -(void)setAttributeCommand:(NSString * _Nonnull)attribute withFloatValue:(float)value;
659 -(void)setAttributeCommand:(NSString * _Nonnull)attribute withStringValue:(NSString * _Nonnull)value;
666 -(void)getAttributeRequest:(NSString * _Nonnull)attribute;
674 -(void)setCalibrationCommand:(NSString * _Nonnull)command;
681 -(void)writeCalibrationDB:(NSString * _Nonnull)uri;
689 -(NSString * _Nullable)getTrackerType;
697 -(NSString * _Nullable)getDeviceType;
712 -(void)writeInitData:(NSString *_Nonnull)uri;
727 -(void)readInitData:(NSString *_Nonnull)uri;
734 -(void)resetInitData;
742 -(void)setModel:(NSString *_Nonnull)name property:(NSString *_Nonnull)property state:(
bool)enable;
751 -(void)requestModelProperties;
758 -(void)requestModelData:(NSString*_Nonnull)name withOptions:(NSString *_Nonnull)options;
766 -(void)removeModel:(NSString*_Nonnull)nameURI;
805 -(BOOL)addRawModelWithStruct:(NSString *_Nonnull)struc andData:(NSData*_Nonnull)data;
808 -(void)pushJsonAndBinaryCommand:(NSString *_Nonnull)struc andData:(NSData*_Nonnull)data;
809 -(void)pushJsonCommand:(NSString *_Nonnull)json;
810 -(void)writeLineModelData:(NSString *_Nonnull)uri;
811 -(void)readLineModelData:(NSString *_Nonnull)uri;
int subMeshCount
Stats of the model regarding the number of mehes.
Definition: vlSDK_Apple.h:145
NSString * modelHash
The model hash code for licensing of the model.
Definition: vlSDK_Apple.h:133
Definition: vlSDK_Apple.h:169
bool enabled
If the model is expected to be shown.
Definition: vlSDK_Apple.h:130
Definition: vlSDK_Apple.h:105
bool occluder
If the model will occlude other parts as an invisible part.
Definition: vlSDK_Apple.h:142
Definition: vlSDK_Apple.h:161
Definition: vlSDK_Apple.h:112
Convenient function for using the vlSDK in a simple manner. The vlSDK wrapper uses the C-Interface a...
Definition: vlSDK_Apple.h:396
NSString * name
The name which has either been automatically assigned, or is coming from the model definitions...
Definition: vlSDK_Apple.h:136
int triangleCount
Stats of the model regarding the number of triangles used.
Definition: vlSDK_Apple.h:148
NSString * uri
The URI of the object that has been referenced.
Definition: vlSDK_Apple.h:139
Definition: vlSDK_Apple.h:82
Properties of models managed by the visionlib. The model properties can be queried by calling request...
Definition: vlSDK_Apple.h:126