An OpenCV framework for iOS and macOS.
Needed iOS 8.0+.
Needed macOS 10.10+ and OpenCV 2.4.x.
Install OpenCV by using Cocoapods.
cd EMCVLib
pod install
Install OpenCV with brew:
We cannot use brew to install OpenCV due to this issue: [OpenCV #7833]
It'll crash when releasing camera in Cocoa application.
So we need to compile it by ourselves.
- Download OpenCV: [trmbhs/opencv]
- Download extra modules: [trmbhs/opencv_contrib]
- Config with cmake-gui. See here.
- Make and install.
Headers should be here:
/usr/local/include/opencv
/usr/local/include/opencv2
Librarys should be here:
/usr/local/lib
Download the repo. Then drag the framework project to your project.
What can this framework does now?
- Display image and play real-time processing video with customized filter.
- Color convert. Channals split. Image flip, smooth, blending.
- Edge Detection. Find extreme values and locations. Calculate and compare histograms.
- Corener Harris. Shi-Tomasi. Optical Flow.
- Matching algorithm: Template Match. Back Projection. SURF Match.
Some screenshots of the demo.
Use @autoreleasePool
when doing loop can solve some memory problems.
API docs and bugs here.
-
[Bug] Bugs.
-
[API]
EMCVFactory
: A wrapped functions whitch can do some computer vision calculations. -
[API]
EMCVBasicImage
: A wrapped basic image class. -
[API]
EMCVImage
: A wrapped image class. -
[API]
EMCVSplitedImage
: A wrapped multi channel image class. -
[API]
EMCVSingleImage
: A wrapped single channel image class. -
[API]
EMCVFilter
: A wrapped image filter. -
[API]
EMCVFilterOperation
: A wrapped image operation by using block. -
[API]
EMCVVideoCapture
: A wrapped video player class. -
[API]
EMCVVideoWriter
: A wrapped video writer class. -
[API]
NSImageView + EMCVLib
: A category of NSImageView. -
[API]
UIImageView + EMCVLib
: A category of UIImageView.
Blog: http://enumsblog.com
Email: [email protected]