资源简介
基于opencv实现的图像拼接,比Stitcher详细,有中间过程有部分中文注释
代码片段和文件信息
#include
#include
#include
#include “opencv2/opencv_modules.hpp“
#include “opencv2/highgui/highgui.hpp“
#include “opencv2/stitching/detail/autocalib.hpp“
#include “opencv2/stitching/detail/blenders.hpp“
#include “opencv2/stitching/detail/camera.hpp“
#include “opencv2/stitching/detail/exposure_compensate.hpp“
#include “opencv2/stitching/detail/matchers.hpp“
#include “opencv2/stitching/detail/motion_estimators.hpp“
#include “opencv2/stitching/detail/seam_finders.hpp“
#include “opencv2/stitching/detail/util.hpp“
#include “opencv2/stitching/detail/warpers.hpp“
#include “opencv2/stitching/warpers.hpp“
using namespace std;
using namespace cv;
using namespace cv::detail;
// Default command line args
vector img_names;
bool preview = false;
bool try_gpu = false;
double work_megapix = 0.6;
double seam_megapix = 0.1;
double compose_megapix = 0.6;
float conf_thresh = 1.f;
string features_type = “surf“;//or“orb“
string ba_cost_func = “ray“;
string ba_refine_mask = “xxxxx“;
bool do_wave_correct = true;
WaveCorrectKind wave_correct = detail::WAVE_CORRECT_HORIZ; //水平方向
bool save_graph = false;
std::string save_graph_to;
string warp_type = “spherical“;
int expos_comp_type = ExposureCompensator::GAIN_BLOCKS;
float match_conf = 0.3f;
string seam_find_type = “gc_color“;
int blend_type = Blender::MULTI_BAND;
float blend_strength = 5;
string result_name = “result.jpg“;
int main(/*int argc char* argv[]*/)
{
int argc = 3;
char* argv[] = {“parliament1.jpg“ “parliament2.jpg“ “parliament3.jpg“
//int argc = 10;
//char* argv[] = {“1.jpg“ “2.jpg“ “3.jpg“ “4.jpg“ “5.jpg“ “6.jpg“ “7.jpg“ “8.jpg“ “9.jpg“
//“10.jpg“
// “--preview“
//“--try_gpu““no“
//“--work_megapix““0.6“
////“--features““orb“
//“--wave_correct““no“
//“--wave_correct“
//“--warp_type“// “plane“ “cylindrical““spherical““plane““cylindrical““spherical““fisheye““stereographic“
// “plane“ //“compressedPlaneA2B1“ “compressedPlaneA1.5B1““compressedPlanePortraitA2B1“
//// “compressedPlanePortraitA1.5B1“ “paniniA2B1““paniniA1.5B1“ “paniniPortraitA2B1““paniniPortraitA1.5B1“
// // “mercator“ “transverseMercator“
// “--expos_comp““no“
// “--seam““no““--blend““no“
};
for (int i = 0; i < argc; ++i)
img_names.push_back(argv[i]);
// Check if have enough images
int num_images = static_cast(img_names.size()); //拼接图片的数量
double work_scale = 1 seam_scale = 1 compose_scale = 1;
bool is_work_scale_set = false is_seam_scale_set = false is_compose_scale_set = false;
cout<<“Finding features...“<
Ptr finder;
#if defined(HAVE_OPENCV_NONFREE) && defined(HAVE_OPENCV_GPU) && !defined(ANDROID)
if (try_gpu && gpu::getCudaEnabledDeviceCou
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2016-09-02 17:37 opencvstitch\
目录 0 2016-09-02 17:37 opencvstitch\opencvstitch\
文件 14113 2016-09-02 17:37 opencvstitch\opencvstitch\opencvstitch.cpp
文件 4020 2016-09-02 17:37 opencvstitch\opencvstitch\opencvstitch.vcxproj
文件 950 2016-09-02 17:37 opencvstitch\opencvstitch\opencvstitch.vcxproj.filters
文件 150854 2016-07-20 15:00 opencvstitch\opencvstitch\parliament1.jpg
文件 149259 2016-07-20 14:50 opencvstitch\opencvstitch\parliament2.jpg
文件 147176 2016-07-20 14:57 opencvstitch\opencvstitch\parliament3.jpg
文件 7274496 2016-09-02 17:37 opencvstitch\opencvstitch.sdf
文件 903 2016-09-02 17:36 opencvstitch\opencvstitch.sln
文件 18432 2016-09-02 17:37 opencvstitch\opencvstitch.v11.suo
- 上一篇:A-PDF Page Cut 3.5
- 下一篇:《工厂物理学》中文译稿 2.rar
相关资源
- 测量平差程序设计—宋力杰
- HDF5 HDF4 NC 格式数据解析操作类
- 通信录管理系统(用数据库连接,包
- QT5各类控件合集包好常用(QML)
- ROI区域&图像混合例程by浅墨
- ASM 人脸特征点提取
- 车牌识别源代码
- 并行计算mpi与openmp之蒙特卡洛求不规
- Opencv下利用SIFT、SURF、ORB三种特征点实
- opencv 、directshow捕获摄像头实时播放
- Opencv和图像分类
- 基于opencv的车道线检测代码
- perl2exe 破解版,可编译生成exe文件
- AIX 5.3安装文档
- OPENCv 在图片上写字,各种格式
- 超市信息管理系统课程设计.docx
- QT+OpenCV实现图像识别
- 数据结构 刘大有 代码
- 程序包.rar基于pyqt+OpenCV设计的用户密
- OpenCV双目标定双目校正
- 用OpenCV作的一个车牌识别程序,可以
- 实现快速排序
- 判断一个有向图中是否存在回路,并
- 邮政编码识别 OPENCV
- opencv 神经网络分类
- opencv中文chm参考api文档
- opencv识别单行数字
- 本科课设——电力系统潮流计算
- 人脸识别系统-毕业设计
- 颜色增强算法Opencv
评论
共有 条评论