Content aware cleanup for video

Last September a film production company asked to use the time-lapse webcam footage I assembled during the eruption in Fimmvörðuháls and Eyjafjallajökull.  They preferred the footage without logos but Vodafone in Iceland who had maintained the webcam did not have clean versions of the images.  Cropping would have been an option but then interesting parts of the frame would have been lost so I looked at the option to use the content aware fill techniques that have recently appeared in image editing programs.

     Still frame from: Eyjafjallajökull volcanic eruptions in 2010       Still frame from: Eyjafjallajökull volcanic eruptions in 2010

First I tried the Resynthesizer plugin for GIMP and it did a fairly good job, but to run the whole set of images through it (one image for each minute, 1440 images for each day) I would have needed to write something in Script-Fu as GIMP does not have the ability to record user interactions to a batch job – open a file, make a selection, run Resynthesizer on it, etc – and that was indeed an option as I don’t mind trying out new programming environments.

     Still frame from: Eyjafjallajökull volcanic eruptions in 2010       Still frame from: Eyjafjallajökull volcanic eruptions in 2010

But I decided to try the new Content Aware Fill feature in Adobe Photoshop also and it did a better job cleaning up the areas containing the logos.  And as it is very easy to create batch jobs from user interactions in Photoshop, it was the choice for this task which took about a week crunching through the 75888 images from the period the eruptions lasted and the webcam was in operation, March 24th (the eruption started on the 21st) to May 21st (eruption ended on the 23rd).  For each image a mask was created to limit the area the content aware filter would work with, four selections created to apply the filter on, and the image flattened.

     Still frame from: Eyjafjallajökull volcanic eruptions in 2010       Still frame from: Eyjafjallajökull volcanic eruptions in 2010

The results are quite impressive.  On a few frames the results are not so smooth and could be done better by hand but I wouldn’t bother, they just appear as slight glitches when the frames are run through, 12 per second or faster.  Here are a few days with the time-lapse videos before and after for comparison:

P.S. there on May 13th at min 1:30 I can be seen wearing a scarf and black sweater and gray pants, carrying a red and gray backpack :)

Skildu eftir svar

Netfang þitt verður ekki birt. Nauðsynlegir reitir eru merktir *