Document scanner using camerax architect

160 views
Skip to first unread message

Ayush Yadav

unread,
Jul 24, 2023, 4:57:54 AM7/24/23
to Android CameraX Discussion Group
I am trying to make a document scanner with corner detection using TensorFlow model and CameraX Api.

I want to know the best strategy to process analysis image to TensorFlow model (accepts RGB image ,so i need the fastest pipeline for conversion (renderscript is deprecated ,so cant use it and other is to use bitmap method).
Also I need to capture the image too ,so need to make sure that the aspect ratio of capture and analysis image ,preview image is same.If i try using the anaysis image for capturing is will be of low quality ,thats why after detecting the corner ,capturing image instantly.

My current flow is : preview image ,analysis image and capture image having same aspect ratio so that corner points get plotted correctly ,passing analysis image to TensorFlow input and getting the corners. Also need to make sure analysis image quality is min ,preview is mid quality and capture image is high quality.

I want to know any better strategy ,any reference kotlin project or suggestion

Xi Zhang (张熹)

unread,
Jul 24, 2023, 1:35:25 PM7/24/23
to Ayush Yadav, Android CameraX Discussion Group
Hi Ayush:

Your workflow looks good to me. There is an API to transform the coordinates so the aspect ratio doesn't really have to match. However, having a matching aspect ratio does simplify the logic.  Please let us know if you run into any issues.

Thanks,
Xi

--
You received this message because you are subscribed to the Google Groups "Android CameraX Discussion Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to camerax-develop...@android.com.
To view this discussion on the web visit https://groups.google.com/a/android.com/d/msgid/camerax-developers/8bd79eb4-1823-4347-85a0-b9d50f482d3dn%40android.com.
Reply all
Reply to author
Forward
0 new messages