How To use Camera Index 3 in EasyAR4

0 votes
asked Jan 17, 2020 by moahti (120 points)
In EasyAR2 for Unity using Windows, it was possible to use 'Camera Device Index 3' ( in CameraDeviceBehaviour) for using an external USB device Camera (E.G. a Basler camera) which is not listed as an 'Imaging devices' in the Device Manager.

Using Index > 1 AR3 and AR4 just result in a error.

1 Answer

0 votes
answered Jan 20, 2020 by kenn (18,750 points)
Did you try Camera_VideoCamera sample to loop all cameras?
commented Jan 20, 2020 by moahti (120 points)
Yes tried that, but the system says, that I only got on camera, and therefore I can only select ‘Camera index’ = 0

If I force the ‘openWithIndex’ function in the csapi.cs to use index=1, an error occur. (Only indexes allowed is 0 and 1. In EasyAr ver 2, higher index values was allowed.)
If I use the function ‘WebCamTexture.devices’, I got the same list as in EasyAr ver 2. (Several cameras)
commented Jan 20, 2020 by kenn (18,750 points)
Device support is never a concise problem on desktops. We use different Windows frameworks (MSMF) for camera support starting from V3. So it is possible that supported devices are different.
At same time, we offered a fully customizable Custom Camera feature which you can use to extend device support.
commented Jan 20, 2020 by moahti (120 points)
The EasyAR CustomCameraSupport, is supports Android and IPhonePlayer, and not supported under WindowsEditor!

Or are you thinking of something else?
commented Jan 20, 2020 by kenn (18,750 points)
Let me clarify something.
In Unity projects,
EasyAR Sense is the dll and so files you can find under the Plugins folder.
EasyAR Sense Unity Plugin is files you can find under the EasyAR folder.
And Samples (in other words, examples, code and resources for you to reference and shows some but not all API usages) are files you can find under the Samples folder.

As of Custom Camera Feature,
It is a feature of EasyAR Sense, in all platforms (Win/Mac/Android/iOS) and all language bindings (C++, C#, Java, Obj-C,...).
There is also some wrapper in EasyAR Sense Unity Plugin.
We only provide samples for Android and iOS, for now, but it can already explain how can the API be used. We may add more samples later.

So what I was talking about is that the feature is available, you can use the API to extend the camera support. If and how to do that depends on you. I am not talking about a feature that just opens all cameras in a magic way. It do need a lot of work, and even understanding the system API calling in some cases. And I know it cannot be an easy work for all developers, so I was just talking about an option.
Welcome to EasyAR SDK Q&A, where you can ask questions and receive answers from other members of the community.