0

在我的项目中,我正在捕获点云,并在此基础上创建一个二进制掩码,我想将其应用于从 Tango 平板电脑主摄像头捕获的图像,以便最终图像是检测到的点云点的剪切。

我尝试使用探戈示例来获取相机图像,以便可以进行进一步的后处理,但没有成功。(临时 hack 包括一个用于渲染纹理的相机,然后将遮罩着色器应用于渲染)

在 Unity 中获取探戈主摄像机图像的最简单方法是什么?

4

1 回答 1

1

看一下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 相机帧

于 2016-12-26T11:33:03.423 回答