在Unity Hololens 2中访问原始相机视频源

huangapple go评论71阅读模式
英文:

Accessing raw camera feed in Unity Hololens 2

问题

项目摘要:

我正在为Hololens 2开发计算机视觉项目,目标是能够处理来自实时摄像头的帧,然后在我的Unity应用程序中以AR方式叠加处理后的帧。

例如) 用户将会看着表面上的一个裂缝,然后该裂缝将在AR中被高亮显示。

图像处理通过openCV以C++完成,并将构建成.dll文件以在Unity中访问。目前我遇到的问题是访问Hololens的原始摄像头数据,以便进行处理。

可能性:

我已经研究了Mixed Reality Capture,但这似乎主要用于记录/流式传输头戴设备的视图,而不是原始摄像头数据。全息图也会干扰图像处理。

我还研究了Research Mode,它提供了对传感器流的访问,如用于跟踪头戴设备的摄像头和深度传感器,这是一个可能性,但我想知道是否有更好的方法?

摄像头流要求:

  • 不需要彩色,黑白即可
  • 至少30帧每秒
  • 没有叠加全息图的原始摄像头数据
英文:

Project Summary:

I'm working on computer vision project for the Hololens 2, the goal is to be able to process frames from a live camera feed and then overlay the processed frames in AR within my Unity app.

> ex) The user will look at a crack in a surface, then the crack will be high-lighted in AR.

The image processing is done in C++ via openCV and will be built into a .dll to access within Unity, the problem I'm running into currently is accessing a raw camera feed from the Hololens that I can use for processing.

Possibilities:

I've looked into Mixed Reality Capture but this seems to mostly be used for recording/streaming headset view and not a raw camera feed. Holograms will also interfere with the image processing.

I've also looked into Research Mode which gives access to sensor streams such as the cameras and depth sensors used for tracking the headset, this is a possibility but I'm wondering if there is a better way?

Camera stream requirements:

  • Doesn't need color, black and white is fine
  • At least 30fps
  • Raw camera feed without Holograms overlayed

答案1

得分: 1

我认为研究模式可以满足您的需求,但需要注意研究模式不适用于生产环境。

除了研究模式,您可以尝试Unity提供的PhotoCaptureVideoCapture,在调用CreateAsync时可以选择是否捕捉全息图像。请参考以下文档。

您也可以尝试WebCamTexture,它不捕捉全息图像。您可以参考 https://docs.unity3d.com/ScriptReference/WebCamTexture.html

英文:

I think Research Mode can achieve your needs, but it should be noted that Research Mode is not suitable for production environments.

In addition to Research Mode, you can try PhotoCapture and VideoCapture provided by Unity, you can choose whether to capture holograms when calling CreateAsync. Please refer to the documentation below.

You can also try WebCamTexture, it doesn't capture holograms. You can refer to https://docs.unity3d.com/ScriptReference/WebCamTexture.html.

huangapple
  • 本文由 发表于 2023年7月18日 00:35:45
  • 转载请务必保留本文链接:https://go.coder-hub.com/76706489.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定