<?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>bugflux.org &#187; education</title>
	<atom:link href="http://bugflux.org/tag/education/feed/" rel="self" type="application/rss+xml" />
	<link>http://bugflux.org</link>
	<description>André Prata, nDray</description>
	<lastBuildDate>Fri, 16 Sep 2011 07:54:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>unintended (dis)honesty</title>
		<link>http://bugflux.org/blog/1528:unintended-dishonesty/</link>
		<comments>http://bugflux.org/blog/1528:unintended-dishonesty/#comments</comments>
		<pubDate>Fri, 17 Jun 2011 16:42:05 +0000</pubDate>
		<dc:creator>nDray</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[en]]></category>
		<category><![CDATA[education]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://bugflux.org/?p=1528</guid>
		<description><![CDATA[this morning i slipped to my boss/coordinator/teacher that i don&#8217;t have aspirations of going too far in my professional career. well, given some thought, that&#8217;s sort of a lie. what i usually mean by this is that i don&#8217;t want &#8230; <a href="http://bugflux.org/blog/1528:unintended-dishonesty/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>this morning i slipped to my <a title="diogogomes.com" href="http://diogogomes.com/" target="_blank">boss/coordinator/teacher</a> that i don&#8217;t have aspirations of going too far in my professional career. well, given some thought, that&#8217;s sort of a lie. what i usually mean by this is that i don&#8217;t want to be the head of something too large to handle on the nine to five schedule! for as long as i&#8217;ve known myself, i always felt great for being complimented. i often get that for being good at what i do, so i&#8217;ll keep trying!</p>
<p>for the next &#8220;year&#8221;, the big thesis road, my mind is more or less settled on working on top of <a title="odtone @ atnog.av.it.pt" href="http://atnog.av.it.pt/projects/odtone" target="_blank">odtone</a>. maybe you laptop-owner-linux-user will read my name in a few manpages in the future! =)</p>
]]></content:encoded>
			<wfw:commentRss>http://bugflux.org/blog/1528:unintended-dishonesty/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>crisis of a middle-class citizen</title>
		<link>http://bugflux.org/blog/1459:crisis-of-a-middle-class-citizen/</link>
		<comments>http://bugflux.org/blog/1459:crisis-of-a-middle-class-citizen/#comments</comments>
		<pubDate>Thu, 13 Jan 2011 17:03:43 +0000</pubDate>
		<dc:creator>nDray</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[education]]></category>
		<category><![CDATA[en]]></category>
		<category><![CDATA[personal]]></category>

		<guid isPermaLink="false">http://bugflux.org/?p=1459</guid>
		<description><![CDATA[it hasn&#8217;t always been the case, but le&#8217;me say that i regard myself as an intelligent, handsome guy. back in grade school my intelligence meant that teachers enjoyed setting my goals up high, and my handsomeness meant that people wouldn&#8217;t always &#8230; <a href="http://bugflux.org/blog/1459:crisis-of-a-middle-class-citizen/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>it hasn&#8217;t always been the case, but le&#8217;me say that i regard myself as an intelligent, handsome guy. back in grade school my intelligence meant that teachers enjoyed setting my goals up high, and my handsomeness meant that people wouldn&#8217;t always account for my intelligence. what my intelligence therefore meant was that my anticipation of the future was one of a hard-working man, most devoted to his professional success, and what my handsomeness therefore meant was that people disappointed me for discarding my ability to attract and delight, inside as much as out.</p>
<p>i thankfully never fully embraced these ideas, though.</p>
<p><span id="more-1459"></span></p>
<p>back in fifth grade i asked my parents for a musical keyboard. we bought a nice casio one, i though. i chose it. i believe the idea came from sharing a possession with a friend of mine, who still is one of my best. i hammered it for a while, but of course i needed teaching, and so i went to a local music school for it. after a year i was quite proficient at it. although listed under the piano class, i was practicing at home with non-touch-sensitive-keys keyboard. very much unlike a piano! my parents didn&#8217;t bide to my &#8220;want a piano&#8221; desire, about the same time my teacher suggested that i got in the conservatory, since i was learning nothing already, there. a school teacher of mine even suggested i moved with her into town and study there. i was fucking 12, they scared the shit out of me.</p>
<p>so i went through grade school without a serious hobby other than video games. it was not until i was 18 that i finally decided to try and plain tennis. once again i went to a local school. at the end of the first month or so i had bought my own racket. half a year into once a week training, it didn&#8217;t feel very appropriate for my technique, i had a hard time confidently swinging with it. having to pay more attention to my national exams and the driving lessons i decided to abandon the sport. i thought that i should try and sell my racket and forget about tennis. the coach wouldn&#8217;t let me. he told me that i had learned so much in those six months and had developed so well compared to all other trainees that it was just stupid to quit, sell the racket. i still keep the racket, and occasionally play, but i should really get one better suited for me, even for recreation&#8230;</p>
<p>this kind of bothers me. i quit things that i enjoy partly because i can&#8217;t or don&#8217;t afford better equipment, but mostly because, after asserting my ability, the drive to increase the proficiency level just vanishes. it was quite interesting to see a university teacher (doctor) telling the same about himself a couple of weeks ago, while defending his aggregation. the jury was asking the reason for such a broad curriculum rather than being emphasised on a single field of studies. the doctor answered that he had that problem. he was curious about many things and, once he proved himself apt for those fields, he lost interest and moved on.</p>
<p>this is what i find myself in, in those two stories, but nowadays as well at a smaller scale. this semester i had two projects to deliver. one on advanced network architectures and another one on knowledge and data engineering. the first project consisted on implementing a subset of the http protocol and a peer-to-peer network on top of that. me and my colleague didn&#8217;t do that great a job, it was quite disappointing for what we could accomplish. even with the project being so interesting, i wasn&#8217;t able to devote as much time as was necessary for a good release (more on group project responsibility in the future, maybe).</p>
<p>that (same of the aggregation!) teacher is a serious right brain thinker. for the final presentation, he asked the students to emphasize anything they wanted about the project, and talk about that. we decided to just talk about how our modelling of the solution. we had called our project p80p (p2p on top of http, port 80). the &#8220;P80P&#8221; text was clean and big on the screen on the first slide, and it reminded the teacher of the p-80 from the second great war&#8217;s aircraft. the first few minutes into the presentation (we presented last) the teacher noted &#8220;by far, the best presentation&#8221;. but at the end he was again reminded of the airplane. we had a very good start, but we didn&#8217;t have a good conclusion for the presentation. we impressed with the structure and attitude, but it was so exhausting to develop those slides that we simply forgot to think about how to finish.</p>
<p>and you know what? i was more than happy about the comments. i felt &#8220;by far, the best&#8221; anyway. truth be told, i prepared most of the presentation, and it was awesome. though it was incomplete, i feel i did my part.</p>
<p>the same happened with the other project. we didn&#8217;t have that many ideas, and they had to be our own. we just had to mess with xml, webservices, user accounts, etc. lots of projects consisted of ideas that messed with all of it, but they were just feed aggregators, webstores, and stuff like that. a group even implemented the last.fm&#8217;s funcionality on top of the last.fm api! :S no way i was going to do that! how could i feel that my project was better than google reader, or itunes or last.fm? me and my colleague simply messed with rss. we engineered a website where you can add a few feeds, configure a set of rules to match feeds to categories, and present graphics about the distribution of contents among that categories. for example, we input news feeds about politics, set a few matches for each candidate of the upcoming elections and get &#8220;how much is being written about each candidate&#8221;. this was very easy to code, my colleague didn&#8217;t feel good about that being our project.</p>
<p>guess what! it wasn&#8217;t, there were very nice projects, but ours was new, and the teacher said &#8220;i like your idea, you can sell that!&#8221;. our grade will probably be at the middle of the table, even lower, but i enjoy that our project matters.</p>
<p>and this has been my academic life. i get satisfaction from slightly above average results; i never attended a &#8220;resort exam&#8221; to raise my average; teachers and coordinators seem to understand and trust me. but! i will be one mark below 16 by the end of the masters, which is the minimum for a phd studies scholarship. this time, the phd will then be the next equipment that i can&#8217;t or don&#8217;t want to afford.</p>
<p>and you know what? i&#8217;m more than happy! life is not devotion to professional success. not mine, anyway. i&#8217;ll just keep being half awesome. =)</p>
]]></content:encoded>
			<wfw:commentRss>http://bugflux.org/blog/1459:crisis-of-a-middle-class-citizen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>tudo tem o seu tempo</title>
		<link>http://bugflux.org/blog/1177:tudo-tem-o-seu-tempo/</link>
		<comments>http://bugflux.org/blog/1177:tudo-tem-o-seu-tempo/#comments</comments>
		<pubDate>Sun, 11 Jul 2010 10:37:19 +0000</pubDate>
		<dc:creator>nDray</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[pt]]></category>
		<category><![CDATA[education]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[science]]></category>

		<guid isPermaLink="false">http://bugflux.org/?p=1177</guid>
		<description><![CDATA[já toda a gente pensou em viagens no tempo. talvez voltar ao passado para corrigir alguma coisa, talvez para chegar mais depressa ao futuro. bem, em discussão recorrente dizem-me que não se pode voltar ao passado; ir para o futuro &#8230; <a href="http://bugflux.org/blog/1177:tudo-tem-o-seu-tempo/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>já toda a gente pensou em viagens no tempo. talvez voltar ao passado para corrigir alguma coisa, talvez para chegar mais depressa ao futuro. bem, em discussão recorrente dizem-me que não se pode voltar ao passado; ir para o futuro já se faz, em pequenas escalas; dependendo da velocidade que se consiga atingir, pode-se avançar tanto quanto se queira, em teoria.</p>
<p><span id="more-1177"></span></p>
<p>eu acho que a viagem no tempo é um tema de conversa muito interessante, mas não suporto que se fale dela em termos científicos, muito menos em tom de leis. a primeira:</p>
<blockquote><p>não se pode voltar atrás no tempo, as fórmulas não o permitem. é um mecanismo que a natureza tem de se proteger!</p></blockquote>
<p>parece razoável: como é que se lidava com alterações no passado que criassem paradoxos no presente? boa pergunta, mas não ter resposta prova a impossibilidade? há milhares de anos era &#8220;impossível dar a volta ao mundo&#8221;, pois &#8220;o mundo era plano&#8221;. hoje é impossível voltar atrás no tempo, mas porquê?</p>
<blockquote><p>se voltasses atrás no tempo e morresses, o que é que acontecia agora, que estás a falar comigo?</p></blockquote>
<p>não sei, mas isto não prova que não é possível, só prova ignorância. eu não sei explicar o que acontece no meu cérebro que me permita escrever, no entanto escrevo. mas sei que o cérebro tem um papel no processo, já é qualquer coisa. para defender a resolução deste paradoxo gosto da física quântica, que afirma a existência de ramificações de universos num grande multiverso. isto é, se eu voltar atrás no tempo e morrer, estou a criar uma bifurcação. numa delas estou aqui, a escrever. noutra não estou, e outras coisas totalmente diferentes acontecem.</p>
<blockquote><p>viajar para o futuro é possível, e está provado. os sistemas de gps precisam de ajustes devido ao facto de estarem afastados da terra. segundo einstein, o tempo passa mais devagar perto de objectos de grande massa.</p></blockquote>
<p>bem, duas brincadeiras. claro que é possível viajar no tempo para o futuro. estou a fazê-lo neste preciso momento. não me sinto parado no tempo. corpos de grande massa: sim, se estiver ao pé de uma menina gorda o tempo parece passar mais devagar do que se estiver ao pé de uma menina elegante. =) relatividade de einstein. sabia umas coisas, o homem!</p>
<p>para provar estas teorias, usam-se relógios atómicos. uns na terra, uns no espaço, outros ali pela atmosfera às voltas para um lado e para o outro. no fim juntam-se e todos mostram durações diferentes. o que eu sei sobre os relógios atómicos é que são muito precisos, regulares. o que eu sei também é que um relógio não sustenta a noção de tempo. isto é, porque é que se diz que o tempo contrai e dilata e não se diz que o relógio alterou o seu período? se calhar as diferentes condições de velocidade e de massa condicionam o funcionamento dos relógios, e não o tempo em si.</p>
<blockquote><p>se circundares a terra à velocidade da luz durante 40 anos, quando aterrares passaram 10&#8217;000 anos na terra, ou coisa que o valha.</p></blockquote>
<p>até pode ser, mas o facto de eu ter envelhecido apenas 40 anos não implica que o tempo tenha mudado. explica apenas que eu envelheci a uma taxa de 40 anos por 10&#8217;000. o que mudou, a meu ver, foi a minha percepção do tempo, e a velocidade dos meus mecanismos biológicos. se é essa a noção de tempo, então claro que é fácil viajar, mesmo para trás: qualquer envelhecimento reversível.</p>
<p>não tenho para mim que envelhecer mais rápido ou mais devagar em relação a outros seja viagem no tempo. viagem no tempo consiste em saltar entre momentos diferentes de um tempo a 3 dimensões, se é que existem! há tanta coisa escrita que nem me atrevo a citar (nem a ler!). acredito em viagens no tempo, claro, e que o homem conseguiria controlar, mas acho que a extinção chegará antes desse dia. sem a discussão e as teorias científicas não era possível avançar, mas deixo isso para os tolos. por enquanto, e com tantas incertezas, o tema ao café não passa de filosofia.</p>
]]></content:encoded>
			<wfw:commentRss>http://bugflux.org/blog/1177:tudo-tem-o-seu-tempo/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>inverse perspective mapping</title>
		<link>http://bugflux.org/blog/1103:inverse-perspective-mapping/</link>
		<comments>http://bugflux.org/blog/1103:inverse-perspective-mapping/#comments</comments>
		<pubDate>Tue, 06 Jul 2010 18:55:35 +0000</pubDate>
		<dc:creator>nDray</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[en]]></category>
		<category><![CDATA[education]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://bugflux.org/?p=1103</guid>
		<description><![CDATA[one of this year&#8217;s projects, and also the subject of my mini-research scholarship, was automating the process of obtaining an inverse perspective map (ipm) for an autonomous driving robot. autonomous driving robots frequently use cameras for object and road detection. &#8230; <a href="http://bugflux.org/blog/1103:inverse-perspective-mapping/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>one of this year&#8217;s projects, and also the subject of my mini-research scholarship, was automating the process of obtaining an inverse perspective map (ipm) for an autonomous driving robot.</p>
<p>autonomous driving robots frequently use cameras for object and road detection. after detecting such elements in an image it must be able to locate them in the real world, or else the image serves no purpose. that&#8217;s the ipm: a means of associating points in an image to points in the car coordinate system. to do obtain it, one only has to understand the transformations that occur when points are projected in an image and undo all those steps, for each point of the image, thus obtaining the real coordinates of each pixel.</p>
<p><span id="more-1103"></span></p>
<h2>a little geometry:</h2>
<p>the first transformation to consider is the one relative to the mechanics of the camera, the way it was constructed. correction of these values comprehends the calibration of the focal distance and the alignment of the lens relative to the projective plane, the image sensor. this requires finding 4 unknowns, that are used in this way:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=%5Cleft%5B%20%5Cbegin%7Barray%7D%7Bc%7D%20%20x%5C%5C%20%20y%5C%5C%20%20w%20%20%5Cend%7Barray%7D%20%5Cright%5D%20%3D%20%5Cleft%5B%20%5Cbegin%7Barray%7D%7Bccc%7D%20%20f_x%20%26%200%20%26%20c_x%5C%5C%20%200%20%26%20f_y%20%26%20c_y%5C%5C%20%200%20%26%200%20%26%201%20%20%5Cend%7Barray%7D%20%5Cright%5D%20%5Cleft%5B%20%5Cbegin%7Barray%7D%7Bc%7D%20%20X%5C%5C%20%20Y%5C%5C%20%20Z%20%20%5Cend%7Barray%7D%20%5Cright%5D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\left[ \begin{array}{c}  x\\  y\\  w  \end{array} \right] = \left[ \begin{array}{ccc}  f_x &amp; 0 &amp; c_x\\  0 &amp; f_y &amp; c_y\\  0 &amp; 0 &amp; 1  \end{array} \right] \left[ \begin{array}{c}  X\\  Y\\  Z  \end{array} \right]' title='\left[ \begin{array}{c}  x\\  y\\  w  \end{array} \right] = \left[ \begin{array}{ccc}  f_x &amp; 0 &amp; c_x\\  0 &amp; f_y &amp; c_y\\  0 &amp; 0 &amp; 1  \end{array} \right] \left[ \begin{array}{c}  X\\  Y\\  Z  \end{array} \right]' class='latex' /></p>
<p>the left part contains the corrected points and the right part the original point coordinates in the real world, multiplied by a matrix. this matrix <a title="transformation matrix @ wikipedia.org" href="http://en.wikipedia.org/wiki/Transformation_matrix" target="_blank">describes</a> a change in scale as well as a translation. this operation gives us an image that is equivalent to the one obtained if we were using a pinhole camera.</p>
<p>the camera is now perfect, but the lens is still uncorrected. usually lenses produce radial distortion in the projection. this distortion is quite intense if using fisheye lenses. that&#8217;s actually the case in the considered robot. due to mechanical constraints, the camera is quite close to the road, and using a normal lens would yield a fairly small field of view. on top of that, some might consider that in practice it is hard to have the lens perfectly parallel to the image sensor, which is a requirement for an undistorted projection. these two problems are solved with 5 new parameters, as corrected by the first few terms of a taylor expansion around the center of the lens [<a title="learning opencv @ oreilly.com" href="http://oreilly.com/catalog/9780596516130" target="_blank">bradski, kaehler</a>]:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=%5Cleft%5B%20%5Cbegin%7Barray%7D%7Bc%7D%20%20x_%7Bcorrected%7D%5C%5C%20%20y_%7Bcorrected%7D%20%20%5Cend%7Barray%7D%20%5Cright%5D%20%3D%20%5Cleft%5B%20%5Cbegin%7Barray%7D%7Bc%7D%20%20x%5C%5C%20%20y%20%20%5Cend%7Barray%7D%20%5Cright%5D%20%281%20%2B%20k_1%20r%5E2%20%2B%20k_2%20r%5E4%20%2B%20k_3%20r%5E6%29%20%2B%20%5Cleft%5B%20%5Cbegin%7Barray%7D%7Bc%7D%20%202%20p_1%20xy%20%2B%20p_2%20%28r%5E2%20%2B%202%20x%5E2%29%5C%5C%20%20p_1%20%28r%5E2%20%2B%202%20y%5E2%29%20%2B%202%20p_2%20xy%20%20%5Cend%7Barray%7D%20%5Cright%5D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\left[ \begin{array}{c}  x_{corrected}\\  y_{corrected}  \end{array} \right] = \left[ \begin{array}{c}  x\\  y  \end{array} \right] (1 + k_1 r^2 + k_2 r^4 + k_3 r^6) + \left[ \begin{array}{c}  2 p_1 xy + p_2 (r^2 + 2 x^2)\\  p_1 (r^2 + 2 y^2) + 2 p_2 xy  \end{array} \right]' title='\left[ \begin{array}{c}  x_{corrected}\\  y_{corrected}  \end{array} \right] = \left[ \begin{array}{c}  x\\  y  \end{array} \right] (1 + k_1 r^2 + k_2 r^4 + k_3 r^6) + \left[ \begin{array}{c}  2 p_1 xy + p_2 (r^2 + 2 x^2)\\  p_1 (r^2 + 2 y^2) + 2 p_2 xy  \end{array} \right]' class='latex' /></p>
<p>after these two transformations we say that the camera is calibrated for the intrinsic parameters. at this point, if we know the position of the camera relative to the floor, elementary geometry allows us to solve the position of each point. usually, though, it&#8217;s hard to mount a camera with a specific angle to the floor, at a fixed height. to find these parameters we need to solve for the perspective transformation. this transformation basically will allow us to obtain a bird&#8217;s eye view of whatever the camera is capturing. this transform is given by the following operation [<a title="automatic perspective calibration @ ieeexplore.ieee.org" href="http://ieeexplore.ieee.org/xpl/freeabs_all.jsp?arnumber=4756061" target="_blank">bevilacqua, gherardi, carozza</a>]:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=%5Cleft%5B%20%5Cbegin%7Barray%7D%7Bc%7D%20%20x%27%5C%5C%20%20y%27%5C%5C%20%201%20%20%5Cend%7Barray%7D%20%5Cright%5D%20%3D%20%5Cleft%5B%20%5Cbegin%7Barray%7D%7Bccc%7D%20%20h_%7B11%7D%20%26%20h_%7B12%7D%20%26%20h_%7B13%7D%5C%5C%20%20h_%7B21%7D%20%26%20h_%7B22%7D%20%26%20h_%7B23%7D%5C%5C%20%20h_%7B31%7D%20%26%20h_%7B32%7D%20%26%20h_%7B33%7D%20%20%5Cend%7Barray%7D%20%5Cright%5D%20%5Cleft%5B%20%5Cbegin%7Barray%7D%7Bc%7D%20%20x%5C%5C%20%20y%5C%5C%20%201%20%20%5Cend%7Barray%7D%20%5Cright%5D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\left[ \begin{array}{c}  x&#039;\\  y&#039;\\  1  \end{array} \right] = \left[ \begin{array}{ccc}  h_{11} &amp; h_{12} &amp; h_{13}\\  h_{21} &amp; h_{22} &amp; h_{23}\\  h_{31} &amp; h_{32} &amp; h_{33}  \end{array} \right] \left[ \begin{array}{c}  x\\  y\\  1  \end{array} \right]' title='\left[ \begin{array}{c}  x&#039;\\  y&#039;\\  1  \end{array} \right] = \left[ \begin{array}{ccc}  h_{11} &amp; h_{12} &amp; h_{13}\\  h_{21} &amp; h_{22} &amp; h_{23}\\  h_{31} &amp; h_{32} &amp; h_{33}  \end{array} \right] \left[ \begin{array}{c}  x\\  y\\  1  \end{array} \right]' class='latex' /></p>
<p>on the left we have the corrected image point, on the right the matrix that describes its rotations and translations, and the uncorrected image point. these rotations and translations are the unknowns, called the extrinsic parameters. once we have a bird&#8217;s eye view of the scene we can infer distances between points. we just need to locate one point, so we&#8217;ll be able to define a fixed coordinate for all points.</p>
<h2>a little code:</h2>
<p>when you don&#8217;t know these parameters, because cameras don&#8217;t have a datasheet stating the angle between the lens and the sensor, or how much the lens distorts the image, you can obtain them capturing know objects with identifiable points. chessboards are a good example. fortunately i had to do very little with this math introduction to calibrate the image, because <a title="opencv @ willowgarage.com" href="http://opencv.willowgarage.com/wiki/">opencv</a> solved most of these problems with just a few function calls. anyway, i didn&#8217;t know that until i studied image projection, and it eventually came handy to know the inner works.</p>
<p>so, opencv provides me: a way of detecting chessboard corners, those referred easily identifiable points; given a series of chessboards, the intrinsic parameters; given four image points and their corrected projection, the extrinsic parameters.</p>
<p>detecting chessboard corners is a call away from <strong>cvFindChessboardCorners()</strong>. this accepts an image and returns a list of points. this list of points can be used, along with the image that produced them, to call <strong>cvFindCornerSubPix()</strong>, and get subpixel accuracy on those same points.</p>
<p>given a series of captures of different images from chessboards, which will produce a series of lists of points, opencv provides <strong>cvCalibrateCamera2()</strong>, that calculates the rotations and translations of the chessboard between captures, thus fixing all 9 intrinsic parameters. it should be noted that, for better results, at least 10 chessboard captures should be done. using <strong>cvUndistort2()</strong> one is able to see the result of correcting an image for the intrinsic parameters. this is easily evaluated for fisheye lenses, since after the calibration no visible distortion should be noticed. straight lines should remain straight [<a title="straight lines have to be straight @ springerlink.com" href="http://www.springerlink.com/content/m9cx2b2au3eyj8gp/?p=6697af31dc5442cf8f391e11387d6e26" target="_blank">devernay, faugeras</a>]. <strong>cvUndistortPoints()</strong> corrects a sparse set of points instead of a whole image.</p>
<p>once calibrated for the intrinsic parameters, we can find all 8 extrinsic parameters (the matrix is normalized so that <img src='http://s.wordpress.com/latex.php?latex=h_%7B33%7D%20%3D%201&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='h_{33} = 1' title='h_{33} = 1' class='latex' />) using 4 collinear points (their ideal and distorted positions). one can do this laying a chessboard on the road and detecting the outermost corners. we know that these form a rectangle, so we can fix 4 coordinates that form a rectangle where those corners should be projected. opencv allows us to do this using <strong>cvGetPerspectiveTransform()</strong>. the result can be observed with a call to <strong>cvWarpPerspective()</strong>, which yields the referred bird&#8217;s eye view (or the result of any other calculated perspective transform). <strong>cvPerspectiveTransform()</strong> corrects a sparse set of points instead of a whole image.</p>
<p>so, since we now have a bird&#8217;s eye view, we only need to locate one point in the image and indicate its real coordinates. this will allow us to both find the relation between distances in pixels and distances in the real world and also fix the location of all the points.</p>
<h2>conclusion:</h2>
<p>this is pretty much an overview what i&#8217;ve been doing, and is greatly based on &#8220;<a title="learning opencv @ oreilly.com" href="http://oreilly.com/catalog/9780596516130" target="_blank">learning opencv: computer vision with the opencv library</a>&#8220;, from o&#8217;reilly media. further steps include making use of this map to abstract algorithms such as &#8220;lane detection&#8221;, &#8220;car positioning&#8221;, to work at a car coordinate level, instead of image coordinates. this will not only make it easier for the programmer to produce algorithms but will also facilitate porting solutions to other architectures, and different camera mounts.</p>
<p>the project code is not public <em>per se</em>, but i&#8217;m free to disclose any requested parts.</p>
]]></content:encoded>
			<wfw:commentRss>http://bugflux.org/blog/1103:inverse-perspective-mapping/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>corrida de tradições</title>
		<link>http://bugflux.org/blog/742:corrida-de-tradicoes/</link>
		<comments>http://bugflux.org/blog/742:corrida-de-tradicoes/#comments</comments>
		<pubDate>Wed, 05 Aug 2009 10:22:28 +0000</pubDate>
		<dc:creator>nDray</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[pt]]></category>
		<category><![CDATA[education]]></category>
		<category><![CDATA[politics]]></category>
		<category><![CDATA[society]]></category>

		<guid isPermaLink="false">http://bugflux.org/?p=742</guid>
		<description><![CDATA[é motivo de orgulho para muita gente que amanhã se realize uma corrida de toiros em homenagem aos emigrantes portugueses. eu gostava de ser emigrante, entre outros motivos, para ter uma voz mais saliente neste assunto e sugerir que a &#8230; <a href="http://bugflux.org/blog/742:corrida-de-tradicoes/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>é motivo de orgulho para muita gente que amanhã se realize uma <a href="http://www.campopequeno.com/default.aspx?SqlPage=Content&#038;CpContentId=221" title="corrida de homenagem ao emigrante @ campopequeno.com" target="_blank">corrida</a> de toiros em homenagem aos emigrantes portugueses. eu gostava de ser emigrante, entre outros motivos, para ter uma voz mais saliente neste assunto e sugerir que a melhor homenagem possível seria uma corrida de <a href="http://www.youtube.com/watch?v=KyeT0Zv2oF4" title="tradições antigas @ youtube.com" target="_blank">defensores da tradição</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://bugflux.org/blog/742:corrida-de-tradicoes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>são poucas vergonhas destas&#8230;</title>
		<link>http://bugflux.org/blog/625:sao-poucas-vergonhas-destas/</link>
		<comments>http://bugflux.org/blog/625:sao-poucas-vergonhas-destas/#comments</comments>
		<pubDate>Sat, 09 May 2009 15:51:22 +0000</pubDate>
		<dc:creator>nDray</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[pt]]></category>
		<category><![CDATA[education]]></category>
		<category><![CDATA[society]]></category>

		<guid isPermaLink="false">http://bugflux.org/?p=625</guid>
		<description><![CDATA[&#8230; que fazem com que pessoas que pagam impostos para que o ensino seja generalizado e relativamente ausente de custos fiquem revoltadas. este tipo de actuação é tomada como exemplo pela sociedade em geral e descredibiliza por completo os ideiais &#8230; <a href="http://bugflux.org/blog/625:sao-poucas-vergonhas-destas/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>&#8230; que fazem com que pessoas que pagam impostos para que o ensino seja generalizado e relativamente ausente de custos fiquem revoltadas. <a href="http://planeta-indie.blogspot.com/2009/05/strip-na-queima-das-fitas-do-porto-2009.html" title="strip na queima do porto @ planeta-indie.blogspot.com" target="_blank">este</a> tipo de actuação é tomada como exemplo pela sociedade em geral e descredibiliza por completo os ideiais de que um ensino público é a chave para o crescimento económico e social de uma nação. para muitos a possibilidade de frequentar o ensino superior não passa de uma garantia de que ainda passarão alguns anos de farra até que tenham de enfrentar as dificuldades da vida, mas é preciso que se saiba que há pessoas para quem o ensino superior é mesmo a opção mais complicada, mas praticamente necessária ou, pelo menos, digna e merecida.</p>
]]></content:encoded>
			<wfw:commentRss>http://bugflux.org/blog/625:sao-poucas-vergonhas-destas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>esta manhã fiquei com a impressão&#8230;</title>
		<link>http://bugflux.org/blog/504:esta-manha-fiquei-com-a-impressao/</link>
		<comments>http://bugflux.org/blog/504:esta-manha-fiquei-com-a-impressao/#comments</comments>
		<pubDate>Sun, 12 Apr 2009 13:31:56 +0000</pubDate>
		<dc:creator>nDray</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[pt]]></category>
		<category><![CDATA[education]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://bugflux.org/?p=504</guid>
		<description><![CDATA[&#8230; de ter descoberto o motivo para escolher os computadores e a telemática para aprofundar nestes 5 (try 6&#8230;) anos de universidade. segundo o que me veio à cabeça a minha opção deve-se ao facto de eu gostar de perceber &#8230; <a href="http://bugflux.org/blog/504:esta-manha-fiquei-com-a-impressao/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>&#8230; de ter descoberto o motivo para escolher os computadores e a telemática para aprofundar nestes 5 (<em>try 6&#8230;</em>) anos de universidade. segundo o que me veio à cabeça a minha opção deve-se ao facto de eu gostar de perceber como funciona a maioria dos nossos utensílios diários. acontece que o computador, a par da internet, é o utensílio diário de cada vez mais indivíduos, quer por motivos profissionais quer por motivos <span style="text-decoration: line-through;">sexuais</span> pessoais.</p>
<p>para muitas pessoas o computador não passa de uma caixa negra, muitas vezes branca, crescentemente colorida; software então&#8230; isso aumenta ainda mais o meu interesse porque nunca gostei de pertencer à maioria (contemporânea). o meu futuro, como o de muitos outros, não se poderá limitar a trabalhos rotineiros, ou seremos desempregados em prol da índia e da china. espero assim, um dia, marcar a diferença <em>thinking outside the box</em>.</p>
]]></content:encoded>
			<wfw:commentRss>http://bugflux.org/blog/504:esta-manha-fiquei-com-a-impressao/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>o problema das aulas&#8230;</title>
		<link>http://bugflux.org/blog/263:o-problema-das-aulas/</link>
		<comments>http://bugflux.org/blog/263:o-problema-das-aulas/#comments</comments>
		<pubDate>Tue, 03 Mar 2009 20:22:06 +0000</pubDate>
		<dc:creator>nDray</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[pt]]></category>
		<category><![CDATA[education]]></category>
		<category><![CDATA[personal]]></category>

		<guid isPermaLink="false">http://bugflux.org/?p=263</guid>
		<description><![CDATA[&#8230; a que ninguém vai, e estou a falar das orientações tutoriais, inventadas algures na implementação do processo de bolonha, tem a ver com o facto de a maioria dos professores se limitar a sumariar as aulas após a sua &#8230; <a href="http://bugflux.org/blog/263:o-problema-das-aulas/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>&#8230; a que ninguém vai, e estou a falar das orientações tutoriais, inventadas algures na implementação do processo de bolonha, tem a ver com o facto de a maioria dos professores se limitar a sumariar as aulas após a sua ocorrência. isto é, o trabalho a desenvolver nas <em>ditas cujas</em> é determinado no decorrer da mesma e é proposto pelo aluno, raramente pelo professor.<br />
<span id="more-263"></span><br />
isto falha não na medida em que o aluno não quer saber das aulas e não frequenta porque não há faltas, mas porque o aluno é obrigado a desenvolver trabalho antes das aulas e remeter para esses momentos as dúvidas ou questões que queira ver resolvidas ou exercitadas. claro que isso não vai funcionar nunca porque, para esses momentos, os alunos podem ir ao gabinete do professor, ligar ou enviar e-mail a qualquer hora, e não esperar durante uma semana para ver os seus problemas resolvidos.</p>
<p>a solução para o problema passa por estabelecer conteúdos a ser laborados nesses períodos de carácter facultativo, mas que os alunos podem alterar entretanto, caso s verifique necessário.</p>
<p>um bom exemplo disto são as aulas de bases de dados do professor rui ribeiro, que traz para estas aulas propostas de trabalho e prática de conceitos acessórios (mas ao mesmo tempo essenciais) relativos aos objectivos da disciplina&#8230;</p>
<p>a+</p>
]]></content:encoded>
			<wfw:commentRss>http://bugflux.org/blog/263:o-problema-das-aulas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>cinquenta e dois pontos&#8230;</title>
		<link>http://bugflux.org/blog/208:cinquenta-e-dois-pontos/</link>
		<comments>http://bugflux.org/blog/208:cinquenta-e-dois-pontos/#comments</comments>
		<pubDate>Sat, 10 Jan 2009 09:52:48 +0000</pubDate>
		<dc:creator>nDray</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[pt]]></category>
		<category><![CDATA[education]]></category>
		<category><![CDATA[politics]]></category>
		<category><![CDATA[society]]></category>

		<guid isPermaLink="false">http://bugflux.org/?p=208</guid>
		<description><![CDATA[&#8230; é a cotação chinesa actual atribuida a estudantes que não resolvem os trabalhos de casa. no caso deste miudo de 10 anos, foram atribuidos na face, por uma professora de 37 anos, dois filhos, que torceu e pegou no &#8230; <a href="http://bugflux.org/blog/208:cinquenta-e-dois-pontos/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>&#8230; é a cotação chinesa actual atribuida a estudantes que não resolvem os trabalhos de casa. no <a href="http://www.telegraph.co.uk/news/worldnews/asia/china/4176114/Chinese-schoolboy-has-52-stitches-after-attack-from-teacher.html" title="52 stiches after not doing homework @ telegraph.co.uk" target="_blank">caso</a> deste miudo de 10 anos, foram atribuidos na face, por uma professora de 37 anos, dois filhos, que torceu e pegou no menino pelas bochechas quando este não entregou o trabalho de casa resolvido.<br />
<span id="more-208"></span><br />
parentes da senhora terão já procurado certificados médicos para provar que se encontra mentalmente instável. esta história revela alguns pontos fortes da qualidade do ensino chinês:</p>
<ol>
<li>os miudos de 10 anos não são <a href="http://www.medicalnewstoday.com/articles/40830.php" title="american children too fat for safety seats @ medicalnewstoday.com" target="_blank">balofos como os americanos;</a></li>
<li>(as senhoras de 37 anos são fortes como o raio, ainda assim;)</li>
<li>a avaliação dos professores é minimamente justa para os docentes;</li>
<li>não deve haver relatos de violência entre alunos nesta escola;</li>
<li>nenhum dos espectadores se lembrará vez alguma de apontar uma arma a um docente.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://bugflux.org/blog/208:cinquenta-e-dois-pontos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>foi no quentinho de suas casas&#8230;</title>
		<link>http://bugflux.org/blog/156:foi-no-quentinho-de-suas-casas/</link>
		<comments>http://bugflux.org/blog/156:foi-no-quentinho-de-suas-casas/#comments</comments>
		<pubDate>Tue, 23 Dec 2008 15:16:34 +0000</pubDate>
		<dc:creator>nDray</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[pt]]></category>
		<category><![CDATA[economy]]></category>
		<category><![CDATA[education]]></category>
		<category><![CDATA[politics]]></category>

		<guid isPermaLink="false">http://bugflux.org/?p=156</guid>
		<description><![CDATA[&#8230; que no dia 22 de dezembro de 2008 que os alunos da universidade de aveiro, em harmonia com os da universidade do porto, não viram o seu órgão de ensino passar numa bandeja das mãos do estado para as &#8230; <a href="http://bugflux.org/blog/156:foi-no-quentinho-de-suas-casas/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>&#8230; que no dia 22 de dezembro de 2008 que os alunos da universidade de aveiro, em harmonia com os da universidade do porto, <span style="text-decoration: line-through;">não</span> viram o seu órgão de ensino passar numa bandeja das mãos do estado para as mãos do capitalismo.<br />
<span id="more-156"></span><br />
com a passagem a fundação, a universidade de aveiro admite a incapacidade de, com o apoio do estado, manter condições normais de funcionamento. esta mudança, diz-se, visa melhorar a prestação do serviço público. uma melhoria conseguida através do <em>reforço das infra-estruturas e equipamentos, científicos e de ensino, a contratação de recursos humanos qualificados e o desenvolvimento de medidas específicas de apoio aos estudantes.</em><br />
resta saber o que leva o capitalismo em troca&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://bugflux.org/blog/156:foi-no-quentinho-de-suas-casas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

