没有合适的资源?快使用搜索试试~ 我知道了~
这是一个简短的文档,描述了在非gui环境中处理全景图的各种开源工具和技术。这些例子都是基于Linux的经验,但大多数应该在OS X或Windows上工作,最多只需要做一点修改。 这篇文档对于理解hugin本身“底层”发生了什么也很有用,建议任何想要使用hugin源代码的人阅读。 内容 你为什么要那样做? 2 panotools“脚本” 简单的命令行拼接 在命令行上创建hugin项目 4.1生成项目文件 4.2控制点生成 4.3修剪控制点 4.4优化位置和几何形状 4.5光度参数优化 4.6设置输出选项 4.7类似于Hugin GUI助手的示例工作流程 在命令行上拼接hugin项目 5.1重新映射(渲染)图像 5.2混合 6 .用panostart把它们连在一起 用于操作项目文件的脚本 命令行工具的完整列表 8.1控制点生成 8.2工程文件修改 8.3控制点修剪 8.4优化 8.5渲染 8.6混合 8.7 misc 8.8色差 8.9查询 8.10 tiff文件 8.11输出格式 8.12旧工具 有用的图像处理工具
资源推荐
资源详情
资源评论
Panorama scripting in a nutshell
This is a short document describing the various Open Source tools and techniques available for
working with panoramas in a non-GUI environment. The examples are based on Linux experience,
but most of them should work on OS X or Windows with minor modifications at most.
This document is also useful for understanding what happens 'under the hood' in hugin itself and
recommended reading for anyone looking to work with the hugin sourcecode.
Why would you do that?
PanoTools 'Scripting'
Simple command-line stitching
Creating hugin projects on the command-line
Generating the project file
Generating control points
Pruning control points
Optimising positions and geometry
Optimising photometric parameters
Setting output options
Example work flow similar to assistant in Hugin GUI
Stitching hugin projects on the command-line
Remapping (Rendering) images
Blending
Holding it all together with panostart
Panotools::Script for manipulating project files
Full list of command-line tools
Control point generation
Project file modification
Control point pruning
Optimisation
Rendering
Blending
Misc
Chromatic aberration
Querying
TIFF files
Output formats
Older tools
Contents
Useful Image processing tools
Why would you do that?
Creating and manipulating panoramas is something that should obviously be done in a graphical tool.
This is true, but perhaps you find that you are spending more time operating a computer than being a
photographer. This is an indication that something is wrong - The computer exists to do the boring
work and scripting is one way to make this happen.
PanoTools 'Scripting'
The file format first used in Helmut Dersch's Panorama tools is often referred to as a 'script', but a
'PanoTools' script is really a data file describing a 'panorama stitching project'.
Although these original PanoTools are less used today, the file format is alive and well with several
variations used as project files by PTGui, PTAssembler, hugin and related tools. These files are simple
plain-text, sometimes it is useful to modify them directly with a text editor - Further on we will
introduce various methods for manipulating them via the 'programming' kind of scripts.
Simple command-line stitching
Lets start with a basic but common use case: Photographers with quality panoramic tripod heads can
reproduce identical sets of photos every time, in this situation there is no need to create a new
stitching project for every panorama, it is enough to use a single project as a template.
This example takes a pre-existing project called template.pto, created with three photos. It uses nona
for remapping, and enblend for blending the remapped photos into a finished TIFF image:
nona -o out -m TIFF_m template.pto DSC_1234.JPG DSC_1235.JPG DSC_1236.JPG
enblend -o finished.tif out0000.tif out0001.tif out0002.tif
The first nona command creates three remapped TIFF images called out0000.tif, out0001.tif etc...
the list of input images can be substituted with any set of identically sized photos. The second enblend
command uses these TIFF files as input and merges them to a file called finished.tif. template.pto
If the internal blender is used, the commands simplify to
nona -o out -m TIFF template.pto DSC_1234.JPG DSC_1235.JPG DSC_1236.JPG
Creating hugin projects on the command-
line
The entire panorama creation process can be performed on the command-line, and therefore
scripted, doing this involves a series of steps similar to the workflow in a GUI tool.
Generating the project file
Most of hugin tools take a pto file as input and output. So the first step is to create this pto file. For
this purpose use pto_gen.
pto_gen *.jpg
will put all jpg files in the current directory into one project file with a default name. You can also
specify single images and your own project name
pto_gen -o project.pto image1.jpg image2.jpg image3.jpg
You can specify more options to the project (see pto_gen for details).
There are a number of tools available for generating control points from groups of photos, like cpfind.
Here is an example using cpfind
cpfind --multirow -o project.pto project.pto
Hint: Other control points generator, such as autopano-sift, autopano-sift-c, panomatic and match-n-
shift take a list of images instead of a project. In this case the pto generation and control point
generation are one step. Here is an example for autopano-sift-c:
autopano-sift-c --projection 0,50 project.pto DSC_1234.JPG DSC_1235.JPG DSC_1236.JPG
This will create a .pto project with control points (if any) linking the three photos, note that the
projection format (f0, rectilinear) of the input photos and approximate horizontal angle of view (v50,
50 degrees) have to be specified.
This still isn't a finished panorama, at the very least this involves optimising the camera positions and
then rendering the output.
You could go ahead and optimise this project file straight away, but this can be a bit hit and miss.
First it is a good idea to clean up the control points. There are currently two useful tools for cleaning
control points: celeste removes points from areas of sky and cpclean removes points with large error
distances, first celeste_standalone:
celeste_standalone -i project.pto -o project.pto
Then cpclean:
cpclean -o project.pto project.pto
Note that in both cases we are overwriting the input project.pto file with the cleaned output. If you
want you can create intermediate temporary files and keep each step in case you need to backtrack.
Other control point cleaners are ptscluster and ptoclean. cpclean has largely replaced ptoclean, but
you could still run it like this:
Generating control points
Pruning control points
剩余10页未读,继续阅读
资源评论
HLZ42576734
- 粉丝: 72
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功