iOS UI for panorama capture
Before we delve into the OpenCV code for turning an image collection into a panorama, we will first build a UI to support the easy capture of a sequence of overlapping images. First, we must make sure we have access to the camera as well as saved images. Open the Info.plist
file and add the following three rows:
To start building the UI, we create a view with a View
object for the camera preview on the right, and an overlapping ImageView
on the left. ImageView
should cover some area of the camera preview View, to help guide the user in capturing an image with enough overlap from the last. We can also add a few ImageView
instances on top to show the previously captured images, and on the bottom a Capture
button and a Stitch
button to control the application flow:
To connect the camera preview to the preview View, we must do the following:
- Start a capture session (
AVCaptureSession
) - Select a device (
AVCaptureDevice
) - Set up the capture session with input from the device...