<?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>Le coin à Guij</title>
	<atom:link href="http://guij.emont.org/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://guij.emont.org/blog</link>
	<description></description>
	<lastBuildDate>Thu, 02 Feb 2012 16:38:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.5</generator>
		<item>
		<title>FOSDEM 2012 &#8211; can beer freeze?</title>
		<link>http://guij.emont.org/blog/2012/02/02/fosdem-2012-can-beer-freeze/</link>
		<comments>http://guij.emont.org/blog/2012/02/02/fosdem-2012-can-beer-freeze/#comments</comments>
		<pubDate>Thu, 02 Feb 2012 16:38:08 +0000</pubDate>
		<dc:creator>guijemont</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://guij.emont.org/blog/?p=265</guid>
		<description><![CDATA[Thanks to my awesome employer Igalia, I am flying tomorrow to the cold city of Brussels to attend FOSDEM 2012. I will give a lightning talk, Saturday at 13:40, about my balloon adventures at Nowhere, with an emphasis on how Free Software made it possible. Hopefully, this will motivate other Free Software hackers to get [...]]]></description>
			<content:encoded><![CDATA[<p>Thanks to my awesome employer <a href="http://www.igalia.com/">Igalia</a>, I am flying tomorrow to the cold city of Brussels to attend <a href="http://www.fosdem.org/">FOSDEM</a> 2012.</p>
<p><a href="http://www.fosdem.org"><img src="http://www.fosdem.org/promo/going-to" alt="I'm going to FOSDEM, the Free and Open Source Software Developers' European Meeting" /></a></p>
<p>I will give a <a href="http://fosdem.org/2012/schedule/event/balloonfreaks">lightning talk</a>, Saturday at 13:40, about my <a href="http://balloonfreaks.mooo.com/blog/">balloon adventures</a> at <a href="http://www.goingnowhere.org/">Nowhere</a>, with an emphasis on how Free Software made it possible. Hopefully, this will motivate other Free Software hackers to get out of their basement and hack in the &#8220;real&#8221; world :).<br />
The talk should be streamed live at this <a href="http://fosdem.org/2012/news/video-streaming-urls">url</a> (in the Ferrer room).</p>
<p>Many other Igalians will come (I think there will be 14 of us), <a href="http://fosdem.org/2012/schedule/event/gnome3a11y">and</a> <a href="http://fosdem.org/2012/schedule/event/libreplan">will</a> <a href="http://fosdem.org/2012/schedule/event/webappsgnome">give</a> <a href="http://fosdem.org/2012/schedule/event/webkit2">talks</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://guij.emont.org/blog/2012/02/02/fosdem-2012-can-beer-freeze/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gstreamer and OpenCV for image stabilisation</title>
		<link>http://guij.emont.org/blog/2011/11/10/gstreamer-and-opencv-for-image-stabilisation/</link>
		<comments>http://guij.emont.org/blog/2011/11/10/gstreamer-and-opencv-for-image-stabilisation/#comments</comments>
		<pubDate>Thu, 10 Nov 2011 10:37:34 +0000</pubDate>
		<dc:creator>guijemont</dc:creator>
				<category><![CDATA[Boulot]]></category>
		<category><![CDATA[Geekeries]]></category>

		<guid isPermaLink="false">http://guij.emont.org/blog/?p=183</guid>
		<description><![CDATA[I am now back from Prague where I gave a talk on image stabilisation (and my holiday pictures). Hopefully a video of the talk will soon be online. In the meantime, I would like to explain a bit my efforts in written form, with some details slightly updated from the talk (the code progressed a [...]]]></description>
			<content:encoded><![CDATA[<div class="document" id="gstreamer-and-opencv-for-image-stabilisation">
<p>I am now back from <a class="reference external" href="http://guij.emont.org/blog/2011/10/23/prague-we-meet-again/">Prague</a> where I gave a <a class="reference external" href="http://gstreamer.freedesktop.org/conference/speakers.html#emont">talk</a> on image stabilisation (and my holiday pictures). Hopefully a video of the talk will soon be online. In the meantime, I would like to explain a bit my efforts in written form, with some details slightly updated from the talk (the code progressed a bit since then).</p>
<p><b>UPDATE:</b> The talk is now <a href="http://gstconf.ubicast.tv/videos/time-lapse-and-stabilizing-a-sequence-of-images/">online</a>.</p>
<p>I got interested in the issues of image stabilisation through a helium balloon photography <a class="reference external" href="http://balloonfreaks.mooo.com/blog/">project</a> in which I participated. I want to make a nice time lapse video from the pictures I have taken, but they were taken from a camera that was moving, which would make the result <em>very</em> shaky without some kind of postprocessing.</p>
<p>Thankfully, I work at <a class="reference external" href="http://www.igalia.com/">Igalia</a>, which means that on top of my personal time, I could spend on this project some company time (what we call internally our <em>hackfest</em> time, of up to 5 hours per week).</p>
<div id="original-problem-statement">
<h3>Original problem statement</h3>
<p>I have around 4h30 of pictures taken from a balloon 100 metres high. The pictures were taken at a rate of one per minute, which makes around 270 pictures. I want to make a nice <a class="reference external" href="http://en.wikipedia.org/wiki/Time_lapse">time lapse</a> out of it. Simply using the frames as is to build a video does not work well. Partly because I would probably be legally required to include a warning to epileptic people at the beginning of the video, but mostly because people actually watching it would wish they were epileptic to have a good excuse not to watch it.</p>
<p>This is due to the huge differences occurring between two consecutive frames.</p>
<p>Here is an example of two consecutive frames in that series:</p>
<p><a class="reference external image-reference" href="http://guij.emont.org/blog/wp-content/uploads/2011/11/IMG_7539.jpg"><img alt="http://guij.emont.org/blog/wp-content/uploads/2011/11/IMG_7539-300x225.jpg" src="http://guij.emont.org/blog/wp-content/uploads/2011/11/IMG_7539-300x225.jpg"></a><br />
<a class="reference external image-reference" href="http://guij.emont.org/blog/wp-content/uploads/2011/11/IMG_7540.jpg"><img alt="http://guij.emont.org/blog/wp-content/uploads/2011/11/IMG_7540-300x225.jpg" src="http://guij.emont.org/blog/wp-content/uploads/2011/11/IMG_7540-300x225.jpg"></a></p>
<p>As you can see, from one frame to the next, a lot of pixels would change. And that does not look pretty. It is also pretty obvious that they are both pictures of the same thing, and could be made to be pretty similar, mainly by rotating one of them, and maybe reprojecting it a bit so that things align properly even though the point of view changed a bit from one frame to the next.</p>
</div>
<div id="standing-on-the-shoulders-of-giants">
<h3>Standing on the shoulders of giants</h3>
<p>There was no question in my mind that I wanted to use <a class="reference external" href="http://gstreamer.freedesktop.org/">GStreamer</a> for the task, by writing an element or set of elements to do the stabilisation. The two big advantages of this approach are:</p>
<ul class="simple">
<li>I can benefit from all the other elements of GStreamer, and I can easily do things like decode my pictures, turn them in a video, stabilise it and encode it in a format of my choice, all in one command.</li>
<li>Others could easily reuse my work, potentially in ways I could not think of.  One idea would be to integrate that in <a class="reference external" href="http://www.pitivi.org/">PiTiVi</a> in the future.</li>
</ul>
<p>Then, after some research, I realised that <a class="reference external" href="http://opencv.willowgarage.com/wiki/">OpenCV</a> provides a lot of the tools needed for the task as well.</p>
<p>Since I am still in a prototyping/research stage, and I hate to write loads of boilerplate, I am using python for that project, though a later rewrite in <tt class="docutils literal">C</tt> or <tt class="docutils literal">C++</tt> is not impossible.</p>
</div>
<div id="first-things-first">
<h3>First things first</h3>
<p>I will not present things exactly in the order I researched them, but rather in the order I should have researched them: starting with a simpler problem, then getting into the complications of my balloon problem.</p>
<p>The simpler problem at hand is presented to you by Joe the Hippo:</p>
<p><video controls=""><br />
  <source src="http://guij.emont.org/blog/wp-content/uploads/videos/shaky-hippo.webm" type="video/webm"><br />
  <source src="http://guij.emont.org/blog/wp-content/uploads/videos/shaky-hippo.ogg" type="video/ogg"><br />
</video><br />
<br /><a href="http://guij.emont.org/blog/wp-content/uploads/videos/shaky-hippo.webm">Joe the shaky hippo (video)</a>
<p>As you can see, Joe almost looks like he&#8217;s on a boat. He isn&#8217;t, but the cameraman is, and the video was taken with a lot of zoom. The movement in that video stream has a particularity that can make things simpler: the position of a feature on the screen does not change much from one frame to the next, because a very short amount of time happens between them. We will see that some potentially very useful algorithms take advantage of that particularity.</p>
</div>
<div id="the-steps-of-image-stabilisation">
<h3>The steps of image stabilisation</h3>
<p>As I see it for the moment, there are two basic steps in image stabilisation:</p>
<ol class="arabic simple">
<li>Find the <a class="reference external" href="http://en.wikipedia.org/wiki/Optical_flow">optical flow</a> (i.e. the movement) between two frames</li>
<li>Apply a transformation that reverts that movement, on a global (frame) scale</li>
</ol>
<p>Step 2. is made rather easy by <a class="reference external" href="http://opencv.willowgarage.com/wiki/">OpenCV</a> with the <a class="reference external" href="http://opencv.itseez.com/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.html#findhomography">findHomography()</a> and <a class="reference external" href="http://opencv.itseez.com/modules/imgproc/doc/geometric_transformations.html#warpperspective">warpPerspective()</a> functions, so we won&#8217;t talk much about it here.</p>
</div>
<div id="id1">
<h3>Optical flow</h3>
<p>For all that matters in this study, we can say that for each frame the optical flow is represented by two lists of point coordinates <em>origins</em> and <em>destinations</em>, such that the feature at the coordinate <em>origins[i]</em> in the previous frame is at the coordinate <em>destinations[i]</em> in the current frame.</p>
<p>Optical flow algorithms can be separated in two classes, depending on whether they provide the flow for all pixels (<a class="reference internal" href="#dense-optical-flow">Dense optical flow</a> algorithms) or only for selected pixels (<a class="reference internal" href="#sparse-optical-flow">Sparse optical flow</a> algorithms). Both classes can theoretically provide us with the right data (<em>origins</em> and <em>destinations</em> point lists) to successfully compute the opposite transformation we want to apply using <a class="reference external" href="http://opencv.itseez.com/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.html#findhomography">findHomography()</a>.</p>
<p>I tried one algorithm of each class, choosing the ones that seemed popular to me after reading a bit of <a class="citation-reference" href="#bradski2008" id="id2">[Bradski2008]</a>. Here is what I managed to do with them.</p>
<div id="dense-optical-flow">
<h4>Dense optical flow</h4>
<p>I tried to use OpenCV&#8217;s implementation of the <em>Horn-Schunck</em> algorithm <a class="citation-reference" href="#horn81" id="id3">[Horn81]</a>. I don&#8217;t know if I used it incorrectly, or if the algorithm simply cannot be applied to that situation, but this is all I could do to Joe with that:</p>
<p><video controls=""><br />
  <source src="http://guij.emont.org/blog/wp-content/uploads/videos/hippo-hs.webm" type="video/webm"><br />
  <source src="http://guij.emont.org/blog/wp-content/uploads/videos/hippo-hs.ogg" type="video/ogg"><br />
</video><br />
<a href="http://guij.emont.org/blog/wp-content/uploads/videos/hippo-hs.webm">Now Joe is shaky and flickery</a>
<p>As you can see, this basically <em>added</em> flickering.  Since that, I did not find time to improve this case before I realised that this algorithm is considered as <a class="reference external" href="http://opencv.itseez.com/modules/video/doc/motion_analysis_and_object_tracking.html#calcopticalflowhs">obsolete</a> in OpenCV, and the new python bindings do not include it.</p>
<p>Note that this does not mean that dense optical flow sucks: David Jordan, a Google Summer of Code student, does <a class="reference external" href="https://gitorious.org/~dmj726/gstreamer/dmj726s-gst-plugins-bad/commits/optical-flow">awesome</a> <a class="reference external" href="http://vimeo.com/30639307">things</a> with a dense algorithm by Proesmans et al. <a class="citation-reference" href="#proesmans94" id="id4">[Proesmans94]</a>.</p>
</div>
<div id="sparse-optical-flow">
<h4>Sparse optical flow</h4>
<p>I played with the <em>Lucas-Kanade</em> algorithm <a class="citation-reference" href="#lucas81" id="id5">[Lucas81]</a>, with the implementation provided by OpenCV. Once I managed to find a good set of parameters (which are now the default in the <tt class="docutils literal">opticalflowfinder</tt> element), I got pretty good results:</p>
<p><video controls=""><br />
  <source src="http://guij.emont.org/blog/wp-content/uploads/videos/stabler-hippo.webm" type="video/webm"><br />
  <source src="http://guij.emont.org/blog/wp-content/uploads/videos/stabler-hippo.ogg" type="video/ogg"><br />
</video><br />
Joe enjoys the stability of the river bank, undisturbed by the movements of the water (<a href="http://guij.emont.org/blog/wp-content/uploads/videos/stabler-hippo.webm">video</a>)
<p>And it is quite fast too. On my laptop (with an i5 processor), I can stabilise <em>Joe the hippo</em> in real time <a class="footnote-reference" href="#id7" id="id6">[1]</a> (it is only a 640&#215;480 video, though).</p>
<table class="docutils footnote" frame="void" id="id7" rules="none">
<colgroup>
<col class="label">
<col></colgroup>
<tbody valign="top">
<tr>
<td class="label"><a class="fn-backref" href="#id6">[1]</a></td>
<td>For those who attended my talk at the Gstreamer Conference 2011: yes, now it is proper real time, I optimised the code a bit.</td>
</tr>
</tbody>
</table>
</div>
</div>
<div id="the-balloon-problem">
<h3>The balloon problem</h3>
<p>As we seen in the previous section, for a shaky hippo video, [Horn81] isn&#8217;t any help, but [Lucas81] is pretty efficient. But can they be of any use for my balloon problem?</p>
<div id="unsuccessful-results">
<h4>Unsuccessful results</h4>
<p>I won&#8217;t show any video here, because there is nothing much to see. Instead, an explanation in pictures that show how the algorithms rate for the balloon time lapse.</p>
<p>This is what <em>Horn-Schunck</em> can do:</p>
<p><a class="reference external image-reference" href="http://guij.emont.org/blog/wp-content/uploads/2011/11/balloon-hs.png"><img alt="http://guij.emont.org/blog/wp-content/uploads/2011/11/balloon-hs-300x112.png" src="http://guij.emont.org/blog/wp-content/uploads/2011/11/balloon-hs-300x112.png"></a></p>
<p>The picture shows two consecutive frames in the time lapse (the older is on the left). Each of the coloured lines goes from a point on the first image to the corresponding point on the second one, according to the algorithm (click on the image to see a larger version where the lines are more visible). Since <em>Horn-Schunck</em> is a dense algorithm, the coloured lines are only displayed for a random subset of points to avoid clutter.</p>
<p>Obviously, these lines show that the algorithm is completely wrong, and could not follow the big rotation happening between the two frames.</p>
<p>Does <em>Lucas-Kanade</em> rate better? Let&#8217;s see:</p>
<p><a class="reference external image-reference" href="http://guij.emont.org/blog/wp-content/uploads/2011/11/balloon-lk.png"><img alt="http://guij.emont.org/blog/wp-content/uploads/2011/11/balloon-lk-300x112.png" src="http://guij.emont.org/blog/wp-content/uploads/2011/11/balloon-lk-300x112.png"></a></p>
<p>This is the same kind of visualisation, except that there is no need to chose a subset, since the algorithm already does that.</p>
<p>As for the result, it might be slightly less wrong than <em>Horn-Schunck</em>, but <em>Lucas-Kanade</em> does not seem to be of any help to us either.</p>
<p>The issue here, as said earlier, is that these two algorithms, like most optical flow algorithms, are making the assumption that a given feature will not move more than a few pixels from one frame to the next (for some value of &#8220;a few pixels&#8221;). This assumption is very clever for typical video streams taken at 25 or 30 frames per second. Unfortunately, it is obviously wrong in the case of our stream, where the camera has the time to move a lot between two frames (which are captured one minute apart).</p>
<p>Is all hope lost? Of course not!</p>
</div>
<div id="feature-recognition">
<h4>Feature recognition</h4>
<p>I found salvation in feature recognition. OpenCV provides a lot of feature recognition algorithms. I have tried only one of them so far, but I hope to find the time to compare it with others in the future.</p>
<p>The one I tried is SURF (for &#8220;Speeded Up Robust Features&#8221;, <a class="citation-reference" href="#bay06" id="id8">[Bay06]</a>). It finds &#8220;interesting&#8221; features in an image and descriptors associated with them. The descriptors it provides are invariant to rotation and scaling, which means that it is in theory possible to find the same descriptors from frame to frame.</p>
<p>To be able to efficiently compare the sets of frame descriptors I get for two consecutive frames, I use <a class="reference external" href="http://www.cs.ubc.ca/~mariusm/index.php/FLANN/FLANN">FLANN</a>, which is well <a class="reference external" href="http://opencv.itseez.com/modules/flann/doc/flann_fast_approximate_nearest_neighbor_search.html">integrated</a> in OpenCV.</p>
<p>Here is a visualisation of how this method performs:</p>
<p><a class="reference external image-reference" href="http://guij.emont.org/blog/wp-content/uploads/2011/11/balloon-surf.png"><img alt="http://guij.emont.org/blog/wp-content/uploads/2011/11/balloon-surf-300x112.png" src="http://guij.emont.org/blog/wp-content/uploads/2011/11/balloon-surf-300x112.png"></a></p>
<p>As you can see, this is obviously much better! There might be a few outliers, but OpenCV&#8217;s <a class="reference external" href="http://opencv.itseez.com/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.html#findhomography">findHomography()</a> can handle them perfectly, and here&#8217;s a <a class="reference external" href="http://guij.emont.org/blog/wp-content/uploads/videos/balloon-201111052333.webm">proof video</a> (I am not including it in the article since it is quite high resolution).</p>
<p>Obviously, the result is not perfect yet (especially in the end), but it is quite promising, and I hope to be able to fix the remaining glitches sooner than later.</p>
</div>
</div>
<div id="show-me-the-code">
<h3>Show me the code!</h3>
<p>The code as well as a quick introduction on how to use it is available <a class="reference external" href="https://github.com/guijemont/GstStabilizer">on github</a>. Bugs and patches should be posted <a class="reference external" href="https://github.com/guijemont/GstStabilizer/issues">here</a>.</p>
<hr class="docutils">
<table class="docutils citation" frame="void" id="bradski2008" rules="none">
<colgroup>
<col class="label">
<col></colgroup>
<tbody valign="top">
<tr>
<td class="label"><a class="fn-backref" href="#id2">[Bradski2008]</a></td>
<td>G. Bradski and A. Kaehler , &#8220;Learning OpenCV&#8221;, ISBN 978-0-596-51613-0, 2008.
</td>
</tr>
</tbody>
</table>
<table class="docutils citation" frame="void" id="horn81" rules="none">
<colgroup>
<col class="label">
<col></colgroup>
<tbody valign="top">
<tr>
<td class="label"><a class="fn-backref" href="#id3">[Horn81]</a></td>
<td>B. K. P. Horn and B. G. Schunck, “Determining optical flow,” <em>Artificial Intelligence</em> 17 (1981): 185–203, 1981.  <a class="reference external" href="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.93.3092&amp;rep=rep1&amp;type=pdf">PDF</a>
</td>
</tr>
</tbody>
</table>
<table class="docutils citation" frame="void" id="proesmans94" rules="none">
<colgroup>
<col class="label">
<col></colgroup>
<tbody valign="top">
<tr>
<td class="label"><a class="fn-backref" href="#id4">[Proesmans94]</a></td>
<td>M. Proesmans, L. Van Gool, E. Pauwels, A. Oosterlinck, &#8220;Determination of optical flow and its discontinuities using non-linear diffusion&#8221;, J.-O. Eklundh (Ed.), <em>Computer vision</em> &#8212;  ECCV &#8217;94, <em>Lecture Notes in Comp.  Science</em>, Vol.  801, Springer, Berlin, 295–2304, 1994.  <a class="reference external" href="http://www.cse.iitk.ac.in/users/vision/dipen/references/proesmans-eccv94_1.pdf">PDF</a>
</td>
</tr>
</tbody>
</table>
<table class="docutils citation" frame="void" id="lucas81" rules="none">
<colgroup>
<col class="label">
<col></colgroup>
<tbody valign="top">
<tr>
<td class="label"><a class="fn-backref" href="#id5">[Lucas81]</a></td>
<td>B. Lucas and T. Kanade, &#8220;An Iterative Image Registration Technique with an Application to Stereo Vision&#8221;, Proc. of <em>7th International Joint Conference on Artificial Intelligence (IJCAI)</em>, 674–279 <a class="reference external" href="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.49.2019&amp;rep=rep1&amp;type=pdf">PDF</a>
</td>
</tr>
</tbody>
</table>
<table class="docutils citation" frame="void" id="bay06" rules="none">
<colgroup>
<col class="label">
<col></colgroup>
<tbody valign="top">
<tr>
<td class="label"><a class="fn-backref" href="#id8">[Bay06]</a></td>
<td>H. Bay, T. Tuytelaars and L. Van Gool, “SURF: Speeded Up Robust Features”, <em>9th European Conference on Computer Vision</em>, 2006. <a class="reference external" href="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.85.2512&amp;rep=rep1&amp;type=pdf">PDF</a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://guij.emont.org/blog/2011/11/10/gstreamer-and-opencv-for-image-stabilisation/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
<enclosure url="http://guij.emont.org/blog/wp-content/uploads/videos/shaky-hippo.ogg" length="22309965" type="audio/ogg" />
<enclosure url="http://guij.emont.org/blog/wp-content/uploads/videos/hippo-hs.ogg" length="31834330" type="audio/ogg" />
<enclosure url="http://guij.emont.org/blog/wp-content/uploads/videos/stabler-hippo.ogg" length="10029058" type="audio/ogg" />
		</item>
		<item>
		<title>Prague, we meet again!</title>
		<link>http://guij.emont.org/blog/2011/10/23/prague-we-meet-again/</link>
		<comments>http://guij.emont.org/blog/2011/10/23/prague-we-meet-again/#comments</comments>
		<pubDate>Sat, 22 Oct 2011 22:45:29 +0000</pubDate>
		<dc:creator>guijemont</dc:creator>
				<category><![CDATA[Boulot]]></category>
		<category><![CDATA[Geekeries]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Tourisme]]></category>

		<guid isPermaLink="false">http://guij.emont.org/blog/?p=167</guid>
		<description><![CDATA[&#160; Tomorrow I will fly to Prague, going to the GStreamer Conference, then to LinuxCon Europe and ELCE. I&#8217;m excited to go back there, after having first visited this beautiful city in my last Eurotrip. I will give a talk at the GStreamer Conference about my work on image stabilisation, related to that balloon project [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_172" class="wp-caption aligncenter" style="width: 460px"><a href="http://guij.emont.org/blog/wp-content/uploads/2011/10/img_1040b_small.jpg"><img class="size-large wp-image-172 " title="Charles Bridge in Prague" src="http://guij.emont.org/blog/wp-content/uploads/2011/10/img_1040b_small-1024x684.jpg" alt="The bridge, seen from the Petřín lookout tower" width="450" height="300" /></a><p class="wp-caption-text">Karlův most (Charles bridge)</p></div>
<p>&nbsp;</p>
<p>Tomorrow I will fly to Prague, going to the <a href="http://gstreamer.freedesktop.org/conference/">GStreamer Conference</a>, then to <a href="https://events.linuxfoundation.org/events/linuxcon-europe">LinuxCon Europe</a> and <a href="https://events.linuxfoundation.org/events/embedded-linux-conference-europe/">ELCE</a>.<br />
I&#8217;m excited to go back there, after having first visited this beautiful city in my last <a href="http://guij.emont.org/blog/2011/08/03/eurotrip-starting-soon-desktop-summit-berlin/">Eurotrip</a>.<br />
I will give a <a href="http://gstreamer.freedesktop.org/conference/speakers.html#emont">talk</a> at the GStreamer Conference about my <a href="http://www.gitorious.org/gststabilizer">work</a> on image stabilisation, related to that <a href="http://balloonfreaks.mooo.com/blog/">balloon project</a> we did with <a href="http://nerochiaro.net/">Ugo</a>.<br />
I will go there sponsored by <a href="http://www.igalia.com/">Igalia</a>, with my friends and colleagues <a href="http://blogs.igalia.com/vjaquez/">Víctor</a>, <a href="http://base-art.net/">Philippe</a> and <a href="http://javiermunhoz.com/blog/">Javi</a>. Víctor will give a <a href="http://gstreamer.freedesktop.org/conference/speakers.html#jaquez">talk</a> as well, about the integration of syslink and GStreamer.</p>
]]></content:encoded>
			<wfw:commentRss>http://guij.emont.org/blog/2011/10/23/prague-we-meet-again/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Eurotrip starting soon: Desktop Summit, Berlin</title>
		<link>http://guij.emont.org/blog/2011/08/03/eurotrip-starting-soon-desktop-summit-berlin/</link>
		<comments>http://guij.emont.org/blog/2011/08/03/eurotrip-starting-soon-desktop-summit-berlin/#comments</comments>
		<pubDate>Wed, 03 Aug 2011 12:03:02 +0000</pubDate>
		<dc:creator>guijemont</dc:creator>
				<category><![CDATA[Geekeries]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Tourisme]]></category>

		<guid isPermaLink="false">http://guij.emont.org/blog/?p=155</guid>
		<description><![CDATA[On Friday, I am going on a little Eurotrip that will lead me through Germany, France, Ireland and Czech Republic. The whole trip will last a month. If I manage better than some american guys, I will get to Berlin on Friday afternoon for the desktop summit: I am going there sponsored by the awesome [...]]]></description>
			<content:encoded><![CDATA[<p>On Friday, I am going on a little <a href="http://www.imdb.com/title/tt0356150/">Eurotrip</a> that will lead me through Germany, France, Ireland and Czech Republic. The whole trip will last a month.</p>
<p>If I manage better than <a href="http://www.youtube.com/watch?v=O5mIm4bPBWE">some american guys</a>, I will get to Berlin on Friday afternoon for the desktop summit:</p>
<p><img class="alignnone" title="I'm going to the Desktop Summit 2011 in Berlin" src="https://www.desktopsummit.org/sites/www.desktopsummit.org/files/DS2011banner.png" alt="" width="333" height="110" /></p>
<p>I am going there sponsored by the awesome company I work for, <a href="http://www.igalia.com/">Igalia</a>. Many other igalians will be there too.</p>
<p>Grilo will be well <a href="http://blogs.igalia.com/jasuarez/2011/07/29/grilo-ds2011-2/">represented</a>, with a short <a href="https://desktopsummit.org/program/sessions/integration-web-media-lookup-gnome-shell-grilo">talk</a> by Philippe on his integration work of Grilo with the Gnome Shell, and a <a href="http://wiki.desktopsummit.org/Workshops_&amp;_BoFs/2011/Developing_applications_with_Grilo">hacking session</a> with Juan and myself.</p>
<p>I will stay in Berlin until the 15th of August, to attend the <a href="https://live.gnome.org/Hackfests/Introspection2011">GObject Introspection hackfest</a>, where I will also be sponsored by Igalia. I should admit I don&#8217;t know much about the internals of GI yet, but I am excited to &#8220;learn by hacking&#8221; in the company of great hackers!</p>
<p>Then I will continue my Eurotrip, but that is another story.</p>
]]></content:encoded>
			<wfw:commentRss>http://guij.emont.org/blog/2011/08/03/eurotrip-starting-soon-desktop-summit-berlin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Playing with balloons</title>
		<link>http://guij.emont.org/blog/2011/05/09/playing-with-balloons/</link>
		<comments>http://guij.emont.org/blog/2011/05/09/playing-with-balloons/#comments</comments>
		<pubDate>Mon, 09 May 2011 08:00:56 +0000</pubDate>
		<dc:creator>guijemont</dc:creator>
				<category><![CDATA[Boulot]]></category>
		<category><![CDATA[Geekeries]]></category>

		<guid isPermaLink="false">http://guij.emont.org/blog/?p=142</guid>
		<description><![CDATA[These days, I&#8217;m spending a big part of my free time on a nice project with a few friends. That&#8217;s a project involving a balloon. We have recently started a blog called Balloon Freaks to talk about this, you might want to check it out.]]></description>
			<content:encoded><![CDATA[<p>These days, I&#8217;m spending a big part of my free time on a nice project with a few friends. That&#8217;s a project involving a balloon. We have recently started a blog called <a href="http://balloonfreaks.mooo.com/blog/">Balloon Freaks</a> to talk about this, you might want to check it out.</p>
]]></content:encoded>
			<wfw:commentRss>http://guij.emont.org/blog/2011/05/09/playing-with-balloons/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Blog back online</title>
		<link>http://guij.emont.org/blog/2011/04/27/blog-back-online/</link>
		<comments>http://guij.emont.org/blog/2011/04/27/blog-back-online/#comments</comments>
		<pubDate>Tue, 26 Apr 2011 22:02:13 +0000</pubDate>
		<dc:creator>guijemont</dc:creator>
				<category><![CDATA[Boulot]]></category>
		<category><![CDATA[Geekeries]]></category>
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://guij.emont.org/blog/?p=124</guid>
		<description><![CDATA[I finally found the time to migrate my blog to the new server I have (the old server died a few weeks ago). I hope I managed to do the transition correctly, and that people following me through a feed reader and/or a planet won&#8217;t be flooded with a truckload of old articles. If that [...]]]></description>
			<content:encoded><![CDATA[<p>I finally found the time to migrate my blog to the new server I have (the old server died a few weeks ago).</p>
<p>I hope I managed to do the transition correctly, and that people following me through a feed reader and/or a planet won&#8217;t be flooded with a truckload of old articles. If that still happens, I apologise. Also, I know the alert readership that you are noticed that I went back to the default wordpress theme: this is by design (and a bit by laziness). I got tired of the old design, which was ugly anyway (it was hacked together from various bits by a very amateurish designer: me). So, here&#8217;s something sober, just like I want it to be.</p>
<p>As for more generic news, I am still happy, enjoying life in Barcelona, loving my job at <a href="http://www.igalia.com/">Igalia</a>, hacking on cool <a href="https://live.gnome.org/Grilo">Grilo</a> stuff (and sometime <a href="http://gstreamer.freedesktop.org/">GStreamer</a> stuff as well). Hopefully I will post some things regarding that in the not so distant future.</p>
<p>This might be difficult because most of my spare time these days is taken by what I call the &#8220;balloon project&#8221;, recently started with a few gifted friends of mine. More on that soon, I promise, as I have plenty of things to tell about this project that involves developments in a lot of domains in which I&#8217;d love to know more but am always discovering things, such as physics, electronics or computer science.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://guij.emont.org/blog/2011/04/27/blog-back-online/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fosdem</title>
		<link>http://guij.emont.org/blog/2011/01/22/fosdem-2/</link>
		<comments>http://guij.emont.org/blog/2011/01/22/fosdem-2/#comments</comments>
		<pubDate>Sat, 22 Jan 2011 14:42:24 +0000</pubDate>
		<dc:creator>guijemont</dc:creator>
				<category><![CDATA[Boulot]]></category>
		<category><![CDATA[Geekeries]]></category>
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">https://guij.emont.org/blog/?p=121</guid>
		<description><![CDATA[Like a few friends have stated, I am now saying it loud and clear: And for that I should thank the awesome company for which I work. I am sure great time will be had, as well as great conversations about free software, multimedia, technology, life, the universe and everything. See you all at FOSDEM!]]></description>
			<content:encoded><![CDATA[<div>
<p>Like <a href="http://blogs.igalia.com/mario/2011/01/22/some-updates-on-frogr-0-4-and-myself/">a</a> <a href="http://people.gnome.org/~csaavedra/news-2011-01.html#D19">few</a> <a href="http://tilloy.net/olivier/blog/post/2011/01/22/Going-to-FOSDEM">friends</a> have stated, I am now saying it loud and clear:<br />
<a href="http://www.fosdem.org"><img src="http://www.fosdem.org/promo/going-to" alt="I'm going to FOSDEM, the Free and Open Source Software Developers' European Meeting" /></a></p>
<p>And for that I should thank the awesome <a href="http://www.igalia.com/">company</a> for which I work. I am sure great time will be had, as well as great conversations about free software, multimedia, technology, life, the universe and everything.</p>
<p>See you all at FOSDEM!</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://guij.emont.org/blog/2011/01/22/fosdem-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Recent hacks: python with gdb to follow gstreamer</title>
		<link>http://guij.emont.org/blog/2010/11/09/recent-hacks-python-with-gdb-to-follow-gstreamer/</link>
		<comments>http://guij.emont.org/blog/2010/11/09/recent-hacks-python-with-gdb-to-follow-gstreamer/#comments</comments>
		<pubDate>Tue, 09 Nov 2010 15:58:39 +0000</pubDate>
		<dc:creator>guijemont</dc:creator>
				<category><![CDATA[Boulot]]></category>
		<category><![CDATA[Geekeries]]></category>

		<guid isPermaLink="false">https://guij.emont.org/blog/?p=120</guid>
		<description><![CDATA[I&#8217;ve recently discovered one too little-known feature of gdb: you can script it with python. It&#8217;s even in the documentation, and there are nice tutorials available which I invite you to read. The two main cool things you can do in python, is define new commands, and new convenience functions. Unfortunately, as you can read [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently discovered one too little-known feature of gdb: you can script it with python. It&#8217;s even in the <a href="http://sourceware.org/gdb/current/onlinedocs/gdb/Python.html">documentation</a>, and there are <a href="http://sourceware.org/gdb/wiki/PythonGdbTutorial">nice tutorials available</a> which I invite you to read.</p>
<p>The two main cool things you can do in python, is define new commands, and new convenience functions. Unfortunately, as you can read in <a href="http://tromey.com/blog/?p=501">this article</a>, defining a new command requires a lot of boilerplate (and it&#8217;s the same for convenience functions).</p>
<p>Since I wanted to write a few commands, I couldn&#8217;t be bothered to copy-paste that boilerplate, so I ended up writing a nice magical class that makes registering a function easier. You can find that <a href="http://gitorious.org/junk/python_gdb_gst_adapter/blobs/master/gdb_auto_command.py#line19">here</a>.</p>
<p>With this new weapon in hand, I wrote new commands to be able to follow what happens in a <a href="http://www.gstreamer.net/data/doc/gstreamer/head/gstreamer-libs/html/GstAdapter.html">GstAdapter</a>. Basically, I wanted to be able to track the position in the original file of each byte that was going out of a given adapter. So I wrote some code to be called by gdb commands when some operations on a GstAdapter are done, doing the necessary calculations and storing, and voilà: I can print, with gdb, the file position of the data obtained with each call to gst_adapter_peek().</p>
<p>All the code and the gdb script can be found over <a href="http://gitorious.org/junk/python_gdb_gst_adapter">there</a>.</p>
<p>As you can see, a gdb script is still needed. I haven&#8217;t yet really tried to play with breakpoints in python, but I have a feeling this is not totally trivial, if at all possible. The other great limitation is speed. It feels like the calls to python stuff from gdb are very costly, and, in the case of GStreamer, don&#8217;t expect smooth playing if you use some gdb command implemented in python for every buffer transmitted.</p>
<p>Conclusion: it&#8217;s got limits, but overall, this ability to enhance gdb with python allows you to do things you couldn&#8217;t do easily otherwise, like store data in complex structures for your debugging, and prototype easily some debugging actions you want to do, where the only alternative is to write it in C and include it in the application/library you are debugging.</p>
]]></content:encoded>
			<wfw:commentRss>http://guij.emont.org/blog/2010/11/09/recent-hacks-python-with-gdb-to-follow-gstreamer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New job, new flat: new life!</title>
		<link>http://guij.emont.org/blog/2010/10/05/new-job-new-flat-new-life/</link>
		<comments>http://guij.emont.org/blog/2010/10/05/new-job-new-flat-new-life/#comments</comments>
		<pubDate>Tue, 05 Oct 2010 14:46:13 +0000</pubDate>
		<dc:creator>guijemont</dc:creator>
				<category><![CDATA[Boulot]]></category>
		<category><![CDATA[Geekeries]]></category>
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">https://guij.emont.org/blog/?p=119</guid>
		<description><![CDATA[You might have noticed one way or another, that I have just started a new job at Igalia. I&#8217;m very excited about joining a company that seems to try and do everything the right way™, and with really great people. At least for starters, and to flex my hacking muscles a bit, I&#8217;m going to hack on [...]]]></description>
			<content:encoded><![CDATA[<p>You might have noticed <a href="http://identi.ca/notice/53375548">one way</a> or <a href="http://www.igalia.com/nc/igalia-247/igalian/item/gemont/">another</a>, that I have just started a new job at <a href="http://www.igalia.com/">Igalia</a>. I&#8217;m very excited about joining a company that seems to try and do everything the right way™, and with really great people.</p>
<p>At least for starters, and to flex my hacking muscles a bit, I&#8217;m going to hack on various <a href="http://www.gstreamer.net/">gstreamer</a> stuff, which is always fun. Also, I think this will be my first post to appear on <a href="http://planet.igalia.com/">planet Igalia</a>, so: HI PLANET READERS!</p>
<p>Oh yeah, as the title says, I&#8217;ve just changed flat, am now living in a great flat in a brand new building with cool flatmates, so that&#8217;s good news as well! And yes, I&#8217;m still in Barcelona, now in Poble Sec, which proves a cool area so far.</p>
]]></content:encoded>
			<wfw:commentRss>http://guij.emont.org/blog/2010/10/05/new-job-new-flat-new-life/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Camino de Santiago</title>
		<link>http://guij.emont.org/blog/2010/08/04/camino-de-santiago/</link>
		<comments>http://guij.emont.org/blog/2010/08/04/camino-de-santiago/#comments</comments>
		<pubDate>Wed, 04 Aug 2010 15:10:11 +0000</pubDate>
		<dc:creator>guijemont</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">https://guij.emont.org/blog/?p=118</guid>
		<description><![CDATA[Tomorrow (Thursday 5th of August 2010), I am going to meet Paola and Ugo on the Camino de Santiago. They&#8217;ve been walking since last Friday, and with them, I should try to reach Santiago de Compostela, after about 3 weeks of walking, if we make it to there, that is. Since I&#8217;ll probably have plenty [...]]]></description>
			<content:encoded><![CDATA[<p>Tomorrow (Thursday 5th of August 2010), I am going to meet Paola and <a href="http://nerochiaro.net/">Ugo</a> on the <a href="http://en.wikipedia.org/wiki/Way_of_St._James">Camino de Santiago</a>. They&#8217;ve been walking since last Friday, and with them, I should try to reach Santiago de Compostela, after about 3 weeks of walking, if we make it to there, that is.</p>
<p>Since I&#8217;ll probably have plenty of things to tell from the road, I&#8217;ve started another blog just for that, which you can find there: <a href="http://santiaguij.blogspot.com/">http://santiaguij.blogspot.com/</a>.</p>
<p>UPDATE: made it there, and finally uploaded all the videos, and wrote many articles, on my <a href="http://santiaguij.blogspot.com/">santiago blog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://guij.emont.org/blog/2010/08/04/camino-de-santiago/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

