android / android/camera-samples
DEPTH 16 format produces 0 values
- Lingua principale
- Kotlin
- Stelle
- 5.5k
- Fork
- 2.4k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Is DEPTH16 in Camera2 API ready to use? or we are supposed to use ARCore for depth detection? My use case is not to render depth data/image continuously on screen, but to capture a JPEG image and it's depth when user tap on capture button in a shot.
I created a capture request of TEMPLATE_PREVIEW / TEMPLATE_STILL_PICTURES for target image reader of Image Format DEPTH16 as following.
```
imageReader = ImageReader.newInstance(
240, 180, ImageFormat.DEPTH16, IMAGE_BUFFER_SIZE)
```
```
val captureRequest = camera.createCaptureRequest(
CameraDevice.TEMPLATE_PREVIEW).apply {
addTarget(depthImageReader.surface)
}
```
captureRequest.set(CaptureRequest.JPEG_ORIENTATION, 0)
val fpsRange: Range = Range(15, 30)
captureRequest.set(CaptureRequest.CONTROL_AE_TARGET_FPS_RANGE, fpsRange)
session.capture(captureRequest.build(), null, null)
```
imageReader.setOnImageAvailableListener({ reader ->
val image = reader.acquireNextImage()
```
on this image , with session.capture, the depth samples are all 0. if I replace it with session.setRepeatingRequest(captureRequest.build(), null, null), the first frames are still all 0 values, after some movement, the later frames has a a lot of 0, 8192, and very large values such as 17524 (17m which is not correct?), along with some random range.
I've tested https://medium.com/swlh/working-with-the-3d-camera-on-the-samsung-s10-5g-4782336783c , however the first frames are 0 as well
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia esaminando la documentazione della Camera2 API per ImageFormat.DEPTH16, ImageReader e le richieste di acquisizione. Riproduci il problema usando la configurazione DEPTH16 240×180 mostrata, sia con session.capture sia con setRepeatingRequest, quindi determina se i campioni con valore zero e fuori intervallo indicano un comportamento del dispositivo non supportato o un errore dell'applicazione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- kotlin
- Ambito
- mobile-dev
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100