What is the most efficient method to achieve long exposure time? Basically, API of Android camera2 allow to manual change exposure time, ISO and other camera parameters, but limited by device limit. Eg. Huawei P20 Lite has 1s limit, but, built-in app allow to use 8s exposure. I want to make some similar, but using software simulating long exposure with capture burst (series of photos [ex=1s] with small interval accumlating in result image) (Expected 16s or even 24 s for astrophotography). Probably, I should:
- Take n photos with capture burst or repeating request
- In onImageAvailableListener copy byte[] array (capture result) into RenderScript.Allocation collection
- Use reduce rs like this example, add convert output allocation into .dng file:
static void addintAccum(int *accum, int val) {
*accum += val;
}
It makes sanse? I have done some trials with basically operating on bitmap, but it looks very bad (sum every int8 color of w,x pixel every n photo) and take a lot of time to computing every pixel. Unfornately, i use API level 30 with Render Script target API 24 wchich produce ScriptC class with invalid imports (androidx.renderscript.* instead of android.renderscript) due to version conflict (propably version 30 doesn`t exists).
defaultConfig {
applicationId "robertr.smartcamera"
minSdkVersion 21
targetSdkVersion 30
versionCode 1
versionName "1.0"
renderscriptTargetApi 24
renderscriptSupportModeEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}