对不起,调用函数时遇到以下错误: [self createIplImageFromUIImage:img1];
这是代码:
IplImage *imgTemplate = [self CreateIplImageFromUIImage:img1];
这是错误细节
error: cannot convert 'objc_object*' to 'IplImage*' in initialization
目前我正在使用xcode 4.4.1和ios 5.1以及来自aptogo网站的opencv ..也许2.4.2
*编辑(已解决)
IplImage *imgTemplate =(IplImage *)[self CreateIplImageFromUIImage:img1];
答案 0 :(得分:0)
也许这有帮助:
IplImage *imgTemplate = [[IplImage alloc] init];
imgTemplate = [self CreateIplImageFromUIImage:img1];