|
OpenCV 2.4.8 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object SurfaceView org.opencv.android.CameraBridgeViewBase
public abstract class CameraBridgeViewBase
This is a basic class, implementing the interaction with Camera and OpenCV library. The main responsibility of it - is to control when camera can be enabled, process the frame, call external listener to make any adjustments to the frame and then draw the resulting frame to the screen. The clients shall implement CvCameraViewListener.
Nested Class Summary | |
---|---|
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
|
Field Summary | |
---|---|
static int |
CAMERA_ID_ANY
|
static int |
CAMERA_ID_BACK
|
static int |
CAMERA_ID_FRONT
|
Constructor Summary | |
---|---|
CameraBridgeViewBase(Context context,
AttributeSet attrs)
|
|
CameraBridgeViewBase(Context context,
int cameraId)
|
Method Summary | |
---|---|
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)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int CAMERA_ID_ANY
public static final int CAMERA_ID_BACK
public static final int CAMERA_ID_FRONT
Constructor Detail |
---|
public CameraBridgeViewBase(Context context, AttributeSet attrs)
public CameraBridgeViewBase(Context context, int cameraId)
Method Detail |
---|
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)
|
OpenCV 2.4.8 Documentation | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |