Questions tagged [android-camera2]

The android.hardware.camera2 package provides an interface to fully control many apsects of camera device, e.g. CameraDevice, CaptureRequest-CaptureResult flow, Surfaces, ProcessingImages, setting camera parameters, setting request parameters and so on. It replaces the deprecated Camera class.

From Android Documentation

This package models a camera device as a pipeline, which takes in input requests for capturing a single frame, captures the single image per the request, and then outputs one capture result metadata packet, plus a set of output image buffers for the request. The requests are processed in-order, and multiple requests can be in flight at once. Since the camera device is a pipeline with multiple stages, having multiple requests in flight is required to maintain full framerate on most Android devices. To enumerate, query, and open available camera devices, obtain a CameraManager instance.

Individual CameraDevices provide a set of static property information that describes the hardware device and the available settings and output parameters for the device. This information is provided through the CameraCharacteristics object, and is available through getCameraCharacteristics(String).

1641 questions
0
votes
1 answer

Android Camera2 JNI Image Processing - Surface not being unlocked from JNI?

I've followed the Camera2Video example and also implemented some JNI code to do some image processing on the Surface belonging to the SurfaceTexture for the preview on the screen. This works fine but when I hit the record button it fails to record…
jimbo
  • 416
  • 1
  • 4
  • 14
0
votes
1 answer

How to flip pictures/video with Camera2 API

My camera sensor is looking through a prism, so I am trying to mirror pictures and video that are captured with the Android Camera2 API. I am able to flip and manipulate the TextureView which fixes the live view, but that doesn't affect the captured…
user1749865
  • 113
  • 8
0
votes
1 answer

Image Capturing in Camera2 Api after zooming

trying to use camera2 api, needs a functionality in which user can tap/untap to zoom in & zoom out. Used this code for zooming CameraManager manager = (CameraManager) activity.getSystemService(Context.CAMERA_SERVICE); …
Mohsin
  • 1,586
  • 1
  • 22
  • 44
0
votes
1 answer

Android streaming video to server

I'm new to android, and having trouble finding information about how to send live video using camera2 to a server for image processing. I've been searching google for a few hours, but all I can find is information about watching a live stream from…
goofenhour
  • 159
  • 1
  • 2
  • 13
0
votes
0 answers

Is it possible to control flash intensity and flash frequency with Android Camera2?

I have an application where I am trying to impart the maximum possible light energy into a subject from an Android smartphone's flash. In lab measurements with several phones we have observed that the light output of the flash while taking an auto…
0
votes
1 answer

mediaRecoder.reset() while recording a video CAMERA2 API

Can we reset all the values that hold in mediaRecorder while recording video? I've tried just using mediaRecorder.reset() while recording video. But it won't work. I don't know is it possible or not. If it is possible please any references will…
user8646027
0
votes
1 answer

How can I load camera preview instead of a image

enter image description here I'm Making an android app. Well, this is a sample code for face detection provided by google. Instead of using a jpeg file, I want to use my camera preview . How should I change the code? It would be very thankful if you…
pykid
  • 1
  • 1
0
votes
0 answers

Record feed from camera2 device and send it over a network

I am developing an application which is supposed to capture the camera preview/video from camera2 api and send the ByteArray to another device connected over a network(preferrably wifi). But I couldn't get the proper preview similar to that of…
Kshitij
  • 392
  • 2
  • 13
0
votes
1 answer

How to set the orientation of camera in Android for the image to be taken

I am using Camera2Api I am able to capture front camera image with this but Image is 90degree oriented. How to set the params so I get a proper image private void openCamera() { CameraManager manager = (CameraManager)…
Devrath
  • 42,072
  • 54
  • 195
  • 297
0
votes
0 answers

Android: how to Zoom using camera2 API

I am new to android development and i am creating app that deals with camera but i am having problem with the zoom in function. I am using camera2 code sample from google, i modified bit using solutions from here but still it is not working. public…
Lion King
  • 11
  • 1
  • 2
0
votes
1 answer

JNI YUV_420_888 to RGBA_8888 conversion

Currently I'm building an app to do real-time image processing and then display. The first step is to try displaying the original preview using Camera2 API and ANativeWindow API. I pass the y, u, v channels through JNI separately and do YUV2RGB…
fytao
  • 181
  • 3
  • 14
0
votes
0 answers

Using Camera 2 SurfaceView, how can I achieve a blur preview as below

How can I achieve below view to capture picture
Shashwat
  • 525
  • 4
  • 8
0
votes
1 answer

Android camera2: capture request keys don't include settings I can control from the default app

I'm using getAvailableCaptureRequestKeys() to know which settings I can modify. For instance, say I want to modify the ISO. First I get all the available keys: captureRequestKeys =…
Rodolfo Rocco
  • 71
  • 1
  • 8
0
votes
0 answers

How to crop the image from the TextureView

I want to crop the finger which is shows in the white region (i.e., a view). placed above the TextureView using framelayout. I've tried capturing the view and converting into bitmap but i doesn't help. Is there any solution available for this?…
0
votes
0 answers

How to display the camera in the app using the camera2 library?

I am trying to show the camera view on the screen. I struggle using the camera2 library correctly. Here is the code: This code prepares a display: @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); …
mercury0114
  • 1,341
  • 2
  • 15
  • 29
1 2 3
99
100