Maxst AR SDK 4.0.0  4.0.0
Classes | Public Member Functions | Static Public Member Functions | List of all members
com.maxst.ar.CameraDevice Class Reference

Classes

enum  CameraApi
 
enum  FlipDirection
 
enum  FocusMode
 

Public Member Functions

void setCameraApi (CameraApi cameraApi)
 
CameraApi getCameraApi ()
 
ResultCode start (int cameraId, int width, int height)
 
ResultCode stop ()
 
boolean setNewFrame (byte[] data, int length, int width, int height, ColorFormat format)
 
boolean setNewFrame (long data, int length, int width, int height, ColorFormat format)
 
boolean setNewFrameAndTimestamp (byte[] data, int length, int width, int height, ColorFormat format, long timestamp)
 
boolean setNewFrameAndTimestamp (long data, int length, int width, int height, ColorFormat format, long timestamp)
 
boolean setFocusMode (FocusMode focusMode)
 
boolean setFlashLightMode (boolean toggle)
 
boolean setAutoWhiteBalanceLock (boolean toggle)
 
void flipVideo (FlipDirection direction, boolean toggle)
 
List< String > getParamList ()
 
boolean setParam (String paramKey, boolean paramValue)
 
boolean setParam (String paramKey, int paramValue)
 
boolean setParam (String paramKey, int min, int max)
 
boolean setParam (String paramKey, String paramValue)
 
float [] getProjectionMatrix ()
 
float [] getBackgroundPlaneProjectionMatrix ()
 

Static Public Member Functions

static CameraDevice getInstance ()
 

Detailed Description

class for camera device handling

Member Function Documentation

◆ flipVideo()

void com.maxst.ar.CameraDevice.flipVideo ( FlipDirection  direction,
boolean  toggle 
)
inline

Flip video background

Parameters
directionFlip direction
toggletrue for set, false for reset

◆ getBackgroundPlaneProjectionMatrix()

float [] com.maxst.ar.CameraDevice.getBackgroundPlaneProjectionMatrix ( )
inline

Get projection matrix for background plane rendering

Returns
4x4 gl matrix (Column major)

◆ getCameraApi()

CameraApi com.maxst.ar.CameraDevice.getCameraApi ( )
inline

Get used camera api value

Returns
enum value

◆ getParamList()

List<String> com.maxst.ar.CameraDevice.getParamList ( )
inline

Get supported parameter key list

Returns
Parameter key list

◆ getProjectionMatrix()

float [] com.maxst.ar.CameraDevice.getProjectionMatrix ( )
inline

Get projection matrix. This is used for augmented objects

Returns
4x4 gl matrix (Column major)

◆ setAutoWhiteBalanceLock()

boolean com.maxst.ar.CameraDevice.setAutoWhiteBalanceLock ( boolean  toggle)
inline

Set auto white balance lock

Parameters
toggletrue : lock, false : unlock wb lock
Returns
true if setting success

◆ setCameraApi()

void com.maxst.ar.CameraDevice.setCameraApi ( CameraApi  cameraApi)
inline

Select which camera api are used

Parameters
cameraApicamera 1 or camera 2

◆ setFlashLightMode()

boolean com.maxst.ar.CameraDevice.setFlashLightMode ( boolean  toggle)
inline

Set flash light mode

Parameters
toggletrue : Turn on light, false : Turn off light
Returns
true if setting success

◆ setFocusMode()

boolean com.maxst.ar.CameraDevice.setFocusMode ( FocusMode  focusMode)
inline

Set camera focus mode

Parameters
focusModecamera focus mode
Returns
true if setting success

◆ setNewFrame() [1/2]

boolean com.maxst.ar.CameraDevice.setNewFrame ( byte []  data,
int  length,
int  width,
int  height,
ColorFormat  format 
)
inline

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

◆ setNewFrame() [2/2]

boolean com.maxst.ar.CameraDevice.setNewFrame ( long  data,
int  length,
int  width,
int  height,
ColorFormat  format 
)
inline

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

Parameters
dataimage data native pointer address.
lengthimage length
widthimage width
heightimage height
formatimage format

◆ setNewFrameAndTimestamp() [1/2]

boolean com.maxst.ar.CameraDevice.setNewFrameAndTimestamp ( byte []  data,
int  length,
int  width,
int  height,
ColorFormat  format,
long  timestamp 
)
inline

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
timestampimage timestamp

◆ setNewFrameAndTimestamp() [2/2]

boolean com.maxst.ar.CameraDevice.setNewFrameAndTimestamp ( long  data,
int  length,
int  width,
int  height,
ColorFormat  format,
long  timestamp 
)
inline

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

Parameters
dataimage data native pointer address.
lengthimage length
widthimage width
heightimage height
formatimage format
timestampimage timestamp

◆ setParam() [1/4]

boolean com.maxst.ar.CameraDevice.setParam ( String  paramKey,
boolean  paramValue 
)
inline

Set camera parameter.

Parameters
paramKeyParameter key
paramValueParameter value
Returns
True if success

◆ setParam() [2/4]

boolean com.maxst.ar.CameraDevice.setParam ( String  paramKey,
int  paramValue 
)
inline

Set camera parameter.

Parameters
paramKeyParameter key
paramValueParameter value
Returns
True if success

◆ setParam() [3/4]

boolean com.maxst.ar.CameraDevice.setParam ( String  paramKey,
int  min,
int  max 
)
inline

Set camera parameter with range value

Parameters
paramKeyParameter key
minParameter min value
maxParameter max value
Returns
True if success

◆ setParam() [4/4]

boolean com.maxst.ar.CameraDevice.setParam ( String  paramKey,
String  paramValue 
)
inline

Set camera parameter.

Parameters
paramKeyParameter key (white-balance, etc)
paramValueParameter value
Returns
True if success

◆ start()

ResultCode com.maxst.ar.CameraDevice.start ( int  cameraId,
int  width,
int  height 
)
inline

Start camera preview

Parameters
cameraId0 is rear camera, 1 is face camera
widthprefer camera width
heightprefer camera height
Returns
Result code

◆ stop()

ResultCode com.maxst.ar.CameraDevice.stop ( )
inline

Stop camera preview


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