moto z2 play camera2 wrong capabilities? - android

Okay, I just got a new Moto z2 play and decided to try and learn the Android Camera2 api using it... The phone is not rooted, and the stock camera app has the option to record slow motion videos and have manual focus during photos... But when I probe the CameraCharacteristics using the Camera2 api, it shows me a LEGACY hardware level device, with no support for high fps recording nor manual sensor control... I've read in the internet that build.prop can be edited so that the device reports the full supported capabilities... But to my understanding, if those capabilities were not supported by default, it wouldn't be possible for stock camera app to show them, right...? So, what's going on? Is there some caveat I'm missing?

The stock camera app likely has custom interfaces to use those features, built on top of the legacy camera HAL.
Unfortunately, the standard camera2 API cannot run on top of the legacy HAL besides in LEGACY mode, because there's no way to automatically hook into custom OEM additions to the legacy HAL.
So there's likely nothing you can do here to enable these features in your own app; Motorola would have to update their entire camera stack to expose a modern camera HAL for camera2 to work better.

Related

connecting USB UVC camera with CameraX

I'm trying to make an android app that preview a stream from an external USB camera.
I can see the camera using UsbManager but for some reason, the CameraX doesn't list it in the connected camera list.
Does anyone have an idea how to fix this?
Also, I've downloaded for my android device some random app that allows streaming from a USB camera and it worked so I don't think it is a problem that the camera isn't compatible to work with an android device or something like that.
afaik CameraX doesn't support UVC cameras yet/still and Android doesn't provide a driver... for Android system UVC camera is just "some USB" device (as you noticed - handled by UsbManager) and you need to provide a driver by self...
so you can use some other libraries for getting UVC video, probably currently best is AndroidUSBCamera by jiangdongguo

android API27 not detecting external usb camera ( LENS_FACING_EXTERNAL)

I am trying list number of cameras (Front, back, external) using API27 (8.1.0) (which they claim as supporting external USB camera.) But couldn't.
Looks like android api (camera2) doesn't support this, any idea?
Android camera API supports external camera but it still needs device manufacturers to implement this feature at kernerl/HAL level. My understanding is not too many devices today actually implements this feature.

android camera2 setTorchMode too slow

I am using Camera2 to turn on the Flash Light on my Android phone with the following :
camManager.setTorchMode(cameraId, true);
But the thing is it's really slow (like half a second to open), compared to the iOS flashlight. I can't find any instantaneous flashlight, is it a hardware issue..?
Thanks in advance!
It's a hardware issue.
If the underlying hardware directly supports a enable-torch call at the HAL (hardware abstraction layer) interface, turning the flash on and off is very fast.
But if it doesn't, the Android OS has to actually open a camera device and turn on the flash via the full camera API. And unfortunately, powering on and off the camera is not a quick (or power-efficient) operation.
The needed HAL interfaces for this were added in Android 6.0 along with the setTorchMode API, but since the backwards compatibility code exists in the OS, not all manufacturers have added the necessary HAL implementation for fast flash control.

Slow motion camera preview android

It seems that most Android devices, even if they support slow motion recording, do not expose these settings via the official API.
On newer Samsung phones you can enable a slow-motion preview via CameraParameter
parms.set("fast-fps-mode", 1);
parms.setPreviewFpsRange(60000, 60000);
How to support all other vendors?

Communicating Between Digital Camera and Android Tablet

I was wondering if there was a known camera that was compatible with android OS's. (such as the nexus 7).
I am trying to essentially control a high resolution digial camera from the android tablet so that it can control when to take a picture, and then retrieve the picture.
This would require a camera with a public API.
I have experience in android programming but not too much in communicating between two different devices. So i was wondering what I should look into in order to achieve this.
Here is a camera that runs Android: http://news.yahoo.com/samsung-takes-aim-japanese-rivals-android-camera-034717081--finance.html
And since it is Android I guess that the API is public.
And the same camera with more info: http://www.samsung.com/uk/consumer/mobile-devices/galaxy-camera/galaxy-camera/EK-GC100ZWABTU and it does run what look like standard android apps.
If you want to control that from another Android device, I think that would make a very interesting project.
The other possibility is the Nikon external control SDK, but I have no idea what language that is in. That was used to build the excellent Sofortbild app for Macs, which controls most Nikon DSLRs. https://sdk.nikonimaging.com/apply/
There are Android applications which can control a set of cameras with added features. The one I'm using gives me the ability to take very specific timelapse shots which would be too complicated or even impossible to get through the camera's own controls. You can find many other control apps on the play store.
Unfortunately this one is only for Canon EOS cameras : DSLR Controller

Categories

Resources