How to Access the stream of HoloLens 2 camera when trying to recognize the marker in AR app? - unity3d

I am beginner in unity and not so much used to HoloLens 2. Actually I am trying to make a simple AR app for HoloLens 2, when I connect the external camera it is working fine but when I want to access the stream of HoloLens 2 in recognizing the marker, it does not recognize the marker and I do not know that either the HoloLens 2 camera stream is working or not. I used the main camera as the child of MixedRealityPlaySpace and add some components from AR camera but it does not work then I tried AR camera separate and as a child of MixedRealityPlaySpace but still the HoloLens camera stream is not working. It will be great help if anyone knows about the problems. Thanks In advance

Which way are you using for marker recognizing development? Vuforia or Unity AR foundation? Without any specific context the above information does not make any sense to me.
For AR Foundation, 2D Image tracking feature is not supported on HoloLens platforms for now, you can refer to this link to learn more about feature support per platform:Platform Support.
For Vuforia, there is a closed issue that show how to make Vuforia work with the MRTK: What's the current status of using Vuforia with the MR Toolkit? #1461

Related

Augmented Reality with Unity ARFoundation on mobile device front-facing camera

Does anyone know if the Unity library ARFoundation works with the front-facing camera on a mobile device? I am having trouble finding recent answers online
Thanks
You can go to the AR Camera -> AR Camera Manager and change the CameraFacingDirection to User.
Now the mobile will use the Front camera if the feature works with front camera. If not, it will enable the back camera.
Disclosure: Lot's of features like Image 2D Tracking and Body Tracking can't work with front camera :(

implementing Android AR with UVC / External camera (Unity)

I'm working on an AR project (Unity) and I want to use an external camera instead of my Android's original one. I saw that Vuforia has such a feature - but claims that ny using that, Ground Plane detection wouldn't work at all and ModelTargets performances taking a hit.
I also saw EasyAR has CustomCamera and Camera2 lib in ARCore.
Question is: What's the best way to approach this? has anyone experienced using an external camera? and with what AR solution? (ARFoundation / Vuforia / EasyAR...).
2nd Question: What should I look for when buying said UVC? Any examples for one?
Also I'd like to hear about experiences with AR solutions regardless of the external camera thing.
Thanks in advance!
Unfortunately, this is unlikely to work with an external camera.
A key part of AR is having a precise calibration of the camera's optics. Without that, it's not possible to accurately analyze the world to draw new objects in it or other AR effects.
A UVC webcam doesn't come with any such calibration information. So it would have to be calibrated somehow, and the calibration information given to Unity's AR engine. I don't know if that's possible with Unity in some way.
Note that not that all internal camera devices on Android are calibrated enough for AR either, but the ARCore team is certifying devices that have sufficient calibration in place.

Unity3D: How does Spectator View work through user side of Hololens?

I am having a hard time understanding the documentation. So I trying to spectate using a Hololens mounted on a camera. The user Hololens has an application. What do I need to do on the user side Hololens to enable Spectator View? Does it require MRTK? What components do I need to add to make on the Unity3D application (user side) to make it visible by the Spectator Hololens
What do I need to do on the user side Hololens to enable Spectator View? Does it require MRTK?
First, you need to go through the Getting Started to obtain and reference the MixedReality-SpectatorView codebase in your project.
Then, add the MixedReality.SpectatorView/SpectatorView/Prefabs/SpectatorView.prefab to the primary scene and choose a Spatial Alignment Strategy, following Basic Unity Setup for step-by-step tutorial.
For Video camera rig HoloLens, you need to calibrate and test your device according to this document: Spectator View Video Camera Setup.
After that, the PC listens to pose updates from video camera rig hololens and gets scene information from the user HoloLens, then composites this application content into the video camera stream.
Besides, MRTK as an SDK is intended to accelerate the development of MR projects and is not required to enable SpectatorView.

Unity game flipped after deploying

I havea game that uses ARCamera from Vuforia. When running in Unity the game works no problem. After I deploy the game to UWP, however, it seems that every thing has flipped. Almost as if I was looking at the game from the back. Even the writing is reversed. when deploying the game to android devices this does not happen. Does anyone have an idea how to solve this?
Thanks in advance
There is a ReflectionMode which flips the view horizonally. This is used when using a front facing camera.
If you look at the 'Vuforia Core Samples Example' from the asset store, they have a CameraManager script that shows how to handle camera configuration.

How to create our own marker for Augmented Reality in iOS technology?

I am new in AR technology, I have researched and come to know that AR works upon marker detection technology.
I found some sample code with vuforia, string, ARKit, etc.
But how they are detecting for particular marker that I am not able to fetch yet.
So my main questions are:
How to create our own marker (for iOS) (Sample code/link would be helpful)?
How to detect that particular marker using the camera to place our AR object?
Let me know if you require any more details.
Any help/information would be welcomed.
Did you see this one?
Augmented reality on the iPhone using NyARToolkit
Also I found some sample code here:
https://github.com/kamend/iPhone-Stuff