Skip to content

CameraX supports nv21 but as yuv420 #802

@FantaMagier

Description

@FantaMagier

Describe your issue. If applicable, add screenshots to help explain your problem.

Good News. Android CameraX supports now NV21 but it is in Format yuv420. So InputImage has problems like descibed here: flutter/packages#9853 (comment)

Configuring NV21 image format
If you initialize a CameraController with ImageFormatGroup.nv21, then streamed images will still have the ImageFormatGroup.yuv420 format, but their image data will be formatted in NV21. See https://developer.android.com/reference/kotlin/androidx/camera/core/ImageAnalysis#OUTPUT_IMAGE_FORMAT_NV21().

Steps to reproduce.

Use newest Version of CameraX Android

What is the expected result?

CameraX yuv420 Nv21 is accepted by ML KIT Flutter

Did you try our example app?

Yes

Is it reproducible in the example app?

Yes

Reproducible in which OS?

Android

Flutter/Dart Version?

Current Version

Plugin Version?

Current Versions

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions