is that possible to open and preview back-facing and front-facing camera at same time? - android-camera

I'm using HTC sensation for testing.
the version of Android is 2.3.4.
and there are two cameras on this device.
I could open camera separated (do preview NOT at same time).
BUT, once, if I try to open camera at same time.
I'll got a RuntimeException - Fail to connect to camera service for front-facing camera.
does anyone have idea ??

According to Android Camera Api,
Your application should only have one Camera object active at a time
for a particular hardware camera.
So I guess it should not be possible.

Related

Vuforia Ground Plane Detection doesn't work when using webcam (IP webcam using Iriun Webcam in android phone)

Thought of using Vuforia as it allows testing using a webcam. So, i downloaded Iriun Webcam (IP Webcam for android), and succesfully got the video stream inside the Unity Editor when i press "Play".
I created a minimal AR example, where my app would detect a plane and a tap would place an object.
My issue is that when I Build the apk and test it on my phone it works perfectly as it should, but when i do it using the play button inside the editor, the video stream is captured, but it won't do any AR stuff (like plane detection as it was supposed to do)
Please help me with any possible reason there could be, as I couldn't find any such issues faced by anyone else
I created a minimal AR example, where my app would detect a plane and a tap would place an object.
My issue is that when I Build the apk and test it on my phone it works perfectly as it should, but when i do it using the play button inside the editor, the video stream is captured, but it won't do any AR stuff (like plane detection as it was supposed to do)
As mentioned here https://library.vuforia.com/unity-extension/vuforia-play-mode-unity Ground Plane is not supported when using a webcam in Unity Play Mode. Ground plane relies on a robust device tracker and this is not available when using a webcam. However, to help development, it is possible to record a sequence on a device and then using this in play mode https://library.vuforia.com/platform-support/recording-and-playback. The other option is to emulate the Ground Plane behavior using an Image Target as discussed here https://library.vuforia.com/ground-plane/introduction-ground-plane-unity.

Why is not Unity recognizing my digital camera?

I have mixed around with Unity and Vuforia. Im all set and got it to work with an image that spawns 3D objects. My project has been done with my FaceTime Camera on my Macbook pro 2018. Now i want to try and move over to my Digital Camera: Sony AX6300. But when i connect the camera, Unity wont recognize it. I can still only choose FaceTime Cam built in on my Mac. Can anyone in here help out maybe?
Image
You have to edit the xml file named webcamprofiles.xml inside vuforiaresource, and add or edit your device camera name...
it works for me

Recording vr motion video

I want to record a vr motion video of my house using aframe so that I can show the demo view of the the house.What are the js files need to be included?How can I do it?
I assume you just want to record 360º video — if so, a 360º camera is the place to start. See: http://thewirecutter.com/reviews/best-360-degree-camera/
You may want to test things out on your device (Gear VR, Cardboard, Vive, whatever) before investing in a camera. Video playback in A-Frame may have some issues on mobile devices particularly.
Example: https://aframe.io/examples/showcase/videosphere/
hi kumar yes you use without using 360 camera by using normal mobile phone but to place that video you have to use latest version of unity that support not only 360 video format but also plane so where you can put that video as an medium.
or if you are using unity 4.6 to unity 5.3 then use have to use some packages like easy video texture in this package you have different options for placing video
https://github.com/maazirfan/Easy-Movie-Texture-for-Unity
and use where ever you want vr/gear vr / htc vive .

how to use the cardboard sdk for pc vr game?

so I want to create a vr game using unity3d and cardboard sdk for PC(windows), which I'll stream to my phone screen using kinoConsol. I created a simple scene when I build it for android,it works fine , I mean it shows the dual sbs camera(screen), but a windows build shows only one normal camera(screen).. is there a way I can use the cardboard sdk to show the sbs camera(screen) in a windows build ?? if not is there any thing else available to achieve this ?
Side by side is easy, just place two cameras where the eyes should be and change their viewport rect to half width. Now you have a side by side stereo renderer without any external library. Cardboard also adds some distortion to the lenses, but it is not that important to use it in your case.
Your second, and much bigger problem is the gyroscope - you have to somehow communicate the position of your headset to your unity app on your pc. This is not trivial and probably will require finding or building an persistent service on your android device that will send the orientation data to your desktop app.

Detecting when device in cardboard headset in Unity

I'm building a Unity Cardboard app, and would like to detect when the device is in the headset. The NFC in theory has this data, but it does not seem to be exposed in the API. I would like to have the app automatically enter VR mode when in the headset, without the user needing to toggle in and out of a VR mode.
Basically, I want Cardboard.vrModeEnabled to be automatically updated when you enter or exit a headset.
Is this possible? Thanks!
It used to be in the (non-Unity) SDK but was deprecated, for several reasons. For one, the NFC sensors on phones are placed in different places, so the detection was not uniformly reliable. For another, using the sensor this way drains battery quickly.
There are a lot of cardboard models on the market. a lot of them don't come with an NFC tag. so i wouldn't count on it.
Best approach for me is to start in VR mode, when the user touches the screen, disable VR mode for 10 seconds since the last touch and then go back to VR mode.