EnoxSoftware / HoloLensWithOpenCVForUnityExample

HoloLens With OpenCVforUnity Example (Support for Hololens1 and Hololens2)
MIT License
262 stars 50 forks source link

Camera image of Hololens2 is not be displayed #37

Closed Sakitakazawa closed 3 years ago

Sakitakazawa commented 3 years ago

Hi. I want to use HololensWithOpenCVForUnityExample with Hololens2. It works well in unity editor but when built to Hololens2, camera image of Hololens2 is not be displayed. (I want to try Comic filter Example.) I set up according to Readme of this, HololensWithOpenCVForUnityExample. How can I use Hololens2's camera with HololensWithOpenCVForUnityExample?? In there any special procedure when using Hololens2, not Hololens??

I read #29 and one said we should change code in Videocapture.cs. But Videocapture.cs is not in Camstream folder in HoloLensCameraStream so I think Videocapture.cs is not used when using HololensWithOpenCVForUnityExample and it seems meaningless....

using version: Hololens2 Unity 2019.4.23f1 Visual Studio 2019 OpenCVForUnity 2.4.4 HololensWithOpenCVForUnityExample 1.0.4 camnewnham/HoloLensCameraStream

EnoxSoftware commented 3 years ago

Follow the steps in this comment to modify the script in the ”camnewnham/HoloLensCameraStream” repository to create and replace the new HoloLensCameraStream.dll.

https://github.com/EnoxSoftware/HoloLensWithOpenCVForUnityExample/issues/29#issuecomment-830040262

Sakitakazawa commented 3 years ago

Thank you, I did so but there is another error...

Assets\HoloLensWithOpenCVForUnityExample\HoloLensComicFilterExample\HoloLensComicFilterExample.cs(11,7): error CS0246:The type or namespace name 'HoloLensCameraStream' could not be found (are you missing a using directive or an assembly reference?) Assets\CamStream\Scripts\CameraStreamHelper.cs(13,11): error CS0246: The type or namespace name 'OnVideoCaptureResourceCreatedCallback' could not be found (are you missing a using directive or an assembly reference?) Assets\CamStream\Examples\Matrix Usage Example\Scripts\MatrixUsageApp.cs(81,29): error CS0246: The type or namespace name 'VideoCaptureResult' could not be found (are you missing a using directive or an assembly reference?)

and more.

I added Only CamStream folder to Assets, is it ok??

Is build process "Release and ARM"?? Also, in Readme, CameraIntrinsicsCheckerHelper scene does not used. Should I include CameraIntrinsicsCheckerHelper scene in "Scene in Build"? If so, in what order should I add the scene in "Scene in Build"?

Sakitakazawa commented 3 years ago

And I also want to know about tihs question #111 in github in OpenCVForUnity(not using camnewnham/HoloLensCameraStream and I simplly try Example in OpenCVForUnity but it does not work well...)

EnoxSoftware commented 3 years ago

HololensWithOpenCVForUnityExample is a project I created for hololens1. I don't have hololens2 yet. Therefore, my knowledge of making it work with hololens2 is based entirely on the comments made by the pioneers in issue #29.

Sakitakazawa commented 3 years ago

I tried again from the first step and made a new project, it went well!! Thank you very much for your advice…!!!! I was so lucky to ask for help here. Thank you!!