#Hide Camera Feed or Use Custom UI in Easy ML Kit

1 messages · Page 1 of 1 (latest)

marsh whale
#

I want to scan barcodes using Easy ML Kit’s LiveCameraInputSource, but I don’t want any camera preview visible at all (no overlay).
I only want my custom Unity UI on screen during scanning.

Is there a way to completely hide or minimize the camera overlay, or run the scanner in “headless” mode?
If not, is this something you plan to support?
Any tips or workarounds?

somber sand
#

Basically you want hide the native camera visually but still scan from it. Right?

marsh whale
#

Right.

somber sand
#

Did you try setting viewport value?

private IImageInputSource CreateLiveCameraInputSource()
        {
            LiveCameraInputSource inputSource = new LiveCameraInputSource();
            inputSource.Viewport = new Rect(0, 0.15f, 1f, 0.7f);
            inputSource.MaxResolution = new Vector2(1920, 1080); //Camera resolution (provided in landscape orientation) will try to pick a resolution starting from this value and goes lower.
            return inputSource;
        }
#

@marsh whale

zenith lynx
#

i'm interested in achieving the same exact effect -- full screen scan but with no feed displayed on screen. Is the solution to just change the size of the viewport? so make it very tiny?

somber sand
#

viewport sets the container size of the native camera. So if its small, the area below it is visible, which means unity surface! Hope you are looking for the same thing!

#

@marsh whale Did you give a try with it and is it what you expected?

zenith lynx
#

i can confirm this works. i set the viewport to 0,0,0,0 and am able to scan barcodes with no viewport displayed

somber sand
#

Cool! Thanks for confirming @zenith lynx
In-case if you like the plugin, would appreciate if you can rate us on asset store and recommend us to your peers/studios you are connected to.

Also, wondering if adding features related to GenAI has any importance w.r.t easy ml kit. Please share your feedback.

zenith lynx
#

Just posted a review. What are you thinking in terms of GenAI features?

somber sand
zenith lynx
#

i'm mostly using it for barcode reading in my current project -- so those features aren't important to me. i would like to try using object tracking and recognition for iOS when you get that done. i'm currently using Google Vision, but am wondering if it would be more efficient with ML kit.

somber sand
#

Thanks for confirming!