Reputation: 11
Hello I have a really difficult question. I got the nexus 6 and I want to have the preview stream in RAW fromat (ImageFormate.RAW_SENSOR) at the camera2 API. Is this even possible?
I use the android-Camera2Raw (https://github.com/googlesamples/android-Camera2Raw)
Upvotes: 1
Views: 1403
Reputation: 61
Currently, this is not possible. Please see this table for a list of formats possible as a stream: https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#SCALER_STREAM_CONFIGURATION_MAP
Your most "raw" choice would be turning off noise reduction (if supported by the hardware) in your CaptureRequest.Builder
, like so:
builder.set(CaptureRequest.NOISE_REDUCTION_MODE, CaptureRequest.NOISE_REDUCTION_MODE_OFF);
If frame rate isn't an issue, you could send repeated CaptureRequests for RAW images, and on your ImageReader.OnImageAvailableListener()
process the RAW, convert it to a Bitmap, then place that into an ImageView
, but that approach is exactly as impractical as it sounds :)
Upvotes: 1