<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Hugin &#8211; Matthew Petroff</title>
	<atom:link href="https://mpetroff.net/tag/hugin/feed/" rel="self" type="application/rss+xml" />
	<link>https://mpetroff.net</link>
	<description>mpetroff.net</description>
	<lastBuildDate>Thu, 01 Dec 2016 00:12:54 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>Stabilizing 360 Video with Hugin</title>
		<link>https://mpetroff.net/2016/11/stabilizing-360-video-with-hugin/</link>
					<comments>https://mpetroff.net/2016/11/stabilizing-360-video-with-hugin/#comments</comments>
		
		<dc:creator><![CDATA[Matthew Petroff]]></dc:creator>
		<pubDate>Wed, 30 Nov 2016 23:51:08 +0000</pubDate>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[360]]></category>
		<category><![CDATA[equirectangular]]></category>
		<category><![CDATA[Hugin]]></category>
		<category><![CDATA[stabilization]]></category>
		<category><![CDATA[video]]></category>
		<guid isPermaLink="false">https://mpetroff.net/?p=2341</guid>

					<description><![CDATA[Although there are plenty of tools that work well for stabilizing regular video, there aren&#8217;t any good ones for stabilizing 360 degree video. As I was unable to find any freely available software that worked, I used various command line &#8230; <a href="https://mpetroff.net/2016/11/stabilizing-360-video-with-hugin/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p><span class="dropcap">A</span>lthough there are plenty of tools that work well for stabilizing regular video, there aren&#8217;t any good ones for stabilizing 360 degree video. As I was unable to find any freely available software that worked, I used various command line tools from <a href="http://hugin.sourceforge.net/">Hugin</a> and <a href="https://www.ffmpeg.org/">FFmpeg</a>. Although this worked, it was <em>extremely</em> slow and had some issues with the horizon drifting.<sup id="rf1-2341"><a href="https://mpetroff.net/2016/11/stabilizing-360-video-with-hugin/#fn1-2341" title="Manually adding some horizontal line control points in Hugin helped in this regard." rel="footnote">1</a></sup> I can&#8217;t really recommend the approach, but I figured I&#8217;d post the technique in case anyone finds it to be useful. Hopefully Facebook with open source their <a href="https://code.facebook.com/posts/697469023742261/360-video-stabilization-a-new-algorithm-for-smoother-360-video-viewing/">360 video stabilization</a>, since it seems much better.<br />
<span id="more-2341"></span></p>
<div class="highlighted-source default bash">
<pre><span></span><span class="c1"># Extract frames from original video</span>
ffmpeg -i video.webm frame%03d.png

<span class="c1"># Create Hugin project with frames</span>
pto_gen -o project.pto -p <span class="m">4</span> -f <span class="m">360</span> frame*.png

<span class="c1"># Find control points between adjacent frames</span>
cpfind --linearmatch -o ctrlpoints.pto project.pto

<span class="c1"># Remove bad control points (optional)</span>
cpclean -p -o clean.pto ctrlpoints.pto

<span class="c1"># Optimize fit</span>
autooptimiser -p -o optimized.pto clean.pto

<span class="c1"># Change output size to match input and change output mode to only remap images</span>
pano_modify --canvas<span class="o">=</span>AUTO --output-type<span class="o">=</span>REMAPORIG -o output.pto optimized.pto

<span class="c1"># Stitch output</span>
nona -o output output.pto

<span class="c1"># Convert remapped frames back into video</span>
ffmpeg -framerate <span class="m">30</span> -i output%04d.tif -c:v libvpx -b:v 10M output-no-audio.webm

<span class="c1"># Copy audio</span>
ffmpeg -i output-no-audio.webm -i video.webm -map <span class="m">0</span>:v -map <span class="m">1</span>:a -c:v copy -c:a libvorbis output.webm
</pre>
</div>
<p><iframe width="100%" height="315" src="https://www.youtube.com/embed/TRyp1ygxnv4" frameborder="0" allowfullscreen></iframe></p>
<p><iframe loading="lazy" width="100%" height="315" src="https://www.youtube.com/embed/cIAziL4ScJQ" frameborder="0" allowfullscreen></iframe></p>
<hr class="footnotes"><ol class="footnotes" style="list-style-type:decimal"><li id="fn1-2341"><p >Manually adding some horizontal line control points in Hugin helped in this regard.&nbsp;<a href="https://mpetroff.net/2016/11/stabilizing-360-video-with-hugin/#rf1-2341" class="backlink" title="Return to footnote 1.">&#8617;</a></p></li></ol>]]></content:encoded>
					
					<wfw:commentRss>https://mpetroff.net/2016/11/stabilizing-360-video-with-hugin/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Peering Down</title>
		<link>https://mpetroff.net/2015/01/peering-down/</link>
					<comments>https://mpetroff.net/2015/01/peering-down/#comments</comments>
		
		<dc:creator><![CDATA[Matthew Petroff]]></dc:creator>
		<pubDate>Fri, 16 Jan 2015 06:00:10 +0000</pubDate>
				<category><![CDATA[Photography]]></category>
		<category><![CDATA[Baltimore]]></category>
		<category><![CDATA[George Peabody Library]]></category>
		<category><![CDATA[Hugin]]></category>
		<category><![CDATA[photography]]></category>
		<guid isPermaLink="false">http://mpetroff.net/?p=1711</guid>

					<description><![CDATA[Two years ago, I took a large set of photos at the George Peabody Library. Among those were a very wide angle image looking up at the skylight and an image looking down. The latter was taken with a point-and-shoot &#8230; <a href="https://mpetroff.net/2015/01/peering-down/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p><span class="dropcap">T</span>wo years ago, I took a <a href="/2013/02/george-peabody-library/">large set of photos</a> at the George Peabody Library. Among those were a very wide angle image <a href="https://www.flickr.com/photos/petroffm/8412068345/">looking up at the skylight</a> and <a href="https://www.flickr.com/photos/petroffm/8391402264/">an image looking down</a>. The latter was taken with a point-and-shoot camera suspended between the sixth floor railings with the help of <a href="https://www.flickr.com/photos/petroffm/8390318647/">fishing line and office supplies</a>. Unfortunately, the field of view was much too narrow, leaving the stacks out completely, so the photo fell short of my vision for it, and it didn&#8217;t complement the photo looking up. I needed to use my DSLR and fisheye lens, but there was no way the previous method would have supported it. However, I just revisited this idea and finally got the photo I wanted.</p>
<p><a href="https://cdn0.mpetroff.net/wp-content/uploads/2015/01/peering-down.jpg" title="Peering Down" data-sbox="1711"><img loading="lazy" decoding="async" class="aligncenter wp-image-1714 size-large" title="Peering Down" src="https://cdn0.mpetroff.net/wp-content/uploads/2015/01/peering-down-640x427.jpg" alt="Peering Down" width="640" height="427" srcset="https://cdn0.mpetroff.net/wp-content/uploads/2015/01/peering-down-640x427.jpg 640w, https://cdn0.mpetroff.net/wp-content/uploads/2015/01/peering-down-300x200.jpg 300w, https://cdn0.mpetroff.net/wp-content/uploads/2015/01/peering-down-1280x853.jpg 1280w, https://cdn0.mpetroff.net/wp-content/uploads/2015/01/peering-down.jpg 1500w" sizes="auto, (max-width: 640px) 100vw, 640px" /></a></p>
<p><span id="more-1711"></span></p>
<p>This time, I designed an aluminum rig to hold the DSLR and suspended it between the railings using parachute cord. After stringing the cord across the atrium and pulling it taut with a trucker&#8217;s hitch, I attached the camera and pulled the rig to the center of the atrium using fishing line. Once the camera stopped swinging, I took around a dozen exposure-bracketed sets of photos via USB tethering and then took everything down. Finally, I used <a href="http://hugin.sourceforge.net/">Hugin</a> to correct the lens distortion and small misalignments for three bracketed sets, masking out people who were moving in each set; Enblend and Enfuse were used to create the final image, which was then cropped.</p>
<p><a href="https://cdn0.mpetroff.net/wp-content/uploads/2015/01/photo-setup.jpg" title="Photo Setup" data-sbox="1711"><img loading="lazy" decoding="async" class="aligncenter size-large wp-image-1720" title="Photo Setup" src="https://cdn0.mpetroff.net/wp-content/uploads/2015/01/photo-setup-640x480.jpg" alt="Photo Setup" width="640" height="480" srcset="https://cdn0.mpetroff.net/wp-content/uploads/2015/01/photo-setup-640x480.jpg 640w, https://cdn0.mpetroff.net/wp-content/uploads/2015/01/photo-setup-300x225.jpg 300w, https://cdn0.mpetroff.net/wp-content/uploads/2015/01/photo-setup-1280x960.jpg 1280w, https://cdn0.mpetroff.net/wp-content/uploads/2015/01/photo-setup.jpg 1500w" sizes="auto, (max-width: 640px) 100vw, 640px" /></a></p>
<p><a href="https://cdn0.mpetroff.net/wp-content/uploads/2015/01/photo-setup-2.jpg" title="Photo Setup" data-sbox="1711"><img loading="lazy" decoding="async" class="aligncenter size-large wp-image-1722" title="Photo Setup" src="https://cdn0.mpetroff.net/wp-content/uploads/2015/01/photo-setup-2-640x480.jpg" alt="Photo Setup" width="640" height="480" srcset="https://cdn0.mpetroff.net/wp-content/uploads/2015/01/photo-setup-2-640x480.jpg 640w, https://cdn0.mpetroff.net/wp-content/uploads/2015/01/photo-setup-2-300x225.jpg 300w, https://cdn0.mpetroff.net/wp-content/uploads/2015/01/photo-setup-2-1280x960.jpg 1280w" sizes="auto, (max-width: 640px) 100vw, 640px" /></a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://mpetroff.net/2015/01/peering-down/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
		<item>
		<title>Day Student Lounge Panorama</title>
		<link>https://mpetroff.net/2011/07/day-student-lounge-panorama/</link>
					<comments>https://mpetroff.net/2011/07/day-student-lounge-panorama/#respond</comments>
		
		<dc:creator><![CDATA[Matthew Petroff]]></dc:creator>
		<pubDate>Fri, 29 Jul 2011 02:33:53 +0000</pubDate>
				<category><![CDATA[Photography]]></category>
		<category><![CDATA[Day Student Lounge]]></category>
		<category><![CDATA[DSL]]></category>
		<category><![CDATA[Hugin]]></category>
		<category><![CDATA[pannellum]]></category>
		<category><![CDATA[panorama]]></category>
		<category><![CDATA[photography]]></category>
		<category><![CDATA[Taft]]></category>
		<guid isPermaLink="false">http://www.mpetroff.net/?p=190</guid>

					<description><![CDATA[For my four years at Taft, this was my home away from home. The Day Student Lounge in all its glory: May 28, 2011. And an interactive version:]]></description>
										<content:encoded><![CDATA[<p>For my four years at Taft, this was my home away from home. The Day Student Lounge in all its glory: May 28, 2011.</p>
<p><a href="https://cdn0.mpetroff.net/wp-content/uploads/2011/07/DSLpano-1000x500.jpg" title="Day Student Lounge Panorama" data-sbox="190"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-198" title="Day Student Lounge Panorama" src="https://cdn0.mpetroff.net/wp-content/uploads/2011/07/DSLpano-600x300.jpg" alt="Day Student Lounge Panorama" width="600" height="300" srcset="https://cdn0.mpetroff.net/wp-content/uploads/2011/07/DSLpano-600x300.jpg 600w, https://cdn0.mpetroff.net/wp-content/uploads/2011/07/DSLpano-600x300-300x150.jpg 300w" sizes="auto, (max-width: 600px) 100vw, 600px" /></a>And an interactive version:</p>
<div style="width:600px; margin-left:auto; margin-right:auto; overflow:hidden;"><iframe loading="lazy" title="pannellum panorama viewer" width="600" height="400" webkitAllowFullScreen mozallowfullscreen allowFullScreen style="border-style: none;" id="pannellum_6a7r6y2TWU" src="//cdn5.mpetroff.net/files/pannellum/pannellum.htm?panorama=https://cdn0.mpetroff.net/wp-content/uploads/2011/07/DSLpano.jpg&amp;id=pannellum_6a7r6y2TWU&amp;title=Day%20Student%20Lounge&amp;author=Matthew%20Petroff"></iframe></div>
]]></content:encoded>
					
					<wfw:commentRss>https://mpetroff.net/2011/07/day-student-lounge-panorama/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Sidewalk Chalk</title>
		<link>https://mpetroff.net/2011/06/sidewalk-chalk/</link>
					<comments>https://mpetroff.net/2011/06/sidewalk-chalk/#respond</comments>
		
		<dc:creator><![CDATA[Matthew Petroff]]></dc:creator>
		<pubDate>Sat, 18 Jun 2011 01:18:25 +0000</pubDate>
				<category><![CDATA[Photography]]></category>
		<category><![CDATA[Hugin]]></category>
		<category><![CDATA[mosaic]]></category>
		<category><![CDATA[photography]]></category>
		<category><![CDATA[Taft]]></category>
		<guid isPermaLink="false">http://www.mpetroff.net/?p=151</guid>

					<description><![CDATA[Prior to graduation, the underclassmen wrote the names of all of the graduating seniors on the various paths outside in sidewalk chalk. Wanting to remember this moment, I set out to document it and photographed the entire path with an &#8230; <a href="https://mpetroff.net/2011/06/sidewalk-chalk/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p><span class="dropcap">P</span>rior to graduation, the underclassmen wrote the names of all of the graduating seniors on the various paths outside in sidewalk chalk. Wanting to remember this moment, I set out to document it and photographed the entire path with an 8mm fisheye lens. I then pruned the more than 200 images down to 135 and, using <a title="Hugin" href="http://hugin.sourceforge.net/">Hugin&#8217;s</a> mosaic mode and more than 1000 manually selected control points, was able to stitch together the photos into one 678.9 megapixel image after many, many hours of work. Here I present the results.</p>
<p>Taft Class of 2011 Names:<br />
<a title="Taft Class of 2011 Names" href="/files/openzoom/taft-class-of-2011/">https://mpetroff.net/files/openzoom/taft-class-of-2011/</a></p>
<p>Taft Class of 2011 Initials:<br />
<a title="Taft Class of 2011 Initials" href="/files/openzoom/taft-class-of-2011-initials/">https://mpetroff.net/files/openzoom/taft-class-of-2011-initials/</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://mpetroff.net/2011/06/sidewalk-chalk/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Page Caching using Disk: Enhanced 
Content Delivery Network via Amazon Web Services: CloudFront: cdn0.mpetroff.net
Minified using Disk

Served from: mpetroff.net @ 2026-03-28 17:56:21 by W3 Total Cache
-->