Questions tagged [camera2]
142 questions
0
votes
1 answer
Reading Input-frames from PreviewHighSpeedCamera callback method onCaptureCompleted() using Camera2
Reading Input-frames from PreviewHighSpeedCamera callback method onCaptureCompleted() using Camera2
We are trying to set camera preview for more than 120fps i.e PreviewSessionHighSpeed using Camera2 API, below is the code snippet
private void…

user1278407
- 19
- 3
0
votes
2 answers
Android Camera2 Flash Timing Issues
I'm working on an Android camera app that needs to use a fixed (manual) focus, and always uses the flash. I'm having some issues that seem to be with the flash timing. The flash always fires and an image is always acquired, but sometimes the flash…

jranalli
- 718
- 1
- 6
- 14
0
votes
1 answer
How to get preview frames to do live video share using camera2 api
I am trying to do live video sharing using camera 2 API in Android.
I have two devices for doing this activity. I can see the preview in SurfaceView what I am seeing, is the preview using setRepeatingRequest API on the first device. But now I want…

Viji
- 1
0
votes
0 answers
CONTROL_AF_REGIONS of Camera2 is disabled due to the LEGACY level
With AF_MODE set to auto, I first use CONTROL_AF_TRIGGER_CANCEL and capture,
then I set up the AF_REGION to 2486 , 657 : 163 x 122 weight 1000.
After that, I use CONTROL_AF_TRIGGER_START and capture again.
But it always focuses on the center of the…

Shyyy
- 1
0
votes
1 answer
Android Image to Bitmap for use in Google Vision Barcode api
I need to convert android.media.Image to a BitMap so that I can use it in the Google Vision Barcode API. I've tried the following...
byte[] imageData = new byte[image.getPlanes()[0].getBuffer().remaining()];
Bitmap bmp =…

aaa
- 363
- 4
- 15
0
votes
1 answer
Only one APK with Camera2 and old camera API
I have an app that uses camera2 API and also the old camera version. The problem is that I need to generate a single APK with minSdkVersion 16 and camera2 does not compile together, for obvious reasons.
I gave a quick fix to the problem by making an…

Mateus
- 389
- 3
- 20
0
votes
2 answers
Camera2 api set parameter in HAL3
I am a Android newbie in Camera. I have a question about how to set the vendor tag parameter to hal3 using camera2 api, because in the past, I used camera API 1 (HAL1) to set the parameter to HAL.
Is there any way to use Camera2 API to set custom…

twobrother
- 1
- 1
- 3
0
votes
1 answer
Capturing Video in Background using Android Camera2 API
I'd like to modify the code of the Camera2Video-Example.
When I leave the application by pressing the Home-Button, it should continue capturing video in Background until I return to the Application and stop the service manually.
Any ideas how to…

user2302113
- 41
- 1
- 5
0
votes
1 answer
Nexus 5x Frames from preview are turned Camera2
I try to do some ImageProcessing on the current frame of the Preview in Android.
In case of every other smartphone, it works pretty good. But now, I have to make the app accessible for the Nexus 5x.
There I get a 180 degree turned Image from the…

Marcel T
- 659
- 1
- 7
- 28
0
votes
2 answers
android camera2 preview not working with surface view
I have been using TextureView for my camera preview until I cannot find a way to set its background color so I switched to SurfaceView but the preview is not working anymore. Everything else is working fine, except for the preview.
Here is my code…

Handsum
- 15
- 1
- 7
0
votes
1 answer
Android - I am using camera in a Texture View. I wish to add some kind of img or text on top of the live camera
I am using camera2 in a Texture View. I wish to add some kind of image or text on top of the live camera. for eg. the way snapchat adds the time or speed on top of the live View.
when i click a picture i want to capture the live camera image as…

jamian
- 1,544
- 2
- 16
- 25
0
votes
1 answer
How to get fullscreen textureview using camera2?
I am trying to get a full screen preview of the camera. I read through the documentation of camera2 which says Each Surface has to be pre-configured with an appropriate size and format (if applicable) to match the sizes and formats available from…

ShrimpCrackers
- 4,388
- 17
- 50
- 76
0
votes
1 answer
android camera2 api MediaRecorder stop() error
I am very new in android and I am trying to create a simple video recorder app using android camera2 api. By following a tutorial on youtube I managed to preview the camera in a TextureView and start capturing with MediaRecorder, but I am having…

Handsum
- 15
- 1
- 7
0
votes
0 answers
Interesting behavior of Android camera
I am not sure how to exactly express this. But you must have noticed that the android camera automatically adjusts the 'look' of the camera preview based on the object it is being pointed at. Like for example, if you point the camera directly at a…

prithul
- 347
- 3
- 10
0
votes
1 answer
Camera2's openCamera() throws SecurityException
Upon using Camera2 class, I hit the following exception when calling openCamera() method:
W/System.err: java.lang.SecurityException
W/System.err: at android.os.BinderProxy.transactNative(Native Method)
W/System.err: at…

RyanB
- 1,287
- 1
- 9
- 28