MaxstARSDK
All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties
maxstAR.CameraDevice Class Reference

class for camera device handling More...

Collaboration diagram for maxstAR.CameraDevice:
Collaboration graph

Public Types

enum class  FocusMode { FOCUS_MODE_CONTINUOUS_AUTO = 1 , FOCUS_MODE_AUTO = 2 }
 Camera focus mode More...
 
enum class  CameraType { Rear = 0 , Face = 1 }
 Supported camera type (Mobile only) More...
 
enum class  CameraResolution { Resolution640x480 , Resolution1280x720 , Resolution1920x1080 }
 Supported camera resolution More...
 
enum class  FlipDirection { HORIZONTAL = 0 , VERTICAL = 1 }
 Flip video More...
 

Public Member Functions

ResultCode Start ()
 Start camera preview More...
 
ResultCode Start (string folderPath)
 
bool SetNewFrame (byte[] data, int length, int width, int height, ColorFormat format)
 Set external camera image to AR engine.(Free, Enterprise license key can activate this interface. Mobile only supported) More...
 
bool SetNewFrame (ulong data, int length, int width, int height, ColorFormat format)
 Set external camera image to AR engine.(Free, Enterprise license key can activate this interface. Mobile only supported) More...
 
bool SetNewFrameAndTimestamp (byte[] data, int length, int width, int height, ColorFormat format, ulong timestamp)
 Set external camera image and timestamp to AR engine.(Free, Enterprise license key can activate this interface. Mobile only supported) More...
 
bool SetNewFrameAndTimestamp (ulong data, int length, int width, int height, ColorFormat format, ulong timestamp)
 Set external camera image and timestamp to AR engine.(Free, Enterprise license key can activate this interface. Mobile only supported) More...
 
bool SetFocusMode (FocusMode focusMode)
 Set camera focus mode More...
 
bool SetFlashLightMode (bool toggle)
 Turn on/off flash light More...
 
bool SetAutoWhiteBalanceLock (bool toggle)
 Toggle auto white balance lock (Android only supported now) More...
 
void FlipVideo (FlipDirection direction, bool on)
 Flip video background More...
 
bool IsVideoFlipped (FlipDirection direction)
 Check Video Flipped More...
 
bool SetZoom (float zoomValue)
 Set Camera Zoom Scale More...
 
float getMaxZoomValue ()
 Get Camera Device Max Zoom value. More...
 
List< string > GetParamList ()
 Get parameter key list (Android only supported now) More...
 
bool SetParam (string key, bool boolTypeValue)
 Set camera parameter (Android only supported now) More...
 
bool SetParam (string key, int intTypeValue)
 Set camera parameter (Android only supported now) More...
 
bool SetParam (string key, int min, int max)
 Set camera parameter (Android only supported now) More...
 
bool SetParam (string key, string stringTypeValue)
 Set camera parameter (Android only supported now) More...
 
ResultCode Stop ()
 Stop camera preview More...
 
int GetWidth ()
 
int GetHeight ()
 
Matrix4x4 GetProjectionMatrix ()
 Get projection matrix More...
 
float[] GetBackgroundPlaneInfo ()
 Get background plane info More...
 
bool IsFlipHorizontal ()
 Get flip state More...
 
bool IsFlipVertical ()
 Get flip state More...
 
bool CheckCameraMove (TrackedImage image)
 
void SetFusionEnable ()
 Set Fusion Camera Enable More...
 
void SetARCoreTexture ()
 Make Texuture for ARCore (Android Only) More...
 

Static Public Member Functions

static CameraDevice GetInstance ()
 Get a CameraDevice instance. More...
 

Detailed Description

class for camera device handling

Member Enumeration Documentation

◆ CameraResolution

Supported camera resolution

Enumerator
Resolution640x480 

640 * 480 (4:3 Resolution)

Resolution1280x720 

1280 * 720 (16:9 Resolution)

Resolution1920x1080 

1920 * 1080 (16:9 Resolution)

◆ CameraType

Supported camera type (Mobile only)

Enumerator
Rear 

Rear camera

Face 

Face camera

◆ FlipDirection

Flip video

Enumerator
HORIZONTAL 

Horizontal flip

VERTICAL 

Vertical flip

◆ FocusMode

Camera focus mode

Enumerator
FOCUS_MODE_CONTINUOUS_AUTO 

Continuous focus mode. This focus mode is proper for AR

FOCUS_MODE_AUTO 

Single auto focus mode

Member Function Documentation

◆ CheckCameraMove()

bool maxstAR.CameraDevice.CheckCameraMove ( TrackedImage  image)
Here is the call graph for this function:

◆ FlipVideo()

void maxstAR.CameraDevice.FlipVideo ( FlipDirection  direction,
bool  on 
)

Flip video background

Parameters
directionFlip direction
onTrue to set. False to rest

◆ GetBackgroundPlaneInfo()

float [] maxstAR.CameraDevice.GetBackgroundPlaneInfo ( )

Get background plane info

Returns
float[5] background plane info

◆ GetHeight()

int maxstAR.CameraDevice.GetHeight ( )

Returns
get camera preview height

◆ GetInstance()

static CameraDevice maxstAR.CameraDevice.GetInstance ( )
static

Get a CameraDevice instance.

Returns
Return the CameraDevice instance

◆ getMaxZoomValue()

float maxstAR.CameraDevice.getMaxZoomValue ( )

