android-camera

android camera get light sensor value

拜拜、爱过 提交于 2019-12-22 17:48:28
问题 I know how to get a lux value from the light sensor using android.hardware.sensor . I saw light meter tools on the market. The application description said it can get the lux value from the camera. How can it do that? Also how can I set the shutter speed and the aperture? 回答1: Take a look at the Camera.Parameters class. It has all functions supported by the Camera. Probably setExposureCompensation . I don't know much about photography but my guess would be that exposure compensation is

image capture app crashes on pressing back button

血红的双手。 提交于 2019-12-22 17:32:08
问题 public class MainActivity extends Activity { private static final int CAMERA_PIC_REQUEST = 2500; Button Report_help; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Report_help=(Button)findViewById(R.id.report_help); Report_help.setOnClickListener(new OnClickListener() { public void onClick(View v) { Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);

Cartesian Coordinate System in Perspective Projection

 ̄綄美尐妖づ 提交于 2019-12-22 13:54:28
问题 I'm still implementing a perspective projection for my augmented reality application. I've already asked some questions about the viewport-calculation and other camera stuff, which is explained from Aldream in this thread However, I don't get any useful value at the moment and I think this depends on my calculation of the cartesian coordinate space. I had some different ways to transform latitude,longitude and altitude to a cartesian coordinate space, but nothing of them seems to work

Android camera preview freezes when switching cameras?

那年仲夏 提交于 2019-12-22 12:12:08
问题 I am writing a custom camera for my app. It's working fine when opening the activity with either of the back or front cameras. But I'm really struggling with switching cameras inside the activity. When I tap the switching camera button, the preview freezes and nothing happens. I have tried the answers and tips suggested in other questions related to the camera and the preview, but nothing works. Here is my activity: public class CameraActivity extends Activity implements SurfaceHolder

Taking Multiple Photos from Android device

三世轮回 提交于 2019-12-22 11:00:01
问题 I am working on an app that takes multiple photos from android device once launched and stores it into the memory card. Is there a way to speed up the process, because latency between each photo taken is very large. On an average 1.6 photos are taken per sec. in the lowest resolution and less than 1 photo per sec. in highest resolution. The device's camera is 8 MP. My question is can I increase the number of pictures taken per sec.? Can I make my app work somewhat like DSLR which can shoot

What data is returned when using ACTION_IMAGE_CAPTURE?

Deadly 提交于 2019-12-22 10:27:56
问题 I'm getting a bit confused from this description: The caller may pass an extra EXTRA_OUTPUT to control where this image will be written. If the EXTRA_OUTPUT is not present, then a small sized image is returned as a Bitmap object in the extra field. This is useful for applications that only need a small image. If the EXTRA_OUTPUT is present, then the full-sized image will be written to the Uri value of EXTRA_OUTPUT. With NO EXTRA_OUTPUT , it will return a "small sized image"? With EXTRA_OUTPUT

How to increase frame rate with Android CameraX ImageAnalysis?

与世无争的帅哥 提交于 2019-12-22 09:29:47
问题 I'm investigating the new CameraX API, in relation to how viable it might be to switch over from our current Camera2 system. In our Camera2 system, we use an OpenGL surface to capture the frames from a PreviewCaptureSession, and we are hitting consistent 30fps image processing speeds across most devices, with some able to hit 60fps with AutoExposure settings enabled. CameraX isn't giving anything near that speed and I'm not sure if its something I've missed in setup. I've setup the test

flash torch functionality not working through app-widget in nexus 5

天涯浪子 提交于 2019-12-22 08:11:33
问题 Flash is turning-on fine from application (added surface_view to the layout), when I try to turn-on flash through app-widget it's not working. I used Camera and SurfaceView Here is the code I am using Camera mCamera; SurfaceView preview; mCamera = Camera.open(); mCamera.setPreviewDisplay(preview.getCameraHolder()); Parameters params = mCamera.getParameters(); params.setFlashMode(Parameters.FLASH_MODE_TORCH); mCamera.setParameters(params); mCamera.startPreview(); Added permission and features

android camera2 process each frame and display its preview

[亡魂溺海] 提交于 2019-12-22 06:27:28
问题 I use the https://github.com/googlesamples/android-Camera2Basic, but try to modify it in a way that I could get access to each frame before it is drawn on the surfaceview. I understood, I should add additional surface (ImageReader.getSurface()), and read the frame from it in this callback: private final ImageReader.OnImageAvailableListener mOnImageAvailableListener = new ImageReader.OnImageAvailableListener() { @Override public void onImageAvailable(ImageReader reader) { Log.d("Img",

android camera2 process each frame and display its preview

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-22 06:27:13
问题 I use the https://github.com/googlesamples/android-Camera2Basic, but try to modify it in a way that I could get access to each frame before it is drawn on the surfaceview. I understood, I should add additional surface (ImageReader.getSurface()), and read the frame from it in this callback: private final ImageReader.OnImageAvailableListener mOnImageAvailableListener = new ImageReader.OnImageAvailableListener() { @Override public void onImageAvailable(ImageReader reader) { Log.d("Img",