Problems with camera2 on the Galaxy S5 - android

I'm trying to analyse cameraimages while filming.
This is running on most of the devices.
I'm using the camera2 API.
But the preview freezes if I start recording on my galaxy S5.
Does anybody know how to avoid this on galaxy devices?

Probably the only way you can avoid this, is to switch to the camera API. Samsung Devices haven't implemented the new camera2 API until now. I also tried to make a Augmented Reality APP with the camera2 API and tested with my Samsung Device, but unfortunately, the most features and configurations of the camera2 API are not supported on Samsung Galaxy S5.
So: Either you use another Hardware for your Applikation, or you go back to camera(1)API

You are right , me too faced this issue once but i found solution for this
Samsung camera (galaxy series) use only if you need to implement Camera 2 API or else you can use older Camera API for wide support.

Related

Android camera2 Samsung Galaxy S6 autofocus CONTROL_AF_MODE_CONTINUOUS_PICTURE not working as well as stock camera app

We are using the camera2 API and setting the preview auto-focus via previewCaptureRequestBuilder.set(CaptureRequest.CONTROL_AF_MODE, CaptureRequest.CONTROL_AF_MODE_CONTINUOUS_PICTURE ); The phone we are using is a Samsung Galaxy S6 which has an excellent camera. The issue does not happen with an LG G4.
This mostly works. However, specially in poor lighting conditions and with text, it does not work as well as the stock camera app. The stock camera app always auto-focuses perfectly, but our app only auto-focuses well when there is good lighting and also better with textured surfaces such as wood than paper with text.
This video (from someone else a few years ago) demonstrates a similar outcome as with our app: https://www.youtube.com/watch?v=lnMoYZwVaFM

What are the hardware configurations required for opening front and back cameras simultaneously?

I managed to preview back & front cameras simultaneously, using Camera2 API (multiple-camera-streams-simultaneously)
It works pretty well on OnePlus 8 (pro) device BUT didn't work on others such as Samsung Galaxy A32 and OnePlus 7 (pro);
got the error: ERROR_MAX_CAMERAS_IN_USE, while trying to open the second camera.
How can I know which devices can support it ?
I understand there is HW criteria for that, but what is it ?
Thanks
Starting API 30, new methods are added to know availability as well stream configuration for concurrent cameraID that you can use.
https://source.android.com/devices/camera/concurrent-streaming

Android Camera 2 API problems with flash on Nougat 7.1

Following the Camera 2 sample I've created simple camera class to capture the images. When it's okay with capturing both flash/non-flash images on any device with Android < 7.0, on mine Nexus 5X with Android 7.1 the same config fire the flash only once on the preview. Pre-sequences are the next:
for the preview I'm using CameraDevice.TEMPLATE_PREVIEW with AE mode set to CameraMetadata.CONTROL_AE_MODE_ON_ALWAYS_FLASH
the same I use for the capture still picture, but with CameraDevice.TEMPLATE_STILL_CAPTURE
If someone can help me with this case - I'll be really appreciated.
This is just additional information on the above issue. I wish to draw some attention to this problem!
My application takes a photo every 5 seconds. I (1) select the camera, (2) acquirer a session and then with each loop I (3) create a Capture request in which I set the Flash Mode and call the capture method on the session.
I have no issues with my Samsung SM-G550T (Android version 6.01), but I was having some issues with the Flash Mode on my Moto G4 (Android version 7.0). I got both phones to Flash, but only with this setting:
CaptureRequest.Builder requestBuilder = mCameraDevice.createCaptureRequest(CameraDevice.TEMPLATE_STILL_CAPTURE);
requestBuilder.set(CaptureRequest.FLASH_MODE, CaptureRequest.FLASH_MODE_SINGLE);
I am presently having an issue with a LG device (M210N) (Android version 7.0). Using the settings I stated above I get the device to flash just once. If I completely re-initialize the camera (as described above) the device will flash again only once.
If I add the CONTROL_AE_MODE_ON_ALWAYS_FLASH setting to the above requestBuilder, then the LG does not flash at all. So I had to remove that flag.
I have tried many different additional settings and combination for settings and none of them have eliminated this issue. I wonder how many devices are affected by this issue.

Android Camera API glossy effect on Galaxy S7

Pictured above on the left is how it should look (captured using a Galaxy S6), but on the right (captured using a Galaxy S7) is what I'm getting if I use the Camera2 API on an S7. I'm doing computer vision stuff using OpenCV so this glossy effect is breaking it.
It seems the Camera2 API (the stock Samsung camera app is fine) is producing some sort of undesired glossy effect when used on the Galaxy S7. I've tried the plain Android Camera2 API and the Samsung Galaxy Camera SDK 1.1 (found on http://developer.samsung.com/galaxy#camera).
This doesn't happen if I'm using the deprecated Camera1 API, so it seems the issue is with the S7's HALv3. This also never happens on the Galaxy S6 and other devices (both Samsung and non-Samsung).
If you try any 3rd-party camera app on the Play Store that uses Camera2, you should be able to replicate this effect. Not sure if SO is the best place to post this, but Samsung doesn't seem to be active in their own developer forums.
This is controlled by various CaptureRequest settings. S7 has perhaps different default settings for Camera2 API, that's why it is different from the S6, but you should be able to get similar results just by experimenting with various settings.
You should get rid of the "glow" by disabling EDGE_MODE like this: requestBuilder.set(CaptureRequest.EDGE_MODE, CaptureRequest.EDGE_MODE_OFF);
See for more settings and description: https://developer.android.com/reference/android/hardware/camera2/CaptureRequest.html#EDGE_MODE

Is the Camera class supported across all Android Devices?

I am working on an app and using the Camera class that comes with the Android SDK. The class seems to work on my Galaxy Ace, but I've read that it doesn't work on all Android devices. Here's the function I call:
Camera camera;
camera.takePicture(shutterCallback, rawPictureCallback, jpegPictureCallback);
Sometimes OEM's customize default behavior and takePicture was introduced in API level 5. I'm also using this in one of my application and till now I haven't seen a device not supporting this.
Can you be more specific on which device it's not working?

Categories

Resources