Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 ImageAnalysis is not supported when Extension is enabled on this device when enabling HDR in example app #2715

Closed
4 of 5 tasks
Dingenis opened this issue Apr 4, 2024 · 1 comment
Labels
🐛 bug Something isn't working

Comments

@Dingenis
Copy link

Dingenis commented Apr 4, 2024

What's happening?

When enabling HDR in the example app, an error is thrown. The error is only thrown when photo={true}, photoHdr={true} and a frame processor is set.

Reproduceable Code

const device = useCameraDevice("back")
const format = useCameraFormat(device, [])
const enableHdr = true
const videoHdr = format?.supportsVideoHdr && enableHdr
const photoHdr = format?.supportsPhotoHdr && enableHdr && !videoHdr

const frameProcessor = useFrameProcessor((frame) => {
 'worklet'
 console.log(`${frame.timestamp}: ${frame.width}x${frame.height} ${frame.pixelFormat} Frame (${frame.orientation})`)
}, [])

return (
    <Camera
      style={StyleSheet.absoluteFill}
      isActive={true}
      device={device}
      photoHdr={photoHdr}
      photo={true}
      frameProcessor={frameProcessor}
    />
  )

Relevant log output

2024-04-04 15:46:56.485  9711-9711  CameraSession           com.mrousavy.camera.example          E  Failed to configure CameraSession! Error: ImageAnalysis is not supported when Extension is enabled on this device. Check ExtensionsManager.isImageAnalysisSupported before binding the ImageAnalysis use case., Config-Diff: Difference(deviceChanged=false, outputsChanged=true, sidePropsChanged=true, isActiveChanged=false, locationChanged=false)
                                                                                                    java.lang.IllegalArgumentException: ImageAnalysis is not supported when Extension is enabled on this device. Check ExtensionsManager.isImageAnalysisSupported before binding the ImageAnalysis use case.
                                                                                                    	at androidx.camera.lifecycle.LifecycleCameraRepository.bindToLifecycleCamera(LifecycleCameraRepository.java:312)
                                                                                                    	at androidx.camera.lifecycle.ProcessCameraProvider.bindToLifecycle(ProcessCameraProvider.java:609)
                                                                                                    	at androidx.camera.lifecycle.ProcessCameraProvider.bindToLifecycle(ProcessCameraProvider.java:386)
                                                                                                    	at com.mrousavy.camera.core.CameraSession.configureCamera(CameraSession.kt:417)
                                                                                                    	at com.mrousavy.camera.core.CameraSession.configure(CameraSession.kt:165)
                                                                                                    	at com.mrousavy.camera.CameraView$update$1.invokeSuspend(CameraView.kt:156)
                                                                                                    	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
                                                                                                    	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
                                                                                                    	at android.os.Handler.handleCallback(Handler.java:958)
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:99)
                                                                                                    	at android.os.Looper.loopOnce(Looper.java:230)
                                                                                                    	at android.os.Looper.loop(Looper.java:319)
                                                                                                    	at android.app.ActivityThread.main(ActivityThread.java:8893)
                                                                                                    	at java.lang.reflect.Method.invoke(Native Method)
                                                                                                    	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:608)
                                                                                                    	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)

Camera Device

{
  "formats": [],
  "sensorOrientation": "landscape-left",
  "hardwareLevel": "limited",
  "maxZoom": 8,
  "minZoom": 1,
  "maxExposure": 20,
  "supportsLowLightBoost": false,
  "neutralZoom": 1,
  "physicalDevices": [
    "wide-angle-camera"
  ],
  "supportsFocus": true,
  "supportsRawCapture": false,
  "isMultiCam": false,
  "minFocusDistance": 10,
  "minExposure": -20,
  "name": "0 (BACK) androidx.camera.camera2",
  "hasFlash": true,
  "hasTorch": true,
  "position": "back",
  "id": "0"
}

Device

Samsung Galaxy A53 (Android 14)

VisionCamera Version

4.0.0-beta.13

Can you reproduce this issue in the VisionCamera Example app?

Yes, I can reproduce the same issue in the Example app here

Additional information

@Dingenis Dingenis added the 🐛 bug Something isn't working label Apr 4, 2024
@Dingenis Dingenis changed the title 🐛 ImageAnalysis is not supported when Extension is enabled on this device when enabling HDR in example app. 🐛 ImageAnalysis is not supported when Extension is enabled on this device when enabling HDR in example app Apr 4, 2024
@mrousavy
Copy link
Owner

fixed in #2770 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants