android-camera2

Android Camera2 RAW streaming

白昼怎懂夜的黑 提交于 2021-02-18 16:59:41
问题 I am very new to Android and trying to: Stream raw data from the camera (ImageFormat RAW_SENSOR) Process raw data Display processed results interactively It seems like raw data capture is only available in still capture mode. Is this correct ? If so would it be possible to perform repeated CaptureRequests for RAW images instead ? What kind of performance can be expected using a 13MP sensor ? Any reference code ? Many thanks in advance, Guillaume EDIT : Here is what I have done so far: Create

Rotating YUV image data for Portrait Mode Using RenderScript

故事扮演 提交于 2021-02-15 04:35:00
问题 for a video image processing project, I have to rotate the incoming YUV image data so that the data is not shown horizontally but vertically. I used this project which gave me a tremendous insight in how to convert YUV image data to ARGB for processing them in real-time. The only drawback of that project is that it is only in landscape. There is no option for portrait mode (I do not know why the folks at Google present an example sample which handles only the landscape orientation). I wanted

Rotating YUV image data for Portrait Mode Using RenderScript

坚强是说给别人听的谎言 提交于 2021-02-15 04:34:24
问题 for a video image processing project, I have to rotate the incoming YUV image data so that the data is not shown horizontally but vertically. I used this project which gave me a tremendous insight in how to convert YUV image data to ARGB for processing them in real-time. The only drawback of that project is that it is only in landscape. There is no option for portrait mode (I do not know why the folks at Google present an example sample which handles only the landscape orientation). I wanted

Rotating YUV image data for Portrait Mode Using RenderScript

和自甴很熟 提交于 2021-02-15 04:34:18
问题 for a video image processing project, I have to rotate the incoming YUV image data so that the data is not shown horizontally but vertically. I used this project which gave me a tremendous insight in how to convert YUV image data to ARGB for processing them in real-time. The only drawback of that project is that it is only in landscape. There is no option for portrait mode (I do not know why the folks at Google present an example sample which handles only the landscape orientation). I wanted

Is it possible to capture a High-Res image while using ArCore?

两盒软妹~` 提交于 2021-02-11 13:36:38
问题 In my app I'm trying to use ArCore as sort of a "camera assistant" in a custom camera view. To be clear - I want to display images for the user in his camera and have him capture images that don't contain the AR models. From what I understand, in order to capture an image with ArCore I'll have to use the Camera2 API which is enabled by configuring the session to use the "shared Camera". However, I can't seem to configure the camera to use any high-end resolutions (I'm using pixel 3 so I

Display a rectangular bounding box (overlay) on custom Camera2 API so only the image inside the box is captured

ε祈祈猫儿з 提交于 2021-02-10 06:30:34
问题 I'm using the following code to capture an image using the custom Camera2 API. I am a beginner and I have no idea how to display a rectangular overlay on the camera preview. I did try the solutions available here, but I can't figure out how to fit it in my code. I need to achieve something like this to capture A4 sheets. Only the part of the image which is in the box must be captured and displayed in the next activity. MainActivity package com.example.customcamera; import android.Manifest;

Display a rectangular bounding box (overlay) on custom Camera2 API so only the image inside the box is captured

流过昼夜 提交于 2021-02-10 06:30:22
问题 I'm using the following code to capture an image using the custom Camera2 API. I am a beginner and I have no idea how to display a rectangular overlay on the camera preview. I did try the solutions available here, but I can't figure out how to fit it in my code. I need to achieve something like this to capture A4 sheets. Only the part of the image which is in the box must be captured and displayed in the next activity. MainActivity package com.example.customcamera; import android.Manifest;

Different capture output size on certain camera resolutions in Android

北城余情 提交于 2021-02-08 23:43:55
问题 I am developing a custom camera application using the Android Camera2 API where you can switch between the different camera and video resolutions available in the phone. It also offers the possibility to take squared 1:1 pictures. To take the square pictures, I take a normal 4:3 picture and then crop it to maintain the 1:1. (So 4032x3024 would be 3024x3024). I noticed a problem when taking a 1:1 picture on certain resolutions, the output is slightly cropped (zoomed). This is the result of the

Android camera2 api touch to focus example?

醉酒当歌 提交于 2021-02-07 02:50:30
问题 Hi I'm using camera2basic example to implement my camera2 application. I can't find any good example to implement touch to focus with camera2 api. Currently the code i'm using for touch to focus is this: private void setFocusArea(MotionEvent event) { if (mCameraId == null) return; CameraManager cm = (CameraManager)getActivity().getSystemService(Context.CAMERA_SERVICE); CameraCharacteristics cc = null; try { cc = cm.getCameraCharacteristics(mCameraId); } catch (CameraAccessException e) { e

Android Camera2 API stretching the preview

让人想犯罪 __ 提交于 2021-02-04 21:24:08
问题 I am working with the Google sample project, but I cannot seem to get the preview to work without stretching it. public void setAspectRatio(int width, int height) { if (width < 0 || height < 0) { throw new IllegalArgumentException("Size cannot be negative."); } mRatioWidth = width; mRatioHeight = height; requestLayout(); } I have tried physically changing the aspect ration on the AutoFitTextureView class, this makes it full screen, but causes it to stretch. Has anyone figured out a successful