Introduction

Instant imaging processing is highly pursued in self-driving vehicles, biomedical imaging, drone swarm attacks, and automatic optical inspections in smart factories. To enhance the instant progression of imaging, spatial filters are adopted to adjust the phase and amplitude of the input images. Many phase contrast methods, such as Zernike phase contrast imaging1, differential interference contrast imaging2 and spiral phase contrast imaging3, have been demonstrated. Spatial differentiators for optical analog computing have been developed and applied in the instant imaging progression of edge detection in recent years4,5. Optical edge detection extracts the useful geometric features of objects during light-matter interactions. It is regarded as a potential candidate for instant imaging due to its ultrahigh speed and low energy consumption6,7. To enhance the applicability of optical edge detectors for instant imaging, their robustness has been enhanced in various aspects, such as resolution8,9,10, dynamic color selectivity11,12, polarization dependency13 and independence14,15, working band16,17,18, coherence19,20 and high-order optical edge detection21. In practical usage, obstacles inevitably interfere with optical devices, accordingly destroying the carried light field information. Therefore, realizing optical edge detection with robustness to obstacles in the light path is meaningful.

Spiral phase contrast imaging is one of the most representative techniques used in the instant imaging progression of edge detection. It is clear that any light propagating through the radial line of the spiral phase plate will conduct a π phase difference, which results in an isotropic edge contrast enhancement of the input amplitude-type or phase-type objects3. However, robustness to obstacles is rarely considered in existing spiral phase contrast imaging methods. The Bessel beam, which is described by a Bessel function of the first kind with infinite energy22 and is usually experimentally approximated by a Bessel-Gaussian beam23, is a suitable candidate for solving this problem. Self-healing ability24,25 has inspired tremendous research in optics and photonics, such as adaptive free-space optical communications26, new illumination for light microscopy27, particle manipulations such as optical tweezers28, and optical quantum networks29,30. If the specific self-healing characteristic can be introduced to spiral phase contrast imaging, the wavefront of the objects will be reconstructed even after obstruction, and thus robustness to obstacles can be expected.

In this work, we propose and demonstrate a self-healing spiral phase contrast imaging with a compact 4f-irrelevant self-healing optical edge detector, which is integrated with spiral phase, axicon phase and lens phase modulations. First, we demonstrate that the design can generate self-healing spiral phase contrast imaging. The self-healing capacity of the point spread function (PSF) is verified via both simulations and experiments, and spiral phase contrast imaging is carried out for both amplitude-type and phase-type objects. Furthermore, the robustness of self-healing to the size of obstacles is investigated. The proposed self-healing optical edge detector moves a steady step toward practical instant image processing.

Results

Design and principle

Figure 1a depicts the setup for the self-healing spiral phase contrast imaging. The object light propagates through the edge detector and the obstacle; then, a self-healing object edge image can be obtained at the imaging plane of the detector because the artificially designed phase profile of the detector contributes to both edge detection and self-healing. The illustration shows that edge detection information can be obtained even when obscured by an obstacle, except for causing intensity distribution differences.

Fig. 1
figure 1

Diagrams of function and design. (a) Setup for self-healing spiral phase imaging. (b) The phase design and distribution of the detector. Color bar: 0–2π.

The phase design and distribution of the detector are shown in Fig. 1b. To fulfill the self-healing spiral phase contrast imaging requirements, the phase profile \(\eta (x,y)\) is a superposition of a spiral phase \(\alpha (x, y) = m \cdot \theta\), an axicon phase \(\beta (x, y) = 2\uppi r/d\) and a lens phase \(\gamma (x, y) = -\uppi {r}^{2}/f\lambda\), where m is the topological charge, \(\theta = \text{arctan }(y/x)\), \(r = \sqrt{({x}^{2}+{y}^{2})}\), d is the axicon period, λ is the operating wavelength and f is the focal length. The color bar indicates a phase change from 0 to 2π. The spiral phase and the axicon phase aim to generate a Bessel-Gaussian beam to achieve self-healing capacity, while the spiral phase and the lens phase are set as a spiral lens to realize spiral phase contrast imaging. The initial conditions of the Bessel-Gaussian beams can be expressed as23

$$\begin{array}{c}{U}_{\text{BG}}\left(r,\theta \right)={A}_{\text{BG}}{J}_{m}\left({k}_{t}r\right)\text{exp}\left(\frac{-{r}^{2}}{{w}_{\text{BG}}^{2}}\right)\text{exp}\left(-im\theta \right),\end{array}$$
(1)

\({A}_{\text{BG}}\) represents the amplitude, \({J}_{m}\) is the mth-order Bessel function of the first kind, \({k}_{t}\) is the transverse component of the wavevector, and \({w}_{\text{BG}}\) is the waist of the beam. The transverse amplitude can be reconstructed after being obstructed by obstacles31, and the corresponding minimum self-healing distance can be calculated by \({z}_{min}= D/2{\theta }_{a}\)24. D is the width of the obstacle, and \({\theta }_{a}\) is the opening angle of the output beam. In diffractive optics, the image field distribution \({U}_{i}\) of a single lens imaging illuminated by coherent light can be expressed as the convolution of the PSF \(\widetilde{h}\) and the ideal image field \({U}_{g}\) in geometric optics32

$$\begin{array}{c}{U}_{i}\left(u,v\right)= \widetilde{h}\left(u,v\right)* {U}_{g}\left(u,v\right),\end{array}$$
(2)

\(\left(u,v\right)\) represents the coordinates of the image field, \(*\) represents the convolutional operation, \({U}_{g}\left(u,v\right)= \frac{1}{|M|}{U}_{o}(\frac{u}{M},\frac{v}{M}\)), \({U}_{o}(\frac{u}{M},\frac{v}{M}\)) represents the object field in geometric optics, and M represents magnification. The common PSF can be written as

$$\begin{array}{c}\widetilde{h}\left(u,v\right)= {\iint }_{-\infty }^{+\infty }P\left(\uplambda z\widetilde{x},\uplambda z\widetilde{y}\right)\text{exp}\left[-\text{j}2\uppi \left(u\widetilde{x}+v\widetilde{y}\right)\right]\text{d}\widetilde{x}\text{d}\widetilde{y},\end{array}$$
(3)

\(P\) represents the pupil function, \(\uplambda\) represents the operating wavelength, \(z\) represents the distance between the lens plane and the image plane, \(\widetilde{x}= \frac{x}{\uplambda z}\), and \(\widetilde{y}= \frac{y}{\uplambda z}\). For a spiral phase with a topological charge of 1 and a lens phase, the corresponding PSF can be approximated as33

$$\begin{array}{c}\widetilde{h}\left(\rho ,\varphi \right)= \frac{\pi R}{2r}\left[{J}_{0}\left(\sigma \rho \right){H}_{1}\left(\sigma \rho \right)-{J}_{1}\left(\sigma \rho \right){H}_{0}\left(\sigma \rho \right)\right]\cdot{e}^{i\varphi },\end{array}$$
(4)

\(\rho = \sqrt{{u}^{2}+{v}^{2}}\), \(\varphi =\text{arctan}\left(\frac{v}{u}\right)\), \(R\) is the aperture radius, \(\sigma = \frac{2\pi R}{\lambda f}\). \({J}_{0}\) and \({J}_{1}\) are 0th- and 1st-order Bessel functions of the first kind, respectively; \({H}_{0}\) and \({H}_{1}\) are 0th- and 1st-order Struve functions of the first kind, respectively. The PSF here is a donut-shaped pattern. The convolution of the donut-shaped PSF and a uniform object field distribution (amplitude or phase) will cause complete destructive interference, while the convolution of the donut-shaped PSF and an object field distribution with gradients will retain the intensity output.

Fabrication and characterization of the edge detector

