This repository contains iOS demo applications developed during Google Summer of Code 2012 with opencv.org. Note, the demos require the opencv ios framework. See "Getting Started" section.
-
HelloIosVideo: Beginners tutorial on using opencv's ios camera interface.
-
FullscaleDemoApp: Meta project containing all other demos.
-
FaceDetectVideo: Face detection on still images and iphone video camera.
-
GrabCut: Grabcut segmentation algorithm. Paint foreground/background seeds with touch gestures.
-
VideoConvolution: Process video frames with basic convolution kernels: Gaussian blur, median blur, bilateral blur, laplacian, sobel, canny.
-
VideoFilter: Advanced video filters: pixelation, color inversion, retro filter, soft focus, cartoon, pinhole.
- You need opencv.framework (statically compiled opencv framework for iOS).
- Download pre-compiled framework.
- Alternatively, follow manual build instructions.
Note, the XCode projects are configured to look for opencv2.framework at /build/opencv2.framework.
-
OpenCV provides a wrapper to use Apple's native camera interface to obtain image/video frames. Each frame is converted automatically to cv::Mat and delivered to a C callback via delegation. Learn more.
-
Continue writing your first video processing project.
-
Once you have understood how to obtain a cv::Mat in your iOS project, feel free to re-use the modular demo controllers in shared and please feel free to contribute.
-
Advanced: Dig deep into how OpenCV obtains image/video frames from the native interface, wraps them into C datastructures, calls the C callback to let you process each frame (hence .mm files), and then updates the output target:
opencv/modules/videoio/include/opencv2/videoio/cap_ios.h opencv/modules/videoio/src/cap_ios_abstract_camera.mm opencv/modules/videoio/src/cap_ios_photo_camera.mm opencv/modules/videoio/src/cap_ios_video_camera.mm
- Contribute to the iOS project, for example by adding to the very sparse documentation.
-
Note, the XCode projects are currently outdated. Last time they have been updated in 2012. - The XCode projects compile, but the XIB files/storyboards are not up to date with current layout guides.