CS4243 – Digital Image Stabilization

CS4243 – Digital Image Stabilization

During my stay at NUS I followed a course on Computer Vision by Terence Sim. The course was partly a project that I did with Florian Kock and Samuel Martin. Our self-assigned subject was an image stabilization algorithm.
This page shows you the result of our algorithm and the slides of the final presentation. The slides can be seen by clicking on the image to the right.

Below is a result video of our algorithm. The algorithm is based on removing the high-frequency movements found in video. In order to do so, three steps had to be taken.

Step 1: Finding the movement
In order to find the movement, we calculated the difference in position, rotation and zooming of every two succeeding frames. This was done by finding corresponding points in every two frames, selecting the best ones and calculating the homography.
Finding corresponding points was done with the Shi-Tomasi algorithm to find valuable features to track and the pyramidical Lucas-Kanade optical flow calculation.
Because the result was still pretty noisy, we iterated the calculation of the homography, removing the points that had a too large error at every step.

img1Slide 3
Slide 4
Slide 5
Slide 6
Slide 7
Slide 8
Slide 9

Slide 10Step 2: Averaging the movement
For every frame a moving average was taken in order to remove the high-frequency movement. Because of the use of homographies, this was not as straightforward.
This lead to homographies that, once applied to the original frames, correct the movement by removing the unwanted movement, but keeping the intended movement.

Step 3: Compensating for the movement
In the last and final step, all the frames were transformed according to the calculated homographies. An extra step is taken by cropping the image so that the image is filled entirely in every frame.

The result
The result is shown below. The first frame is the uncorrected movement. In the middle frame the frames are corrected, it shows that every frame can be rotated, shifted and enlarged in order to compensate for the shaking. The last frame is the final result where a number of pixels are taken from the sides and top and bottom.

Slide 11
Slide 12
Slide 13
Slide 14
Slide 15
Slide 16
Slide 17
Slide 18
Slide 19
Stabilized Video

36 hours of Corbusier

Our editorial staff had a small teambuilding holidays in Marseille. It was pretty good but we did not do too much. The flight was 10 euros for a return flight, so we decided to go there. We stayed for 2 days and saw the neighborhood built by Marseille’s architect Le Corbusier which was pretty awesome. A lot of concrete buildings with non-concrete shapes I guess. I don’t know too much about architecture, but I still took a number of pictures and pretended to be amazed. 

Intermania editorial staff
Intermania editorial staff

For the rest we did typical French stuff, like eating bread with cheese, drinking wine and walking around. Marseille was a decent thing to do and our team is built again. Check out the pictures if you want.

The Singaporean Life

I’ve been in Singapore for two weeks now and I’ve got the idea that I’m starting to find out how I’m supposed to live here in Singapore. I’ve had one week of lectures and something like a routine starts to emerge in my usually quite erratic lifestyle.


As far as school goes, I applied for 6 courses from which I followed all first lectures. Going to NUS is always a bit of a weird process. You’re supposed to get accepted for at least one course you apply for, but when you get here, you’re supposed to pick your study package. You’ve got two weeks after class starts to do so. So with this whole process of dropping and adding, NUS has something called ‘shopping week’, in which all lectures are really crowded with people who are considering taking that course. And the second week they drop the courses that are too hard, too boring, too easy, too whatever.

no images were found

So I’ve been shopping too and took the following courses: ‘Computer Vision and Pattern Recognition’, ‘Introduction to Fuzzy/Neural Networks’, ‘Modeling Uncertainty in Artificial Intelligence’ and ‘Analyzing Psychological Data using General Linear Models’. 2 Computer science courses, 1 electrical engineering course and 1 psychology course. Very much like back at the TU/e, where I have courses at all three of those faculties too. I’m pretty confident about passing these 4 courses, but the Uncertainty one and the Computer Vision one are going to be really hard work. Something that is somewhat unusual for me, but something I started right away from the first day of lectures.
My schedule is pretty light, but I’ve got courses at the weirdest hours. Monday en Tuesday I have courses from 1830 till 2030… Wednesday I don’t have any courses. Thursday I’ve got one course from noon till 1400 and on Friday I’ve got one course from 1000 till 1100 and then one from 1600 till 1900. It’s pretty weird… but on the other hand, coursework in here is only something like 25% of what you’re supposed to do.
Not al courses start with the serious business right away, since this is supposed to be shopping week, right? Except for my Uncertainty course… I’ve been reading two articles and a couple of chapters on Bayes’ theorem and applications of it. Pretty interesting, although it’s still quite abstract. This course is going to be hard, so I’m really putting my hours into it. Let’s see if it pays off.


A life pattern is somewhat emerging from my seemingly random activities and urges and needs. Apart from the courses that I go to, for which I have to travel around 1 hour, I find the time to do other important stuff like eating, sleeping, drinking, shopping, sightseeing, etcetera. From these activities, eating is definetely the most fun. My breakfast consists like in Holland of cereals and milk, but the fun really starts at lunch. All the food here is great, Indonesian, Chinese, Japanese, Malayan. Plus it’s really cheap at the hawker centers here.
So around noon or 1 I grab my first meal, and then at 7pm I grab my dinner. I’m starting to appreciate spicy food.
And throughout the week I have a couple of things to do. Wednesday night is partynight, which is fun in Singapore too. Beers are expensive, but you get wasted pretty easily with this hot weather, so I spend about as much as I would in Holland.

