|
visageSDK
|
Implements simple high-level Objective-C interface around VisageSDK::VisageTracker functionallity. More...
#import <TrackerWrapper.h>
Inherits NSObject, and NSObject.
Instance Methods | |
| (void) | - initTracker:withInformer: |
| Method for initializing the tracker. More... | |
| (void) | - startTrackingFromCam |
| Method for starting tracking from a camera. | |
| (void) | - startTrackingFromVideo: |
| Method for starting tracking from a video. More... | |
| (void) | - startTrackingFromImage |
| Method for starting tracking from an image. | |
| (void) | - trackingCamOperation |
| Method for initializing the camera and performing face tracking on the given frame. | |
| (void) | - trackingImageOperation |
| Method for loading picture and performing face tracking on the given frame. | |
| (void) | - trackingVideoOperation: |
| Method for loading video file and performing face tracking on the given frame. | |
| (void) | - stopTracker |
| Method for stoping the tracker. | |
| (void) | - displayTrackingResults:Frame: |
| Method for displaying tracking results. More... | |
| (long) | - getCurrentTimeMs |
| Function used for measuring tracker speed. More... | |
| (void) | - captureFromFile: |
| Helper function used for capturing from given video file. | |
| (void) | - initTracker:withInformer:andAnalyserInformer: |
| Method for initializing the tracker. More... | |
| (void) | - startTrackingFromCam: |
| Method for starting tracking from a camera. | |
| (void) | - startTrackingFromImage: |
| Method for starting tracking from an image. | |
| (void) | - startTrackingFromVideo: |
| Method for starting tracking from a video. | |
| (void) | - trackingCamThread: |
| Method for initializing the camera and performing face tracking on the given frame. | |
| (void) | - trackingImageThread: |
| Method for loading picture and performing face tracking on the given frame. | |
| (void) | - trackingVideoThread: |
| Method for loading a video and performing face tracking on sequential frames. | |
| (void) | - stopTracker |
| Method for stoping the tracker. | |
| (void) | - displayTrackingResults:Frame:Face: |
| Method for displaying tracking results. More... | |
| (long) | - getCurrentTimeMs |
| Function used for measuring tracker speed. More... | |
Protected Attributes | |
| Informer * | m_informer |
| Informer used for displaying tracking information. | |
| int | glWidth |
| Size of the OpenGL view. | |
| int | glHeight |
| Size of the OpenGL view. | |
| AnalyserInformer * | analyserInformer |
| Informer used for displaying analyser information. | |
| bool | ageActivated |
| Boolean variable that states if age analyser is turned on or off. | |
| bool | genderActivated |
| Boolean variable that states if gender analyser is turned on or off. | |
| bool | emotionsActivated |
| Boolean variable that states if emotions analyser is turned on or off. | |
| int | activeDisplay |
| Current drawing options variable. | |
Implements simple high-level Objective-C interface around VisageSDK::VisageTracker functionallity.
This makes connecting the iOS app GUI with visage|SDK tracker functionaly easier as primary programming language used in iOS apps is Objective-C while primary programming language used in visage|SDK is C++. The class is a subclass of NSObject and it uses Objective-C++ for implementation details.
The sample application automatically chooses appropriate tracker configuration file based on device it is running on.
Key members of this class are:
Definition at line 42 of file VisageTrackerDemo/Classes/TrackerWrapper.h.
| - (void) displayTrackingResults: | (int*) | trackerStatus | |
| Frame: | (VsImage*) | frame | |
Method for displaying tracking results.
The results are retrieved via global VisageSDK::TrackingData object and displayed using class Informer for textual data and OpenGL ES for visual data (frames from camera and 3D face model). It shows how to properly interpret tracking data and setup the OpenGL scene to display 3D face model retrieved from the tracker correctly aligned to the video frame.
Definition at line 455 of file VisageTrackerDemo/Classes/TrackerWrapper.mm.
References VisageSDK::VisageRendering::DisplayLogo(), VisageSDK::VisageRendering::DisplayResults(), VsImage::height, CustomGLView::setOpenGLContext, CustomGLView::swapOpenGLBuffers, and VsImage::width.
Referenced by trackingCamOperation, trackingImageOperation, and trackingVideoOperation:.
| - (void) displayTrackingResults: | (int*) | trackerStatus | |
| Frame: | (VsImage*) | frame | |
| Face: | (VsRect*) | rect | |
Method for displaying tracking results.
The results are retrieved via global VisageSDK::TrackingData object and displayed using class Informer for textual data and OpenGL ES for visual data (frames from camera and 3D face model). It shows how to properly interpret tracking data and setup the OpenGL scene to display 3D face model retrieved from the tracker correctly aligned to the video frame.
Definition at line 941 of file ShowcaseDemo/ShowcaseDemo/TrackerWrapper.mm.
References activeDisplay, ageActivated, emotionsActivated, VisageSDK::FaceData::faceRotation, VisageSDK::FaceData::faceTranslation, genderActivated, glWidth, VsImage::height, CustomGLView::setOpenGLContext, CustomGLView::swapOpenGLBuffers, and VsImage::width.
| - (long) getCurrentTimeMs |
Function used for measuring tracker speed.
Used for video synchronization (if flag video_file_sync is set to 1).
Definition at line 364 of file VisageTrackerDemo/Classes/TrackerWrapper.mm.
Referenced by trackingCamOperation, trackingImageOperation, and trackingVideoOperation:.
| - (long) getCurrentTimeMs |
Function used for measuring tracker speed.
Used for video synchronization (if flag video_file_sync is set to 1).
| - (void) initTracker: | (CustomGLView *) | view | |
| withInformer: | (Informer*) | info | |
Method for initializing the tracker.
This method creates a new VisageTracker objects and initializes tracking by choosing appropriate configuraion file based on device it is running on.
Definition at line 60 of file VisageTrackerDemo/Classes/TrackerWrapper.mm.
References UIDeviceHardware::platform.
| - (void) initTracker: | (CustomGLView *) | view | |
| withInformer: | (Informer*) | info | |
| andAnalyserInformer: | (AnalyserInformer *) | analyserInformer | |
Method for initializing the tracker.
This method creates a new VisageTracker objects and initializes tracking by choosing appropriate configuraion file based on device it is running on.
Definition at line 200 of file ShowcaseDemo/ShowcaseDemo/TrackerWrapper.mm.
References analyserInformer, and UIDeviceHardware::platform.
| - (void) startTrackingFromVideo: | (NSString *) | filename |
Method for starting tracking from a video.
| filename | name of the video file |
Definition at line 316 of file VisageTrackerDemo/Classes/TrackerWrapper.mm.
References trackingVideoOperation:.
1.8.15