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. 浏览器正确理解和使用GBK及UTF-8(UTF-8 + BOM)网页编码

    网页编码英文译为web page encoding.是在网页中指定其特定的字符编码格式的库. GBK是国家标准GB2312基础上扩容后兼容GB2312的标准. GBK的文字编码是用双字节来表示的.即不 ...

  2. AbstractFactory抽象工厂模式

    #include <iostream> using namespace std; class ProductAbase { public: ProductAbase(){} virtual ...

  3. String.prototype.trim

    /*内置对象添加方法:String.prototype.trim(给String添加一个trim方法) *^这个是以什么什么开头 *$这个是以什么什么结尾 *'/s是String /d是数字' *re ...

  4. js复制链接

    需求:js复制一个并非当前页面的链接 实现: html <button class="btn btn-primary btn_copyurl">复制课程链接</b ...

  5. 记录maven的一些命令

    为了方便后面找资料更快,记录下(不定期更新): maven官网:http://maven.apache.org/plugins/ mvn package打包 mvn package -DskipTes ...

  6. 快速学习Bash

    作者:Vamei 出处:http://www.cnblogs.com/vamei 严禁转载. Shell是Linux下经典的文本互动方式,而Bash是现在最常用的一种Shell.我在这里总结了Bash ...

  7. n年前,我没钱但年轻,我怕n年后我老时,还是一无所成——2017我的收获和反思

    记得当年我刚从学校里出来时,应该和现在的95后差不多,当时还是很惶恐的,怕找不到工作,怕无法挣到足够的钱买房子支撑家庭,(当然还有其它的担心点),却唯独没意识到自己拥有着最宝贵的财富:年轻. 年轻意味 ...

  8. React的JSX语法及组件

    最近一个同事很急没有做任何交接就请了陪产假,然后我来维护.说实在的我一开始是一脸懵逼的.因为MV*项目里用的最多的还是Vue:React听说也了解过,但毕竟不熟... 不过不管如何这也是工作:同事也恭 ...

  9. UVALive 4490 Help Bubu

    题目大意:有n本书,高度值域为8,现可以把k本书拿出来再放进去,相邻的.高度相同的书算作一块,最小化块的个数.n=100. 强烈建议大家不要在做完区间DP后做别的DP题:区间DP是整体考虑,而一般DP ...

  10. bat检测文件大小并邮件报警

    rem 获取当前日期 set TimeName=%date:~0,4%%date:~5,2%%date:~8,2% rem 获取文件名 set file=%TimeName%   rem 获取文件大小 ...