Abstract
Moiré patterns, the wavy distortions often seen when photographing digital screens, present a significant challenge in image restoration. Traditional methods typically operate in either the sRGB domain, where distortions are already non-linearly processed, or the RAW domain, which lacks color context and leads to color casts. This paper introduces RRID (RAW and sRGB Image Demoiréing), a framework that jointly leverages the structural integrity of RAW data and the color fidelity of sRGB images. By employing a dual-branch architecture with frequency-aware modules and an RGB-guided Image Signal Processor (ISP), RRID achieves state-of-the-art performance in removing moiré while maintaining accurate color reproduction.
The Challenge of Screen Recapture
Capturing images of LCD screens often results in moiré patterns due to the interference between the camera's color filter array and the screen's subpixel grid. Removing these patterns is difficult because they vary in frequency, color, and shape.
Historically, researchers have approached this in two ways. sRGB-domain methods are convenient but struggle because the camera's internal ISP has already "baked" the moiré artifacts into the final image through operations like demosaicing and tone mapping. Conversely, RAW-domain methods work with "cleaner" linear data, making pattern removal easier, but they frequently suffer from severe "color cast" issues. Without the proprietary ISP metadata from the camera, reconstructing the intended colors from RAW data is an ill-posed problem.
The RRID Framework
To overcome these limitations, the RRID framework utilizes both RAW and sRGB inputs. The core idea is to use the sRGB image—even if it contains moiré—as a "color DNA" guide to help the RAW branch produce a clean, color-accurate output.
Dual-Branch Feature Extraction
The model begins with the Skip-Connection based Demoiréing Module (SCDM). This U-Net-style structure processes RAW and sRGB features in parallel. To enhance feature extraction, the authors introduced two specialized modules within the skip-connections:
- Gated Feedback Module (GFM): Integrated into the RAW branch, the GFM adaptively filters features to distinguish between high-frequency scene textures and moiré artifacts.
- Frequency Selection Module (FSM): Integrated into the sRGB branch, the FSM operates in the frequency domain. It uses a learnable band-stop filter via Block Discrete Cosine Transform (DCT) to specifically target and suppress the frequencies associated with moiré patterns.
RGB-Guided ISP (RGISP)
The most critical component is the RGISP module, which acts as a bridge between the two domains. It employs a cross-attention mechanism where demoiréd sRGB features guide the transformation of RAW features into the sRGB color space. This effectively allows the model to learn a device-specific ISP on the fly, ensuring that the final output matches the expected color profile of the original sRGB capture without the moiré.
Final Reconstruction
The final stage uses Residual Swin Transformer Blocks (RSTBs). These blocks leverage the long-range dependency modeling of Transformers to handle global tone mapping and refine fine details, ensuring a high-quality final image.
Experimental Evaluation
The authors evaluated RRID on the TMM22 dataset, which contains paired RAW and sRGB images from various smartphones and displays. RRID achieved a PSNR of 26.55 dB, outperforming the previous state-of-the-art (RawVDmoiré) by 0.62 dB. Qualitatively, RRID is notably better at avoiding the "washed out" or tinted appearance common in other models.
The model also showed strong generalization on the FHDMi dataset. Even when adapted for sRGB-only tasks, the architectural innovations of RRID allowed it to remain highly competitive. Furthermore, with an inference time of approximately 0.089 seconds on an NVIDIA RTX 3090, the framework is efficient enough for practical use.
Conclusion
RRID represents a significant step forward in image demoiréing by successfully fusing the strengths of RAW and sRGB data. By treating sRGB data as a color guide rather than just a corrupted input, the framework solves the persistent color cast problem in RAW demoiréing. Future work may extend this approach to video sequences and further optimize the RGISP module for mobile hardware deployment.
Summary updated