body { font-family: @微软雅黑; font-size: 8pt; line-height: 1.5 }
html,body { color: inherit; background-color: inherit }
h1 { font-size: 1.5em; font-weight: bold }
h2 { font-size: 1.4em; font-weight: bold }
h3 { font-size: 1.3em; font-weight: bold }
h4 { font-size: 1.2em; font-weight: bold }
h5 { font-size: 1.1em; font-weight: bold }
h6 { font-size: 1.0em; font-weight: bold }
img { border: 0; max-width: 100% }
blockquote { margin-top: 0px; margin-bottom: 0px }
table { border-collapse: collapse; border: 1px solid #bbbbbb }
td { border-collapse: collapse; border: 1px solid #bbbbbb }

     如果仅仅是简单的拼接,可以采用stitching.cpp就差不多了;但是如果采用stitching_detailed.cpp的话,首先要解决的就是"编译问题",而后解决的是分析不同参数下的拼接结果和匹配效果;最后是能够理解一些原理。
     OK,历经一些调试,编译成功,首先看一下有哪些参数可以调整。其实光靠这个就可以写一个简单的带调整的界面了。


F:\06.项目项目\opencv拼接\imageStitching\imageStitching>imageStitching.exe
Rotation model images stitcher.

stitching_detailed img1 img2 [...imgN] [flags]

Flags:
  --preview
      Run stitching in the preview mode. Works faster than usual mode,
      but output image will have lower resolution.
  --try_gpu (yes|no)
      Try to use GPU. The default value is 'no'. All default values
      are for CPU mode.

Motion Estimation Flags:
  --work_megapix <float>
      Resolution for image registration step. The default is 0.6 Mpx.
  --features (surf|orb)
      Type of features used for images matching. The default is surf.
  --match_conf <float>
      Confidence for feature matching step. The default is 0.65 for surf and 0.3 for orb.  这个我可能会单独配置
  --conf_thresh <float>
      Threshold for two images are from the same panorama confidence.
      The default is 1.0.
  --ba (reproj|ray)
      Bundle adjustment cost function. The default is ray.
  --ba_refine_mask (mask)
      Set refinement mask for bundle adjustment. It looks like 'x_xxx',
      where 'x' means refine respective parameter and '_' means don't
      refine one, and has the following format:
      <fx><skew><ppx><aspect><ppy>. The default mask is 'xxxxx'. If bundle
      adjustment doesn't support estimation of selected parameter then
      the respective flag is ignored.
  --wave_correct (no|horiz|vert)
      Perform wave effect correction. The default is 'horiz'.
  --save_graph <file_name>
      Save matches graph represented in DOT language to <file_name> file.
      Labels description: Nm is number of matches, Ni is number of inliers,
      C is confidence.

Compositing Flags:
  --warp (plane|cylindrical|spherical|fisheye|stereographic|compressedPlaneA2B1|
compressedPlaneA1.5B1|compressedPlanePortraitA2B1|compressedPlanePortraitA1.5B1|
paniniA2B1|paniniA1.5B1|paniniPortraitA2B1|paniniPortraitA1.5B1|mercator|transve
rseMercator)
      Warp surface type. The default is 'spherical'.
  --seam_megapix <float>
      Resolution for seam estimation step. The default is 0.1 Mpx.
  --seam (no|voronoi|gc_color|gc_colorgrad)
      Seam estimation method. The default is 'gc_color'.
  --compose_megapix <float>
      Resolution for compositing step. Use -1 for original resolution.
      The default is -1.
  --expos_comp (no|gain|gain_blocks)
      Exposure compensation method. The default is 'gain_blocks'.
  --blend (no|feather|multiband)
      Blending method. The default is 'multiband'.
  --blend_strength <float>
      Blending strength from [0,100] range. The default is 5.
  --output <result_img>
      The default is 'result.jpg'.

测试图片:
第一组:

--全部默认参数,80秒,结果

--preview 约80秒,这个图片拼接的不错,但是时间太长了。

 --work_megapix <float>是用于寻找的,改为0.1后时间为30秒
      --features (surf|orb) 改成orb后速度显著提升
 --match_conf <float>也应该是数值越小匹配越快,但是失败的可能也越大。这个是不断调整参数的过程。

  --ba (reproj|ray)默认是ray,改为reproj后,速度更快!更快


然后,就是 --warp 这一块,参数比较多
plane
cylindrical
fisheye
spherical

opencv提供的带参数例程的更多相关文章

  1. OpenCV中的SVM参数优化

    OpenCV中的SVM参数优化 svm参数优化opencv SVMSVR参数优化CvSVMopencv CvSVM        SVM(支持向量机)是机器学习算法里用得最多的一种算法.SVM最常用的 ...

  2. C#的泛型的类型参数可以有带参数的构造函数的约束方式吗?

    Review后看到标题让我十分羞愧自己语文功底太差,估计...请见谅......我还特地把这句写回开头了...... 问题 前天遇到的一个问题,所以在MSDN发了个问,刚也丰富了下问题,关于泛型的. ...

  3. Force.com微信开发系列(八)生成带参数的二维码

    为了满足用户渠道推广分析的需要,公众平台提供了生成带二维码的接口.使用该接口可以获得多个带不同场景值的二维码,用户扫描后,公众号可以接收到事件推送.目前有两种类型的二维码,分别是临时二维码和永久二维码 ...

  4. c# 多线程 调用带参数函数

    线程操作主要用到Thread类,他是定义在System.Threading.dll下.使用时需要添加这一个引用.该类提供给我们四个重载的构造函数(以下引自msdn).       Thread (Pa ...

  5. c++中在一个类中定义另一个只有带参数构造函数的类的对象

    c++中在一个类中定义另一个只有带参数构造函数的类的对象,编译通不过 #include<iostream> using namespace std; class A { public:  ...

  6. c#创建带参数的线程

    1.无参数线程的创建 Thread thread = new Thread(new ThreadStart(getpic)); thread.Start(); private void showmes ...

  7. C# 利用反射动态创建对象——带参数的构造函数和String类型

    C# 利用反射动态创建对象——带参数的构造函数和String类型 最近笔者有一个想法需要利用反射动态创建对象(如string,int,float,bool,以及自定义类等)来实现,一直感觉反射用不好, ...

  8. C#线程调用带参数的方法

    在 .NET Framework 2.0 版中,要实现线程调用带参数的方法有两种办法.第一种:使用ParameterizedThreadStart.调用 System.Threading.Thread ...

  9. 带参数的Mixin

    带参数的mixin 在Less中,还可以像函数一样定义一个带参数的mixin, 这种形式叫做 Parametric Mixin,即带参数的混入.如: // 定义一个样式选择器 .borderRadiu ...

随机推荐

  1. Docker for Windows 使用入门

    欢迎来到Docker for Windows! Docker是用于创建Docker应用程序的完整开发平台,Docker for Windows是在Windows系统上开始使用Docker的最佳方式. ...

  2. 自学Zabbix3.6.3-触发器triggers expression表达式

    触发器中的表达式使用很灵活,我们可以创建一个复杂的逻辑测试监控,触发器表达式形式如下: 1 {<server>:<key>.<function>(<param ...

  3. Python笔记·第九章—— 函数 (一)

    一.函数的作用 函数可以让我们代码结构更清晰,而且避免了代码的重复,冗余,使一段代码或者功能可以反复的被调用,大大提高了开发效率 二.函数的定义 def 函数名(参数1,参数2,*args,默认参数, ...

  4. linux启动失败

    如图 1.开机界面 按 e 键 2.选择第二个进入就好了 根据网上说的修改kernel 配置  加上 enforcing=0 无效 1.进入界面后再按 e 键 3.选择第二个按e键进入编辑 界面 每次 ...

  5. js登录滑动验证,不滑动无法登陆

    js的判断这里是根据滑块的位置进行判断,应该是用一个flag判断 <%@ page language="java" contentType="text/html; ...

  6. OC学习6——面相对象的三大特性

    我们在学习Java的时候都知道,类有三大特性:继承,封装,多态,这也是面向对象的三大特征.OC学习篇之---类的三大特性(封装,继承,多态) 1.封装(Encapsulation)是指将对象的状态信息 ...

  7. caffe CuDNN报错问题解决

    解决cudnn问题:Loaded runtime CuDNN library: 5005 (compatibility version 5000) but source was compiled wi ...

  8. Python 项目实践二(下载数据)第四篇

    接着上节继续学习,在本节中,你将下载JSON格式的人口数据,并使用json模块来处理它们.Pygal提供了一个适合初学者使用的地图创建工具,你将使用它来对人口数据进行可视化,以探索全球人口的分布情况. ...

  9. Java-单例模式详解(图文并茂,简单易懂)

    PS:首先我们要先知道什么是单例,为什么要用单例,用的好处是什么等问题来看. 1:java中单例模式是一种常见的设计模式,单例模式的写法有好几种,这里主要介绍两种:懒汉式单例.饿汉式单例单例模式有以下 ...

  10. MySQL 字符集问题及安全的更新操作

    一.字符集乱码 1.操作系统字符集 [root@mysql5 ~]# cat /etc/system-release /etc/sysconfig/i18n CentOS release 6.5 (F ...