opencv图像拼接
2014-10-23 12:58
381 查看
#include <iostream> #include <fstream> #include "opencv2/highgui/highgui.hpp" #include "opencv2/stitching/stitcher.hpp" using namespace std; using namespace cv; int main(int argc, char* argv[]) { Mat img01 = imread("01.png"); Mat img02 = imread("02.png"); Mat img03 = imread("03.png"); vector<Mat> imgs; imgs.push_back(img01); imgs.push_back(img02); imgs.push_back(img03); Mat pano; Stitcher stitcher = Stitcher::createDefault(false); Stitcher::Status status = stitcher.stitch(imgs, pano); if (status != Stitcher::OK) { cout << "Can't stitch images, error code = " << int(status) << endl; return -1; } imshow("01",img01); imshow("02",img02); imshow("03",img03); imshow("Stitch",pano); waitKey(0); imwrite("result.jpg", pano); return 0; }
使用opencv自带的类Stitcher,来实现图像拼接。
原图如下:
拼接效果如下图
相关文章推荐
- Opencv图像拼接
- 用opencv开源包实现了下图像拼接
- 基于opencv的图像拼接(一): sift特征点提取
- 利用opencv的stitcher类进行图像拼接
- OpenMP并行编程应用—加速OpenCV图像拼接算法
- OpenCV学习笔记(五十一)——imge stitching图像拼接stitching OpenCV学习笔记(五十二)——号外:OpenCV 2.4.1 又出来了。。。。。 OpenCV学习笔记(五
- OPenCV 图像拼接之------stitching和stitching_detailed
- [转]opencv实现几幅图像拼接成一整幅大图
- opencv学习--图像拼接之 Stitcher
- androidstudio opencv2.4.10下使用图像拼接,特征检测
- Opencv3 Sift和Surf特征实现图像无缝拼接生成全景图像
- 基于opencv的图像拼接(二): stitch 类
- 特征点匹配应用——图像拼接的原理与基于OpenCV的实现
- OpenCV实现将两幅图像拼接在一起
- OpenCV学习笔记(五十一)——imge stitching图像拼接stitching
- Opencv 使用Stitcher类图像拼接生成全景图像
- opencv-图像拼接与融合
- opencv--图像拼接
- opencv图像拼接与融合
- 基于OpenCV的图像拼接