Reputation: 97
I am developing an app to do some image processing operations on a captured image. I used camera2basic sample as a base to my project but it sometimes takes long time to capture and sometimes crashes which annoying me.
Is there a simple authentic code simpler than camera2basic to use camera2 API with opencv or can I use intent to use the Android camera.
Upvotes: 0
Views: 1642
Reputation: 25471
There are a number of projects which aim to put a robust and simpler wrapper aoerund the Android Camera2 API, and they generally support the earlier camera API also.
The two most poplar at the moment seem to be:
They are not perfect - take a look at the issues lists and decide yourself.
I have used Fotoapparat and while I did see at least one issue, I found it simpler and more robust than the basic Camera2Basic example code.
Upvotes: 2
Reputation: 18107
If you just want an image to work with, you can use the standard Android image capture intent to get the default camera app to take a picture for you.
See "Taking Photos Simply" in the Android developer docs.
Upvotes: 0