The detector is first exposed by a digital micromirror device-based photopatterning system34 to imprint the director distribution \(\eta (x,y)/2\) into the azo-dye SD1 (NCLCP, China) layers spin-coated on substrates of a 5 μm-thick cell; then, the nematic liquid crystal E7 (NCLCP, China) is filled into the cell. According to the Pancharatnam-Berry phase, a detector carrying a phase \(\eta (x,y)\) is obtained. Notably, a geometric phase twice the value of the local azimuth of the director is encoded due to the spin-orbital coupling in the circularly polarization conversion process. The fabricated detector is exhibited in Fig. 2a with a topological charge of m = 1, an axicon period of d = 3000 μm and a focal length of f = 21.9 cm. Figure 2b shows the main photopatterning areas under a polarized optical microscope (POM) (Nikon 50i, Japan) and proves that all the areas agree with the design. Figure 2c depicts the liquid crystal director distribution in the central areas, and the color bar indicates 0 to π. Figure 2d shows the setup for the PSF measurement of the edge detector. In the z direction, a collimated supercontinuum laser (410–1200 nm, 900 μm in diameter, SuperKEVO, NKTPhotonics, Denmark) is selected as the point source, and a polarizer and a quarter-wave plate are used to generate circular polarization. After passing through the edge detector, the same combination of polarizer and quarter-wave plate is used for the polarization analyzer. Finally, a charge-coupled device (CCD) (Thorlabs, DCC1645C, USA) is used to capture the results. The edge detector is electrically tuned to meet the half-wave condition at an operating wavelength of 633 nm with a square-wave alternating current of 0.945 V and 1000 Hz. The output of the PSF image of a donut-shaped ring is exhibited in Fig. 2e, which is consistent with the theoretical analysis. To further demonstrate the PSF result, a corresponding normalized two-dimensional intensity distribution is presented in Fig. 2f. The two cross-sectional intensities, which correspond to the two orthogonal white dashed lines in Fig. 2e, indicate almost identical modulation performances.

Fig. 2
figure 2

Images and characterization of the edge detector. (a) Sample appearance image. (b) POM image of the central photopatterning area in (a). Scale bar: 400 μm. (c) Liquid crystal director distribution in the central area in (b). Scale bar: 100 μm. (d) The edge detector PSF measurement setup. P1: polarizer 1, λ/4: quarter-wave plate, P2: polarizer 2. (e) The PSF image. Scale bar: 150 μm. (f) The normalized two-dimensional intensity distribution of the PSF image.

Characterization of the PSF self-healing capacity

To characterize the self-healing feature of the PSF generated by the edge detector, the same setup as in Fig. 2d was used; a rodlike obstacle was placed horizontally 3 cm after the edge detector, as shown in Fig. 3a. To simplify, other devices of the setup are not displayed here. By collecting the images at different distances from the edge detector in the z direction, the self-healing progress can be clearly observed. The distances are set as 9.9–21.9 cm with an interval of 3 cm; the corresponding black dashed frames indicate the receiving positions, and the middle white dashed lines represent the later self-healing intensity analysis positions. The simulation and experimental results are presented in Fig. 3b. The width of the obstacle used here is 300 μm. The patterns in both the simulated (MathWorks, MATLAB 2021a, USA) and experimental results were recovered from two discrete centrosymmetric parts to an undivided ring along the farther observation position. To describe the self-healing progress clearly, a transverse (the white dashed lines in Fig. 3a) normalized intensity distribution is exhibited in Fig. 3c. Along with the propagation of the distorted beam, the peripheral energy gradually approaches the center, and the intensity of the obstructed areas gradually becomes stronger and reaches a peak at the focal plane. The last PSF self-healing pattern has obvious intensity differences between the obstructed and unobstructed areas but maintains nearly the same shape as the unobstructed pattern, indicating it causes intensity differences but does not influence the modulation feature.

Fig. 3
figure 3

Characterization of the self-healing capacity of PSF. (a) Experimental setup diagram. (b) The simulated and experimental PSF self-healing results for a rod-shaped obstacle with a diameter of 300 μm at the corresponding positions in (a). (c) The normalized intensity distributions of the PSF self-healing results corresponding to (b), at the white dashed line indicated in (a).

Characterization of self-healing spiral phase contrast imaging

To verify the amplitude-type self-healing spiral phase contrast imaging experiments, the setup shown in Fig. 4a was adopted. A mask is set as an amplitude-type object, and the obstacle is still placed horizontally 3 cm after the edge detector. The relative size ratio between the letter object O and the obstacle diameter w is exhibited in Fig. 4b. H and O are selected as objects, and obstacle diameters of 0 μm, 100 μm, 200 μm and 300 μm are placed separately to observe the influences on the edge detection results (Fig. 4c and 4d). It should be noted that both the object-to-sample distance and the CCD-to-sample distance follow the Gaussian imaging formula, and they are set to 2f. in order to obtain isometric images compared to the objects. Like usual spiral phase contrast imaging, both the edge information of H and O can be extracted clearly and are irrespective of the curvatures and orientations of the objects when there is no obstacle (0 μm). However, a slight reduction of intensity occurs due to the light shielding caused by the obstacles (100 μm, 200 μm, or 300 μm). As expected, the wider the diameter of the obstacle is, the weaker the edge information intensity of the obstructed areas becomes. As shown in Fig. 4e and 4f, the normalized intensity distributions with different obstacle diameters at the same position (white dashed line in Fig. 4c and 4d) further prove above phenomena. The imperfect imaging is due to the limited resolution caused by the small size of the element, which can be improved via introducing larger sample with longer focal length.

