Full-color 3D visualization with Janus metafiber Authors: Haotian Xu, Tianyue Li, Haotian Ding, Shaochen Fang, Xiangyu Ma, Haojie Chen, Ye Chen, Yifeng Xiong, Shuming Wang, Fei Xu Published: 2026 ABSTRACT Fiber endoscopic imaging system exhibits high-precision imaging capability in extreme scenarios due to its flexibility and compatibility. The fiber bundles are naturally suitable to collect 2D intensity information, but it is difficult to directly obtain depth or angle information. Therefore, a large number of complex optical components are usually required to achieve dual-function imaging. In this work, we propose a single round-trip system with metasurface-integrated fiber bundle, namely the so-called Janus metafiber system. With the forward and reverse switching of the same optical path, we simultaneously achieving passive 2D imaging in the visible regime and active 3D depth sensing. The experiment shows high imaging fidelity and noise resilience benefiting from time-division acquisition between single-wavelength array scanning and polychromatic illumination. Especially, a 60° FOV and a divergence angle less than 2° has been verified in the interpolation optimized 3D depth imaging. Furthermore, the enhanced broadband depth-resolved synthetic imaging and edge detection are demonstrated combining the bimodal data. Our work enlightens potential applications in real-time biomedical diagnostics, LiDAR, and industrial inspection. Introduction Fiber-optic endoscopic imaging system brings forth minimally invasive or non-destructive inspection in biomedical or extreme environments for its high flexibility and exceptional light transmission capability1,2, including in vivo biomedical imaging3 and internal inspection of expensive mechanical equipment such as jet engines and industrial pipelines4. Typically, the spectrum and reflectance information acquired from the target characterize the color, material composition, and surface morphological properties. Conventionally, fiber bundles composed of thousands of tiny cores arranged in a hexagonal array are inherently well-suited for acquiring two-dimensional (2D) intensity information5–7, which intrinsically lacks three-dimensional (3D) depth information. Therefore, numerous approaches have been developed recently aimed at achieving depth-resolved imaging through fiber bundles, such as optical coherence tomography (OCT) scanning8, structured light9, scattering calculations10, and light-field angle extraction11. However, these methods typically operate in specific spectral bands or modalities, restricting them to providing either standalone 2D or 3D imaging, but not both simultaneously with full color and high precision. This limitation is exacerbated when attempting full-color imaging, where broadband chromatic aberrations inherent in the fiber bundle and imaging system distort projected contours and the point spread function (PSF). Consequently, the inherent broadband chromatic aberrations make it generally impossible to simultaneously achieve full-color and stereoscopic imaging within the same optical path configuration. Nevertheless, any attempts to overcome these drawbacks, undoubtedly introduce additional bulk optical components, fundamentally hindering compact and lightweight integration. The emergence of metasurfaces unlocks lightweight heterogeneous integration while enabling precise modulating of the optical degrees of freedom, thereby facilitating multidimensional imaging and multifunctional application12–17. Owing to these inherent properties, metasurfaces are exceptionally suited for integration with high-aspect-ratio fiber end-face characterized by small mode-field areas, thus minimizing optical thickness18–22. In endoscopic implementations requiring both color and spatial information of the target, bidirectional fiber-optic waveguiding that is distinct from conventional metasurface-assisted OCT systems solely responsible for light collection, necessitates, on the one hand, metasurface-mediated acquisition of illuminated object spectra into the fiber, and on the other hand, metasurface-modulated illumination and scanning of objects via light exiting the fiber. Such reciprocity exhibits on-demand Janus functionality23–25, establishing a foundation for round-trip bifunctional full-color stereoscopic imaging system. Herein, we propose a Janus metafiber system for full-color stereoscopic visualization (FCSV) via a reciprocally bi-functional strategy, by fully combining forward and reverse optical paths through the fiber with the assistance of a metasurface-enabled quadratic phase, which simultaneously allows 2D spectral collection and high-precision 3D depth acquisition in an ultracompact footprint. In forward case, the system maintains consistent multi-wavelength PSFs, with the fiber bundle causing negligible image resolution degradation. In reverse situation, the configuration utilizes the angle amplification functionality of the quadratic metasurface to replace front-end scanning with back-end scanning, achieving a 60° field of view (FOV) and <2° beam divergence. Furthermore, the theoretical depth detection accuracy improves from ~ 15 cm to ~ 2 cm through sine interpolation. Finally, we demonstrated dual-modality imaging in different scenarios using this round-trip approach and computationally generated full-color depth point cloud reconstructions and edge detection results, laying the foundation for future ultrafast multidimensional endoscopic techniques in extreme environments26. Results Concept of FCSV configuration The system configuration diagram of FCSV is shown in Fig. 1a. When using the forward configuration, the illumination light emitted by the white light LED is projected onto the surface of the imaging object via a multi-mode fiber (MMF) with a core diameter of 1 mm. The reflected light is focused by a quadratic phase metasurface onto the end-face of a fiber bundle (FIGH-30-650S, Fujikura) with a diameter of 600 μm and a numerical aperture (NA) of 0.4. After propagation through the fiber bundle, the object’s spectral information is obtained via a full-color CCD imaging system at the rear end. The specific optical path direction is shown in Fig. 1b and the inset showcases the optical photograph of the fiber bundle and the full-color imaging result. When using the reverse configuration, the emitted 532 nm pulsed light is modulated by a spatial light modulator (SLM) and undergoes small-angle array scanning at the end-face of the fiber bundle. After propagating through the fiber bundle, the pulse light undergoes angle amplification by the quadratic phase metasurface to achieve a large FOV point-by-point scan. The reflected signal is then collected by the MMF and propagated to an avalanche photodetector (APD), where it is compared with the incident reference beam using the time-of-flight (ToF) method to derive the object’s depth information. The specific optical path direction and depth imaging result are shown in Fig. 1c.Fig. 1Principle of FCSV.a Schematic of FCSV. After being modulated by a SLM, the incident pulsed laser is scanned at the rear end of the fiber bundle and undergoes angle amplification through a quadratic phase metasurface at the front end. The reflected signal is then collected by a MMF to achieve ToF measurement. Meanwhile, the white light emitted by the MMF is reflected and focused by the metasurface, which is then transmitted in reverse through the fiber bundle to a rear-end full-color CCD for collection. b Schematic of 2D full-color imaging. In this configuration, MMF acts as illumination fiber to project white light onto the object surface, while the fiber bundle acts as imaging fiber to collect reflected signal for imaging by the rear-end CCD. Scale bar: 100 μm. c Schematic of 3D depth imaging. In this configuration, the fiber bundle acts as a scanning fiber and the scanning beam modulated by the SLM is amplified and collimated by the quadratic phase metasurface before being projected onto the object. The MMF then acts as a collection fiber to acquire the reflected pulse signals into an APD. Finally, the depth information of the object is recovered by the ToF method. Principle of FCSV. a Schematic of FCSV. After being modulated by a SLM, the incident pulsed laser is scanned at the rear end of the fiber bundle and undergoes angle amplification through a quadratic phase metasurface at the front end. The reflected signal is then collected by a MMF to achieve ToF measurement. Meanwhile, the white light emitted by the MMF is reflected and focused by the metasurface, which is then transmitted in reverse through the fiber bundle to a rear-end full-color CCD for collection. b Schematic of 2D full-color imaging. In this configuration, MMF acts as illumination fiber to project white light onto the object surface, while the fiber bundle acts as imaging fiber to collect reflected signal for imaging by the rear-end CCD. Scale bar: 100 μm. c Schematic of 3D depth imaging. In this configuration, the fiber bundle acts as a scanning fiber and the scanning beam modulated by the SLM is amplified and collimated by the quadratic phase metasurface before being projected onto the object. The MMF then acts as a collection fiber to acquire the reflected pulse signals into an APD. Finally, the depth information of the object is recovered by the ToF method. By repeatedly using the same optical path to propagate both white light and pulsed signal, this system exhibited as a Janus metafiber system that simultaneously achieve dual functional imaging without modifying the optical path configuration. This is achieved by adding a beam splitter to route the forward and reverse incident signals and adopting a time-domain alternating acquisition strategy, which sequentially acquiring full-color images and pulse signals and the interference between them can be avoided (shown in Supporting Information Note 1 and Figure S1). Additionally, the system’s ‘bidirectional single-transmit single-receive’ configuration eliminates the impact of near-end reflection signals from incident light on image quality. The actual picture of the output part of this system is shown in Supporting Information Note 2 and Figure S2. Metasurface implementation Given aforementioned endoscopic scheme, we use a quadratic phase metasurface to achieve reciprocal imaging, enabling to collimate incident light from all directions into a coaxial plane wave. By applying this property inversely through a normalized beam point array at the end-face of fiber bundle as shown in Fig. 2a, we achieve concurrent angle magnification and collimated emission, facilitating large FOV and extended depth of focus (DoF) imaging. To accomplish this, each nanopillar at position (x, y) imparts the required phase given by: 1\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\phi (x,y)=\frac{\pi ({x}^{2}+{y}^{2})}{\lambda f}$$\end{document}ϕ(x,y)=π(x2+y2)λfwhere λ is the working wavelength and f is the focal length. Similarly, when we get the phase curve and reverse-derive its two-dimensional imaging result, we can obtain a nearly parallel real image at its focal plane27 when the object distance d is much larger than the focal length f. The imaging surface presents a slightly curved distribution, which is known as the ‘fisheye effect’.Fig. 2Characteristics of quadratic metasurface.a Schematic diagram of the basic properties of the quadratic phase. Based on the phase formula, incident beams with different incident angles will focus at different positions on the focal plane (z = f) after passing through the metasurface. The lateral offset distance is related to the incident angle as x = f · sinθ. This property can be used to achieve reverse angle magnification collimation scanning. b The schematic of the nanopillars composed of Si3N4 fabricated on the SiO2 substrate, which have period P and height H. c The amplitude and phase of the transmission coefficient for a nanopillar of radius R at the design wavelength. d The transmittance and phase of selected nanopillars with variations in radius. e, f are the optical microscopy and scanning electric microscopy of the metasurface. Scale bar is 100 μm and 500 nm, respectively. Characteristics of quadratic metasurface. a Schematic diagram of the basic properties of the quadratic phase. Based on the phase formula, incident beams with different incident angles will focus at different positions on the focal plane (z = f) after passing through the metasurface. The lateral offset distance is related to the incident angle as x = f · sinθ. This property can be used to achieve reverse angle magnification collimation scanning. b The schematic of the nanopillars composed of Si3N4 fabricated on the SiO2 substrate, which have period P and height H. c The amplitude and phase of the transmission coefficient for a nanopillar of radius R at the design wavelength. d The transmittance and phase of selected nanopillars with variations in radius. e, f are the optical microscopy and scanning electric microscopy of the metasurface. Scale bar is 100 μm and 500 nm, respectively. The required phase profile ϕ(x, y) is realized by using nanopillars of varying radius R. Figure 2b shows a schematic of the nanopillars composed of Si3N4, which have period P and height H. To ensure high efficiency, the nanopillar height and the unit-cell period are optimized at the design wavelength λ. In this design, phase accumulation follows the waveguiding effect, given by \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\varphi }_{{WG}}=2\pi {n}_{\mathrm{eff}}H/\lambda$$\end{document}φWG=2πneffH/λ, and the neff is the effective refractive index of a nanopillar surrounded by air. Therefore, the height H must be sufficient to provide a full 2π phase shift over the range of available radii. The smallest achievable radius is limited by fabrication constraints, while the maximum radius is limited by the unit cell size P. The period P itself must satisfy the Nyquist sampling criterion (P < λ/(2NA)), where NA is the numerical aperture calculated from Eq. (1). For our design, we chose λ = 532 nm, H = 600 nm, and P = 500 nm. To construct the metasurface, we discretize the required phase shift φ(xi, yi) onto a square lattice of unit cells with size P × P. At each position (xi, yi), we choose the nanopillar radius that minimizes ∣Tmeiϕ−T(R)eiφ(R)∣, where Tm is the transmission averaged over all the radii and ϕ is the target phase profile. T(R)eiφ(R) is the element of the Jones matrix. In this design, polarization insensitivity necessitates the equality of diagonal elements in the Jones matrix, i.e., Jxx = Jyy, where the subscripts denote the polarization directions of incident and transmitted light in the simulation, as illustrated in Fig. 2c. Each point in the complex plane represents the amplitude and phase of the transmission coefficient for a nanopillar of radius R at the design wavelength, indicating the structure exhibits high transmission efficiency with minimal variation across radii while achieving nearly complete 2π phase modulation. Figure 2d presents the simulated phase φ(R) and transmission as functions of nanopillar radius R, extracted from the Jones matrix elements. These results were obtained through finite-difference time-domain (FDTD) simulations across the visible spectrum, confirming full 2π phase coverage with consistently high transmission. Periodic boundary conditions were applied in all FDTD simulations. Based on the aforementioned principle, we fabricated metasurface sample with diameter of 600 μm and focus length of 600 μm (NA ~ 0.4, consistent with the fiber bundle), whose optical microscopy and scanning electric microscopy (SEM) are illustrated in Fig. 2e, f. The minute connections between meta-atoms in Fig. 2f represent common fabrication errors arising from small-scale exposure and etching processes, and do not significantly impact the optical performance of this device. The detailed fabrication process, using standard CMOS-compatible technology, is described in the Sample Fabrication section. Full-color imaging measurement We first tested the full-color imaging capability of the FCSV system. The PSF test optical setup is shown in Fig. 3a. A single-mode optical fiber (FCS2-PC-450-600, JCOPTIX) in the visible waveband was used for monochromatic projection and placed at a sufficiently distant position to simulate point source projection. An objective was directly placed at the focal plane of the metasurface for light collection. The PSF results obtained at 460 nm, 532 nm, and 630 nm are shown in Fig. 3b. We used the one-dimensional intensity distribution along the horizontal central axis of the 2D image to measure the full-width at half maximum (FWHM). After calculation, the FWHM of the quadratic metasurface at 0° incidence was found to be 2.84 μm, 1.94 μm, and 2.86 μm at three wavelengths, respectively. Considering the radial symmetry distribution of the metasurface, we tested the results within the 0° to 30° range in the horizontal direction and calculated their FWHM for comparison, with the relevant results shown in Fig. 3d. As shown in the figure, the FWHM at three wavelengths does not increase significantly within 0° to 30°. The small decrease of FWHM values at 10° is caused by the slight deviation between the focus plane and imaging plane. When the incident angle reaches 20°, the FWHM value slightly increases due to oblique incidence and the PSF response distribution at 30° becomes slightly non-uniform due to proximity to the metasurface’s FOV limit, resulting in a smaller measured FWHM value. The specific PSF responses and calculated FWHM values for three wavelengths between 0° to 30° are shown in Supporting Information Figure S4.Fig. 3Optical measurement of the quadratic metasurface.a Schematic diagram of the optical path for testing the PSF of the quadratic metasurface. The metasurface and CCD positions are fixed, and the PSF response of the metasurface is tested by using a single-mode fiber for monochromatic projection at a sufficiently long distance. The scanning range is ±30°. b PSF response of the quadratic metasurface at 460 nm, 532 nm, and 630 nm, respectively. We used the one-dimensional intensity profile of its horizontal center axis to calculate its full-width at half-maximum (FWHM). Scale bar: 5 μm. c The optical path configuration of the full-color imaging test. We placed the end-face of the fiber bundle at the focal plane of the quadratic metasurface to collect the focused light, and then used an objective to collect the image at the rear end. d When the incident angle ranges from 0 to 30°, the FWHM corresponding to three wavelengths remains at a relatively uniform level. e Full-color imaging comparison test between using the metasurface + CCD configuration and the metasurface + fiber bundle + CCD configuration. The test results indicate that the use of fiber bundle did not significantly reduce the image resolution, but when magnifying a local area for comparison, the hexagonal honeycomb-like sampling pattern introduced by the fiber bundle can be observed. Optical measurement of the quadratic metasurface. a Schematic diagram of the optical path for testing the PSF of the quadratic metasurface. The metasurface and CCD positions are fixed, and the PSF response of the metasurface is tested by using a single-mode fiber for monochromatic projection at a sufficiently long distance. The scanning range is ±30°. b PSF response of the quadratic metasurface at 460 nm, 532 nm, and 630 nm, respectively. We used the one-dimensional intensity profile of its horizontal center axis to calculate its full-width at half-maximum (FWHM). Scale bar: 5 μm. c The optical path configuration of the full-color imaging test. We placed the end-face of the fiber bundle at the focal plane of the quadratic metasurface to collect the focused light, and then used an objective to collect the image at the rear end. d When the incident angle ranges from 0 to 30°, the FWHM corresponding to three wavelengths remains at a relatively uniform level. e Full-color imaging comparison test between using the metasurface + CCD configuration and the metasurface + fiber bundle + CCD configuration. The test results indicate that the use of fiber bundle did not significantly reduce the image resolution, but when magnifying a local area for comparison, the hexagonal honeycomb-like sampling pattern introduced by the fiber bundle can be observed. The relevant test optical path configuration of the full-color imaging is shown in Fig. 3c. We used a electronic screen to project full-color iamge and conducted tests with and without fiber bundles for image acquisition. When using fiber bundle as the light-receiving transmission medium, their end-face were placed at the focal plane of the metasurface. The results obtained in both cases are shown in Fig. 3e. When using Metasurface + CCD and Metasurface + Fiber bundle + CCD configuration to capture the same scene, we found that the resolution of captured image was not significantly affected. However, when extracting detailed regions from the image, it was clearly observed that the image captured using the fiber bundle exhibited a hexagonal honeycomb-like sampling pattern, which to some extent affects the resolution capability of image details. This can be removed using specific algorithms28 or neural networks29. In this test, it has been retained because we aimed to demonstrate the original acquisition results without data processing. Scanning imaging measurement Figure 4a illustrates a schematic diagram of a configuration called ‘rear-end scanning replacing front-end scanning’. An SLM is used to achieve a small-angle scan of ~5° to cover the entire end-face of the fiber bundle, as shown by points A, B, and C. The coordinates of point B are (x, y), assumed to be (0, 200 μm). The inset in the lower left corner shows the SLM phase map corresponding to the three points. When the beams from different scanning points propagate through the fiber bundle, they are amplified and collimated at the output end by the quadratic metasurface. At a depth of ~10 cm, the coordinates of point B correspond to ~(0, 3.5 cm). This demonstrates that the quadratic phase metasurface achieves ~102 orders of magnitude of scanning field-of-view amplification, sufficient for applications in centimeter scale endoscopic scenarios. To verify the functionality of the quadratic metasurface, we tested the positions of the exit spots on the end-face at different angles, as recorded in Fig. 4b. Based on the principle of optical path reversibility, we first measured the SLM phase values at all outgoing angles and then observed the fiber bundle end-face corresponding to those phase values using a CCD. Between −20° and 20°, it can be observed that as the exit angle deviates from 0°, the spot exhibits a noticeable shift. After calibrating using a bright-field image, we measured the specific displacement values and compared them with the theoretical value Δx = f · sinθ. As shown in the figure, within an FOV of ~60°, the spot displacement values are nearly identical to the theoretical values, validating the unique characteristic of this quadratic phase metasurface. Complete exit spot images and bright field image are shown in Supporting Information Note 3 and Figure S5.Fig. 4Measurement of the scanning functionality of the FCSV system.a Schematic diagram of the ‘rear-end scanning replacing front-end scanning’ configuration. Small-angle scanning is achieved using an SLM on the rear end-face of the fiber bundle, and the angle amplification can be achieved at the output end using a quadratic phase metasurface. The inset shows the SLM phase patterns corresponding to the three scanning points A, B, and C. b Light spot images on the end-face at different angles and the corresponding theoretical and actual focus displacement, whose values are determined by the focal point offset formula Δx = f · sinθ. c Schematic diagram of the emitted scanning beam geometry. Pi, Pt, and Pf represent the power at the front and back of the metasurface and the focal point on the object, respectively, while Δθ denotes the divergence angle of the emitted beam. d Enlarged view of the spot at the focal point. Scale bar, 500 μm. A two-dimensional Gaussian fit is applied to the spot to restore its original shape and size, and the calculated divergence angle is shown in (e). f The metasurface transmittance Et, focusing efficiency Ef, and overall device efficiency EALL corresponding to angles from −20° to 20°. The variation in metasurface transmittance can be explained by the effective aperture cutting of the quadratic phase metasurface at different incident angles. g Schematic diagram of the reflected signal and reference signal in the time domain, and the pulse width is ~7.9 ns. For ToF calculations, the midpoint of the rising edge is used as the reference point, and sine interpolation is applied to each pulse to enhance temporal resolution. h Multi-angle depth calibration tests were conducted using this FCSV system, with depth measurements taken at 2 cm intervals between 10 to 20 cm range. The result shows that the recovered depth values within ±20° are relatively uniform and close to the actual depth values. Measurement of the scanning functionality of the FCSV system. a Schematic diagram of the ‘rear-end scanning replacing front-end scanning’ configuration. Small-angle scanning is achieved using an SLM on the rear end-face of the fiber bundle, and the angle amplification can be achieved at the output end using a quadratic phase metasurface. The inset shows the SLM phase patterns corresponding to the three scanning points A, B, and C. b Light spot images on the end-face at different angles and the corresponding theoretical and actual focus displacement, whose values are determined by the focal point offset formula Δx = f · sinθ. c Schematic diagram of the emitted scanning beam geometry. Pi, Pt, and Pf represent the power at the front and back of the metasurface and the focal point on the object, respectively, while Δθ denotes the divergence angle of the emitted beam. d Enlarged view of the spot at the focal point. Scale bar, 500 μm. A two-dimensional Gaussian fit is applied to the spot to restore its original shape and size, and the calculated divergence angle is shown in (e). f The metasurface transmittance Et, focusing efficiency Ef, and overall device efficiency EALL corresponding to angles from −20° to 20°. The variation in metasurface transmittance can be explained by the effective aperture cutting of the quadratic phase metasurface at different incident angles. g Schematic diagram of the reflected signal and reference signal in the time domain, and the pulse width is ~7.9 ns. For ToF calculations, the midpoint of the rising edge is used as the reference point, and sine interpolation is applied to each pulse to enhance temporal resolution. h Multi-angle depth calibration tests were conducted using this FCSV system, with depth measurements taken at 2 cm intervals between 10 to 20 cm range. The result shows that the recovered depth values within ±20° are relatively uniform and close to the actual depth values. For collimated scanning imaging, the divergence angle of the beam and transmission are critical parameters. We present a schematic diagram of a single scanning beam in Fig. 4c, where the light power before and after entering the metasurface, as well as at the focal point, are denoted as Pi, Pt, and Pf, respectively, and the divergence angle of the beam is denoted as Δθ. The image quality has deteriorated at the large angles owing to the limit of the edge of the aperture, and given the resolvable intensity of reflected light, so we will focus only on investigating the imaging performance between ±20° for convenience. Detailed analysis is documented in Supporting Information Note 4 and Figure S6. The spot image at the focal point is shown in Fig. 4d, where it appears divided by the cores of the fiber bundle. We consider it as a complete spot when collecting the light, which does not affect the accuracy of the returned signal. For estimating the original spot size to calculate the divergence angle, we used a two-dimensional Gaussian fitting function to fit the focused spots at different angles for calculating their FWHM, which is depicted in Supporting Information Note 5 and Figure S7. The results are shown in Fig. 4e. As can be seen from the figure, the divergence angle ranges from 1.2° to 1.6°, and it increases slightly as the angle increases from 0°. We denote the metasurface transmittance as Et = Pt / Pi, the focusing efficiency as Ef = Pf / Pt, and the total device efficiency as EALL = Pf / Pi, with the relevant results shown in Fig. 4f. From the results, it can be observed that the focusing efficiency generally maintains constant (detailed analysis in Supporting Information Note 6 and Figure S8), and the transmittance and total device efficiency are decrease with increasing angle. The primary factor influencing device transmittance is the effective aperture cutting27. Since the fiber bundle has a NA similar to that of the quadratic phase metasurface, its effective aperture nearly covers the entire metasurface aperture. When obliquely emitted, the effective transmitted power decreases due to the offset of the center point, as shown in the inset of Fig. 4f. When using ToF to calculate object depth information, both the pulse width of the pulse signal and the acquisition rate are critical. The 532 nm pulse laser (MPL-H-532nm-10uj) we used has a pulse width of ~7.9 ns, and the APD acquisition rate is 1 GHz, resulting in a depth resolution accuracy of ~15 cm. A schematic diagram of the reflected signal and reference signal in the time domain is shown in Fig. 4g. We calculated the time difference using the rising edge coordinate at half of the maximum value and performed sine interpolation based on the original sampling rate to improve time resolution. The specific processing algorithm is demonstrated in the Supporting Information Note 7 and Figure S9. We used this method to evaluate the multi-angle depth accuracy within the range from 10 to 20 cm, as shown in Fig. 4h. As seen in the figure, clear resolution is achievable at five angles when selecting a 2 cm depth interval, representing over an eightfold improvement compared to the original accuracy, thereby validating the feasibility of this interpolation method. A detailed explanation of the intrinsic depth resolution and interpolation resolution of the system is demonstrated in the Supporting Information Note 8 and Figure S10. Demonstration of bimodal fiber imaging In addition to calculating depth information based on the time difference, traditional ToF algorithm can also use peak intensity ratio to calculate reflectance information, as shown in Fig. 5a. In view of the lost energy after passing through the fiber bundle and the metasurface, we use a pre-calibrated intensity normalized value to calculate the reflectance r, using the following formula:2\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$r=\frac{{I}_{1}}{\alpha {{\cdot }}{I}_{2}}$$\end{document}r=I1α⋅I2Where I1 is the peak intensity of the reflected signal, I2 is the peak intensity of the reference signal, and α is the calibration ratio between the reference signal and the actual intensity after emission from the metasurface. This formula can be used to characterize the reflectance of an object’s surface. We tested the imaging performance of this FCSV system in four scenarios: the numbers 3 and 1, the letters S and N, different house models, and a school bus model and parking sign. The results are shown in Fig. 5b. From left to right, the images are the ground truth, the 2D full-color image of Mode 1, the reflectance imaging and the depth imaging of Mode 2. The edge of the FOV of the full-color imaging results were cropped to match with the square FOV used during scanning imaging.Fig. 5The bimodal imaging in different situations and the enhanced full-color 2D imaging.a By comparing the reference signal pulse with the reflected signal pulse, the sample depth d and object reflectance r can be determined. The flight time is measured at the rising edge, and the intensity value is measured at the peak. b Full-fiber dual-mode imaging in four different scenarios: the numbers 3 and 1, the letters S and N, different house models, and a school bus model and parking sign. In Mode 1, the full-color 2D images acquired in the forward direction are displayed, while in Mode 2, the object reflectivity and depth images obtained from the reverse scan are shown. c The enhanced full-color 3D synthetic imaging mode can be derived from the original bimodal imaging results. Object coordinates, offset values and full-color matrix are extracted from the depth images and full-color images, respectively. After matching through an alignment algorithm, a visualizable full-color 3D image is synthesized. Subsequently, we use the adjacent value determination method to traverse the pixels in the image and distinguish between surface data with lower data dispersion and edge information with higher data dispersion based on the interval threshold. d Enhanced full-color 3D imaging and edge detection imaging. After separation using the adjacent value determination method, the surface image with edge points removed and the compressed edge image are obtained, respectively displaying the main part of the image and the edge contour information. The FOV in the x, y direction is approximately 5 cm. The z-axis depth, considering the size of the region and the perspective effect, does not fully reflect the actual depth interval effect. The actual depth is based on the depth image in (b). The bimodal imaging in different situations and the enhanced full-color 2D imaging. a By comparing the reference signal pulse with the reflected signal pulse, the sample depth d and object reflectance r can be determined. The flight time is measured at the rising edge, and the intensity value is measured at the peak. b Full-fiber dual-mode imaging in four different scenarios: the numbers 3 and 1, the letters S and N, different house models, and a school bus model and parking sign. In Mode 1, the full-color 2D images acquired in the forward direction are displayed, while in Mode 2, the object reflectivity and depth images obtained from the reverse scan are shown. c The enhanced full-color 3D synthetic imaging mode can be derived from the original bimodal imaging results. Object coordinates, offset values and full-color matrix are extracted from the depth images and full-color images, respectively. After matching through an alignment algorithm, a visualizable full-color 3D image is synthesized. Subsequently, we use the adjacent value determination method to traverse the pixels in the image and distinguish between surface data with lower data dispersion and edge information with higher data dispersion based on the interval threshold. d Enhanced full-color 3D imaging and edge detection imaging. After separation using the adjacent value determination method, the surface image with edge points removed and the compressed edge image are obtained, respectively displaying the main part of the image and the edge contour information. The FOV in the x, y direction is approximately 5 cm. The z-axis depth, considering the size of the region and the perspective effect, does not fully reflect the actual depth interval effect. The actual depth is based on the depth image in (b). As shown in the figure, the contours and color information of different objects can be clearly characterized in the full-color imaging results. In reflectance imaging results, given that the FWHM of the light spot projected onto the object surface is ~1 mm, we used a 50 × 50 pixel array to cover a field of ~5 cm × 5 cm for imaging tests. After recovering the reflectance image and depth image through algorithmic calculations, we used an up-sampling algorithm to increase the resolution to 200 × 200 pixels to ensure compatibility with the resolution of subsequent composite imaging. Additionally, we removed singular vaslue noise from the images using a bilateral filtering algorithm. A comparison between the original acquired images and the images after up-sampling and filtering can be found in Supporting Information Note 9 and Figure S11. From the test results, it can be observed that differences in surface material and color brightness are clearly distinguishable. For example, in the scenes with the numbers 3 and 1, the lighter yellow color of the number 1 results in higher reflectance under white light illumination, so even at a greater depth, its reflectance remains higher than that of the number 3 in the foreground. In the school bus scene, the metal material of the wheels exhibits a near-mirror-like reflective effect, resulting in a significantly higher reflectance than the wooden material of the rest of the vehicle body. Additionally, the substantial reflectance difference between the white and blue colors on the parking sign makes the outline of the letter P clearly visible. In depth imaging, objects at different depths are clearly distinguished, and the same object surface exhibits relatively uniform depth values. This indicates that the system’s limiting depth resolution in actual testing is superior to the 2 cm demonstrated in Fig. 4h. After obtaining the bimodal imaging results, we can attempt to synthesize a single full-color 3D imaging rendering using depth imaging and full-color imaging information. The specific processing steps are shown in Fig. 5c. We use the coordinate value (x, y, z) from the depth image to determine the 3D coordinate of the point cloud. Then we calibrate the relative positions based on the coordinate differences (Δx, Δy) between the depth imaging and full-color imaging. Furthermore, the RGB color matrix extracted from the full-color image provides the color information for the point cloud. Finally, using the eight parameters x, y, z, Δx, Δy, c1, c2, and c3, we can generate a 3D full-color point cloud map. It is worth mentioning that we observed that at object edges, a complete projection spot may be split, causing its reflected signal to simultaneously reflect both partial object depth information and partial background depth information, resulting in a depth gradient region at the edges. To achieve clearer imaging results, we employed an adjacent value determination method to identify object contours, designating areas with smaller depth gradient as object surface regions and those with larger depth gradient as object edges. The specific determination method can be found in Edge extraction. Of course, this method is only applicable when there are no significant depth differences on the object surface. The relevant computational results are shown in Fig. 5d, where we present the original synthetic images, the object surface images and the edge images separated using the adjacent value determination method. As can be seen, the object surface images indeed remove the interfering points with large depth gradient at the edges compared to the original images; however, some useful points may also be misclassified and removed, such as some pixels at the boundary of the school bus and the parking sign. In the edge image results, the contours of different objects can be clearly identified, aligning closely with the actual scene contours, thereby validating this method’s superior separation performance for object surface and contour information. In practical fiber-optic imaging applications, edge extraction techniques can be employed to enhance image contrast and reduce computational load, thereby advancing the development of three-dimensional fiber-optic scanning imaging. Discussion In summary, the reciprocally bi-functional imaging based on Janus metafiber system has been achieved using a combination of an endoscopic fiber bundle and a quadratic phase metasurface. By repeatedly switching the light path configuration, we simultaneously tested full-color 2D imaging and 3D depth imaging. The system has a theoretical maximum FOV of 60°, a beam divergence angle of ~1.5°, and a depth resolution accuracy better than 2 cm. The bimodal imaging based on this system has been validated in various scenarios, accurately reflecting the spectral and positional information of target objects. Additionally, we demonstrated synthetic 3D full-color images optimized using multi-parameter optimization and edge detection results obtained through adjacent value determination method. For practical applications, metasurface samples must be robustly integrated with optical fibers to ensure mechanical stability, operational reliability, minimal overall footprint, and controlling the rigidity. The integration strategy of metafiber system has also been investigated and the related results are shown in Supporting Information Note 10 and Figure S12. These findings highlight the system’s significant potential for object position detection, color recognition, surface material analysis, and contour extraction in centimeter-level endoscopic scenarios. Looking ahead, considering the current hardware constraints of the system, optimized solutions can be employed to achieve more comprehensive and powerful functionality. For example, high-speed SLM or other rapid scanning solutions4 can be used to implement back-end array scanning, and gate control can be added in the time domain to achieve millisecond-level switching between forward and reverse optical paths, ultimately enabling real-time full-color 3D endoscopic imaging. Chromatic aberration also frequently constitutes a significant constraint on full-color imaging performance. Future approaches may consider employing methods such as extending the nanostructure height freedom30 to achieve superior achromatic performance. By employing higher-speed, more sensitive APD, the system’s depth resolution can be enhanced to the millimeter level, while increasing the imaging DoF and FOV. This could enable full-scene multi-modal imaging across a wide field ranging from millimeter to meter, laying a solid foundation for applications in fields such as LIDAR, biomedical therapy, and industrial instrumentation inspection. Methods Sample fabrication The quadratic metasurface was fabricated by a standard CMOS-compatible fabrication process. Firstly, we cleaned the SiO2 substrate with acetone, isopropanol and ultrapure water, successively. Then a layer of 600 nm Si3N4 was deposited by plasma enhanced chemical vapor deposition (OXFORD PP100 PECVD). After 10 min oxygen plasma treatment, a layer of polymethyl methacrylate (PMMA) was spin-coated on the Si3N4 layer to as the electron beam resist. Considering the poor conductivity of the substrate, 10 nm Au conductive layer was deposited on PMMA by a magnetron sputtering equipment (LEICA EM ACE600). The pattern of metasurface was then transferred to the resist layer by a 30 kV e-beam exposure (TESCAN MIRA3). We removed the Au layer with iodine/potassium iodide solution and developed it in the developer composed with MIBK: IPA = 1:3 for 1 min. A 30 nm metal mask of Al was deposited on the sample to transfer the pattern to the Si3N4 layer by an electron-beam evaporation (Kurt J. Lesker PVD75 Proline EB) and it was immersed in N-methylpyrrolidone (NMP) with 80° heating for 30 min and ultrasonic cleaning for 30 s to lift-off. Finally, the Si3N4 layer was etched by an inductively coupled plasma etching equipment (OXFORD PlasmaPro100 Cobra) to fabricate the designed nanopillars and the mask was removed with a specialized Al remover (Aluminum Etchant Type A). The complete process of metasurface fabrication is composed with the first ten steps as illustrated in Figure S3 and the SEM photograph is obtained by the TESCAN MIRA3 with a same Au deposition step as previously mentioned which is depicted in the dashed box. Edge extraction We employ a method known as adjacent value determination to distinguish object surface point clouds and contour point clouds. Specifically, we use a 3 × 3 pixel block to traverse all positions in the image, excluding the outermost ring of the image. At each position, a determination is made by comparing the central pixel of the 3 × 3 pixel block with the surrounding eight pixels. The number of pixels with depth differences more than a predefined threshold is recorded as NUM. If NUM > 6, the central pixel is determined to belong to the object’s contour; if NUM < 6, it is determined to belong to the object’s surface. The specific calculation process is as follows:3\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{array}{cc}\mathop{\sum }\limits_{{m-1\le i\le m+1}\atop{n-1 < j < n+1}} \left(\left\{\left|De{pt}h\left({x}_{m},{y}_{n}\right)-{Dept}h\left({x}_{i},{y}_{j}\right)\right|\ge {gap}\right\}={\mathrm{TRUE}}\right) \geq 6 \quad ({\mathrm{Edge}})\\ \mathop{\sum }\limits_{{m-1\le i\le m+1}\atop {n-1 < j < n+1}}\left(\left\{\left|De{pt}h\left({x}_{m},{y}_{n}\right)-{Dept}h\left({x}_{i},{y}_{j}\right)\right|\ge {gap}\right\}={\mathrm{TRUE}}\right) < 6 \quad ({\mathrm{Surface}})\\ \begin{array}{c}i,j\in {\mathrm{N}}^{+}\\ 1 < m < M-1\\ 1 < n < N-1\end{array}\end{array}$$\end{document}∑m−1≤i≤m+1n−1