documentation

<vlFrameListenerInterface> Protocol Reference

Listener for all callbacks of the visionLib. More...

#import </Users/local/builds/97sKyySp/0/visometry/vlSDK/unity/visionlib.sdk.unity/Documentation/temp/vlSDK/objective_c/vlSDK_Apple.h>

Inherits <NSObjectNSObject>.

Instance Methods

(void) - onCalibrationResults:
 Receive the calibration data @discussion Will be called with a valid calibration, when getResults has been called. This function will only be called, when using the camera calibration configuration. More...
 
(void) - onCGDebugImageRef:withRotationMatrix:
 Retreives the configured Debug Image as a CGImageRef @discussion When overloading this function, a CGImageRef will be passed, when needed to be set or rendered as background texture functions like onGetDebugImageBufferWithWidth and/or onRawImageBuffer will not be called then, even if defined. More...
 
(void) - onCGImageRef:withRotationMatrix:
 Receive a CGImageRef image buffer @discussion When overloading this function, a CGImageRef will be passed, when needed to be set or rendered as background functions like onGetImageBufferWithWidth and/or onRawImageBuffer will not be called then, even if defined. More...
 
(void) - onExtrinsicData:isValid:
 Receiving the camera pose @discussion Overloading this function will pass a model view matrix for the rendering system. More...
 
(void) - onGetAttribute:withValue:
 Receive the requested attribute @discussion Will be called when an attribute of the pipeline has been requested using getAttributeRequest. More...
 
(NSMutableData *_Nonnull) - onGetDebugImageBufferWithWidth:andHeight:andBytesPerPixel:
 Retreives the configured Debug Image @discussion Use this for setting your own memory location to be the image copied in. More...
 
(NSMutableData *_Nonnull) - onGetImageBufferWithWidth:andHeight:andBytesPerPixel:
 Set your own image buffer to copy the image into @discussion Use either this for setting your own memory location to be the image copied in. More...
 
(void) - onInitPose:andQ:
 Receive the initial pose as quaternion and translation. @discussion Will be called when getInitPose has been issued, it will return the currently set init pose (in openGL compatible system)
 
(void) - onInitPoseMatrix:
 Receive the initial pose as matrix. @discussion Will be called when getInitPose has been issued, it will return the currently set init pose (in openGL compatible system)
 
(void) - onIntrinsicData:
 Receive the projection matrix @discussion Overloading this function will pass a projection matrix regarding the set near and far, width and height value of your screen. More...
 
(void) - onIntrinsicDataWithWidth:height:cx:cy:fx:fy:
 Receive the intrinsic data @discussion Overloading this function will pass a projection matrix regarding the set near and far, width and height value of your screen. More...
 
(void) - onIssuesTriggered:andErrors:
 Will be called when the tracker has been done loading and is running now. @discussion Tracking issues are passed separated by errors and warnings. You should take these very serious. You can review a complete list of possible issues in the documentation. More...
 
(void) - onLog:
 Receive the internal visionLib Log. @discussion Depending on the configured log level you will receive the internal log messages from the visionlib. You might use these messages during development. Anyway it is NOT recommended using them for the end user nor parsing them. Defined issues should be gathered by using onIssuesTriggered:andErrors:. More...
 
(void) - onMetalDebugImageTexture:withRotationMatrix:
 Retreives the configured Debug Image as a metal texture @discussion When overloading this function, a metal texture will be passed, when needed to be set or rendered as background texture functions like onGetDebugImageBufferWithWidth and/or onRawImageBuffer will not be called then, even if defined. More...
 
(void) - onMetalImageTexture:withRotationMatrix:
 Receive a metal image buffer (experimental) @discussion When overloading this function, a metal texture will be passed, when needed to be set or rendered as background texture functions like onGetImageBufferWithWidth and/or onRawImageBuffer will not be called then, even if defined. More...
 
(void) - onModelProperties:
 
(void) - onModelRemoved:withError:
 
(void) - onRawDebugImageBuffer:withWidth:andHeight:andBytesPerPixel:
 Retreives the configured Debug Image @discussion Overloading this function onGetDebugImageBufferWithWidth should not have been overloaded too. will provide you on every frame with fresh image data. More...
 
(void) - onRawImageBuffer:withWidth:andHeight:andBytesPerPixel:
 Receive a raw image buffer @discussion Overloading this function onGetImageBufferWithWidth should not have been overloaded too. will provide you on every frame with fresh image data. More...
 
(void) - onRawModelAdded:withError:
 
(void) - onResetTracking:
 Receive the reset state @discussion Will be called when a reset has occured (hard or soft) More...
 
(void) - onSteppedFrame
 Receive the stepped state. @discussion Will be called, when the SDK has stepped one frame forward. This can be used in conjunction with stepFrame.
 
(void) - onTrackerInitialized:
 When the tracker has been initialized @discussion Will be called when the tracker has been done loading and is running now or not. It is recommended also using the onIssuesTriggered:andErrors: function for more precise informations about the state of the tracking pipe. More...
 
