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);
    };
  • 相关阅读:
    [JSOI2015]最小表示
    [洛谷2002]消息扩散
    [洛谷1726]上白泽慧音
    [CodeVS2822]爱在心中
    [POJ2186]Popular Cows
    [洛谷1991]无线通讯网
    [CQOI2009]跳舞
    [洛谷1342]请柬
    [USACO07JAN]Balanced Lineup
    [NOIp2003提高组]神经网络
  • 原文地址:https://www.cnblogs.com/exmyth/p/4973584.html
Copyright © 2011-2022 走看看