Previewing and saving photos in CameraActivity
Our main activity,
CameraActivity, needs to do the following:
- On startup, use OpenCV Manager to ensure that the appropriate OpenCV shared libraries are available. (For more information about OpenCV Manager, refer back to the Building the OpenCV samples with Eclipse section in Chapter 1, Setting Up OpenCV.)
- Display a live camera feed.
- Provide the following menu actions:
- Switch the active camera (for a device that has multiple cameras).
- Save a photo and insert it into
MediaStore so that it is accessible to apps such as
Gallery. Immediately open the photo in
We will use OpenCV functionality wherever feasible, even though we could just use the standard Android libraries to display a live camera ...