0
我想在iOS中拼接幾張圖像。 所以我使用了openCV框架。 這是我的代碼。但我得到錯誤..在iOS中使用openCV拼接兩張圖像
/體積/工作/Panogram/Panogram/Frameworks/OpenCV.framework/Headers/opencv2/stitching/warpers.hpp:46:10:'detail/warpers.hpp'文件未找到
我想任何人都可以幫助我如何在iOS中使用openCV進行圖像拼接。 我認爲我的框架有問題..如果有人對我做了類似的工作,請幫助我。
#import <OpenCV/opencv2/opencv.hpp>
#import "UIImage+OpenCV.h"
#import <OpenCV/opencv2/stitching/stitcher.hpp>
@interface TakePhotoViewController()
@end
@implementation TakePhotoViewController
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
}
return self;
}
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view from its nib.
UIImage* testImg1 = [UIImage imageNamed:@"002.jpg"];
UIImage* testImg2 = [UIImage imageNamed:@"003.jpg"];
cv::vector<cv::Mat> images;
images.push_back([testImg1 CVMat]);
images.push_back([testImg2 CVMat]);
Stitcher stitcher = Stitcher::createDefault(YES);
Stitcher::Status st1 = stitcher.stitch(images, imgResult);
/////////add image to uiimageview
UIImage *image= [self UIImageFromCVMat:imgResult];
imgView.image=image;
}
感謝您的回答。你對這個錯誤是正確的。 – Skyangel227
但我認爲我的opencv框架不正確。如果你和我做過類似的工作,請給我正確的opencv框架和示例代碼,這些代碼適合你。 – Skyangel227
嘿,我需要一些helop,你能給解決方案嗎? – Rajneesh071