MaxstARSDK
com.maxst.ar.CameraDevice Class Reference
Collaboration diagram for com.maxst.ar.CameraDevice:
Collaboration graph

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 setNewFrameAndPoseAndTimestamp (long data, int length, int width, int height, ColorFormat format, float[] pose, long timestamp)
 
boolean setNewFrameAndPoseAndTimestamp (byte[] data, int length, int width, int height, ColorFormat format, float[] pose, long timestamp)
 
boolean setFocusMode (FocusMode focusMode)
 
boolean setZoom (int zoomScale)
 
int getMaxZoomValue ()
 
boolean setFlashLightMode (boolean toggle)
 
boolean setAutoWhiteBalanceLock (boolean toggle)
 
void flipVideo (FlipDirection direction, boolean toggle)
 
boolean isVideoFlipped (FlipDirection direction)
 Check Screen is Flipped. More...
 
String getParam (String key)
 
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[] getBackgroundPlaneInfo ()
 
float[] getBackgroundPlaneProjectionMatrix ()
 
void setClippingPlane (float near, float far)
 
void setCalibrationData (String path)
 
void setCalibrationData (int width, int height, float fx, float fy, float px, float py)
 
String getCameraIntrinsic ()
 Get Camera Intrinsic. More...
 
void setARCoreTexture ()
 

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 
)

Flip video background

Parameters
directionFlip direction
toggletrue for set, false for reset
Here is the call graph for this function:

◆ getBackgroundPlaneInfo()

float [] com.maxst.ar.CameraDevice.getBackgroundPlaneInfo ( )

Get information for background plane rendering

Returns
background plane information

◆ getBackgroundPlaneProjectionMatrix()

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

Get projection matrix for background plane rendering

Returns
4x4 gl matrix (Column major)

◆ getCameraApi()

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

Get used camera api value

Returns
enum value

◆ getCameraIntrinsic()

String com.maxst.ar.CameraDevice.getCameraIntrinsic ( )

Get Camera Intrinsic.

Returns
{"width":width,"height":height,"fx":fx,"fy":fy,"px":px,"py":py} fx = focal length x, fy =focal length y, px = principal point x, py = principal point y

◆ getInstance()

static CameraDevice com.maxst.ar.CameraDevice.getInstance ( )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getMaxZoomValue()

int com.maxst.ar.CameraDevice.getMaxZoomValue ( )

Get Camera Device Max Zoom value.

Returns
Max Zoom value.

◆ getParam()

String com.maxst.ar.CameraDevice.getParam ( String  key)

Get supported parameter key

Parameters
keyParameter Key
Returns
Parameter value

◆ getParamList()

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

Get supported parameter key list

Returns
Parameter key list

◆ getProjectionMatrix()

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

Get projection matrix. This is used for augmented objects

Returns
4x4 gl matrix (Column major)

◆ isVideoFlipped()

boolean com.maxst.ar.CameraDevice.isVideoFlipped ( FlipDirection  direction)

Check Screen is Flipped.

Returns
return Flipped value.
Here is the call graph for this function:

◆ setARCoreTexture()

void com.maxst.ar.CameraDevice.setARCoreTexture ( )

Set Texutre To get the camera image

◆ setAutoWhiteBalanceLock()

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

Set auto white balance lock

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

◆ setCalibrationData() [1/2]

void com.maxst.ar.CameraDevice.setCalibrationData ( int  width,
int  height,
float  fx,
float  fy,
float  px,
float  py 
)

Set calibration data to camera

◆ setCalibrationData() [2/2]

void com.maxst.ar.CameraDevice.setCalibrationData ( String  path)

Set calibration data to camera

◆ setCameraApi()

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

Select which camera api are used

Parameters
cameraApicamera 1 or camera 2
Here is the caller graph for this function:

◆ setClippingPlane()

void com.maxst.ar.CameraDevice.setClippingPlane ( float  near,
float  far 
)

Set near, far plane

Parameters
nearnear plane value
farfar plane value

◆ setFlashLightMode()

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

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)

Set camera focus mode

Parameters
focusModecamera focus mode
Returns
true if setting success
Here is the call graph for this function:

◆ setNewFrame() [1/2]

boolean com.maxst.ar.CameraDevice.setNewFrame ( byte[]  data,
int  length,
int  width,
int  height,
ColorFormat  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
Here is the call graph for this function:

◆ setNewFrame() [2/2]

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

Set new image data for tracking and background rendering (Free, Enterprise license key can activate this interface)

Parameters
dataimage data native pointer address.
lengthimage length
widthimage width
heightimage height
formatimage format
Here is the call graph for this function:

◆ setNewFrameAndPoseAndTimestamp() [1/2]

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

Set new image data for tracking and background rendering (Free, Enterprise license key can activate this interface)

Parameters
dataimage data native pointer address.
lengthimage length
widthimage width
heightimage height
formatimage format
poseimage pose
timestampimage timestamp
Here is the call graph for this function:

◆ setNewFrameAndPoseAndTimestamp() [2/2]

boolean com.maxst.ar.CameraDevice.setNewFrameAndPoseAndTimestamp ( long  data,
int  length,
int  width,
int  height,
ColorFormat  format,
float[]  pose,
long  timestamp 
)

Set new image data for tracking and background rendering (Free, Enterprise license key can activate this interface)

Parameters
dataimage data bytes.
lengthimage length
widthimage width
heightimage height
formatimage format
poseimage pose
timestampimage timestamp
Here is the call graph for this function:

◆ setNewFrameAndTimestamp() [1/2]

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

Set new image data for tracking and background rendering (Free, Enterprise license key can activate this interface)

Parameters
dataimage data bytes.
lengthimage length
widthimage width
heightimage height
formatimage format
timestampimage timestamp
Here is the call graph for this function:

◆ setNewFrameAndTimestamp() [2/2]

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

Set new image data for tracking and background rendering (Free, Enterprise license key can activate this interface)

Parameters
dataimage data native pointer address.
lengthimage length
widthimage width
heightimage height
formatimage format
timestampimage timestamp
Here is the call graph for this function:

◆ setParam() [1/4]

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

Set camera parameter.

Parameters
paramKeyParameter key
paramValueParameter value
Returns
True if success

◆ setParam() [2/4]

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

Set camera parameter with range value

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

◆ setParam() [3/4]

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

Set camera parameter.

Parameters
paramKeyParameter key
paramValueParameter value
Returns
True if success

◆ setParam() [4/4]

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

Set camera parameter.

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

◆ setZoom()

boolean com.maxst.ar.CameraDevice.setZoom ( int  zoomScale)

Set Camera Zoom Scale

Parameters
zoomScaleZoom value
Returns
result Zoom.

◆ start()

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

Start camera preview Fusion Camera only supports the rear camera.

Parameters
cameraId0 is rear camera, 1 is face camera
widthprefer camera width
heightprefer camera height
Returns
Result code
Here is the call graph for this function:

◆ stop()

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

Stop camera preview

Here is the call graph for this function:

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