MaxstARSDK
All Classes Files Functions Variables Enumerations Enumerator Macros
MasCameraDevice Class Reference

class for camera device handling More...

#import <MasCameraDevice.h>

Inheritance diagram for MasCameraDevice:
Inheritance graph
Collaboration diagram for MasCameraDevice:
Collaboration graph

Instance Methods

(MasResultCode- start:width:height:
 Start camera preview. More...
 
(void) - stop
 Stop camera preview. More...
 
(int) - getWidth
 
(int) - getHeight
 
(bool) - setFocusMode:
 
(bool) - setFlashLightMode:
 Turn on/off flash light. More...
 
(bool) - setAutoWhiteBalanceLock:
 Turn on/off auto white balance lock. More...
 
(void) - flipVideo:toggle:
 Flip video. More...
 
(NSMutableArray *) - getParamList
 Get supported parameter key list. More...
 
(bool) - setParam:toggle:
 Set camera parameter (Android only supported now) More...
 
(bool) - setParam:value:
 Set camera parameter (Android only supported now) More...
 
(bool) - setParam:min:max:
 Set camera parameter (Android only supported now) More...
 
(bool) - setParam:valueString:
 Set camera parameter (Android only supported now) More...
 
(void) - setNewFrame:length:width:height:format:
 Set new image data for tracking and background rendering (Only enterprise license key can activate this interface) More...
 
(matrix_float4x4) - getProjectionMatrix
 Get projection matrix. This is used for augmented objects projection and background rendering. More...
 
(matrix_float4x4) - getBackgroundPlaneProjectionMatrix
 Get projection matrix for background plane rendering. More...
 

Protected Types

enum  MasFocusMode : int { FOCUS_MODE_CONTINUOUS_AUTO = 1, FOCUS_MODE_AUTO = 2 }
 Camera focus mode FOCUS_MODE_CONTINUOUS_AUTO Continuous focus mode. This focus mode is proper for AR FOCUS_MODE_AUTO Scingle auto focus mode. More...
 
enum  MasFlipDirection : int { HORIZONTAL = 0, VERTICAL = 1 }
 Video data flip direction HORIZONTAL Flip video horizontally VERTICAL Flip video vertically. More...
 
enum  MasResultCode : int {
  Success = 0, CameraPermissionIsNotResolved = 100, CameraDevicedRestriced = 101, CameraPermissionIsNotGranted = 102,
  CameraAlreadyOpened = 103, TrackerAlreadyStarted = 200, UnknownError = 1000
}
 Camera Open State Success CameraPermissionIsNotResolved CameraDevicedRestriced CameraPermissionIsNotGranted CameraAlreadyOpened TrackerAlreadyStarted UnknownError. More...
 

Detailed Description

class for camera device handling

Member Enumeration Documentation

◆ MasFlipDirection

- (enum MasFlipDirection) :
protected

Video data flip direction HORIZONTAL Flip video horizontally VERTICAL Flip video vertically.

Enumerator
HORIZONTAL 
VERTICAL 

◆ MasFocusMode

- (enum MasFocusMode) :
protected

Camera focus mode FOCUS_MODE_CONTINUOUS_AUTO Continuous focus mode. This focus mode is proper for AR FOCUS_MODE_AUTO Scingle auto focus mode.

Enumerator
FOCUS_MODE_CONTINUOUS_AUTO 
FOCUS_MODE_AUTO 

◆ MasResultCode

- (enum MasResultCode) :
protected

Camera Open State Success CameraPermissionIsNotResolved CameraDevicedRestriced CameraPermissionIsNotGranted CameraAlreadyOpened TrackerAlreadyStarted UnknownError.

Enumerator
Success 
CameraPermissionIsNotResolved 
CameraDevicedRestriced 
CameraPermissionIsNotGranted 
CameraAlreadyOpened 
TrackerAlreadyStarted 
UnknownError 

Method Documentation

◆ flipVideo:toggle:()

- (void) flipVideo: (MasFlipDirection direction
toggle: (bool)  toggle 

Flip video.

Parameters
directionFlip direction
toggletrue for set, false for reset

◆ getBackgroundPlaneProjectionMatrix()

- (matrix_float4x4) getBackgroundPlaneProjectionMatrix

Get projection matrix for background plane rendering.

Returns
4x4 matrix (Column major)

◆ getHeight()

- (int) getHeight
Returns
camera preview height

◆ getParamList()

- (NSMutableArray*) getParamList

Get supported parameter key list.

Returns
Parameter key list

◆ getProjectionMatrix()

- (matrix_float4x4) getProjectionMatrix

Get projection matrix. This is used for augmented objects projection and background rendering.

Returns
4x4 matrix (Column major)

◆ getWidth()

- (int) getWidth
Returns
camera preview width

◆ setAutoWhiteBalanceLock:()

- (bool) setAutoWhiteBalanceLock: (bool)  toggle

Turn on/off auto white balance lock.

◆ setFlashLightMode:()

- (bool) setFlashLightMode: (bool)  toggle

Turn on/off flash light.

◆ setFocusMode:()

- (bool) setFocusMode: (MasFocusMode mode
Returns
true if focus setting success

◆ setNewFrame:length:width:height:format:()

- (void) setNewFrame: (Byte *)  data
length: (int)  length
width: (int)  width
height: (int)  height
format: (MasColorFormat)  format 

Set new image data for tracking and background rendering (Only enterprise license key can activate this interface)

Parameters
dataimage data bytes.
lengthimage length
widthimage width
heightimage height
formatimage format

◆ setParam:min:max:()

- (bool) setParam: (NSString *)  key
min: (int)  min
max: (int)  max 

Set camera parameter (Android only supported now)

Parameters
keyParameter key
minParameter min value
maxParameter max value
Returns
True if setting success

◆ setParam:toggle:()

- (bool) setParam: (NSString *)  key
toggle: (bool)  toggle 

Set camera parameter (Android only supported now)

Parameters
keyParameter key
toggleParameter value
Returns
True if setting success

◆ setParam:value:()

- (bool) setParam: (NSString *)  key
value: (int)  value 

Set camera parameter (Android only supported now)

Parameters
keyParameter key
valueParameter value
Returns
True if setting success

◆ setParam:valueString:()

- (bool) setParam: (NSString *)  key
valueString: (NSString *)  value 

Set camera parameter (Android only supported now)

Parameters
keyParameter key
valueParameter value
Returns
True if setting success

◆ start:width:height:()

- (MasResultCode) start: (int)  cameraId
width: (int)  width
height: (int)  height 

Start camera preview.

Parameters
cameraId0 is rear camera, 1 is face camera. camera index may depends on device.
widthprefer camera width
heightprefer camera height
Returns
MasResultCode

◆ stop()

- (void) stop

Stop camera preview.


The documentation for this class was generated from the following file: