All-Optical Diffractive Operators for Rapid, Computer-Free Morphological Transformations.

Yuxiang Sun, Fenglei Wang, Jing Han, Geyang Qu, Zezheng Zhang, Yifan Wei, Chuang Yang, Qifeng Ruan, Shuai Wang, Heming Wei, Chaoran Huang, Jun Guan, Q. P. HuPubMed 2026 · DOI

TL;DR

Researchers have developed all-optical diffractive networks that perform complex image processing tasks like erosion and dilation without any computational processing. These diffractive processors leverage deep learning to design optical surfaces that manipulate light wavefronts, enabling real-time, computer-free morphological transformations with potential for highly scalable and efficient visual information processing.

What Problem Does This Paper Address?

Morphological transformations (like erosion and dilation) are fundamental to image processing, used in everything from medical imaging to security surveillance. However, as image datasets grow, these operations become computationally intensive, demanding significant processing power and memory. This bottleneck hinders real-time applications, especially on portable or edge devices. Existing digital methods struggle to keep pace with the ever-increasing data volumes, creating a need for faster, more efficient, and less computationally demanding solutions.

Methods

The core innovation lies in using diffractive optical networks trained with deep learning. These networks consist of multiple cascaded diffractive surfaces. The deep learning process optimizes the phase modulation of each surface by learning the relationship between input and desired output images from a large dataset. Once trained, the network performs the transformation in a single pass of light, eliminating the need for digital computation.

Key aspects of the method include:

  • Diffractive Computing: Light itself is used to perform the computation by propagating through specially designed optical elements.
  • Deep Learning Optimization: A supervised learning approach trains the diffractive surfaces to achieve specific morphological operations.
  • Cascaded Architecture: Multiple diffractive layers are stacked to build complex processing capabilities, enabling tasks like image denoising by combining erosion and dilation.
  • Tunable Kernels: The size and directionality of the morphological operations can be adjusted by modifying the training dataset, allowing for on-demand synthesis of transformation kernels.
  • Reflection Configuration: For experimental validation, a compact, multi-reflection setup using a phase-only Spatial Light Modulator (SLM) was employed.

Datasets

The researchers utilized a combination of datasets for training and evaluation:

  • EMNIST: A dataset of handwritten digits and letters.
  • Quick, Draw!: A dataset of user-drawn sketches.
  • Custom Grating Patterns: Synthetically generated patterns with varying widths and orientations.

For testing generalization, they also used:

  • EMNIST test set.
  • New object categories from QuickDraw (circle, cloud, lightning, leaf, eyeglasses).
  • New grating patterns with unseen widths and angles.
  • Magnetic tile surface defects dataset for real-world testing of denoising.

Key Insights and Ideas

  • Computer-Free Image Processing: The most striking insight is the realization of complex image transformations purely through optical means, bypassing digital computation entirely.
  • Deep Learning as an Optical Design Tool: Deep learning isn't just for analyzing data; it can be used to design the physical hardware (diffractive surfaces) that performs the computation.
  • Scalability of Optical Processing: The diffractive network approach scales effectively to larger, higher-resolution images, overcoming a major limitation of traditional digital methods.
  • Modularity and Composability: Cascading simple diffractive modules allows for the creation of more sophisticated image processing pipelines, like denoising.
  • Flexibility in Transformation Design: The ability to "program" optical transformations by adjusting training data is a powerful concept for creating task-specific optical processors.

Key Results

  • Accurate Morphological Transformations: The diffractive networks successfully performed isotropic erosion and dilation on unseen images, achieving high Structural Similarity Index (SSIM) scores (up to 0.897 for erosion and 0.803 for dilation).
  • Image Denoising: Cascaded diffractive networks effectively performed morphological opening (erosion followed by dilation) to denoise images with added salt noise, significantly improving Peak Signal-to-Noise Ratio (PSNR) and SSIM.
  • Scalability: The approach was demonstrated to work for images up to 640x640 pixels, showing a viable path towards processing large-scale visual data.
  • Tunable Kernels: The system could adjust the extent of erosion/dilation by changing the training data, demonstrating control over transformation parameters.
  • Experimental Validation: The proposed diffractive network was experimentally realized using an SLM, confirming its practical feasibility for both phase- and amplitude-encoded images.

Limitations and Future Work

  • Structuring Element Size Limit: For very large structuring elements (e.g., 9x9 and beyond), the compact diffractive design showed performance degradation. This suggests a trade-off between task complexity and the current architecture's capacity.
  • Future Work: The authors propose several avenues:
  • Increased Depth/Receptive Field: Developing architectures with more layers or larger effective receptive fields to handle larger kernels.
  • Auxiliary Nonlinear Stages: Incorporating nonlinear elements to enhance processing capabilities.
  • Iterative Application: Using recursive application of small-kernel diffractive networks to emulate large-kernel operations, improving fidelity.
  • Anisotropic Transformations: Extending the approach to directional erosion and dilation for edge enhancement and denoising.
  • Physical Integration: Exploring microscale 3D diffractive elements and metasurfaces for integration with CMOS sensors, leading to presensor optical computing.
  • On-Chip Implementation: Developing fully integrated diffractive networks on planar photonic platforms.

Summary updated

Abstract

Morphological transformations are playing a key role in visual information processing with diverse applications ranging from bioimaging to video surveillance and environmental monitoring. However, these operations are becoming increasingly computationally intensive, requiring substantial memory and processing power as the size of image datasets expands. This paper describes a fast, highly parallel approach to perform morphological transformations by diffractive computing. These all-optical processors consist of successive diffractive surfaces designed to perform dilation and erosion operations by learning the relations between input and transformed images via a deep learning-based optimization process. Unlike existing digital methods, our free-space diffractive devices implement these transformations in a computer-free manner by directly processing the optical wavefront. The cascaded diffractive architecture further enables image denoising and flexible tuning of the extent and directionality of erosion/dilation through the same training process by adjusting target image datasets, realizing the synthesis of diverse transformation kernels on demand. We also demonstrate that the optical process is scalable and can process large volumes of visual information in a highly parallel manner. Experimentally, we realize such a diffractive network in a reflection configuration using a phase-only spatial light modulator (SLM) and perform morphological transformations on both amplitude- and phase-encoded images.
BibTeX
@inproceedings{sun2026all,
  author = {Yuxiang Sun and Fenglei Wang and Jing Han and Geyang Qu and Zezheng Zhang and Yifan Wei and Chuang Yang and Qifeng Ruan and Shuai Wang and Heming Wei and Chaoran Huang and Jun Guan and Q. P. Hu},
  title = {{All-Optical Diffractive Operators for Rapid, Computer-Free Morphological Transformations.}},
  booktitle = {PubMed},
  year = {2026},
  doi = {10.1002/nap2.70031},
}
Figure