Questions tagged [camera2]

142 questions
1
vote
1 answer

Show camera2 preview in wallpaperservice

I need to show camera preview in live wallpaper. I've already made for android < M versions. But can't understand how it working with new API. Oldest Camera is deprecated now In google example they put it in xml and in TextureView but how I can…
Joao
  • 374
  • 3
  • 16
1
vote
1 answer

Camera2 Scalar Crop Region and Sensor Image Size

I'm writing an app for a Galaxy S7 which displays a real time Camera2 preview in which I want to control the zoom level using: captureRequestBuilder.set(CaptureRequest.SCALER_CROP_REGION, zoomCropPreview); …
DHHJ
  • 103
  • 1
  • 12
1
vote
1 answer

CameraCaptureSession abortCapture very bad performance

To update the camera capture session with a new state (focus, exposuretime) it seems i have to call abortCaptures on my current session. Calling this takes about 0.3 seconds though. The viewport also freezes during this time. It seems this other…
RuteNL
  • 197
  • 14
1
vote
3 answers

Android Camera2 how to set ISO sensitivity value after AE_MODE set AE_MODE_OFF automatically

I'm using Camera2 API to modify Camera shutter speed. So I have to set CONTROL_AE_MODE to AE_MODE_OFF. Then auto-exposure algorithm will not override SENSOR_SENSITIVITY value. But after shutter speed changed, sensitivity value become not…
yujinyang
  • 11
  • 1
  • 5
1
vote
2 answers

Problems with camera2 on the Galaxy S5

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?
cproeller
  • 107
  • 1
  • 12
1
vote
0 answers

Android Camera2, disable auto focus

My app uses Camera2 API to take frames as fast as possible. We have a start / stop button to start / stop capturing frames. Focus is either set to auto, or done before capturing. If the focus is done before capturing, then during the capture it must…
Tim Autin
  • 6,043
  • 5
  • 46
  • 76
1
vote
1 answer

Camera 2, increase FPS

I'm using Camera 2 API to save JPEG images on disk. I currently have 3-4 fps on my Nexus 5X, I'd like to improve it to 20-30. Is it possible? Changing the image format to YUV I manage to generate 30 fps. Is it possible to save them at this…
Tim Autin
  • 6,043
  • 5
  • 46
  • 76
1
vote
0 answers

Android set camera2 focus only once on beginning of timelapse

I want to make simple app that is making captures for timelapse. Finally I have made it. But I am wondering whether it is possible to lock focus only once, on first photo? And later use that saved value about focus (if possible)? Generally it is a…
kamilf
  • 157
  • 1
  • 3
  • 15
1
vote
1 answer

Draw autofocus rectangle in preview using camera2 android

I am using Camera2 api of Android. I am able to capture image and save it. I am using autofocus mode to focus and capture images. captureBuilder.set(CaptureRequest.CONTROL_AF_MODE, CaptureRequest.CONTROL_AF_MODE_CONTINUOUS_PICTURE); where…
Kamalpreet Grewal
  • 822
  • 1
  • 13
  • 28
1
vote
2 answers

CaptureResult passed to DngSaver in ImageSaver is null camera2 api

In my quest to build a camera app using camera2api I have a small issue while trying to save a raw image. I assign the capture result to a member in the following bit of code. @Override public void onCaptureCompleted(CameraCaptureSession session,…
InquisitiveCoder
  • 171
  • 1
  • 11
1
vote
0 answers

Setting shutter-speed fails for ImageReaders surface (android camera2 api)

I am using camera2 api in my android app and want to manually control shutter-speed. This is how I set shutter-speed: protected void setShutterSpeed(long exposureTime) { if (null == cameraDevice) { Log.e(TAG, "updatePreview error,…
Vitalii Smal
  • 31
  • 1
  • 4
1
vote
2 answers

Convert YUV_420_888 to byte array

I am testing out the new Camera2 API, and I'm able to capture the camera preview in YUV_420_888 format. What I need to do next is to feed this data to a image processing library, which accepts a byte[] parameter. I've found examples of converting…
tropicalfish
  • 1,230
  • 1
  • 16
  • 29
1
vote
2 answers

Android Camera2 Burst and ImageReader

I am trying to get multiple pictures with different exposure time to perform my HDR algorithm. However, I cannot figure out how to use captureBurst() in Android camera2 API and ImageReader to save files. My code will create duplicated files. Can…
Roderick
  • 9
  • 3
1
vote
2 answers

Get bitmap without transformations from TextureView

I am currently developing an application which use Camera2. I display the preview on a TextureView which is scaled and translated (I only need to display a part of the image). My problem is that I need to analyze the entire image. What I have in my…
NiCLO
  • 11
  • 1
  • 3
1
vote
1 answer

Should onCaptureCompleted method be called continuously?

my camera(camera2 api) eats so much from battery and device is being hot after 5 minutes running. During trying to find out where is the problem, i saw that onCaptureCompleted method of CameraCaptureSession.CaptureCallback is being called…
user0770
  • 797
  • 3
  • 11
  • 22