Follow class and function are work normal:
cv::Mat cvImage;
UIImageToMat(image, cvImage);
cv::GaussianBlur
Ptr<Tracker> tracker = Tracker::create("KCF");
......
But follow is compile error:
VideoCapture cap("test.avi");
Error:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_AVAssetWriterInput", referenced from:
objc-class-ref in opencv2(cap_avfoundation.o)
"_AVMediaTypeVideo", referenced from:
CvCaptureCAM::startCaptureDevice(int) in opencv2(cap_avfoundation.o)
CvCaptureFile::CvCaptureFile(char const*) in opencv2(cap_avfoundation.o)
CvVideoWriter_AVFoundation::CvVideoWriter_AVFoundation(char const*, int, double, CvSize, int) in opencv2(cap_avfoundation.o)
......
Then I changed Architectures,but it prompt another Error:
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_AVAssetWriterInput", referenced from:
objc-class-ref in opencv2(cap_avfoundation.o)
"_AVMediaTypeVideo", referenced from:
CvCaptureCAM::startCaptureDevice(int) in opencv2(cap_avfoundation.o)
CvCaptureFile::CvCaptureFile(char const*) in opencv2(cap_avfoundation.o)
CvVideoWriter_AVFoundation::CvVideoWriter_AVFoundation(char const*, int, double, CvSize, int) in opencv2(cap_avfoundation.o)
The package is download at https://sourceforge.net/projects/opencvlibrary/files/opencv-ios/3.2.0/opencv-3.2.0-ios-framework.zip/download.
You need framework AVFoundation
@alalek Thanks,I added
AVFoundation.framework,
CoreMedia.framework,
AssetsLibrary.framework.
Most helpful comment
You need framework AVFoundation