|
OpenCV 2.4.6 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object android.view.View android.view.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
|
Nested classes/interfaces inherited from class android.view.View |
---|
android.view.View.BaseSavedState, android.view.View.DragShadowBuilder, android.view.View.MeasureSpec, android.view.View.OnClickListener, android.view.View.OnCreateContextMenuListener, android.view.View.OnDragListener, android.view.View.OnFocusChangeListener, android.view.View.OnKeyListener, android.view.View.OnLayoutChangeListener, android.view.View.OnLongClickListener, android.view.View.OnSystemUiVisibilityChangeListener, android.view.View.OnTouchListener |
Field Summary | |
---|---|
static int |
CAMERA_ID_ANY
|
static int |
CAMERA_ID_BACK
|
static int |
CAMERA_ID_FRONT
|
Fields inherited from class android.view.View |
---|
DRAWING_CACHE_QUALITY_AUTO, DRAWING_CACHE_QUALITY_HIGH, DRAWING_CACHE_QUALITY_LOW, FOCUS_BACKWARD, FOCUS_DOWN, FOCUS_FORWARD, FOCUS_LEFT, FOCUS_RIGHT, FOCUS_UP, FOCUSABLES_ALL, FOCUSABLES_TOUCH_MODE, GONE, HAPTIC_FEEDBACK_ENABLED, INVISIBLE, KEEP_SCREEN_ON, LAYER_TYPE_HARDWARE, LAYER_TYPE_NONE, LAYER_TYPE_SOFTWARE, MEASURED_HEIGHT_STATE_SHIFT, MEASURED_SIZE_MASK, MEASURED_STATE_MASK, MEASURED_STATE_TOO_SMALL, NO_ID, OVER_SCROLL_ALWAYS, OVER_SCROLL_IF_CONTENT_SCROLLS, OVER_SCROLL_NEVER, SCROLLBAR_POSITION_DEFAULT, SCROLLBAR_POSITION_LEFT, SCROLLBAR_POSITION_RIGHT, SCROLLBARS_INSIDE_INSET, SCROLLBARS_INSIDE_OVERLAY, SCROLLBARS_OUTSIDE_INSET, SCROLLBARS_OUTSIDE_OVERLAY, SOUND_EFFECTS_ENABLED, STATUS_BAR_HIDDEN, STATUS_BAR_VISIBLE, VISIBLE |
Constructor Summary | |
---|---|
CameraBridgeViewBase(android.content.Context context,
android.util.AttributeSet attrs)
|
|
CameraBridgeViewBase(android.content.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(android.view.SurfaceHolder arg0,
int arg1,
int arg2,
int arg3)
|
void |
surfaceCreated(android.view.SurfaceHolder holder)
|
void |
surfaceDestroyed(android.view.SurfaceHolder holder)
|
Methods inherited from class android.view.SurfaceView |
---|
draw, gatherTransparentRegion, getHolder, setVisibility, setZOrderMediaOverlay, setZOrderOnTop |
Methods inherited from class android.view.View |
---|
addFocusables, addFocusables, addOnLayoutChangeListener, addTouchables, bringToFront, buildDrawingCache, buildDrawingCache, cancelLongPress, checkInputConnectionProxy, clearAnimation, clearFocus, combineMeasuredStates, computeScroll, createContextMenu, destroyDrawingCache, dispatchConfigurationChanged, dispatchDisplayHint, dispatchDragEvent, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchPopulateAccessibilityEvent, dispatchSystemUiVisibilityChanged, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchWindowFocusChanged, dispatchWindowVisibilityChanged, findFocus, findViewById, findViewWithTag, focusSearch, forceLayout, getAlpha, getAnimation, getApplicationWindowToken, getBackground, getBaseline, getBottom, getContentDescription, getContext, getDefaultSize, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getFilterTouchesWhenObscured, getFocusables, getFocusedRect, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHeight, getHitRect, getHorizontalFadingEdgeLength, getId, getKeepScreenOn, getKeyDispatcherState, getLayerType, getLayoutParams, getLeft, getLocalVisibleRect, getLocationInWindow, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOverScrollMode, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getParent, getPivotX, getPivotY, getResources, getRight, getRootView, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarStyle, getScrollX, getScrollY, getSolidColor, getSystemUiVisibility, getTag, getTag, getTop, getTouchables, getTouchDelegate, getTranslationX, getTranslationY, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarWidth, getViewTreeObserver, getVisibility, getWidth, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, hasFocus, hasFocusable, hasWindowFocus, inflate, invalidate, invalidate, invalidate, invalidateDrawable, isActivated, isClickable, isDirty, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isHapticFeedbackEnabled, isHardwareAccelerated, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isInEditMode, isInTouchMode, isLayoutRequested, isLongClickable, isOpaque, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScrollbarFadingEnabled, isSelected, isShown, isSoundEffectsEnabled, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, jumpDrawablesToCurrentState, layout, measure, offsetLeftAndRight, offsetTopAndBottom, onCheckIsTextEditor, onCreateInputConnection, onDragEvent, onFilterTouchEventForSecurity, onFinishTemporaryDetach, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onStartTemporaryDetach, onTouchEvent, onTrackballEvent, onWindowFocusChanged, performClick, performHapticFeedback, performHapticFeedback, performLongClick, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, refreshDrawableState, removeCallbacks, removeOnLayoutChangeListener, requestFocus, requestFocus, requestFocus, requestFocusFromTouch, requestLayout, requestRectangleOnScreen, requestRectangleOnScreen, resolveSize, resolveSizeAndState, restoreHierarchyState, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, sendAccessibilityEvent, sendAccessibilityEventUnchecked, setActivated, setAlpha, setAnimation, setBackgroundColor, setBackgroundDrawable, setBackgroundResource, setBottom, setClickable, setContentDescription, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setEnabled, setFadingEdgeLength, setFilterTouchesWhenObscured, setFocusable, setFocusableInTouchMode, setHapticFeedbackEnabled, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setId, setKeepScreenOn, setLayerType, setLayoutParams, setLeft, setLongClickable, setMinimumHeight, setMinimumWidth, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnClickListener, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnKeyListener, setOnLongClickListener, setOnSystemUiVisibilityChangeListener, setOnTouchListener, setOverScrollMode, setPadding, setPivotX, setPivotY, setPressed, setRight, setRotation, setRotationX, setRotationY, setSaveEnabled, setSaveFromParentEnabled, setScaleX, setScaleY, setScrollbarFadingEnabled, setScrollBarStyle, setScrollContainer, setSelected, setSoundEffectsEnabled, setSystemUiVisibility, setTag, setTag, setTop, setTouchDelegate, setTranslationX, setTranslationY, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setWillNotCacheDrawing, setWillNotDraw, setX, setY, showContextMenu, startActionMode, startAnimation, startDrag, unscheduleDrawable, unscheduleDrawable, willNotCacheDrawing, willNotDraw |
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(android.content.Context context, android.util.AttributeSet attrs)
public CameraBridgeViewBase(android.content.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(android.view.SurfaceHolder arg0, int arg1, int arg2, int arg3)
surfaceChanged
in interface android.view.SurfaceHolder.Callback
public void surfaceCreated(android.view.SurfaceHolder holder)
surfaceCreated
in interface android.view.SurfaceHolder.Callback
public void surfaceDestroyed(android.view.SurfaceHolder holder)
surfaceDestroyed
in interface android.view.SurfaceHolder.Callback
|
OpenCV 2.4.6 Documentation | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |