Repository navigation
Open
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listcustomer: crowdAffects or could affect many people, though not necessarily a specific customer.Affects or could affect many people, though not necessarily a specific customer.d: api docsIssues with https://api.flutter.dev/Issues with https://api.flutter.dev/p: cameraThe camera pluginThe camera pluginpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.team-ecosystemOwned by Ecosystem teamOwned by Ecosystem teamtriaged-ecosystemTriaged by Ecosystem teamTriaged by Ecosystem team
Description
First of all thank you so mush for adding access to the image stream in 0.2.8, I'm sure may people will be very happy about this.
I know the latest commit is fresh off the press, bit I would love to see a little more documentation on how to use the camera image stream (other than: "use: cameraController.startImageStream(listener) to process the images")
Reacted by Luigino De Togni, sathiez, Kirill Meshkov, MatthewManageMy, Hari Prasad, Sho Iizuka, Léo Silva, Theeraphol Wattanavekin, Sunbreak, Jelena Lecic and 40 more
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listcustomer: crowdAffects or could affect many people, though not necessarily a specific customer.Affects or could affect many people, though not necessarily a specific customer.d: api docsIssues with https://api.flutter.dev/Issues with https://api.flutter.dev/p: cameraThe camera pluginThe camera pluginpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.team-ecosystemOwned by Ecosystem teamOwned by Ecosystem teamtriaged-ecosystemTriaged by Ecosystem teamTriaged by Ecosystem team
Activity
lewixlabs commentedon Jan 10, 2019
Yes agree, great feature but it needs documentation.
It seems working, i added this new method and its callback in initState inside demo project
Now i'm learning how to handle method FirebaseVisionImage.fromBytes to set metadata
[-]Camera documentation[/-][+]Camera document how to use ImageStream[/+]lewixlabs commentedon Jan 10, 2019
This is a code sample just update
https://github.com/lewixlabs/mlkit_ocr_realtime/blob/96a749c0568247fc0063d52a4f03f0c6385f52cc/lib/main.dart#L118-L168
but not working because i get this error
when
final VisionText visionText = await textRecognizer.processImage(visionImage);is called.
Full sample is here
https://github.com/lewixlabs/mlkit_ocr_realtime/blob/master/lib/main.dart
Waiting for the right direction, thank you! :)
lewixlabs commentedon Jan 11, 2019
Uuuuh, my updated code works on Android! :)
Tomorrow i test it on iOS...
Full demo project here
https://github.com/lewixlabs/mlkit_ocr_realtime
BoHellgren commentedon Jan 30, 2019
I am trying to display an image from an
ImageStream. One one button I havewhere theImage is declared as Uint8List.
A list of numbers between 0 and 255 is displayed. Like
But if I try
Image.memory(theImage)orMemoryImage(theImage)I getWhat am I doing wrong?
(I also have great problems stopping the ImageStream with controller.stopImageStream() ).
lewixlabs commentedon Jan 31, 2019
eduardkieser commentedon Jan 31, 2019
zoechi commentedon Jan 31, 2019
@lewixlabs @eduardkieser Using "add reaction" on the initial comment would increase priority while
+1comments are rather pointless and cause lots of people to get notified for no reason.To get notified yourself use the [Subscribe] button to the top right instead.
BoHellgren commentedon Feb 1, 2019
This is a sample of what the
CameraImagecontains:How can I convert this to a
Uint8Listacceptable toImage.memory()??Or is there another widget which can display a
CameraImage?rockingelevator commentedon Feb 6, 2019
here is a great demo of how to use image stream and face detection: https://github.com/bparrishMines/mlkit_demo/blob/master/lib/face_expression_reader.dart
100 remaining items
BoHellgren commentedon Jan 9, 2023
CameraImage to imageLib.Image performance
I made the function below which converts a CameraImage to a imageLib.Image using a) C code and Dart.ffi, and b) plain Dart. I expected the C code to be much faster, but, to my surprise, the Dart code is some 25% faster! Can anyone explain why? Any ideas on how to do this conversion really fast?
Here is the C code (by @hugand)
faslurrajah commentedon Jun 21, 2023
I'm trying to the same. But I cannot edit ImageData variable's index. im1.data is a ImageData type. I'm trying to do as you do img.data[index] = (0xFF << 24) | (b << 16) | (g << 8) | r;
I'm getting compiling error The operator '[]=' isn't defined for the type 'ImageData'.
caohy7 commentedon Jul 28, 2023
This is how CameraImage is handled in the iOS environment
Under the startImageStream function
Called in the callback of iOS's MethodChannel
Specific treatment methods
Android processing can use the YUVTransform plugin
guyluz11 commentedon Nov 5, 2023
I am using
and you can show the image like this
RawImage(image: image)And it works for normal images.
But like others here I am getting errors in the conversion when using the images from the stream
GleammerRay commentedon Jul 2, 2024
@faslurrajah this solution no longer works on latest package version due to API changes. Here's an adjusted series of methods from my project, ready for general use and should work on both Android and iOS:
thandal commentedon Jul 6, 2024
FYI: I think I have an explanation. While some phones produce yuv420p, others actually quietly are producing nv21/nv12, but then creating interleaved U and V planes.
This means the U and V bytes are interleaved in memory as follows, and the U and V plane buffers are just offset by one byte:
Which is actually nv21 (or nv12 because U is first) "faking it" as yuv420p! So everything makes sense, and you can actually get nv21 just by using the whole (interleaved) U buffer, and the last byte of the V buffer! Of course, it would be best if we could actually get "explicit" n21.
alexcohn commentedon Jul 7, 2024
@thandal I am not sure what you want to achieve this way. Is there some API that expects an
nv12contiguous buffer?angelru commentedon Mar 13, 2025
Does this work?
[-]Camera document how to use ImageStream[/-][+][camera] document how to use ImageStream[/+]