Introduction
Rolling shutter (RS) distortion is a common artifact in images captured by CMOS sensors, particularly when the camera or subject is in motion. Unlike global shutter (GS) sensors that capture the entire frame simultaneously, CMOS sensors record images row-by-row. This sequential exposure results in geometric warping—straight lines appear skewed, and objects look wobbly. Correcting these artifacts from a single frame is a highly ill-posed problem, as the model must infer the camera's temporal motion from a static, distorted input. Existing methods often struggle due to unrealistic synthetic training data or the lack of perfectly aligned ground-truth global shutter images.
The Image-to-Motion Framework
To address these challenges, this paper introduces RS-Diffusion, a novel framework based on diffusion models. Unlike traditional "image-to-image" approaches that attempt to generate corrected pixels directly, RS-Diffusion adopts an "image-to-motion" strategy.
Methodology
- Predicting the Motion Field: The model predicts an Intra Gyro Field (IGF), a 2D motion field representing the camera's movement during the exposure period. By predicting motion rather than pixels, the model preserves the original image's high-frequency textures and avoids resolution constraints typical of standard diffusion models.
- Patch-Attention Module: To mimic the sequential nature of CMOS sensors, the authors designed a specialized attention mechanism. It processes the image in horizontal patches, using intra- and inter-patch self-attention to capture the row-wise dependencies inherent in rolling shutter distortion.
- Warping and Loss: The predicted IGF is used to mathematically warp the RS image back into a GS frame. Training is guided by a combination of Mean Squared Error (MSE) on the motion field and a photometric loss on the final reconstructed image.
Datasets and Real-World Realism
A significant contribution of this work is the RS-Real dataset. To overcome the lack of realistic training pairs, the authors recorded real-world camera shake using a synchronized IMU gyroscope. This high-frequency 3D rotation data was converted into 2D motion fields, allowing for the creation of 40,000 training pairs with mathematically perfect, realistic ground truths. The model was also evaluated on standard benchmarks like the Building Dataset and the challenging RS-Homo dataset, which features low-light and sparse-texture conditions.
Key Results and Performance
RS-Diffusion achieves state-of-the-art (SOTA) performance across all major benchmarks. On the Building dataset, it reached a 34.92 dB PSNR, significantly outperforming the previous best of 33.34 dB. On the difficult RS-Homo dataset, the improvement was even more pronounced, jumping from a previous SOTA of 26.15 dB to 36.60 dB PSNR.
Beyond accuracy, the method is highly efficient. By predicting the motion field in a limited number of diffusion steps, RS-Diffusion achieves an inference speed of 28.1 ms per frame on an NVIDIA RTX 2080Ti, making it suitable for real-time applications.
Conclusion and Future Work
RS-Diffusion demonstrates that combining the generative power of diffusion models with a physics-informed "image-to-motion" framework can effectively solve the ill-posed problem of single-image rolling shutter correction. While currently limited to rotational camera motion (homography), future iterations could integrate monocular depth estimation to handle more complex 6-DOF (degrees of freedom) movements, including translational motion.
Summary updated