android-camera

Android Camera2 API - Set AE-regions not working

匆匆过客 提交于 2020-01-01 16:23:25
问题 In my Camera2 API project for Android, I want to set a region for my Exposure Calculation. Unfortunately it doesn't work. On the other side the Focus region works without any problems. Device: Samsung S7 / Nexus 5 1.) Initial values for CONTROL_AF_MODE & CONTROL_AE_MODE mPreviewRequestBuilder.set(CaptureRequest.CONTROL_AF_MODE, CaptureRequest.CONTROL_AF_MODE_AUTO); mPreviewRequestBuilder.set(CaptureRequest.CONTROL_AE_MODE, CaptureRequest.CONTROL_AE_MODE_ON); 2.) Create the MeteringRectangle

Android Camera2 API - Set AE-regions not working

笑着哭i 提交于 2020-01-01 16:23:07
问题 In my Camera2 API project for Android, I want to set a region for my Exposure Calculation. Unfortunately it doesn't work. On the other side the Focus region works without any problems. Device: Samsung S7 / Nexus 5 1.) Initial values for CONTROL_AF_MODE & CONTROL_AE_MODE mPreviewRequestBuilder.set(CaptureRequest.CONTROL_AF_MODE, CaptureRequest.CONTROL_AF_MODE_AUTO); mPreviewRequestBuilder.set(CaptureRequest.CONTROL_AE_MODE, CaptureRequest.CONTROL_AE_MODE_ON); 2.) Create the MeteringRectangle

Android full screen camera - while keeping the camera selected ratio

眉间皱痕 提交于 2020-01-01 11:38:08
问题 We are trying to build something similar to Instagram Camera screen. i.e allow the user taking square photos. While doing it out U.i must be able to let the user see the camera on fullScreen mode. We want to force the user to take an image in a portrait mode Getting camera possible ratio's We are calculating the best ratio available from camera by private Camera.Size getOptimalPreviewSize(List<Camera.Size> sizes, int w, int h) { final double ASPECT_TOLERANCE = 0.1; double targetRatio =

Android full screen camera - while keeping the camera selected ratio

白昼怎懂夜的黑 提交于 2020-01-01 11:37:07
问题 We are trying to build something similar to Instagram Camera screen. i.e allow the user taking square photos. While doing it out U.i must be able to let the user see the camera on fullScreen mode. We want to force the user to take an image in a portrait mode Getting camera possible ratio's We are calculating the best ratio available from camera by private Camera.Size getOptimalPreviewSize(List<Camera.Size> sizes, int w, int h) { final double ASPECT_TOLERANCE = 0.1; double targetRatio =

Android Custom Camera Quality

给你一囗甜甜゛ 提交于 2020-01-01 10:59:09
问题 I am using the following parameters for my custom camera mCamera = getCameraInstance(); params = mCamera.getParameters(); params.setFlashMode(Camera.Parameters.FLASH_MODE_AUTO); params.setFocusMode(Camera.Parameters.FOCUS_MODE_CONTINUOUS_PICTURE); params.setSceneMode(Camera.Parameters.SCENE_MODE_AUTO); params.setWhiteBalance(Camera.Parameters.WHITE_BALANCE_AUTO); params.setExposureCompensation(0); params.setPictureFormat(ImageFormat.JPEG); params.setJpegQuality(100); params.setRotation(90);

Android- Taking a picture from front facing camera rotates the photo

假装没事ソ 提交于 2020-01-01 10:18:26
问题 I am creating an app in android in which user will be able to take a picture from front camera in portrait mode only. I have achieved fixing the camera view to portrait but when a picture is taken it appears rotated. The worst thing is that the direction of rotation is different in different phones, in one phone it is right rotated whereas in another it is left rotated. Here is my code snippets To make sure activity plays in portrait only <activity android:name=".MainActivity" android:label="

How to integrate ZXing api with front camera in android? [closed]

偶尔善良 提交于 2020-01-01 09:16:29
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 6 years ago . I just wanted to integrate ZXing API in my android app, but cant find the proper documentation. 回答1: Follow these steps: 1) Download the source code here: http://code.google.com/p/zxing/source/checkout 2) Import

How to integrate ZXing api with front camera in android? [closed]

╄→гoц情女王★ 提交于 2020-01-01 09:15:14
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 6 years ago . I just wanted to integrate ZXing API in my android app, but cant find the proper documentation. 回答1: Follow these steps: 1) Download the source code here: http://code.google.com/p/zxing/source/checkout 2) Import

Where does android.hardware.camera2.full come from?

自闭症网瘾萝莉.ら 提交于 2020-01-01 08:57:07
问题 I am trying to implement a camera app. and checking examples. Some examples contain following manifest feature: uses-feature android:name="android.hardware.camera2.full . I have checked official documents and google examples and none of them mentioning existing this feature. (or I am missing some). What is the source of this feature and what is the difference between android.hardware.camera ? Edit: What confuses me was those examples on googlesamples : https://github.com/googlesamples/android

How to take a photo of the same aspect ratio as in preview size?

纵然是瞬间 提交于 2020-01-01 05:28:07
问题 99.9% of all answers on a question in title are as follows: When you searching through the List<Camera.Size> , provided by Camera.Parameters#getSupportedPictureSizes() try to find the size of the same aspect ratio as the camera's preview size which you set via Camera.Parameters.html#setPreviewSize(int,int), or as close as possible. That's fine, but what if I can't find the picture size of the same aspect ratio as in preview size (Android gives you no guarantee that for every preview size