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 {
...
}
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:
Reference
Found this while reading the documented source code of intializeCamera in
packages\camera\camera_android_camerax\lib\src\android_camera_camerax.dart