org.opencv.android
public abstract class CameraBridgeViewBase extends SurfaceView
Modifier and Type | Class and Description |
---|---|
static interface |
CameraBridgeViewBase.CvCameraViewFrame
This class interface is abstract representation of single frame from camera for onCameraFrame callback
Attention: Do not use objects, that represents this interface out of onCameraFrame callback!
|
static interface |
CameraBridgeViewBase.CvCameraViewListener |
static interface |
CameraBridgeViewBase.CvCameraViewListener2 |
static interface |
CameraBridgeViewBase.ListItemAccessor |
Modifier and Type | Field and Description |
---|---|
static int |
CAMERA_ID_ANY |
static int |
CAMERA_ID_BACK |
static int |
CAMERA_ID_FRONT |
Constructor and Description |
---|
CameraBridgeViewBase(Context context,
AttributeSet attrs) |
CameraBridgeViewBase(Context context,
int cameraId) |
Modifier and Type | Method and Description |
---|---|
void |
disableFpsMeter() |
void |
disableView()
This method is provided for clients, so they can disable camera connection and stop
the delivery of frames even though the surface view itself is not destroyed and still stays on the scren
|
void |
enableFpsMeter()
This method enables label with fps value on the screen
|
void |
enableView()
This method is provided for clients, so they can enable the camera connection.
|
void |
setCameraIndex(int cameraIndex)
Sets the camera index
|
void |
SetCaptureFormat(int format) |
void |
setCvCameraViewListener(CameraBridgeViewBase.CvCameraViewListener listener) |
void |
setCvCameraViewListener(CameraBridgeViewBase.CvCameraViewListener2 listener) |
void |
setMaxFrameSize(int maxWidth,
int maxHeight)
This method sets the maximum size that camera frame is allowed to be.
|
void |
surfaceChanged(SurfaceHolder arg0,
int arg1,
int arg2,
int arg3) |
void |
surfaceCreated(SurfaceHolder holder) |
void |
surfaceDestroyed(SurfaceHolder holder) |
public static final int CAMERA_ID_ANY
public static final int CAMERA_ID_BACK
public static final int CAMERA_ID_FRONT
public CameraBridgeViewBase(Context context, AttributeSet attrs)
public CameraBridgeViewBase(Context context, int cameraId)
public void disableFpsMeter()
public void disableView()
public void enableFpsMeter()
public void enableView()
public void setCameraIndex(int cameraIndex)
cameraIndex
- new camera indexpublic void SetCaptureFormat(int format)
public void setCvCameraViewListener(CameraBridgeViewBase.CvCameraViewListener listener)
public void setCvCameraViewListener(CameraBridgeViewBase.CvCameraViewListener2 listener)
listener
- public void setMaxFrameSize(int maxWidth, int maxHeight)
maxWidth
- - the maximum width allowed for camera frame.maxHeight
- - the maximum height allowed for camera framepublic void surfaceChanged(SurfaceHolder arg0, int arg1, int arg2, int arg3)
public void surfaceCreated(SurfaceHolder holder)
public void surfaceDestroyed(SurfaceHolder holder)