Open Tachi107 opened 4 months ago
Hi, I saw the introduction of the new COORDINATE_SYSTEM_SENSOR
option which, according to the commit which introduced it (by @xizhang), should be useful to make use of the new OverlayEffect
API. Still, no sample code is present in the repository. Where can we find some helpful example showing how to make use of this efficient API together with an ImageAnalyzer
like ML Kit or MediaPipe?
Thanks!
We haven't gotten around to create an official code sample yet. For the time being, you can checkout the following change.
SyncedOverlayEffect contains the code for syncing the ML Kit frame to the preview/video frame.
OverlayFragment shows how to use it with ML Kit. Instead of using -1 for the target, you can use the new COORDINATE_SYSTEM_SENSOR in its place.
Please feel free to tag me if you run into any issues.
Hi all, I'm looking into using the new
OverlayEffect
class in my app to draw bounding boxes and labels of objects recognized by ML Kit's implementation ofImageAnalysis.Analyzer
(i.e.MlKitAnalyzer
).I'm currently trying to keep things as simple as possible - I'm using
CameraController
- but I don't understand how I should hook up anOverlayEffect
to it. An example would be really helpful, but I currently cannot find any in the camera-samples repository.For instance, how would you render bounding boxes in an app using ML Kit's default Object Recognition model? Here's a small sample app where you could (hopefully) add an
OverlayEffect
.Thanks!