Repository navigation
Open
flutter/packages
#11632Open
Copy link
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterp: cameraThe camera pluginThe camera pluginpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-androidAndroid applications specificallyAndroid applications specificallyteam-androidOwned by Android platform teamOwned by Android platform teamtriaged-androidTriaged by Android platform teamTriaged by Android platform team
Description
Use case
The plugin only supports YUV_420 image format group, because Flutter does not support RGBA format currently.
But the camerax library allows RGBA_8888 format group as well.
Supporting RGBA_8888 format would allow flutter developers to do computer vision tasks like face detection, image classification, image segmentation, etc.
Proposal
Expecting the plugin to be able to do something like this:
CameraController cameraController = CameraController(
cameras![selectedCameraIndex],
ResolutionPreset.medium,
imageFormatGroup: ImageFormatGroup.rgba8888,
);
cameraController.startImageStream((CameraImage image) {
///Computer vision tasks with rgba8888 image format group bytes
});
Reference
Found this while reading the documented source code of intializeCamera in packages\camera\camera_android_camerax\lib\src\android_camera_camerax.dart
/// Initializes the camera on the device.
///
/// Since initialization of a camera does not directly map as an operation to
/// the CameraX library, this method just retrieves information about the
/// camera and sends a [CameraInitializedEvent].
///
/// [imageFormatGroup] is used to specify the image format used for image
/// streaming, but CameraX currently only supports YUV_420_888 (supported by
/// Flutter) and RGBA (not supported by Flutter). CameraX uses YUV_420_888
/// by default, so [imageFormatGroup] is not used.
@override
Future<void> initializeCamera(
int cameraId, {
ImageFormatGroup imageFormatGroup = ImageFormatGroup.unknown,
}) async {
...
}
Reacted by Johannes Garz, Trevor Davis, Jonas Uekötter, Masda agus, llywuchen, Jeff, Remi Lesaffre, David Carta and thanhle1547
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterp: cameraThe camera pluginThe camera pluginpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-androidAndroid applications specificallyAndroid applications specificallyteam-androidOwned by Android platform teamOwned by Android platform teamtriaged-androidTriaged by Android platform teamTriaged by Android platform team
Type
Projects
- StatusShow more project fields[Non-blocking] Proposals
Activity
Mairramer commentedon Apr 29, 2026
I’ll take a look at this later.
[camera_web] Re: Support for camera stream on web (#7950)