资源简介
基于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
相关资源
- VisualStudioUninstaller vs卸载工具
- 组态王驱动开发包3.0.0.7(中文)
- 多窗口后台鼠标连点器
- 使用选择性重传协议实现UDP可靠通信
- VC 获得文件属性 获取文件的创建时
- 读者写者问题(读者优先,写者优先
- 用VC 编写的仿QQ聊天室程序源代码
- 外点法程序
- 外罚函数程序
- qt-电子点菜系统
- 推箱子及人工智能寻路C 源代码
- 自己写的航空订票系统c 版--数据结构
- 数据结构实验魔王语言
- MUSIC算法c 实现
- C 餐厅叫号系统(QT平)
- 国际象棋c 完整版
-
ob
jectARX给Auto CAD加工具条 - 画图程序MFC/VC/VC CRectTracker 串行化
- MFC网络编程实例
- c 课程设计 职工信息管理系统
- 基于OpenCV的数字识别468815
- VC 游戏编程—附源代码
- 使用opencv去掉二值化图像中黑色面积
- IpHlpApi.h&IpHlpApi.lib
- 清华大学 c 郑莉 ppt课件
- c 程序判断离散数学中命题公式
- 多项式求和(数据结构C 版)
- vc 6.0开发的流程图编辑器
- VC 天空盒(skyBox)实现(附源代码)
- c MFC 画多边形
评论
共有 条评论