(void) - onTrackingInformation:
 Receive runtime tracking information on each frame @discussion Will pass a dictionary with information about the tracking quality etc into the application only if is tracking. More...
 
(void) - onTrackingPaused:
 Receive the pause state. @discussion Will be called, when the tracking pause was issued. More...
 

Detailed Description

Listener for all callbacks of the visionLib.

vlFrameListenerInterface

The vlFrameListenerInterface delegate protocol allows you gaining on frame information about the current tracking state.

Method Documentation

◆ onCalibrationResults:

- (void) onCalibrationResults: (NSString *_Nullable)  json
optional

Receive the calibration data @discussion Will be called with a valid calibration, when getResults has been called. This function will only be called, when using the camera calibration configuration.

Parameters
jsonA NSString holding a json structure with the calibration data.

◆ onCGDebugImageRef:withRotationMatrix:

- (void) onCGDebugImageRef: (CGImageRef _Nonnull)  texture
withRotationMatrix: (float *_Nonnull)  m 
optional

Retreives the configured Debug Image as a CGImageRef @discussion When overloading this function, a CGImageRef will be passed, when needed to be set or rendered as background texture functions like onGetDebugImageBufferWithWidth and/or onRawImageBuffer will not be called then, even if defined.

Parameters
textureMTLTexture object
mA pointer to 16 item matrix holding a rotation matrix of the content to be rotated with

◆ onCGImageRef:withRotationMatrix:

- (void) onCGImageRef: (CGImageRef _Nonnull)  texture
withRotationMatrix: (float *_Nonnull)  m 
optional

Receive a CGImageRef image buffer @discussion When overloading this function, a CGImageRef will be passed, when needed to be set or rendered as background functions like onGetImageBufferWithWidth and/or onRawImageBuffer will not be called then, even if defined.

Parameters
textureThe number of bytes occupied per pixel (e.g. 4 for RGBA images)
mA pointer to 16 item matrix holding a rotation matrix of the content to be rotated with

◆ onExtrinsicData:isValid:

- (void) onExtrinsicData: (float *_Nonnull)  data
isValid: (bool)  valid 
optional

Receiving the camera pose @discussion Overloading this function will pass a model view matrix for the rendering system.

Parameters
dataA 16 element matrix holding the complete opengl capable model view matrix.
validA boolean flag indicating if the pose is valid.

◆ onGetAttribute:withValue:

- (void) onGetAttribute: (NSString *_Nonnull)  name
withValue: (NSString *_Nonnull)  value 
optional

Receive the requested attribute @discussion Will be called when an attribute of the pipeline has been requested using getAttributeRequest.

Parameters
nameA NSString holding the name of the set attribute
valueA NSString holding the value of the set attribute

◆ onGetDebugImageBufferWithWidth:andHeight:andBytesPerPixel:

- (NSMutableData *_Nonnull) onGetDebugImageBufferWithWidth: (int)  width
andHeight: (int)  height
andBytesPerPixel: (int)  bytesPerPixel 
optional

Retreives the configured Debug Image @discussion Use this for setting your own memory location to be the image copied in.

Parameters
widththe width of the image
heightthe height of the image
bytesPerPixelthe number of bytes occupied per pixel (e.g. 4 for RGBA images)

◆ onGetImageBufferWithWidth:andHeight:andBytesPerPixel:

- (NSMutableData *_Nonnull) onGetImageBufferWithWidth: (int)  width
andHeight: (int)  height
andBytesPerPixel: (int)  bytesPerPixel 
optional

Set your own image buffer to copy the image into @discussion Use either this for setting your own memory location to be the image copied in.

Parameters
widththe width of the image
heightthe height of the image
bytesPerPixelthe number of bytes occupied per pixel (e.g. 4 for RGBA images)
Returns
NSMutableData object that will be filled upon every arriving image

◆ onIntrinsicData:

- (void) onIntrinsicData: (float *_Nonnull)  data
optional

Receive the projection matrix @discussion Overloading this function will pass a projection matrix regarding the set near and far, width and height value of your screen.

Parameters
dataA 16 element matrix holding the complete opengl capable projection matrix.

◆ onIntrinsicDataWithWidth:height:cx:cy:fx:fy:

- (void) onIntrinsicDataWithWidth: (float)  width
height: (float)  height
cx: (float)  cx
cy: (float)  cy
fx: (float)  fx
fy: (float)  fy 
optional

Receive the intrinsic data @discussion Overloading this function will pass a projection matrix regarding the set near and far, width and height value of your screen.

Parameters
widthWidth in pixels of the original intrinsics
heightHeight in pixels of the original intrinsics
cxNormed horizontal principal point of the intrinsics 0..1
cyNormed vertical principal point of the intrinsics 0..1
fxThe normalized focal length of the intrinsic camera calibration in x direction.
fyThe normalized focal length of the intrinsic camera calibration in y direction.

◆ onIssuesTriggered:andErrors:

- (void) onIssuesTriggered: (VLIssues *_Nullable)  warnings
andErrors: (VLIssues *_Nullable)  errors 
optional

