vision-camera-image-labeler icon indicating copy to clipboard operation
vision-camera-image-labeler copied to clipboard

Question: how to initialize ImageLabeling client with different options

Open rodgomesc opened this issue 4 years ago • 1 comments

i want to initialize the labeler client with different args

https://github.com/mrousavy/vision-camera-image-labeler/blob/cbf88a545e2aabcbc97aaf2717617ef1e0a69aa9/android/src/main/java/com/visioncameraimagelabeler/VisionCameraImageLabelerPlugin.java#L25

but since the plugin uses callback method to receive javascript params, and do that in a frame loop. i don't how to do that,

https://github.com/mrousavy/vision-camera-image-labeler/blob/cbf88a545e2aabcbc97aaf2717617ef1e0a69aa9/android/src/main/java/com/visioncameraimagelabeler/VisionCameraImageLabelerPlugin.java#L28

can someone walk me through a solution for that?

rodgomesc avatar Aug 17 '21 20:08 rodgomesc

That's pretty easy to do - you just pass the props you want in the params, and in that callback you just compare if the image labeler is initialized with exactly those params. If not, it should be re-initialized.

If you want, you can add support for this in this library and I'll merge it as a PR :)

mrousavy avatar Aug 18 '21 07:08 mrousavy