Questions tagged [camera2]
142 questions
2
votes
1 answer
Android camera2 delay between the video to the sound
I am trying to record video from android camera2 sample
All works fine but when I play the video after recording (from the sd card), the video starts freezing and you can hear just the audio at the background and when the audio stops, the video…

Eli Elezra
- 525
- 2
- 4
- 18
2
votes
1 answer
I can't detect face with camera2
I can't find information about face detection on preview in android.hardware.Camera2, would anybody help me with a complete example?
I saw some questions with camera2 examples in github but I can't understand them.
I used Camera2 sample from Google:…

Carlos Alfonso
- 21
- 4
2
votes
1 answer
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…

Franz
- 169
- 11
2
votes
2 answers
Android camera2 surface with size 1920x1080 is not valid
I've implemented camera2 in my app and it is working on Nexus 6P and Nexus 5. Now I'm trying to test it on other devices, and the first one I tried on failed straight away. This is the error I get on HTC M7 running Lollipop:
Surface with size…

vkislicins
- 3,331
- 3
- 32
- 62
2
votes
0 answers
Android - Camera2 - Turn off pre flash
I am trying to build an app that take picture with red eye. I am using Camera2 capture request as CONTROL_AE_MODE_ON_ALWAYS_FLASH. I noticed that while taking picture, pre flash seems happening in the camera and it reduce the red eye in the picture.…

user441918
- 165
- 10
2
votes
0 answers
Images get interlaced when using camera2 API
I'm trying to create an app using the camera2 api, what I need is to create a burst of 30 fps which I was able to create.
The problems is both the preview images and the saved images interlaced (I'm photographing some blinking leds so its easy to…

Eladit
- 168
- 1
- 2
- 9
2
votes
2 answers
camera2 face detection call back
I'm trying to use the face detector in the camera2 api. I set the preview builder to use the face detector:
previewBuilder.set(CaptureRequest.STATISTICS_FACE_DETECT_MODE,
…

Jonathan Vukadinovic
- 264
- 5
- 18
2
votes
0 answers
How can I detect face properly using Camera2 in Android?
I'm currently using android.hardware.camera2 module to detect a face.
I revise my own code withe the reference
https://github.com/googlesamples/android-Camera2Basic
and
Android camera2 face recognition
However, I had the same problem as the link…

Sinfonietta
- 21
- 1
- 5
2
votes
0 answers
Android Camera2 Flash and manual control
I tried to build a Camera2 Application for Manual Capture Control. The manual settings do not work, when Flash is enabled (TORCH).
I tested it on the Google Camera2Basic Sample and added these lines:
…

Budel
- 33
- 5
1
vote
1 answer
Camera2 PNG capture
I am working on a camera application using the Camera2 API. I am able to capture a RAW (.dng file) and jpg. I saw that it is possible to take a PNG photo on the Camera FV-5 Application and I would like to do the same. I am able to get the ByteBuffer…

Minjae Kim
- 25
- 6
1
vote
1 answer
Placing Camera2 into a fragment
I wish to use the camera2 package to include a camera within my app. The problem arises when I have to fit it into a fragment. I have three fragments within a viewpager that can be swiped through. I want the last fragment to be a camera app that is…

Ahzam Ahmad
- 35
- 7
1
vote
1 answer
Finding eye position on camera using camera2 api android
Below are my code snippet to get faces on camera using camera2 api. In that I am able to get eye position only for few devices. Rest of them returning NULL values. Is there a way to find eye position in camera using camera2 api?
Integer mode =…

Madhan S
- 11
- 2
1
vote
2 answers
Who rotates the frame from a camera when rendering in a SurfaceTexture?
UPDATE : question is about Camera2
I'm trying to figure out who applies the rotation transform when a camera preview is drawn on a SurfaceTexture.
When requesting the preview sizes from the camera you always get pairs where the width is larger than…

Stelian Morariu
- 505
- 7
- 16
1
vote
1 answer
Android Camera2 preview is stretching
I'm using Camera2 but the preview is stretching. Please help me.I have uploaded images please check. I'm new to android.
From Camera Image
From Camera Code I'm using

user1624508
- 49
- 1
- 4
1
vote
1 answer
Camera2 api problems firing flash/no flash images
I will explain my case.
I'm trying to do an application in which every 5 seconds will take an image, one without flash, and then after 5 seconds one with flash, and repeat this every time. So it will take one without flash, one with flash, one…

Ivan
- 782
- 11
- 23