Questions tagged [camera2]

142 questions
0
votes
2 answers

Android Camera2 ImageReader Image Format YUV

I've got an Android application which does motion detection and video recording. It supports both the Camera and Camera2 APIs in order to provide backwards compatibility. I'm using an ImageReader with the Camera2 API in order to do motion…
Chris B
  • 401
  • 6
  • 10
0
votes
1 answer

Android CameraAccessException with older Apis generating lint error

I'm trying to create an Android app which supports both Camera and Camera2, and I have done that by using if statements which check the API level for appropriate sections of code. However, I'm having trouble coping with the CameraAccessException in…
Chris B
  • 401
  • 6
  • 10
0
votes
2 answers

ImageView not fitting sides of screen

Well my app should let me take a picture of my face and display it until i delete it where I can take another one. What is happening when I first open the app is that the pink side lines of the layout backround shows but when I take a picture the…
alex czernenk
  • 193
  • 1
  • 8
0
votes
1 answer

Screenshot and camera preview not working at same time

This picture on the left shows the app before any buttons are clicked. I have used the camera2 google github example to make the backround a camera preview. The picture on the right is when I have clicked the takePicture button. The picture isnt…
alex czernenk
  • 193
  • 1
  • 8
0
votes
1 answer

Switch front and back camera2 in android

I am creating a camera in android using android.hardware.camera2... I referred to this link But, I do not know how to switch front camera and back camera. Please give a advice!
Kanguru
  • 51
  • 4
0
votes
0 answers

Issue with Nexus 6P : configure 60 fps preview session using camera 2 api

I try to implement high speed capture session by click on button. Here is my state callback: private CameraDevice.StateCallback mCameraDeviceStateCallback = new CameraDevice.StateCallback() { @Override public void onOpened(CameraDevice…
Chickin Nick
  • 517
  • 1
  • 6
  • 21
0
votes
2 answers

Xamarin Android Camera2-Preview by OpenGL Texture

I'm trying to get the camera stream of the "new camera framework" Camera2 into a OpenGL Texture but image stays black. I'm working with Xamarin (but Java should be very similar) and I'm using the NDK for native rendering.. So I got a GLSurfaceView…
Kai Rohmer
  • 147
  • 1
  • 11
0
votes
1 answer

camera2 preview with SurfaceTexture works perfectly in SDK v21, but stays black in v23

I test SDK v21 on a Samsung Galaxy A3 (2014), v23 on a Nexus 5X. I tested the Camera2Basic example, too, and it works on both devices. I wonder how my little code restructuring (I use an Activity instead of a Fragment) causes this error on only one…
Andi
  • 457
  • 3
  • 19
0
votes
1 answer

Camera2 imageReader change before taking picture

i am initializing imageReader when setting up the camera: mImageReader = ImageReader.newInstance(largest.getWidth(), largest.getHeight(), ImageFormat.JPEG, 2); mImageReader.setOnImageAvailableListener(mOnImageAvailableListener, mHandler); Is there…
user0770
  • 797
  • 3
  • 11
  • 22
0
votes
1 answer

how to use android camera's flash in Android Studio

I am working on a kind of torch application in android Studio environment. I want to use a pulse waves modulated(PWM) to make the flash light be adapted to the ambient light. I made lot of research about that, but i didn't find any tutorial about…
0
votes
1 answer

how to get RGB values from byte[] array in android camera2 when ImageFormat is JPEG?

I'm using camera2 API I'm interested in getting RGB value from byte array actually average of RGB values can I get it from this part when byte array is collected from ByteBuffer and gets written in file with FileOutputStream.write(bytes) Here is my…
0
votes
1 answer

What are all the automatic parameters of android's camera2 API

I'm developing a camera app using the Android camera2 API, And I need the camera to have always the same configuration, like focus, white balance, exposure, etc. I already disabled AF, AE and AWB, but it still seems to automatically set the white…
0
votes
1 answer

Android Camera2 gives up on AF lock

I'm testing my Camera2 implementation on Nexus 5 with 6.0.1. The problem seems to be related to switching flash modes. Quite unpredictably, changing the flash and taking a picture results in AF not locking and the following appearing in logs: 01-13…
vkislicins
  • 3,331
  • 3
  • 32
  • 62
0
votes
1 answer

Android SurfaceView or Camera2 API for camera preview

I am trying to implement the camera preview function into my app. After a lot of research I found that the best solution is the Camera2 API, but, it isn't supported on most phones. Is there a better solution to do this? For example, I read a lot…
drew
  • 319
  • 1
  • 2
  • 12
0
votes
1 answer

snapshotting a camera2 preview screen

I want to snapshot a preview screen using the camera2 API. I guess there are two spots where I can do this in my code at the surfacetexturelistner where it updates the textureview (this is where the preview renders to) or at the…
1 2 3
9
10