Get Camera Device Max Zoom value.

Returns
Max Zoom value.

◆ GetParamList()

List<string> maxstAR.CameraDevice.GetParamList ( )

Get parameter key list (Android only supported now)

Returns
parameter key list

◆ GetProjectionMatrix()

Matrix4x4 maxstAR.CameraDevice.GetProjectionMatrix ( )

Get projection matrix

Returns
Matrix4x4 projection matrix

◆ GetWidth()

int maxstAR.CameraDevice.GetWidth ( )

Returns
get camera preview width

◆ IsFlipHorizontal()

bool maxstAR.CameraDevice.IsFlipHorizontal ( )

Get flip state

Returns
Horizontal flip

◆ IsFlipVertical()

bool maxstAR.CameraDevice.IsFlipVertical ( )

Get flip state

Returns
Vertical flip

◆ IsVideoFlipped()

bool maxstAR.CameraDevice.IsVideoFlipped ( FlipDirection  direction)

Check Video Flipped

Parameters
directionFlip direction

◆ SetARCoreTexture()

void maxstAR.CameraDevice.SetARCoreTexture ( )

Make Texuture for ARCore (Android Only)

◆ SetAutoWhiteBalanceLock()

bool maxstAR.CameraDevice.SetAutoWhiteBalanceLock ( bool  toggle)

Toggle auto white balance lock (Android only supported now)

◆ SetFlashLightMode()

bool maxstAR.CameraDevice.SetFlashLightMode ( bool  toggle)

Turn on/off flash light

◆ SetFocusMode()

bool maxstAR.CameraDevice.SetFocusMode ( FocusMode  focusMode)

Set camera focus mode

Parameters
focusMode
Returns

◆ SetFusionEnable()

void maxstAR.CameraDevice.SetFusionEnable ( )

Set Fusion Camera Enable

◆ SetNewFrame() [1/2]

bool maxstAR.CameraDevice.SetNewFrame ( byte[]  data,
int  length,
int  width,
int  height,
ColorFormat  format 
)

Set external camera image to AR engine.(Free, Enterprise license key can activate this interface. Mobile only supported)

Parameters
dataByte array of camera image
lengthLenght of data buffer
widthWidth of camera image
heightHeight of camera image
formatColor format
Returns
True success

◆ SetNewFrame() [2/2]

bool maxstAR.CameraDevice.SetNewFrame ( ulong  data,
int  length,
int  width,
int  height,
ColorFormat  format 
)

Set external camera image to AR engine.(Free, Enterprise license key can activate this interface. Mobile only supported)

Parameters
dataNative address of camera image
lengthLenght of data buffer
widthWidth of camera image
heightHeight of camera image
formatColor format
Returns
True success

◆ SetNewFrameAndTimestamp() [1/2]

bool maxstAR.CameraDevice.SetNewFrameAndTimestamp ( byte[]  data,
int  length,
int  width,
int  height,
ColorFormat  format,
ulong  timestamp 
)

Set external camera image and timestamp to AR engine.(Free, Enterprise license key can activate this interface. Mobile only supported)

Parameters
dataByte array of camera image
lengthLenght of data buffer
widthWidth of camera image
heightHeight of camera image
formatColor format
timestampTimestamp
Returns
True success

◆ SetNewFrameAndTimestamp() [2/2]

bool maxstAR.CameraDevice.SetNewFrameAndTimestamp ( ulong  data,
int  length,
int  width,
int  height,
ColorFormat  format,
ulong  timestamp 
)

Set external camera image and timestamp to AR engine.(Free, Enterprise license key can activate this interface. Mobile only supported)

Parameters
dataNative address of camera image
lengthLenght of data buffer
widthWidth of camera image
heightHeight of camera image
formatColor format
timestampTimestamp
Returns
True success

◆ SetParam() [1/4]

bool maxstAR.CameraDevice.SetParam ( string  key,
bool  boolTypeValue 
)

Set camera parameter (Android only supported now)

Parameters
keyParameter key
boolTypeValueParameter value
Returns
True if setting success

◆ SetParam() [2/4]

bool maxstAR.CameraDevice.SetParam ( string  key,
int  intTypeValue 
)

Set camera parameter (Android only supported now)

Parameters
keyParameter key
intTypeValueParameter value
Returns
True success

◆ SetParam() [3/4]

bool maxstAR.CameraDevice.SetParam ( string  key,
int  min,
int  max 
)

Set camera parameter (Android only supported now)

Parameters
keyParameter key
minmin value
maxmin value
Returns
True success

◆ SetParam() [4/4]

bool maxstAR.CameraDevice.SetParam ( string  key,
string  stringTypeValue 
)

Set camera parameter (Android only supported now)

Parameters
keyParameter key
stringTypeValueParameter value
Returns
True if setting success

◆ SetZoom()

bool maxstAR.CameraDevice.SetZoom ( float  zoomValue)

Set Camera Zoom Scale

Parameters
zoomValuezoomScale Zoom value
Returns
result Zoom.

◆ Start() [1/2]

ResultCode maxstAR.CameraDevice.Start ( )

Start camera preview

Here is the call graph for this function:

◆ Start() [2/2]

ResultCode maxstAR.CameraDevice.Start ( string  folderPath)

◆ Stop()

ResultCode maxstAR.CameraDevice.Stop ( )

Stop camera preview


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