Turning an Urban Scene Video into a Cinemagraph

Hang Yan, Yebin Liu, Yasutaka Furukawa

Abstract Creating cinemagraphs—still images with subtle, looping animations—typically requires a static camera and a controlled environment. This paper introduces an automated pipeline designed to generate high-quality cinemagraphs from "in the wild" urban videos captured by moving or handheld cameras. By integrating 3D scene warping for stabilization, frequency-domain analysis for periodic motion detection, and Robust Principal Component Analysis (RPCA) for seamless rendering, the system successfully isolates dynamic elements like neon signs from complex backgrounds.

Introduction

Cinemagraphs offer a unique visual experience by blending the stillness of photography with the motion of video. However, their creation is traditionally labor-intensive, requiring a tripod-mounted camera to ensure a perfectly static background. In urban environments, camera motion (e.g., from a walking person or a moving vehicle) introduces parallax and perspective shifts that make isolating moving objects extremely difficult. This research addresses these challenges by automating the transformation of dynamic urban footage into stabilized, looping cinemagraphs.

The Proposed Pipeline

The system follows a three-stage process: spatial alignment, dynamic segmentation, and final rendering.

Overview of the automated cinemagraph generation pipeline, showing warping, segmentation, and rendering steps.

1. Spatial Alignment (Warping)

To simulate a static camera, the system uses Structure from Motion (SfM) and Multi-View Stereo (MVS) to estimate camera poses and scene depth. All frames are then warped into the viewpoint of a chosen reference frame, effectively stabilizing the background as if it were shot from a tripod.

2. Dynamic Appearance Segmentation

The core technical contribution is the identification of "animatable" regions. The system distinguishes between two types of dynamic content:

  • Repetitive Appearances: Periodic elements like flashing neon signs are detected using a 1D Discrete Fourier Transform (DFT) on pixel intensities over time. Pixels with strong high-frequency peaks are flagged as repetitive.
  • Random Appearances: Non-periodic displays (e.g., digital billboards showing trailers) are identified using a Random Forest classifier. This classifier utilizes features such as color histograms, shape convexity, and temporal binary patterns.
Analysis of dynamic regions: (left to right) reference frame with points p1/p2, temporal intensity plots, frequency magnitude plots (DFT), and the resulting segmentation mask.

3. Cinemagraph Rendering

To produce the final loop, the background is kept static from the reference frame. For the animated regions, the authors use Robust Principal Component Analysis (RPCA). This technique decomposes the video into a low-rank matrix (the stable part) and a sparse matrix (the dynamic part), which helps smooth warping artifacts and handles transient occlusions, such as pedestrians briefly passing in front of a sign.

Key Results and Insights

The system was evaluated on diverse real-world datasets, including handheld YouTube footage of Times Square and Las Vegas. Key findings include:

  • High Accuracy: The Random Forest classifier achieved a validation accuracy of 93.0% in identifying suitable display regions.
  • Qualitative Superiority: Unlike previous methods that often mistakenly animate large moving objects like cars, this approach precisely targets visually attractive elements like signs while maintaining a perfectly still background.
  • Adaptive Regularization: By adjusting the RPCA weight based on the "richness" of the video content, the system prevents "ghosting" artifacts common in simpler blending methods.

Limitations and Future Work

While successful, the method relies heavily on the quality of the initial 3D reconstruction; failures in SfM/MVS can lead to visual distortions. Additionally, while the system handles small occlusions well, large, slow-moving objects (like a person standing in front of a sign) remain a challenge. Future work may incorporate semantic segmentation to better distinguish between background structures and foreground crowds.

Summary updated

BibTeX
@inproceedings{yan2017turning,
  author = {Hang Yan and Yebin Liu and Yasutaka Furukawa},
  title = {{Turning an Urban Scene Video into a Cinemagraph}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2017},
  doi = {10.1109/cvpr.2017.177},
}
Figure