Fig. 4
figure 4

Amplitude-type self-healing spiral phase contrast imaging. (a) Self-healing edge detection experimental setup. (b) Comparison of the sizes of the objects and obstacles. (cd) Letter images and corresponding self-healing spiral phase contrast images with obstacle diameters of 0 μm, 100 μm, 200 μm or 300 μm. Scale bar: 400 μm. (ef) The respective normalized intensity distributions of the results in (cd) for obstacle diameters of 0 μm, 100 μm, 200 μm and 300 μm.

To further verify the self-healing ability, a magnified image (Fig. 5a) of an unstained Paramecium cell sample through a magnification system consisting of two objective lenses was adopted as a phase-type object. Self-healing spiral phase contrast images with different obstacle diameters (0 μm, 100 μm, 200 μm or 300 μm) are shown in Fig. 5b. Differently, the obstacle is placed vertically 3 cm after the edge detector. For the transparent low-contrast paramecium cell sample, the edge information could still be clearly detected even though it was obstructed. It should be noted that the diffraction enhancement caused by the magnification of the Paramecium cell sample slightly diminishes the imaging contrast. The corresponding normalized intensity distributions of the images at the same position (white dashed lines in Fig. 5b) are exhibited in Fig. 5c. All the intensity distributions of the spiral phase contrast images had three peaks. The middle peaks corresponding to the obstructed areas had intensity differences, while the bilateral peaks had almost the same intensity. This finding indicates that a wider obstacle leads to lower intensity of the self-healed edge image.

Fig. 5
figure 5

Phase-type self-healing spiral phase contrast imaging. (a) Unstained paramecium cell image. Scale bar: 500 μm. (b) Self-healing spiral phase contrast images with obstacle diameters of 0 μm, 100 μm, 200 μm and 300 μm. Scale bar: 500 μm. (c) The normalized intensity distributions of the results in (b) with obstacle diameters of 0 μm, 100 μm, 200 μm and 300 μm.

Discussion and conclusion

In contrast to previous edge detectors tailored for instant imaging, the proposed edge detector introduces a self-healing capability in spiral phase contrast imaging by leveraging the combination of the spiral phase and axicon phase. This innovative approach significantly enhances the robustness of optical edge detectors in the presence of obstacles and broadens their applicability. A key advancement in the design is the integration of the lens phase with the spiral phase, which results in a more compact detector and enables spiral phase contrast imaging without reliance on the traditional 4f. system (comprising two lenses separated by twice their focal length). When rodlike obstacles are positioned along the z-axis, the method maintains a consistent self-healing distance24, regardless of the exact location of obstacles along this axis if the distance from the obstacles to the CCD exceeds the minimal self-healing distance, further demonstrating the applicability. It should be noted that the scheme is designed for amplitude-type obstacles. The self-healing property of the detection system was initially verified through edge detection of amplitude-type objects. To further validate this characteristic, edge detection of phase-type objects was conducted. In spite of the diffraction effects occurred during magnification, fortunately, the self-healing edge detection is well demonstrated. Notably, when the size of the object is comparable to that of the detector, edge information is obtained in the optimum quality. An oversized object results in the loss of peripheral edge information, whereas a too small object would cause curved edge contours indued by the spiral phase modulation. Although only one wavelength is adopted, the detector can achieve broadband self-healing spiral phase contrast imaging across the visible spectrum through electrical tuning. This involves adjusting the tilt angle of liquid crystals by applying voltage to two transparent ITO layers, thereby satisfying the half-wave condition for different operating wavelengths. The proposed scheme relies on the coherence of light, with a Gaussian beam being the preferred choice. However, the self-healing edge detection can still be applied to other coherent beams with suitable phase modifications. This flexibility highlights the versatility and potential of the edge detection method in various imaging scenarios.

In summary, we proposed and demonstrated a self-healing spiral phase contrast imaging scheme based on a compact 4f-irrelevant edge detector encoded with self-healing capacity. The detector exhibits robustness to obstacles for both high-contrast amplitude-type objects and low-contrast phase-type objects. This work reveals the potential of the self-healing capacity of spiral phase contrast imaging and will promote instant imaging processing.