Will be called when the tracker has been done loading and is running now. @discussion Tracking issues are passed separated by errors and warnings. You should take these very serious. You can review a complete list of possible issues in the documentation.

When an error has occured, the tracking will NOT start working in anyway.

Parameters
warningsOptional warnings may occured during initialization.
errorsOptional errors may occured during initialization.

◆ onLog:

- (void) onLog: (NSString *_Nonnull)  logString
optional

Receive the internal visionLib Log. @discussion Depending on the configured log level you will receive the internal log messages from the visionlib. You might use these messages during development. Anyway it is NOT recommended using them for the end user nor parsing them. Defined issues should be gathered by using onIssuesTriggered:andErrors:.

Parameters
logStringA NSString holding the message

◆ onMetalDebugImageTexture:withRotationMatrix:

- (void) onMetalDebugImageTexture: (_Nonnull id< MTLTexture >)  texture
withRotationMatrix: (float *_Nonnull)  m 
optional

Retreives the configured Debug Image as a metal texture @discussion When overloading this function, a metal texture will be passed, when needed to be set or rendered as background texture functions like onGetDebugImageBufferWithWidth and/or onRawImageBuffer will not be called then, even if defined.

Parameters
textureMTLTexture object
mA pointer to 16 item matrix holding a rotation matrix of the content to be rotated with

◆ onMetalImageTexture:withRotationMatrix:

- (void) onMetalImageTexture: (_Nonnull id< MTLTexture >)  texture
withRotationMatrix: (float *_Nonnull)  m 
optional

Receive a metal image buffer (experimental) @discussion When overloading this function, a metal texture will be passed, when needed to be set or rendered as background texture functions like onGetImageBufferWithWidth and/or onRawImageBuffer will not be called then, even if defined.

Parameters
textureThe number of bytes occupied per pixel (e.g. 4 for RGBA images)
mA pointer to 16 item matrix holding a rotation matrix of the content to be rotated with

◆ onRawDebugImageBuffer:withWidth:andHeight:andBytesPerPixel:

- (void) onRawDebugImageBuffer: (NSData *_Nonnull)  data
withWidth: (int)  width
andHeight: (int)  height
andBytesPerPixel: (int)  bytesPerPixel 
optional

Retreives the configured Debug Image @discussion Overloading this function onGetDebugImageBufferWithWidth should not have been overloaded too. will provide you on every frame with fresh image data.

Parameters
dataThe number of bytes occupied per pixel (e.g. 4 for RGBA images)
widthThe width of the image
heightThe height of the image
bytesPerPixelthe number of bytes occupied per pixel (e.g. 4 for RGBA images)

◆ onRawImageBuffer:withWidth:andHeight:andBytesPerPixel:

- (void) onRawImageBuffer: (NSData *_Nonnull)  data
withWidth: (int)  width
andHeight: (int)  height
andBytesPerPixel: (int)  bytesPerPixel 
optional

Receive a raw image buffer @discussion Overloading this function onGetImageBufferWithWidth should not have been overloaded too. will provide you on every frame with fresh image data.

Parameters
dataThe number of bytes occupied per pixel (e.g. 4 for RGBA images)
widthThe width of the image
heightThe height of the image
bytesPerPixelthe number of bytes occupied per pixel (e.g. 4 for RGBA images)

◆ onResetTracking:

- (void) onResetTracking: (BOOL)  hard
optional

Receive the reset state @discussion Will be called when a reset has occured (hard or soft)

Parameters
hardA bool indicating if a hard or soft reset has occured.

◆ onTrackerInitialized:

- (void) onTrackerInitialized: (bool)  worked
optional

When the tracker has been initialized @discussion Will be called when the tracker has been done loading and is running now or not. It is recommended also using the onIssuesTriggered:andErrors: function for more precise informations about the state of the tracking pipe.

Parameters
workedtrue or false

◆ onTrackingInformation:

- (void) onTrackingInformation: (vlTrackingState *_Nonnull)  state
optional

Receive runtime tracking information on each frame @discussion Will pass a dictionary with information about the tracking quality etc into the application only if is tracking.

Parameters
stateA Dictionary holding informations about the tracking

"quality": 0.39441, // maps to tracking quality for now

"state": "tracked", // Can be "tracked", "critical" or "lost"

"_InitInlierRatio": 0.731507, // The quality that has been present at the moment of initialization

"_InitNumOfCorresp": 365, // The number of correspondences used when initializing

"_TrackingInlierRatio": 0.39441, // The current quality

"_TrackingNumOfCorresp": 392, // The number of correspondences used actually

"_SFHFrameDist": 466.549, // Actual distance to last key frame

"_NumberOfTemplates": 83 // Number of reinitialization key frames learned

◆ onTrackingPaused:

- (void) onTrackingPaused: (BOOL)  worked
optional

Receive the pause state. @discussion Will be called, when the tracking pause was issued.

Parameters
workedA boolean variable stating if the pause command has worked.