參考:《OpenCV iOS - Video Processing》
發(fā)現(xiàn)導(dǎo)入頭文件
//#import <opencv2/highgui/cap_ios.h>找不到
參考:http://blog.csdn.net/story51314/article/details/54617451
發(fā)現(xiàn)頭文件已經(jīng)修改
#import <opencv2/videoio/cap_ios.h>
.h中
#import <UIKit/UIKit.h>
#import <opencv2/videoio/cap_ios.h>
//#import <opencv2/highgui/cap_ios.h>?
using namespace cv;
@interface OpenCVDome : UIViewController
@property (nonatomic, retain) CvVideoCamera *videoCamera;
@end?
- (void)viewDidLoad {
[super viewDidLoad];
self.videoCamera = [[CvVideoCamera alloc] initWithParentView:imageView];
self.videoCamera.defaultAVCaptureDevicePosition = AVCaptureDevicePositionFront;
self.videoCamera.defaultAVCaptureSessionPreset = AVCaptureSessionPreset352x288;
self.videoCamera.defaultAVCaptureVideoOrientation = AVCaptureVideoOrientationPortrait;
self.videoCamera.defaultFPS = 30;
self.videoCamera.grayscale = NO;
}