android-camera2

implement zoom in Camera2 api. [closed]

半城伤御伤魂 提交于 2019-12-24 21:17:30
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago . I am new to android and working on android camera2 api. I am unable to implement zoom in Camera2 api. I am making a magnifier app. Do I need to change the settings to Macro modeor Auto focus will do that for me? I want to implement zoom using ZoomContols. Please help. Thanks. I

Android camera2 compare image timestamp with CaptureResult SENSOR_TIMESTAMP

梦想的初衷 提交于 2019-12-24 12:22:49
问题 I am using camera2 api to capture images in a loop. When I capture a image, I get callback in onCaptureCompleted method and there I use TotalCaptureResult to get information about the image like iso, exposure and timestamp. Then I store these information in a map. After that I get the image in OnImageAvailableListener of ImageReader and I use image's getTimestamp method and ExifInterface to get exif data like iso and exposure. Surprisingly, the values of iso and exposure is different for the

Continuously take still photo with android Camera2

心已入冬 提交于 2019-12-24 09:30:00
问题 From Camera2Basic example, I modified the code to make the program continuously takes still photo every 2 seconds. It runs fine but after a while it enters the same statecallback condition and does not take picture anymore: case STATE_WAITING_PRECAPTURE: { // CONTROL_AE_STATE can be null on some devices Integer aeState = result.get(CaptureResult.CONTROL_AE_STATE); if (aeState == null || aeState == CaptureResult.CONTROL_AE_STATE_PRECAPTURE || aeState == CaptureRequest.CONTROL_AE_STATE_FLASH

CameraX chooses low resolution for given aspect ratio

半腔热情 提交于 2019-12-24 07:34:34
问题 I want to get the best quality for square aspect ratio and setup the next preview and capture configs for CameraX. val SQUARE_ASPECT_RATIO = Rational(1, 1) val previewConfig = PreviewConfig.Builder().apply { setTargetAspectRatio(SQUARE_ASPECT_RATIO) setTargetRotation(viewFinder.display.rotation) }.build() preview = Preview(previewConfig) val imageCaptureConfig = ImageCaptureConfig.Builder().apply { setCaptureMode(ImageCapture.CaptureMode.MAX_QUALITY) setTargetAspectRatio(SQUARE_ASPECT_RATIO)

Proper solution to pick/click an image on Android

半世苍凉 提交于 2019-12-24 06:45:59
问题 As the title suggests, i'm having an option to upload an image in my app. I would like to have two options: Click a new picture & Select from gallery. Gallery selection is working fine on all devices using this code: Intent in = new Intent(); in.setType("image/*"); in.setAction(Intent.ACTION_GET_CONTENT); startActivityForResult(Intent.createChooser(in, getString(R.string.selectpicture)), 100); The problem is with Click a new picture . I want to use other camera apps installed on the device to

Android Kudan - Extending ARActivity will stop working system camera torch (Flash light)

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-24 00:15:31
问题 I am working on kudan SDK for building 3D Model Augment Reality Object with Marker, all are perfectly works fine,but when i build Camera torch on same ARActivity will stop working flash light, even it will stop working system flash torch (On/off torch from system widgets) if in case i will extends Activity not ARActivity works perfectly fine. Throw Run-time Exception when extends ARActivity 02-08 10:15:32.631 7592-7592/techno.example.com.agumentation W/System.err: android.hardware.camera2

Cannot get camera list by android NDK(camera2 api)

荒凉一梦 提交于 2019-12-23 19:27:54
问题 Trying to build an app with Qt5.12.3 and android ndk, but cannot get camera list by "ACameraManager_getCameraIdList". Mobile : Sony xperia XA1 Ultra Qt: 5.12.3 NDK : r19c minimum target: 24 maximum target: 28 Android library link to : libcamera2ndk.so and libmediandk.so, I link to the libs of api 28, not 24(android-28\arch-arm\usr\lib) permissions: uses-permission android:name="android.permission.CAMERA"/ arch : armeabi-v7a jdk : jdk1.8.0_201 link of the adb logcat : put at google drive since

Android video mirror effect

女生的网名这么多〃 提交于 2019-12-23 15:16:58
问题 I'm working on a camera application that has to capture video in mirror effect. I used texture view to show video preview with mirror effect. Now video preview showing mirror effect but after video being captured and saved it don't have mirror effect. I used MediaRecorder to save video file. I Google this problem but didn't find any solution. I want to save video with mirror effect as shown in camera preview. thanks in advance. 回答1: I have solved this problem by flipping the video. when the

Camera2 api Imageformat.yuv_420_888 results on rotated image

不羁岁月 提交于 2019-12-23 12:36:21
问题 Lots of questions have been made about camera2 api and RAW image format, but searching online I have still not found the answer (that's why I am here btw). I am trying to do some real-time image processing on camera-captured frames using ImageReader and setRepeatingRequest with the front-facing camera. As suggested in some previous posts, I am acquiring the image in a RAW format (specifically Imageformat.yuv_420_888) in order to have a frame-rate around 30fps: imageReader = ImageReader

Low FPS with Camera2 API

人盡茶涼 提交于 2019-12-23 08:48:12
问题 I am experiencing a low FPS rate with the new camera2 api. Specifically, despite choosing the highest FPS range (30,30) from characteristics.get(CameraCharacteristics.CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES); and setting it with mPreviewRequestBuilder.set(CaptureRequest.CONTROL_AE_TARGET_FPS_RANGE, bestFPSRange); I get much lower average rates for high image resolutions on both devices I have tested (Samsung S5 and Xperia Z3 Compact). Here is how I set up the OnImageAvailableListener : int