zoukankan      html  css  js  c++  java
  • Android摄像头抓取图像的格式

    android.hardware.Camera.PreviewCallback

    /**
    * Callback interface used to deliver copies of preview frames as
    * they are displayed.
    *
    * @see #setPreviewCallback(Camera.PreviewCallback)
    * @see #setOneShotPreviewCallback(Camera.PreviewCallback)
    * @see #setPreviewCallbackWithBuffer(Camera.PreviewCallback)
    * @see #startPreview()
    */
    public interface PreviewCallback
    {
    /**
    * Called as preview frames are displayed. This callback is invoked
    * on the event thread {@link #open(int)} was called from.
    *
    * @param data the contents of the preview frame in the format defined
    * by {@link android.graphics.ImageFormat}, which can be queried
    * with {@link android.hardware.Camera.Parameters#getPreviewFormat()}.
    * If {@link android.hardware.Camera.Parameters#setPreviewFormat(int)}
    * is never called, the default will be the YCbCr_420_SP
    * (NV21) format.
    * @param camera the Camera service object.
    */
    void onPreviewFrame(byte[] data, Camera camera);
    };
  • 相关阅读:
    6-1面向对象
    5-1模块
    python随机数
    4-5目录
    4-4内置函数
    4-3迭代器和生成器
    4-1装饰器1
    4-2装饰器2
    3-4函数-全局变量
    3-5递归-函数
  • 原文地址:https://www.cnblogs.com/exmyth/p/4973584.html
Copyright © 2011-2022 走看看