2016-12-21 38 views
0

在我的項目中,我採集了點雲並基於此創建了一個二進制蒙板,我將其應用於Tango平板電腦主攝像頭捕捉的圖像,以便最終圖像爲挖出點雲的檢測點。統一獲取探戈設備主攝像頭圖像

我試圖使用探戈的例子來獲取相機圖像,以便進一步後處理,但我沒有成功。 (臨時黑客包括相機渲染紋理,然後應用遮罩着色器渲染)

什麼是在Unity中獲取探戈主相機圖像的最簡單的方法是什麼?

+0

查看我的回覆在這個問題上,它可能對你有幫助:http://stackoverflow.com/questions/41176053/post-processing-effects-with-tango-camera –

回答

0

看看在VideoOverlayProvider.cs文件,有兩個靜態方法SetCallback(..),這聽起來像你正在尋找:

/// Connect a callback to a camera for access to the pixels. 
    /// 
    /// This is not recommended for display but for applications requiring access to the 
    /// <code>HAL_PIXEL_FORMAT_YV12</code> pixel data. The camera is selected via TangoCameraId. Currently only 
    /// <code>TANGO_CAMERA_COLOR</code> and <code>TANGO_CAMERA_FISHEYE</code> are supported. 
    /// 
    /// The <i>onImageAvailable</i> callback will be called when a new frame is available from the camera. The 
    /// Enable Video Overlay option must be enabled for this to succeed. 
    /// 
    /// Note: The first scan-line of the color image is reserved for metadata instead of image pixels. 

您可以訪問兩個TANGO_CAMERA_COLOR相機和TANGO_CAMERA_FISHEYE相機鏡頭