TranslateProject/published/201401/How to stitch photos together on Linux.md
wxy 1ee2fc7cbe renamed: 10 Lesser Known Useful Linux Commands- Part V.md -> 201401/10 Lesser Known Useful Linux Commands- Part V.md
renamed:    10 Useful Chaining Operators in Linux with Practical Examples.md -> 201401/10 Useful Chaining Operators in Linux with Practical Examples.md
	renamed:    10 basic examples of linux netstat command.md -> 201401/10 basic examples of linux netstat command.md
	renamed:    12 Advanced Commands For Linux Server Admins!.md -> 201401/12 Advanced Commands For Linux Server Admins!.md
	renamed:    14 New Linux Distros That Were Introduced In 2013.md -> 201401/14 New Linux Distros That Were Introduced In 2013.md
	renamed:    15 Basic MySQL Interview Questions for Database Administrators.md -> 201401/15 Basic MySQL Interview Questions for Database Administrators.md
	renamed:    "2013\357\274\232The Golden Year for Linux \342\200\223 10 Biggest Linux Achievements.md" -> "201401/2013\357\274\232The Golden Year for Linux \342\200\223 10 Biggest Linux Achievements.md"
	renamed:    2014--The year of the Linux car.md -> 201401/2014--The year of the Linux car.md
	renamed:    5 Things To Love And Hate About Ubuntu 13.10.md -> 201401/5 Things To Love And Hate About Ubuntu 13.10.md
	renamed:    8 Interesting Linux Tips And Tricks!.md -> 201401/8 Interesting Linux Tips And Tricks!.md
	renamed:    CentOS 6.5 desktop installation guide with screenshots.md -> 201401/CentOS 6.5 desktop installation guide with screenshots.md
	renamed:    "Command Line Basics \342\200\223 watch.md" -> "201401/Command Line Basics \342\200\223 watch.md"
	renamed:    Configure Your Browser To Use Tor On Ubuntu or Debian or Linux Mint.md -> 201401/Configure Your Browser To Use Tor On Ubuntu or Debian or Linux Mint.md
	renamed:    Daily Ubuntu Tips - Mount Partitions In Ubuntu From Your Desktop GUI.md -> 201401/Daily Ubuntu Tips - Mount Partitions In Ubuntu From Your Desktop GUI.md
	renamed:    "Daily Ubuntu Tips \342\200\223 Do Nothing When Laptop Lid Is Closed.md" -> "201401/Daily Ubuntu Tips \342\200\223 Do Nothing When Laptop Lid Is Closed.md"
	renamed:    "Daily Ubuntu Tips \342\200\224 Install VMware Workstation In Ubuntu.md" -> "201401/Daily Ubuntu Tips \342\200\224 Install VMware Workstation In Ubuntu.md"
	renamed:    "Daily Ubuntu Tips \342\200\224 Windows Disk Management Equivalent In Ubuntu.md" -> "201401/Daily Ubuntu Tips \342\200\224 Windows Disk Management Equivalent In Ubuntu.md"
	renamed:    "Gnu--toward the post-scarcity world \342\200\223 the Free Software Column.md" -> "201401/Gnu--toward the post-scarcity world \342\200\223 the Free Software Column.md"
	renamed:    How to Dual Boot Ubuntu and Windows Properly.md -> 201401/How to Dual Boot Ubuntu and Windows Properly.md
	renamed:    "How to Install and Configure UFW \342\200\223 An Un-complicated FireWall in Debian or Ubuntu.md" -> "201401/How to Install and Configure UFW \342\200\223 An Un-complicated FireWall in Debian or Ubuntu.md"
	renamed:    How to Upgrade to GNOME 3.10 in Ubuntu 13.10.md -> 201401/How to Upgrade to GNOME 3.10 in Ubuntu 13.10.md
	renamed:    How to install and configure Nagios on Linux.md -> 201401/How to install and configure Nagios on Linux.md
	renamed:    How to set password policy on Linux.md -> 201401/How to set password policy on Linux.md
	renamed:    How to stitch photos together on Linux.md -> 201401/How to stitch photos together on Linux.md
	renamed:    How to upgrade MySQL server on Debian or Ubuntu.md -> 201401/How to upgrade MySQL server on Debian or Ubuntu.md
	renamed:    Juju ice-cream icon design.md -> 201401/Juju ice-cream icon design.md
	renamed:    Linus Torvalds Releases Last Linux Kernel 3.13 RC for 2013.md -> 201401/Linus Torvalds Releases Last Linux Kernel 3.13 RC for 2013.md
	renamed:    Linus Torvalds Says All Contributor License Agreements Are Broken.md -> 201401/Linus Torvalds Says All Contributor License Agreements Are Broken.md
	renamed:    Linux free Command - Display Free and used Memory in the System.md -> 201401/Linux free Command - Display Free and used Memory in the System.md
	renamed:    Linux id Command - Print user ID and group ID information.md -> 201401/Linux id Command - Print user ID and group ID information.md
	renamed:    Linux is Everywhere. We show you exactly where.md -> 201401/Linux is Everywhere. We show you exactly where.md
	renamed:    Linux lsusb Command to Print information about USB on System.md -> 201401/Linux lsusb Command to Print information about USB on System.md
	renamed:    Linux vmstat Command - Tool to Report Virtual Memory Statistics.md -> 201401/Linux vmstat Command - Tool to Report Virtual Memory Statistics.md
	renamed:    "Linux who command \342\200\223 Displays who is on the system.md" -> "201401/Linux who command \342\200\223 Displays who is on the system.md"
	renamed:    "Move Dropbox\342\200\231s Folder To An External Drive In Ubuntu.md" -> "201401/Move Dropbox\342\200\231s Folder To An External Drive In Ubuntu.md"
	renamed:    New Ubuntu 14.04 Icons Are Drop-Dead Gorgeous, Might Not Arrive in Desktop Version.md -> 201401/New Ubuntu 14.04 Icons Are Drop-Dead Gorgeous, Might Not Arrive in Desktop Version.md
	renamed:    Our Top 10 Linux Applications of 2013.md -> 201401/Our Top 10 Linux Applications of 2013.md
	renamed:    Setup your personal Cloud server in minutes using ownCloud On RHEL, CentOS, Scientific Linux 6.5.md -> 201401/Setup your personal Cloud server in minutes using ownCloud On RHEL, CentOS, Scientific Linux 6.5.md
	renamed:    Software May Be Eating The World, But Open Source Software Is Eating Itself.md -> 201401/Software May Be Eating The World, But Open Source Software Is Eating Itself.md
	renamed:    The Debian Administrator's Handbook updated for Debian 7 Wheezy published and freely available for download.md -> 201401/The Debian Administrator's Handbook updated for Debian 7 Wheezy published and freely available for download.md
	renamed:    The Fedora Project Will No Longer Name Its Linux Distributions.md -> 201401/The Fedora Project Will No Longer Name Its Linux Distributions.md
	renamed:    The Genius Of Linux Is Community, Not Technology.md -> 201401/The Genius Of Linux Is Community, Not Technology.md
	renamed:    Top 10 Linux Distros For Hackers!.md -> 201401/Top 10 Linux Distros For Hackers!.md
	renamed:    Tunnel SSH Connections Over SSL Using 'Stunnel' On Debian 7  Ubuntu 13.10.md -> 201401/Tunnel SSH Connections Over SSL Using 'Stunnel' On Debian 7  Ubuntu 13.10.md
	renamed:    Ubuntu Stores Your Wi-Fi Passwords By Default!.md -> 201401/Ubuntu Stores Your Wi-Fi Passwords By Default!.md
	renamed:    Ubuntu Will Reach True Convergence Before Microsoft, Says Shuttleworth.md -> 201401/Ubuntu Will Reach True Convergence Before Microsoft, Says Shuttleworth.md
	renamed:    Understanding Linux cd Command with Examples.md -> 201401/Understanding Linux cd Command with Examples.md
	renamed:    look--Linux Command To Verify Spellings And Display Lines Beginning With A String.md -> 201401/look--Linux Command To Verify Spellings And Display Lines Beginning With A String.md