Social stuff

no images were found

Getting wasted by yourself is pretty… sad. Luckily there really are a lot of people in the same situation I am, so from the first week it was easy to find people to get wasted with. Right now there is the healthy tension between two groups of people who I can hang out with. On the one hand the Dutch guys from my uni hooked up with a couple of Norwegians, which is pretty fun. And on the other hand there’s a couple of people from everywhere, who I know through one of my classmates for my Computer Vision course.
And next weekend already I will have to decide with who I’m going on a trip. Either to the Perhentian Islands with the foreigners, or to Pulau Tioman with the Dutchies… It both sounds good to me :(.


no images were found

And ye. Singapore is also known as the hub of South East Asia, so I have the idea I should take advantage of it. From 6th till 8th of August I went on a trip to Kuala Lumpur with my fellow students, which was pretty nice. (check out my gallery) A bit too crowded to walk around easily and a bit too early after arriving in Singapore to really be used to anything, maybe it wasn’t really worth it. But it was still good fun! And now next weekend I’m going to somewhere in Malaysia. For the recess week I’m maybe going to Bangkok and in December after my last exam, I’ll be traveling around with my girlfriend. Indonesia? Thailand? Vietnam? Hong Kong? Australia? Anyone can recommend anything?

General Findings

– Singaporean people walk really slow and don’t pay attention to anyone walking behind them. So they can just stop anywhere on the road causing you to bump into them.
– Singaporeans, like their speed of walking, do not run very fast. It’s more like they want to show that they’re spending effort in trying to move faster than actually move faster, causing them to swing and flail wildly with their arms and legs, but not moving very much faster than normal.
– Singaporeans don’t have long hair and goatees. I do. Most people don’t mind, except for people from India. For some apparent reason they really stare me down. Really… really down. And they don’t stop when I start staring back… It kinda creeps me out.


Porn is banned, the National Day Parade seemed more like war propaganda to me and there’s 4 official languages. The discussion going on in Holland whether or not the government is patronizing too much sounds almost ridiculous when you see what the government tells people here. For all men there’s a yearly fitness test on which you have to perform sufficiently to be able to serve your country in times of need. If you don’t perform well enough, you have to do training for a while as punishment.


EEE PCI’ve been on the lookout for the eee pc since november and after playing with one in Singapore I decided I just had to get one. 4 gigs SSD storage, less than a kilogram in weight, 900 Mhz Celeron, 512meg RAM, 7″ (800×480) screen, wifi, built in SD card reader. It’s in my view the way a laptop should be and not something that could replace a desktop, because you have desktops for that…
So my parents bought me one for getting my bachelor. And it’s so friggin nice. Fellow warsower Chas bought one in Australia if I remember correctly and he’s been talking on his blog about how much he likes it. I’m not gonna do that! HA!
I’m gonna whine about the OS that’s on it, about how you have to do all kind of hacky things to get the full 4 gigs of HD. The difficulties in getting a decent torrent, IRC or IM client and the fact that you have to face Satan himself if you want to install compiz fusion. And of course, thanks to Linux, it is impossible to get it connected to the TU/e wifi…
But it’s great for doing my homework assignments, playing openttd, doing my blogging and some couch/bed/toilet-surfing. I think I’m going to install windows XP on it tho, because I really want to get it online at school. And use that 100Mbit together with my portable HD to get some proper leeching going on.

the end of CHI

Wow, this has been a crazy week. So much information to process, people to meet, pictures to take.

Lectures and courses
I’ve been following so many lectures on so many papers. It’s been crazy. Subjects ranged from “A comparison between Heuristics Evalutation Methods” to “User Research using Mechanical Turk”. I’ve been trying to attend to a lot of usability lectures, some of which were really interesting and some of which were plain bad. It was nice to see the difference between academic work and corporate work.
On the general however, it’s just like school. A lot of people sitting and listening to a lecture. Some people taking notes on paper, some taking notes on their macbook pros and some just taking pictures of the projected slides. Continue reading “the end of CHI”

CHI – day 1

Well… a conference. What the hell is something like that supposed to be like?

I had an extensive preparation prior to getting in Florence that consisted of booking a flight, getting accomodation and partying the night before departure with crazy exchange students in Eindhoven. Needless to say, the first day in Florence was hectic.

no images were found

I did make it to the apartment yesterday quite effortlesly (somewhat to my surprise). I did however completely misunderstood Karolien’s Belgian accent for Italian, which lead to me speaking English to someone who’s talking Dutch to me. And while writing this, I realize I haven’t explained that to her yet… But the apartment is way too nice for a shitty student like myself. I’m there together with 3 phd students from my faculty, who I don’t know that well. I think that this might be different when the week is over. I’ve got my own bedroom, with nice kingsize bed. And I’ve got my own bathroom, with bidet. We’re sharing a living room and kitchen, together with the conversations and thoughts that come naturally.
Continue reading “CHI – day 1”