Skip to main content

Update Report

Summary of Work to Date:


Setting off to implement a Cinemagraph generator using the two papers [1] [2] as primary references, following is a list of work done:
  • Going through the papers' methods, two main steps have been outlined for generating semi-automatic / automatic cinemagraphs, namely, Warping and Compositing. The former step (also the one that I majorly studied hitherto) requires use of KLT feature tracking. To understand the working of the tracker, I read through topics including Corner DetectionHomographyRANSAC and Optical Flow. I experimented with sample codes provided by OpenCV to understand how they work and how would I use this existing implementation towards the project goal.


    Optical Flow example (1):
    The lines denote the direction of motion of pixel under the dot

    Optical Flow example (2):
    HSV flow visualization

    KLT Tracking example:
    Detects good-tracking-points and tracks them across frames.


    As a part of the intermediate tasks, I was able to immobilize a hard-coded region in a video to create the Cinemagraphs shown below using OpenCV-Python and MoviePy. MoviePy is a Python module for video editing, which can be used for basic operations (e.g. cuts, concatenations, title insertions), video compositing, processing, or to create advanced effects. It can read and write the most common video formats

    These are composed by cropping off hard-coded portions of the input videos and compositing the video frames along with a masked snapshot of a still frame (at t=0). As assumed in the beginning of the project, the input videos are stabilized. 


    Only the water reflections are mobilized
    [YouTube]


    Only the region near the rock is mobilized
    [YouTube]

    Analysis of Work:

    Following is the task board [see here] marked with sub-tasks completed and to-be-done to put the progress in perspective:  


    Plan for Completion:

    So far, I am off to a rough start due to underestimation of prerequisites for the implementation of the methods described in the paper. As mentioned earlier, I was caught up with the concepts taken as known in the papers thus keeping me from completion of all the intermediate goals. 

    Final Tasks until December 12th:

    Before wrestling the final goals, I may work the backlog task to immobilize / mobilize the user selected area on a reference frame while generating cinemagraph. This should be a good intermediate step before the real implementation, which will be gone though if time permits.

    Nonetheless, here's a list of final goals:

    Warping:

    • Implement a spatially varying warp to have the motion of a region of video removed. The region can be defined either:
      • apriori, or
      • by user input (de-animating strokes).
    • This will be done in two stages:
      • track the "anchor" tracks (the KLT tracks that fall under the defined region on the reference frame) and warp the video.
      • track the "floating" tracks (the tracks that fall under the defined region, but not on the reference frame) and do a warp refinement over the first step.

    Composition:

    • The previous step is bound to introduce unwanted warping in the regions not selected for immobilizing. To keep the pixels other than in ROI intact, we need to composite the warped video with static still frames from input video. 
    • The paper uses graph cuts to perform Markov Random Field (MRF) optimization, to seamlessly composite dynamic regions from the warped video with static regions from input frames into a single output video.
      • To tackle the composition in the given time frame can be challenging. Thus, I plan to composite the warped video with a hard-coded static frame from the video for final generation of cinemagraph.
      • Additionally, if this plan works out better than expected, I plan to study the MRF optimization for seamless composition, still frame candidate selection, energy function and the Seam Cost in it, and how to selectively assign the source of a pixel (warped video or static frame) in the output video that respects the user defined strokes.

    Comments

    Popular posts from this blog

    Final Report

    Generating Cinemagraphs Tushar Turkar © P hotodoto.com Outline Summary Previous work Description of work Results Analysis Summary Cinemagraphs are seamlessly looping media files wherein one or more prominent (or  selected ) region in the foreground is dynamically in motion while rest of the scene is static. The Problem : A regular process to generate a cinemagraph comprises of the following steps: Recording - Capture stabilized footage, e.g., with a tripod Editing Software - Import the raw footage and clip it to show the desired content Masking - Create a mask to mobilize / immobilize the areas of interest Composite - Apply the mask and composite it with a static (invert-masked) image from the clip. Looping - Add seamless boundaries around clip on which to loop. While all this can also be done with several algorithms proposed in the research papers mentioned ahead, creating a cinemagraph still remains a cumbersome task for a majority of ...

    Project Proposal

    Generating Cinemagraphs Summary  Cinemagraphs are still photographs in which a minor and repeated movement occurs, forming a video clip. They are published as an animated GIF or in other video formats, and can give the illusion that the viewer is watching an animation. Cinemagraphs are made by taking a series of photographs or a video recording, and, using image editing software, compositing the photographs or the video frames into a seamless loop of sequential frames. This is done in such a way that motion in part of the subject between exposures is perceived as a repeating or continued motion, in contrast with the stillness of the rest of the image. Taking opportunity from this project, I intend to go through the available techniques for generation of a Cinemagraph, all the steps involved like ROI detection, background warping, stabilization, etc., and come up with a hybrid rendition of the whole process, scraping off parts from existing research to generate a ...