com.supermap.ai

类 AIDetectView

  • java.lang.Object
    • android.view.View
      • android.view.ViewGroup
        • android.widget.RelativeLayout
          • com.supermap.ai.AIDetectView
  • 所有已实现的接口:
    android.graphics.drawable.Drawable.Callback, android.view.accessibility.AccessibilityEventSource, android.view.KeyEvent.Callback, android.view.ViewManager, android.view.ViewParent


    public class AIDetectView
    extends android.widget.RelativeLayout
    AI识别类控件
    • 嵌套类概要

      嵌套类 
      限定符和类型 类和说明
      static interface  AIDetectView.DetectListener
      AI识别结果监听类,用于监听摄像头图片分析后的返回结果
      • 从类继承的嵌套类/接口 android.widget.RelativeLayout

        android.widget.RelativeLayout.LayoutParams
      • 从类继承的嵌套类/接口 android.view.ViewGroup

        android.view.ViewGroup.MarginLayoutParams, android.view.ViewGroup.OnHierarchyChangeListener
      • 从类继承的嵌套类/接口 android.view.View

        android.view.View.AccessibilityDelegate, android.view.View.BaseSavedState, android.view.View.DragShadowBuilder, android.view.View.MeasureSpec, android.view.View.OnApplyWindowInsetsListener, android.view.View.OnAttachStateChangeListener, android.view.View.OnClickListener, android.view.View.OnCreateContextMenuListener, android.view.View.OnDragListener, android.view.View.OnFocusChangeListener, android.view.View.OnGenericMotionListener, android.view.View.OnHoverListener, android.view.View.OnKeyListener, android.view.View.OnLayoutChangeListener, android.view.View.OnLongClickListener, android.view.View.OnSystemUiVisibilityChangeListener, android.view.View.OnTouchListener
    • 字段概要

      • 从类继承的字段 android.widget.RelativeLayout

        ABOVE, ALIGN_BASELINE, ALIGN_BOTTOM, ALIGN_END, ALIGN_LEFT, ALIGN_PARENT_BOTTOM, ALIGN_PARENT_END, ALIGN_PARENT_LEFT, ALIGN_PARENT_RIGHT, ALIGN_PARENT_START, ALIGN_PARENT_TOP, ALIGN_RIGHT, ALIGN_START, ALIGN_TOP, BELOW, CENTER_HORIZONTAL, CENTER_IN_PARENT, CENTER_VERTICAL, END_OF, LEFT_OF, RIGHT_OF, START_OF, TRUE
      • 从类继承的字段 android.view.ViewGroup

        FOCUS_AFTER_DESCENDANTS, FOCUS_BEFORE_DESCENDANTS, FOCUS_BLOCK_DESCENDANTS, LAYOUT_MODE_CLIP_BOUNDS, LAYOUT_MODE_OPTICAL_BOUNDS, PERSISTENT_ALL_CACHES, PERSISTENT_ANIMATION_CACHE, PERSISTENT_NO_CACHE, PERSISTENT_SCROLLING_CACHE
      • 从类继承的字段 android.view.View

        ACCESSIBILITY_LIVE_REGION_ASSERTIVE, ACCESSIBILITY_LIVE_REGION_NONE, ACCESSIBILITY_LIVE_REGION_POLITE, ALPHA, DRAWING_CACHE_QUALITY_AUTO, DRAWING_CACHE_QUALITY_HIGH, DRAWING_CACHE_QUALITY_LOW, FIND_VIEWS_WITH_CONTENT_DESCRIPTION, FIND_VIEWS_WITH_TEXT, FOCUS_BACKWARD, FOCUS_DOWN, FOCUS_FORWARD, FOCUS_LEFT, FOCUS_RIGHT, FOCUS_UP, FOCUSABLES_ALL, FOCUSABLES_TOUCH_MODE, GONE, HAPTIC_FEEDBACK_ENABLED, IMPORTANT_FOR_ACCESSIBILITY_AUTO, IMPORTANT_FOR_ACCESSIBILITY_NO, IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS, IMPORTANT_FOR_ACCESSIBILITY_YES, INVISIBLE, KEEP_SCREEN_ON, LAYER_TYPE_HARDWARE, LAYER_TYPE_NONE, LAYER_TYPE_SOFTWARE, LAYOUT_DIRECTION_INHERIT, LAYOUT_DIRECTION_LOCALE, LAYOUT_DIRECTION_LTR, LAYOUT_DIRECTION_RTL, 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, ROTATION, ROTATION_X, ROTATION_Y, SCALE_X, SCALE_Y, SCREEN_STATE_OFF, SCREEN_STATE_ON, 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, SYSTEM_UI_FLAG_FULLSCREEN, SYSTEM_UI_FLAG_HIDE_NAVIGATION, SYSTEM_UI_FLAG_IMMERSIVE, SYSTEM_UI_FLAG_IMMERSIVE_STICKY, SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN, SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION, SYSTEM_UI_FLAG_LAYOUT_STABLE, SYSTEM_UI_FLAG_LOW_PROFILE, SYSTEM_UI_FLAG_VISIBLE, SYSTEM_UI_LAYOUT_FLAGS, TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_GRAVITY, TEXT_ALIGNMENT_INHERIT, TEXT_ALIGNMENT_TEXT_END, TEXT_ALIGNMENT_TEXT_START, TEXT_ALIGNMENT_VIEW_END, TEXT_ALIGNMENT_VIEW_START, TEXT_DIRECTION_ANY_RTL, TEXT_DIRECTION_FIRST_STRONG, TEXT_DIRECTION_INHERIT, TEXT_DIRECTION_LOCALE, TEXT_DIRECTION_LTR, TEXT_DIRECTION_RTL, TRANSLATION_X, TRANSLATION_Y, VISIBLE, X, Y
    • 构造器概要

      构造器 
      构造器和说明
      AIDetectView(android.content.Context context)
      构造方法
      AIDetectView(android.content.Context context, android.util.AttributeSet attrs)
      构造方法
      AIDetectView(android.content.Context context, android.util.AttributeSet attrs, int defStyle)
      构造方法
    • 方法概要

      所有方法 实例方法 具体方法 
      限定符和类型 方法和说明
      void changeModelFile(AIDetectViewInfo info)
      切换模型文件
      void clearDetectObjects()
      清除识别对象
      void dispose()
      停止识别,关闭相机,回收资源
      java.util.Vector<java.lang.String> getAllDetectArrayProvide()
      设置识别模型后,获取所有可用的识别分类数组
      java.util.Vector<java.lang.String> getDetectArrayToUse()
      获取识别分类数组
      int getDetectInterval()
      获取识别时间间隔阈值
      android.hardware.Camera.Size getPolySize()
      获取聚合模式网格宽高
      android.graphics.Bitmap getPreviewBitmap()
      获取当前预览图片
      android.graphics.Bitmap getScreenCapture()
      AI截屏接口,保存当前预览图片及识别绘制框
      int getTrackedCount()
      获取当前跟踪计数结果
      void init()
      初始化,必须调用该接口完成ai初始化
      boolean isDetect()
      当前识别模式状态
      boolean isPolymerize()
      返回是否聚合模式
      boolean isPolyWithRect()
      返回聚合模式下是否绘制检测框
      void pauseDetect()
      暂停识别
      void resetTrackedCount()
      重置跟踪结果为0
      void resumeDetect()
      开始识别
      void setAIDetectStyle(AIDetectStyle aiDetectStyle)
      设置AI绘制风格
      void setDetectArrayToUse(java.util.Vector<java.lang.String> detectArray)
      设置选择分类数组
      void setDetectedListener(AIDetectView.DetectListener listener)
      注册AI识别监听器
      void setDetectInfo(AIDetectViewInfo info)
      才启动识别之前,需要设置相关模型参数,设置参数
      void setDetectInterval(int interval)
      设置识别时间间隔
      void setGpsData(Point2D gpsData)
      设置GPS坐标
      void setPolyColorAlpha(int alpha)
      设置聚合模式热力颜色透明度。
      boolean setPolyColorArray(java.util.Vector<java.lang.Integer> colorArray)
      设置聚合模式热力色带
      void setPolymerize(boolean value)
      设置是否聚合模式
      void setPolymerizeThreshold(int x, int y)
      设置聚合模式阈值
      void setPolySize(android.hardware.Camera.Size size)
      设置聚合模式网格宽高
      void setPolyWithRect(boolean value)
      设置聚合模式下是否绘制检测框
      void startCameraPreview()
      打开相机预览
      void startCountTrackedObjs()
      开始跟踪计数
      void startPushAIStream(java.lang.String ip, java.lang.String port, java.lang.String id, int framerate, int width, int height, InitCallback callback)
      开始推送带AI检测结果视频流
      void startPushCustomStream(java.lang.String ip, java.lang.String port, java.lang.String id, android.graphics.Bitmap bitmap, int width, int height, InitCallback callback)
      开始推送自定义内容视频流
      void stopCameraPreview()
      关闭相机预览
      void stopCountTrackedObjs()
      停止跟踪计数
      void stopPushAIStream()
      停止推流
      • 从类继承的方法 android.widget.RelativeLayout

        dispatchPopulateAccessibilityEvent, generateLayoutParams, getBaseline, getGravity, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, requestLayout, setGravity, setHorizontalGravity, setIgnoreGravity, setVerticalGravity, shouldDelayChildPressedState
      • 从类继承的方法 android.view.ViewGroup

        addChildrenForAccessibility, addFocusables, addStatesFromChildren, addTouchables, addView, addView, addView, addView, addView, bringChildToFront, childDrawableStateChanged, childHasTransientStateChanged, clearChildFocus, clearDisappearingChildren, clearFocus, dispatchApplyWindowInsets, dispatchConfigurationChanged, dispatchDisplayHint, dispatchDragEvent, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchSetActivated, dispatchSetSelected, dispatchSystemUiVisibilityChanged, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchWindowFocusChanged, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, endViewTransition, findFocus, findViewsWithText, focusableViewAvailable, focusSearch, gatherTransparentRegion, getChildAt, getChildCount, getChildMeasureSpec, getChildVisibleRect, getClipChildren, getDescendantFocusability, getFocusedChild, getLayoutAnimation, getLayoutAnimationListener, getLayoutMode, getLayoutTransition, getOverlay, getPersistentDrawingCache, hasFocus, hasFocusable, hasTransientState, indexOfChild, invalidateChild, invalidateChildInParent, isAlwaysDrawnWithCacheEnabled, isAnimationCacheEnabled, isMotionEventSplittingEnabled, jumpDrawablesToCurrentState, layout, notifySubtreeAccessibilityStateChanged, offsetDescendantRectToMyCoords, offsetRectIntoDescendantCoords, onInterceptHoverEvent, onInterceptTouchEvent, onRequestSendAccessibilityEvent, recomputeViewAttributes, removeAllViews, removeAllViewsInLayout, removeView, removeViewAt, removeViewInLayout, removeViews, removeViewsInLayout, requestChildFocus, requestChildRectangleOnScreen, requestDisallowInterceptTouchEvent, requestFocus, requestSendAccessibilityEvent, requestTransparentRegion, scheduleLayoutAnimation, setAddStatesFromChildren, setAlwaysDrawnWithCacheEnabled, setAnimationCacheEnabled, setClipChildren, setClipToPadding, setDescendantFocusability, setLayoutAnimation, setLayoutAnimationListener, setLayoutMode, setLayoutTransition, setMotionEventSplittingEnabled, setOnHierarchyChangeListener, setPersistentDrawingCache, showContextMenuForChild, startActionModeForChild, startLayoutAnimation, startViewTransition, updateViewLayout
      • 从类继承的方法 android.view.View

        addFocusables, addOnAttachStateChangeListener, addOnLayoutChangeListener, animate, announceForAccessibility, bringToFront, buildDrawingCache, buildDrawingCache, buildLayer, callOnClick, cancelLongPress, cancelPendingInputEvents, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, checkInputConnectionProxy, clearAnimation, combineMeasuredStates, computeScroll, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchGenericMotionEvent, draw, findViewById, findViewWithTag, focusSearch, forceLayout, generateViewId, getAccessibilityLiveRegion, getAccessibilityNodeProvider, getAlpha, getAnimation, getApplicationWindowToken, getBackground, getBottom, getCameraDistance, getClipBounds, getContentDescription, getContext, getDefaultSize, getDisplay, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getFilterTouchesWhenObscured, getFitsSystemWindows, getFocusables, getFocusedRect, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHeight, getHitRect, getHorizontalFadingEdgeLength, getId, getImportantForAccessibility, getKeepScreenOn, getKeyDispatcherState, getLabelFor, getLayerType, getLayoutDirection, getLayoutParams, getLeft, getLocalVisibleRect, getLocationInWindow, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getMinimumHeight, getMinimumWidth, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOverScrollMode, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getParent, getParentForAccessibility, getPivotX, getPivotY, getResources, getRight, getRootView, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarDefaultDelayBeforeFade, getScrollBarFadeDuration, getScrollBarSize, getScrollBarStyle, getScrollX, getScrollY, getSolidColor, getSystemUiVisibility, getTag, getTag, getTextAlignment, getTextDirection, getTop, getTouchables, getTouchDelegate, getTranslationX, getTranslationY, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarWidth, getViewTreeObserver, getVisibility, getWidth, getWindowId, getWindowSystemUiVisibility, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, hasOnClickListeners, hasOverlappingRendering, hasWindowFocus, inflate, invalidate, invalidate, invalidate, invalidateDrawable, isActivated, isAttachedToWindow, isClickable, isDirty, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isHapticFeedbackEnabled, isHardwareAccelerated, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isInEditMode, isInLayout, isInTouchMode, isLaidOut, isLayoutDirectionResolved, isLayoutRequested, isLongClickable, isOpaque, isPaddingRelative, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScrollbarFadingEnabled, isScrollContainer, isSelected, isShown, isSoundEffectsEnabled, isTextAlignmentResolved, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, measure, offsetLeftAndRight, offsetTopAndBottom, onApplyWindowInsets, onCancelPendingInputEvents, onCheckIsTextEditor, onCreateInputConnection, onDragEvent, onFilterTouchEventForSecurity, onFinishTemporaryDetach, onGenericMotionEvent, onHoverChanged, onHoverEvent, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onPopulateAccessibilityEvent, onRtlPropertiesChanged, onScreenStateChanged, onStartTemporaryDetach, onTouchEvent, onTrackballEvent, onWindowFocusChanged, onWindowSystemUiVisibilityChanged, performAccessibilityAction, performClick, performHapticFeedback, performHapticFeedback, performLongClick, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, postInvalidateOnAnimation, postInvalidateOnAnimation, postOnAnimation, postOnAnimationDelayed, refreshDrawableState, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, requestApplyInsets, requestFitSystemWindows, requestFocus, requestFocus, requestFocusFromTouch, requestRectangleOnScreen, requestRectangleOnScreen, resolveSize, resolveSizeAndState, restoreHierarchyState, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, sendAccessibilityEvent, sendAccessibilityEventUnchecked, setAccessibilityDelegate, setAccessibilityLiveRegion, setActivated, setAlpha, setAnimation, setBackground, setBackgroundColor, setBackgroundDrawable, setBackgroundResource, setBottom, setCameraDistance, setClickable, setClipBounds, setContentDescription, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setEnabled, setFadingEdgeLength, setFilterTouchesWhenObscured, setFitsSystemWindows, setFocusable, setFocusableInTouchMode, setHapticFeedbackEnabled, setHasTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHovered, setId, setImportantForAccessibility, setKeepScreenOn, setLabelFor, setLayerPaint, setLayerType, setLayoutDirection, setLayoutParams, setLeft, setLongClickable, setMinimumHeight, setMinimumWidth, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnApplyWindowInsetsListener, setOnClickListener, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnLongClickListener, setOnSystemUiVisibilityChangeListener, setOnTouchListener, setOverScrollMode, setPadding, setPaddingRelative, setPivotX, setPivotY, setPressed, setRight, setRotation, setRotationX, setRotationY, setSaveEnabled, setSaveFromParentEnabled, setScaleX, setScaleY, setScrollBarDefaultDelayBeforeFade, setScrollBarFadeDuration, setScrollbarFadingEnabled, setScrollBarSize, setScrollBarStyle, setScrollContainer, setScrollX, setScrollY, setSelected, setSoundEffectsEnabled, setSystemUiVisibility, setTag, setTag, setTextAlignment, setTextDirection, setTop, setTouchDelegate, setTranslationX, setTranslationY, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setVisibility, setWillNotCacheDrawing, setWillNotDraw, setX, setY, showContextMenu, startActionMode, startAnimation, startDrag, toString, unscheduleDrawable, unscheduleDrawable, willNotCacheDrawing, willNotDraw
      • 从类继承的方法 java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • 从接口继承的方法 android.view.ViewParent

        canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, createContextMenu, getLayoutDirection, getParent, getParentForAccessibility, getTextAlignment, getTextDirection, isLayoutDirectionResolved, isLayoutRequested, isTextAlignmentResolved, isTextDirectionResolved, requestFitSystemWindows
    • 构造器详细资料

      • AIDetectView

        public AIDetectView(android.content.Context context)
        构造方法
        参数:
        context - 上下文
      • AIDetectView

        public AIDetectView(android.content.Context context,
                            android.util.AttributeSet attrs)
        构造方法
        参数:
        context - 上下文
        attrs - 定义控件属性的attrs.xml。
      • AIDetectView

        public AIDetectView(android.content.Context context,
                            android.util.AttributeSet attrs,
                            int defStyle)
        构造方法
        参数:
        context - 上下文
        attrs - 定义控件属性的attrs.xml。
        defStyle - 控件
    • 方法详细资料

      • setDetectInfo

        public void setDetectInfo(AIDetectViewInfo info)
        才启动识别之前,需要设置相关模型参数,设置参数
        参数:
        info - 初始化参数
      • init

        public void init()
        初始化,必须调用该接口完成ai初始化
      • setDetectInterval

        public void setDetectInterval(int interval)
        设置识别时间间隔
        参数:
        interval - 时间间隔阈值,单位:ms
      • getDetectInterval

        public int getDetectInterval()
        获取识别时间间隔阈值
        返回:
        时间间隔阈值,单位:ms
      • setDetectedListener

        public void setDetectedListener(AIDetectView.DetectListener listener)
        注册AI识别监听器
        参数:
        listener - 监听器。
      • setDetectArrayToUse

        public void setDetectArrayToUse(java.util.Vector<java.lang.String> detectArray)
        设置选择分类数组
        参数:
        detectArray - 分类数组模型。
      • setGpsData

        public void setGpsData(Point2D gpsData)
        设置GPS坐标
        参数:
        gpsData - 定位坐标。
      • getDetectArrayToUse

        public java.util.Vector<java.lang.String> getDetectArrayToUse()
        获取识别分类数组
        返回:
        返回识别分类数组
      • resumeDetect

        public void resumeDetect()
        开始识别
      • pauseDetect

        public void pauseDetect()
        暂停识别
      • dispose

        public void dispose()
        停止识别,关闭相机,回收资源
      • clearDetectObjects

        public void clearDetectObjects()
        清除识别对象
      • setPolymerize

        public void setPolymerize(boolean value)
        设置是否聚合模式
        参数:
        value - 是否聚合模式boolean值
      • isPolymerize

        public boolean isPolymerize()
        返回是否聚合模式
        返回:
        是否聚合模式boolean值
      • setPolymerizeThreshold

        public void setPolymerizeThreshold(int x,
                                           int y)
        设置聚合模式阈值
        参数:
        x - 网格聚合横坐标阈值
        y - 网格聚合纵坐标阈值
      • getPolySize

        public android.hardware.Camera.Size getPolySize()
        获取聚合模式网格宽高
        返回:
        聚合模式宽高
      • setPolySize

        public void setPolySize(android.hardware.Camera.Size size)
        设置聚合模式网格宽高
        参数:
        size - 聚合模式网格宽高
      • isDetect

        public boolean isDetect()
        当前识别模式状态
        返回:
        是否识别模式
      • getPreviewBitmap

        public android.graphics.Bitmap getPreviewBitmap()
        获取当前预览图片
        返回:
        预览图片
      • getTrackedCount

        public int getTrackedCount()
        获取当前跟踪计数结果
        返回:
        计数结果
      • resetTrackedCount

        public void resetTrackedCount()
        重置跟踪结果为0
      • startCountTrackedObjs

        public void startCountTrackedObjs()
        开始跟踪计数
      • stopCountTrackedObjs

        public void stopCountTrackedObjs()
        停止跟踪计数
      • getAllDetectArrayProvide

        public java.util.Vector<java.lang.String> getAllDetectArrayProvide()
        设置识别模型后,获取所有可用的识别分类数组
        返回:
        识别分类数组
      • getScreenCapture

        public android.graphics.Bitmap getScreenCapture()
        AI截屏接口,保存当前预览图片及识别绘制框
        返回:
        当前预览图片
      • setAIDetectStyle

        public void setAIDetectStyle(AIDetectStyle aiDetectStyle)
        设置AI绘制风格
        参数:
        aiDetectStyle - AI绘制风格参数
      • startCameraPreview

        public void startCameraPreview()
        打开相机预览
      • stopCameraPreview

        public void stopCameraPreview()
        关闭相机预览
      • startPushAIStream

        public void startPushAIStream(java.lang.String ip,
                                      java.lang.String port,
                                      java.lang.String id,
                                      int framerate,
                                      int width,
                                      int height,
                                      InitCallback callback)
        开始推送带AI检测结果视频流
        参数:
        ip - rtsp服务器ip地址
        port - rtsp服务器端口号
        id - 推流id名称
        framerate - 推流帧率
        width - 推流分辨率宽度
        height - 推流分辨率高度
        callback - 推流状态回调监听
      • startPushCustomStream

        public void startPushCustomStream(java.lang.String ip,
                                          java.lang.String port,
                                          java.lang.String id,
                                          android.graphics.Bitmap bitmap,
                                          int width,
                                          int height,
                                          InitCallback callback)
        开始推送自定义内容视频流
        参数:
        ip - rtsp服务器ip地址
        port - rtsp服务器端口号
        id - 推流id名称
        bitmap - 推流图片
        width - 推流分辨率宽度
        height - 推流分辨率高度
        callback - 推流状态回调监听
      • stopPushAIStream

        public void stopPushAIStream()
        停止推流
      • changeModelFile

        public void changeModelFile(AIDetectViewInfo info)
        切换模型文件
        参数:
        info - 模型文件属性信息
      • setPolyWithRect

        public void setPolyWithRect(boolean value)
        设置聚合模式下是否绘制检测框
        参数:
        value - 是否绘制检测框boolean值
      • isPolyWithRect

        public boolean isPolyWithRect()
        返回聚合模式下是否绘制检测框
        返回:
        是否绘制检测框boolean值
      • setPolyColorArray

        public boolean setPolyColorArray(java.util.Vector<java.lang.Integer> colorArray)
        设置聚合模式热力色带
        参数:
        colorArray - 要求4种颜色,对应目标数量1-3,4-6,7-9,大于等于10
        返回:
        是否设置成功
      • setPolyColorAlpha

        public void setPolyColorAlpha(int alpha)
        设置聚合模式热力颜色透明度。范围0-255,0为全透明,255为不透明
        参数:
        alpha - 颜色透明度