6 import java.util.Arrays;
23 public int getValue() {
return value;}
32 FOCUS_MODE_CONTINUOUS_AUTO(1),
41 public int getValue() {
48 throw new RuntimeException(
"MaxstAR has not been initialized!");
50 if (instance == null) {
58 private CameraDevice() {}
68 int startResult =
MaxstARJNI.CameraDevice_start(cameraId, width, height);
89 MaxstARJNI.CameraDevice_setNewFrame(data, length, width, height, format.getValue());
92 throw new Exception(
"Set external camera image is activated only enterprise license!!");
93 }
catch (Exception e) {
105 return MaxstARJNI.CameraDevice_setFocusMode(focusMode.getValue());
114 return MaxstARJNI.CameraDevice_setFlashLightMode(toggle);
123 return MaxstARJNI.CameraDevice_setAutoWhiteBalanceLock(toggle);
132 MaxstARJNI.CameraDevice_flipVideo(direction.getValue(), toggle);
140 return Arrays.asList(
MaxstARJNI.CameraDevice_getParamList());
149 public boolean setParam(String paramKey,
boolean paramValue) {
150 return MaxstARJNI.CameraDevice_setBoolTypeParameter(paramKey, paramValue);
159 public boolean setParam(String paramKey,
int paramValue) {
160 return MaxstARJNI.CameraDevice_setIntTypeParameter(paramKey, paramValue);
170 public boolean setParam(String paramKey,
int min,
int max) {
171 return MaxstARJNI.CameraDevice_setRangeTypeParameter(paramKey, min, max);
180 public boolean setParam(String paramKey, String paramValue) {
181 return MaxstARJNI.CameraDevice_setStringTypeParameter(paramKey, paramValue);
189 float [] projection =
new float[16];
190 MaxstARJNI.CameraDevice_getProjectionMatrix(projection);
198 float [] projection =
new float[16];
199 MaxstARJNI.CameraDevice_getBackgroundPlaneProjectionMatrix(projection);
boolean setFlashLightMode(boolean toggle)
void setNewFrame(byte[] data, int length, int width, int height, ColorFormat format)
boolean setParam(String paramKey, int paramValue)
static boolean isInitialized()
boolean setParam(String paramKey, int min, int max)
boolean setAutoWhiteBalanceLock(boolean toggle)
ResultCode start(int cameraId, int width, int height)
void flipVideo(FlipDirection direction, boolean toggle)
boolean setParam(String paramKey, String paramValue)
boolean setParam(String paramKey, boolean paramValue)
float [] getBackgroundPlaneProjectionMatrix()
List< String > getParamList()
boolean setFocusMode(FocusMode focusMode)
float [] getProjectionMatrix()