2014-02-03 20:55:51 +08:00

104 lines
5.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

如何在 Linux 中生成全景照片
================================================================================
如果你是一位狂热的摄影爱好者,那么你的摄影集中可能会有一些令人叹为观止的全景摄影作品。事实上,制作这些照片既不需要专业的摄影技术,也不需要什么特别的设备,利用一些照片合并软件(在线或者是离线,桌面设备或者移动设备)就可以将两幅或者多幅有重叠部分的照片轻松合成一幅全景照片。
这篇教程里,我将会解释 **如何在 Linux 中完成全景照片的合并工作**。在这儿,我将会使用一款叫做 [Hugin][1] 的照片合并软件。
Hugin 是一款开源GPLv2并可以免费使用的照片合并工具。它目前支持多个平台包括 LinuxWindowsOS X 和 FreeBSD。 尽管作为一款开源软件但是不论在功能上还是质量上Hugin 都丝毫不逊色于商业软件。相反Hugin 非常强大不仅可以用来创建360度全景照片还支持多种高级测光修正和优化。
### 在 Linux 中安装 Hugin
在 DebianUbuntu 或者 Linux Mint 中安装 Hugin
$ sudo apt-get install hugin
在 Fedora 中安装 Hugin
$ sudo yum install hugin
### 启动 Hugin
我们使用命令来启动Hugin。
$ hugin
在这儿Assistant页我们要做的第一件事就是导入我们想要合并的照片。我们先来点击Load images 按钮,然后导入(两张或者多张)图片。当然了,这些照片应该需要相互有一些重叠的部分(我们这里载入了三张)。
[![](http://farm3.staticflickr.com/2884/11230363115_9aaaf5d8e4_z.jpg)][2]
### 第一次照片合并
在导入照片之后,点击 Align 按钮来开始我们的第一次合并
[![](http://farm8.staticflickr.com/7405/11230471403_4aab2dd708_z.jpg)][3]
为了正确合并照片Hugin 将会在一个单独的窗口中启动合并助手,用来分析照片之间的关键点(控制点)。分析完毕之后,呈现在你眼前的将会是一幅全景照片的预览图。
接下来让我们切换回 Hugin 的主窗口。在 Align 按钮的下方,你将会看见照片合并的状态(比如控制点的数量,错误情况)。当然,还会有合并好坏的相关提示。
[![](http://farm3.staticflickr.com/2838/11230471243_c59a6dd6cd_z.jpg)][4]
如果合并提示显示 bad 或者 really bad你可以继续按照下面的办法来进行排列的调整。
### 添加或者删除控制点
在主窗口中,进入 Control Points 标签页。在这儿Hugin 展现在组合照片中常用的的控制点。我们看到,在左右面板中展现了一对照片,上面的一些同色的小方盒表示的是常用的控制点。你可以手动来添加或者删除这些控制点。这些控制点匹配的越精确,我们得到的合并质量也就越高。除此之外,如果这些控制点分散得比较均匀,得到的效果将会更好。
[![](http://farm4.staticflickr.com/3706/11230392866_aeee95908d_z.jpg)][5]
使用顶部中间的左右箭头按钮来找到拥有最少控制点的两幅照片。如这样的两幅照片,我们可以试图按照下面的办法来手动增加控制点。
首先我们点击左边照片中的某个点然后再来点击右边照片中对应的点。Hugin 将会试图自动调整。接下来,我们继续点击底部的 Add 按钮来添加匹配对。重复上面的操作来添加更多的控制点。
[![](http://farm4.staticflickr.com/3790/11230376534_4acfdf09c8_z.jpg)][6]
### 其他优化
我们可以试图进行重新优化,比如点击工具栏中的 Re-optimize 按钮,或者去 Optimizer 标签中重新调整之前的优化。
[![](http://farm4.staticflickr.com/3830/11230470413_05dbb778d0_z.jpg)][5]
接下来回到 Hugin 主窗口中的 Assistant 标签,再次点击 Align 按钮来看看是否能得到一个更棒的结果。
倘若合并的全景照片的水平线参差不齐,我们可以试图将它拉直。首先点击工具栏上的 Preview panorama 按钮。
[![](http://farm8.staticflickr.com/7423/11230361845_afbb2e11ea_z.jpg)][6]
然后点击预览窗口中的 Straighten 按钮。
[![](http://farm4.staticflickr.com/3750/11230470463_2b4ef3dedf_z.jpg)][7]
一旦你对合并的结果感到满意,你可以继续将它导出为图片文件。只需要到 Hugin 主窗口中 Sticher 标签页里进行下面的操作:
调整画布大小,剪切数量。当然,还需要选择输出格式(比如 TIFFJPEGPNG。最后点击 Stitch按钮来完成。
[![](http://farm3.staticflickr.com/2837/11230376234_2e46342a01_z.jpg)][8]
之后会有提示保存当前项目文件(*.pto设定保存好输出的文件名即可。
导出过程可能会需要花费几秒钟的时间。
这里有一张我利用 Hugin 的实验输出结果。画面中是墨西哥坎昆迷人海滩的全景。:-)
[![](http://farm8.staticflickr.com/7305/11230423496_c7dfaf6c12_c.jpg)][9]
--------------------------------------------------------------------------------
via: http://xmodulo.com/2013/12/stitch-photos-together-linux.html
译者:[ailurus1991](https://github.com/ailurus1991) 校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://hugin.sourceforge.net/
[2]:http://www.flickr.com/photos/xmodulo/11230363115/
[3]:http://www.flickr.com/photos/xmodulo/11230471403/
[4]:http://www.flickr.com/photos/xmodulo/11230471243/
[5]:http://www.flickr.com/photos/xmodulo/11230392866/
[6]:http://www.flickr.com/photos/xmodulo/11230376534/
[7]:http://www.flickr.com/photos/xmodulo/11230470413/
[8]:http://www.flickr.com/photos/xmodulo/11230361845/
[9]:http://www.flickr.com/photos/xmodulo/11230470463/
[10]:http://www.flickr.com/photos/xmodulo/11230376234/
[11]:http://www.flickr.com/photos/xmodulo/11230423496/