time lapse and stabilising a sequence of images (gstreamer conference 2011)

41
Image Stabilisation Guillaume Emont Igalia

Upload: igalia

Post on 27-May-2015

534 views

Category:

Technology


0 download

DESCRIPTION

By Guillaume Emont. The topic for this talk was encountered when trying to make a time lapse film with a camera attached to a tethered helium balloon high above. This talk will introduce the issues of stabilising a sequence of images. It will mainly focus on "discreet" sequences of images (time lapses, stop motion) but will have many bits relevant to more typical continous-ish videos. It will introduce some methods to solve that problem, and various benefits of having these methods in GStreamer, so that they are available to solve other related problems (such as following an object, movement detection, automated compositing or 3D reconstruction). Of course, there will be cool demos, hopefully featuring stunning aerial pictures getting transformed into a smooth video. More information at http://emont.org/blog/2011/11/10/gstreamer-and-opencv-for-image-stabilisation/.

TRANSCRIPT

Page 1: Time lapse and stabilising a sequence of images (GStreamer Conference 2011)

Image Stabilisation

Guillaume EmontIgalia

Page 2: Time lapse and stabilising a sequence of images (GStreamer Conference 2011)

Image StabilisationHoliday pictures

Page 3: Time lapse and stabilising a sequence of images (GStreamer Conference 2011)

that picture is not by me(it is © 2011 Ugo Riboni)

Page 4: Time lapse and stabilising a sequence of images (GStreamer Conference 2011)

...but I was there!

Page 5: Time lapse and stabilising a sequence of images (GStreamer Conference 2011)

with a plan!

Page 6: Time lapse and stabilising a sequence of images (GStreamer Conference 2011)
Page 7: Time lapse and stabilising a sequence of images (GStreamer Conference 2011)

What the balloon sees

Page 8: Time lapse and stabilising a sequence of images (GStreamer Conference 2011)

Let's go higher

Page 9: Time lapse and stabilising a sequence of images (GStreamer Conference 2011)

Higher!

Page 10: Time lapse and stabilising a sequence of images (GStreamer Conference 2011)

HIGHER!

Page 11: Time lapse and stabilising a sequence of images (GStreamer Conference 2011)

I said: HIIIGHEEEER!

Page 12: Time lapse and stabilising a sequence of images (GStreamer Conference 2011)

Ok, that will do

Page 13: Time lapse and stabilising a sequence of images (GStreamer Conference 2011)

We wanted to take pictures for 7 days

Page 14: Time lapse and stabilising a sequence of images (GStreamer Conference 2011)

The balloon agreed to 4 hours and a half

Page 15: Time lapse and stabilising a sequence of images (GStreamer Conference 2011)

There was an intimate ceremonywith family and friends

Page 16: Time lapse and stabilising a sequence of images (GStreamer Conference 2011)

Nice pics! ...now what?

Page 17: Time lapse and stabilising a sequence of images (GStreamer Conference 2011)

Time lapse!

Page 18: Time lapse and stabilising a sequence of images (GStreamer Conference 2011)

-- [timelapse-theory.png] [fit] [text-align=center] <span font="20">(image from wikipedia under GFDL)</span> -- [timelapse-theory.png] [fit] [text-align=center] Crazier: one frame per minute!

Page 19: Time lapse and stabilising a sequence of images (GStreamer Conference 2011)

Removing the training wheels:No tripod.

(luckily, we have OpenCV)

Page 20: Time lapse and stabilising a sequence of images (GStreamer Conference 2011)

Stabilisation in post-processing:

1. detect the movement (optical flow)

Page 21: Time lapse and stabilising a sequence of images (GStreamer Conference 2011)

Optical flow: position changes of features

Page 22: Time lapse and stabilising a sequence of images (GStreamer Conference 2011)

Stabilisation in post-processing:

2. compensate

Page 23: Time lapse and stabilising a sequence of images (GStreamer Conference 2011)

Compensation:

OpenCV provides nice tools(but we won't talk about them here)

Page 24: Time lapse and stabilising a sequence of images (GStreamer Conference 2011)

Optical flow: a few algorithms

Page 25: Time lapse and stabilising a sequence of images (GStreamer Conference 2011)

Horn-Schunck

Page 26: Time lapse and stabilising a sequence of images (GStreamer Conference 2011)

Lucas-Kanade

gst-launch-0.10 filesrc location=shaky-hippo.ogg ! decodebin ! ffmpegcolorspace ! opticalflowcorrector algorithm=1 ! ffmpegcolorspace ! xvimagesink

Page 27: Time lapse and stabilising a sequence of images (GStreamer Conference 2011)

Err, yeah but...What about the balloon pictures?

Page 28: Time lapse and stabilising a sequence of images (GStreamer Conference 2011)

Horn-Schunck

Page 29: Time lapse and stabilising a sequence of images (GStreamer Conference 2011)

Lucas-Kanade

Page 30: Time lapse and stabilising a sequence of images (GStreamer Conference 2011)

SpeededUpRobustFeature

Page 31: Time lapse and stabilising a sequence of images (GStreamer Conference 2011)

SURF

Page 32: Time lapse and stabilising a sequence of images (GStreamer Conference 2011)

Woohoo!

Page 33: Time lapse and stabilising a sequence of images (GStreamer Conference 2011)

Bonus track

Page 34: Time lapse and stabilising a sequence of images (GStreamer Conference 2011)

TODO:Check out the optical flow work by David Jordan (used for slow motion)and try to apply it to stabilisation

Page 35: Time lapse and stabilising a sequence of images (GStreamer Conference 2011)

TODO:better compensation (tesselation?)

Page 36: Time lapse and stabilising a sequence of images (GStreamer Conference 2011)

TODO:try more algorithms (BRIEF and ORB)

Page 37: Time lapse and stabilising a sequence of images (GStreamer Conference 2011)

TODO:automatic optimal choice of algorithm and parameters

Page 38: Time lapse and stabilising a sequence of images (GStreamer Conference 2011)

TODO:reimplement in C and put in -bad?

Page 39: Time lapse and stabilising a sequence of images (GStreamer Conference 2011)

TODO:for videos: movement prediction/averaging(follow the intended movement of the cameraman)

Page 40: Time lapse and stabilising a sequence of images (GStreamer Conference 2011)

questions?

Image credits:training wheels: CC BY-NC-SA 2.0 Dale Basler http://www.flickr.com/photos/baslercast/surf: CC BY-NC-SA 2.0 Guilherme Meneghelli http://www.flickr.com/people/iberere/last one: CC BY-NC-SA 2.0 Martin Ibert http://www.flickr.com/photos/mar_ibert/

Page 41: Time lapse and stabilising a sequence of images (GStreamer Conference 2011)

Thanks! http://www.gitorious.org/gststabilizerhttp://balloonfreaks.mooo.com/http://emont.org/blog/http://www.igalia.com/[email protected]