Reconfigurable image processing metasurfaces with phase-change materials

Optical metasurfaces have enabled analog computing and image processing within sub-wavelength footprints, and with reduced power consumption and faster speeds. While various image processing metasurfaces have been demonstrated, most of the considered devices are static and lack reconfigurability. Yet, the ability to dynamically reconfigure processing operations is key for metasurfaces to be used within practical computing systems. Here, we demonstrate a passive edge-detection metasurface operating in the near-infrared regime whose response can be drastically modified by temperature variations smaller than 10 °C around a CMOS-compatible temperature of 65 °C. Such reconfigurability is achieved by leveraging the insulator-to-metal phase transition of a thin layer of vanadium dioxide, which strongly alters the metasurface nonlocal response. Importantly, this reconfigurability is accompanied by performance metrics—such as numerical aperture, efficiency, isotropy, and polarization-independence – close to optimal, and it is combined with a simple geometry compatible with large-scale manufacturing. Our work paves the way to a new generation of ultra-compact, tunable and passive devices for all-optical computation, with potential applications in augmented reality, remote sensing and bio-medical imaging.


Introduction
Analog optical computing [1] has attracted renewed interest in recent years, due to the exponentially growing demand for data processing [2], facilitating and accelerating computational tasks that would otherwise be performed electronically [3]- [5].All-optical computational platforms offer the appealing possibility of manipulating data at the speed of light while avoiding analog-to-digital conversion [6], leading to large reductions in latency times and energy consumption.In this context, image processing is one of the most important computational tasks, underpinning many technologies, such as augmented reality, self-driving vehicles and LiDAR systems.These operations can be readily performed electronically, i.e., by digitalizing an image and manipulating it via a software.While easy to implement, digital approaches often suffer from several drawbacks, such as high latency times, energy consumption incompatible with stand-alone devices, and overall footprint and complexity, thus making analog alternatives particularly appealing and sought-after.The most commonly used approach to perform analog optical image processing is through Fourier filtering, using a so-called 4f lens configuration [7]: an input image is Fouriertransformed by a first lens, and the different Fourier components are selectively filtered by a spatially varying amplitude and/or a phase mask placed in the Fourier plane.Finally, the output image is created via an inverse Fourier transform performed by a second lens.Edge detection, for example, can be performed with an opaque stop blocking low spatial frequencies and transmitting those above a certain threshold defined by the size of the opaque region.While easy to implement, the 4f approach is not suitable for integrated devices because it is inherently bulky and prone to alignment issues.
Recently, it has been shown that Fourier-based image processing can be implemented without the need of a bulky 4f system, by instead filtering the transverse momentum of an image directly in real space [8], [9].
The implementation of this idea, sometimes referred to as an 'object' or 'image plane' approach [9], requires optical devices with a tailored angle-dependent response [10]- [24], which can be obtained with the aid of metasurfaces -ultra-thin films that are patterned on sub-wavelength scales.In particular, periodic 'nonlocal' metasurfaces [10], [11] can be engineered to perform momentum filtering within a very small footprint, as demonstrated by several theoretical [10]- [12] and experimental [17], [19]- [24] studies.One of the most common image processing functionalities is the calculation of the spatial gradients of an input image  in (, ), for instance by applying the Laplacian operation  out (, ) = ∇ 2  in (, ), which results in an enhancement of the edges of the input image as compared to areas of constant intensity (as sketched in Fig. 1a, left side).In Fourier space, the Laplacian operation is described by  out (  ,   ) = −(  2 +   2 ) in (  ,   ), that is, a high-pass filter that suppresses the small Fourier components corresponding to the flat features of the input image.Physically, this is achieved when the metasurface blocks (by reflection or absorption) any plane wave incident at small angles, while largely transmitting plane waves propagating at larger angles.This response can be achieved in metasurfaces supporting one or more dispersive optical modes [17], [19], [22]- [24], leading to efficient edge-detection devices that do not require bias and operate in real space, without the need for a 4f system, thus drastically reducing the associated footprint.
While several studies [16]- [24] have demonstrated the possibility of performing image processing and edge detection in compact 4f-less systems with the aid of metasurfaces or other approaches, most past work has considered 'static' devices, whose functionality is fixed and cannot be dynamically modified.Yet, such reconfigurability is necessary in order for these devices to replace digital computing in practical systems, particularly in the context of more complex optical computing tasks [25].In order to achieve such reconfigurability, it is necessary to introduce a large, controllable and reversible change of the optical properties of the material forming the metasurface.For example, Zhang et al. [26] have demonstrated computational metasurfaces reconfigurable through mechanical strain, yet with limitations in terms of reproducibility and scalability of such approach to reconfigurable image processing.Several theoretical proposals [27]- [30] have suggested that large reconfigurability may be achieved by electrically gating a graphene layer placed above or inside a metasurface.Liquid crystals can also be used to achieve reconfigurable optical computation, although this approach typically requires thick devices used as spatially varying masks in 4f systems [31], [32], thus limiting the miniaturization and integration opportunities.
Material nonlinearities have also been proposed as a tool to achieve reconfigurability, either by having a high-intensity image impinging on a metasurface made of a saturable absorber [33], or by controlling the metasurface response via an external optical pump [34].
In parallel, phase-change materials (PCMs) have emerged in recent years as an interesting platform to implement strong and controllable changes of the dielectric permittivity of nanophotonic structures.
Materials such as vanadium dioxide (VO2) [35], antimony trisulfide (Sb2S3) and germanium antimony telluride (GST), undergo an abrupt change in their crystalline structure as the temperature exceeds a certain threshold.Recent studies have indeed investigated the integration of optical metasurfaces with VO2 [36], [37] and GST [38], [39] in order to dynamically modify the device response.In the field of imaging, Heenkenda et al. [40] proposed using germanium antimony selenide telluride (GSST) to realize tunable spectral filters for night vision applications.VO2 is of particular interest in this context because its transition temperature is only a few tens of degrees above room temperature [35], which reduces the amount of energy required to change its permittivity, facilitating its implementation within more complex systems.
In this work, we merge the strong tunability provided by PCMs with the field of nonlocal dielectric metasurfaces, to realize an edge-detection 4f-less device whose image processing functionality can be dynamically reconfigured by a temperature change of few degrees.In particular, we experimentally demonstrate a single-layer metasurface, operating in the near-infrared, that performs high-efficiency and high-contrast edge detection at any temperature below the VO2 transition temperature T0 ≈ 65° C, and whose image processing functionality can be drastically modified by varying the device temperature by less than 10° C around T0 (Fig. 1a).Such reconfigurability is achieved by altering the nonlocal response of the metasurface: in the insulating phase, the low loss of the VO2 facilitates long-range interactions between multiple unit cells, giving rise to delocalized photonic modes, whose dispersion and nonlocality is leveraged to accurately tailor the angle-dependent metasurface response.As the VO2 transitions from the insulating to the metallic phase, the sudden increase in loss strongly inhibits the long-range interactions, reducing the degree of nonlocality and resulting in a device with an almost angle-independent transmission profile.
Besides the strong and controllable tunability, our proposed design simultaneously features remarkably large throughput efficiency, full isotropy, a relatively large NA ≈ 0.26 and an almost polarizationindependent response.Our work presents a proof-of-principle implementation of reconfigurable image processing metasurfaces, which may be extended to devices capable of performing other temperaturecontrolled operations, including bandpass filtering, convolution, direction sensing, polarization imaging, and quantitative phase microscopy.

Design and Simulations
The metasurface design is based on a photonic crystal inspired to the geometry introduced in Refs.[22], [24] and illustrated in Figs.1(a-b).It consists of a silicon slab of height H patterned with cylindrical holes of radius R arranged in a triangular lattice with pitch a.The silicon slab rests on a uniform thin film of vanadium dioxide of thickness h, and the entire device is supported by a quartz substrate.The design was numerically optimized with a commercial electromagnetic solver (COMSOL Multiphysics) to obtain the desired reconfigurable response at wavelengths in the near-infrared range (1500 nm -1700 nm).The permittivities of the insulating and metallic phases of VO2 were extracted from the literature [41], while the silicon and quartz were modeled with lossless and dispersionless refractive indices equal to 3.47 and 1.445, respectively.The design geometry was optimized such that, at a given operational wavelength, the angledependent transmission amplitude () of the metasurface supports a Laplacian profile [() ∝ (sinθ) 2 ] when the VO2 is insulating, and an approximately flat profile [() ∝ constant] when the VO2 is metallic.
By keeping the VO2 layer very thin, we ensured that the absorption induced by this material (particularly in the metallic phase) played a limited role in the overall device performance.
The normal incidence transmission spectra of an optimized device (with parameters H = 320 nm, R = 310, a = 960 nm, h = 35 nm) is shown in Fig. 1c for the insulating and metallic phases of VO2.For insulating VO2 (blue curve in Fig. 1c), the transmission spectrum features a high-contrast dip at wavelengths close to  = 1665 nm, which sets the operational wavelength.On the other hand, when the VO2 is metallic, the transmission spectrum evolves onto a significantly different lineshape (red curve in Fig. 1c), being almost wavelength-independent between 1500 nm and 1800 nm, and with an average transmission in the 20-30% range.This transmission level is primarily determined by the increased absorption and reflection induced by the metallic phase of VO2.To verify that this design can perform reconfigurable edge detection, we numerically calculated the angle-dependent transmission of the metasurface for the two phases of VO2 (Figs. 1d-e).In Figure 1d we show the absolute value of the s-polarized angle-dependent transmission amplitude at a fixed wavelength ( = 1665 nm) and for the two phases of VO2 (the corresponding phases of these transmission amplitudes are shown in the Supplementary Information).When the VO2 is in the insulating phase (top of Fig. 1d), the metasurface supports an isotropic Laplacian-like response within a numerical aperture NA ≈ 0.26.The absolute value of the transmission amplitude evolves from almost zero at normal incidence to values as high as 0.9 (corresponding to transmission of about 81%) for polar angles  = 15  .Such a response indicates that, when the VO2 is insulating, the metasurface performs highefficiency edge detection on an input image.On the other hand, when the VO2 is in the metallic phase (bottom of Fig. 1d), the absolute value of the transmission amplitude is pinned to a value of approximately 0.5 (corresponding to a transmission of about 25%) for any angle of incidence within the numerical aperture.Such angle-independent response indicates that the metasurface will not perform Fourier filtering, faithfully reproducing the input image (albeit with some intensity attenuation).The p-polarized transfer functions (shown in the SI) display a similar behavior, although with a reduced value of transmission at large angles when the VO2 is insulating.The reconfigurability of the metasurface transfer function is further demonstrated in Fig. 1e, which shows the metasurface transmission as a function of   =  0  and for   = 0 for both s-and p-polarized illuminations at the operational wavelength.Here,  0 = 2  ⁄ denotes the wavenumber in free space and (  ,   ,   ) are the Cartesian components of the wave-vector  ⃗ .As shown in Fig. 1e, for both s and p polarizations the metasurface transfer function features a flat profile when VO2 is in the metallic phase, and a quasi-parabolic profile when VO2 is in the insulating phase.

Experimental Results
We fabricated a metasurface with parameters close to the numerically optimized design.The fabrication was performed with standard lithographic and etching techniques, as described in the Supplementary Information [42].Figures 2(a-b) show SEM images of a fabricated sample with hole radius R ≈ 350 nm, VO2 thickness h ≈ 35 nm, silicon thickness H ≈ 360 nm and lattice constant a = 960 nm, which we selected for the optical characterization and experiments.In the false-colored tilted image in Fig. 2b, the silicon photonic crystal is colored in green, while the underneath VO2 layer is colored in red.We used a custombuilt optical setup to characterize the optical response of the metasurface as a function of wavelength, incident angle and temperature (see Supplementary Information [42] for additional details).The device temperature was controlled by placing it in contact with a thin ceramic heater, and the temperature of the metasurface was monitored by both a thermal camera and a thermocouple attached on the silicon side of the device.
The black line in Fig. 2c shows the normal-incidence transmission spectrum of the metasurface at temperatures close to room temperature (T = 34° C).The transmission spectrum is characterized by a minimum between 1662 nm and 1675 nm (gray shaded area), where the transmission drops below 2%, in good agreement with simulations.Figure 2d shows the evolution of the normal-incidence transmission spectrum as the temperature of the metasurface is slowly increased.For temperatures ranging from room temperature to approximately 60° C, the transmission spectrum remains almost unchanged, featuring the same minimum in the 1662 nm -1675 nm region.To further confirm this, the transmission spectrum at T = 60° C (corresponding to the dashed cyan line in Fig. 2d) is plotted in Fig. 2c (cyan line).Very small changes of the transmission spectrum for temperatures ranging from room-temperature to 60° C are due to a weak and continuous variation of the refractive index of silicon due to thermo-optic effects.
As the temperature of the metasurface is increased above 60° C, the VO2 undergoes an insulator-to-metal transition, causing the transmission spectrum to rapidly morph into a different line shape.In this state, the transmission minimum disappears, and the wavelength dependence of the device becomes almost flat, as also shown by the horizontal cut at the temperature T = 68° C in Fig. 2c (red curve, corresponding to the dashed red line in Fig. 2d).For temperatures above 68° C, the transmission spectrum does not vary significantly.The experimentally measured temperature dependence of the transmission spectrum shown in Figs.2c-d agrees well with the simulated response in Fig. 1(c-e).In our measurements, the optical spectrum evolves smoothly within a narrow range of temperatures ΔT < 8° C instead of abruptly changing at a certain threshold temperature, as expected for an ideal phase change.This behavior can be attributed to inhomogeneities in the VO2 film that introduce local variations of the threshold temperature [43].The results confirm that the VO2 phase transition lies within the temperature range 60 − 68° C, in agreement with commonly reported values [35].
To demonstrate the process reversibility, the heater was turned off at the end of the measurement run of Fig. 2d, and the transmission spectrum was continuously recorded as the metasurface cooled to room temperature.The results (Fig. 2e) show that the original transmission spectrum is recovered when the metasurface cools to temperatures below ~55° C, confirming that the change of the metasurface spectrum induced by the phase transition is fully reversible.A small hysteresis behavior is also observable when comparing Fig. 2d and 2e: the temperature at which the VO2 undergoes phase transition is slightly different for the warming up and cooling down experiments.Similar hysteresis effects in VO2 have been reported in previous work [43]- [45], and they can be attributed to the formation and interaction between clusters of domains in the metallic phase of the material [44].
Next, we verify that, besides the normal-incidence response, the phase transition of VO2 can also largely reconfigure the nonlocal response of the metasurfacemanifested in the angle-dependent transmission amplitudewhich is crucial to modify the metasurface image processing functionality.To this aim, we performed temperature-and angle-dependent s-polarized transmission measurements for a fixed wavelength  = 1672 nm and azimuthal angle  = 0  , with results shown in Fig. 3a.For all temperatures below T = 60° C the angle-dependent transmission profile displays the desired Laplacian-like behavior, evolving from a transmission of about 2% at normal incidence to a transmission larger than 50% for  ≈ 16  .These transmission levels agree with our simulations (Fig. 1), and they are comparable with the ones obtained in similar static devices [22], [24].This confirms that the absorption due to the optical losses within the insulating VO2 is negligible in this wavelength range.As shown by the three cyan lines in Fig. 3b, the quadratic-like angle-dependent transmission profile remains almost unchanged for temperatures T < 60° C. Minor variations in the angle-dependent transmission profiles for T < 60° C (e.g., the small decrease of the transmission peak at  ≈ 16  for T = 59° C) can be attributed to the weak and smooth variation of the silicon permittivity due to thermo-optic effects.For temperatures T > 60°, the angledependent transmission undergoes a quick and sudden change, evolving to an almost flat profile which is maintained for any temperature T > 68° (see also the three red lines in Fig. 3b).Overall, the experimental data in Figures 2 and 3 confirm that the VO2 phase transition can be leveraged to induce a drastic change in the metasurface nonlocal response.In particular, the high-pass-filter response, which is the mathematical basis for edge detection, can be turned on and off by small (Δ ≤ 8  C) changes in temperature.This discrete and sudden change in nonlocality and angle-dependent response is very different from what can be obtained with typical thermo-optic effects [46], whereby the refractive index changes in a continuous fashion as a function of the temperature, and thus temperature changes of several tens of degrees are necessary to obtain significant spectral changes.
After having verified the temperature-induced reconfigurability of the metasurface nonlocality, we now demonstrate that this platform can be used to realize an image processing device with edge-detection functionality that can be rapidly switched on and off with a temperature change of a few degrees.The imaging experiments were performed with the setup shown in Fig. 4a, and further detailed in [42].Test input images were created by illuminating an amplitude mask with collimated and unpolarized light at a wavelength of 1670 nm.The mask was created by etching a desired shape onto a 200 nm thick layer of chromium deposited on a glass substrate.The image scattered by the target is collected by a NIR objective (Mitutoyo, 50X, NA = 0.42) and relayed onto a near-infrared camera.The metasurface was mounted on the heating stage used for the measurements in Figs. 2 and 3 and placed between the mask and the objective.
The heating stage was placed on a flip mount, allowing us to relay onto the camera either the unfiltered input image (when the metasurface is removed) or the input image filtered by the metasurface.
The imaging results are summarized in Figs. 4 and 5.In Fig. 4, the target was the logo of one of our institutions (CUNY) with a transverse size of approximately 150 µm.Figure 4b shows the output image recorded by the camera when the metasurface is removed from the setup in Fig. 4a.In this scenario, the full unfiltered image is recorded.Next, we inserted the metasurface between the mask and the objective, and we recorded the corresponding image with the device at room temperature (Figure 4c).As expected, in this configuration the edges of the input image are strongly enhanced with respect to the regions where the intensity is homogenous.An important figure of merit for passive computational metasurfaces is the throughput efficiency, that is, how the intensity of the output image compares to the intensity of the input image.Following Ref. [22], we define the peak efficiency as the ratio between the maxima of the input and output intensities  peak ≡ max ( out )/max ( in ).In order to readily estimate this metric, the color plots in Figs.4(b-c) have been normalized by dividing the counts recorded in each pixel by the power incident on the target and by the integration time of the camera.Thanks to this normalization, the pixel intensities in both input and output images are proportional to the optical fluence, and the efficiency  peak can be readily estimated by comparing the upper limits of the colorbars in Figs.4(b-c).In particular, the intensity efficiency of our metasurface reaches values close to 10%.These efficiencies are similar to those measured in similar passive devices without the additional tunability provided by the PCM [22], [24].We stress that this efficiency level is close to the maximum possible efficiency attainable by an ideal filter performing the Laplacian operation with the same NA [22], ultimately limited by the passivity of these devices.
After having verified that our device can perform high-quality and isotropic edge detection at room temperature (Fig. 4c), we investigated how the output filtered image depends on the metasurface temperature.To this aim, the image was continuously acquired as the temperature of the metasurface was increased and then subsequently decreased.In Figs.4(e-f) we show the output image recorded at seven different temperatures, for increasing (Fig. 4e) and decreasing (Fig. 4f) temperatures (in the Supplementary Information [42] we display additional images acquired at other temperatures).In each subpanel, the corresponding temperature is shown in the bottom left corner.As clearly shown by Fig. 4e, the output image remains unaltered for any temperature below 61°, displaying the same high-contrast edge enhancement achieved at room temperature (Fig. 4c).For temperatures above  = 61° C, the output image quickly evolves and, for temperatures above  = 68°C, the edge enhancement has completely disappeared, and the output image now closely resembles the input (Fig. 4b).The changes in the output image between the two states can be further visualized in Fig. 4d, which shows horizontal slices of the output intensity maps (taken along the horizontal dashed line in Fig. 4c) for the temperatures  = 58°C (blue solid curve) and  = 68°C (red shaded area).As the device is cooled down (Fig. 4f), the edge-detecting functionality is fully restored as soon as the temperature drops below 52°.The hysteresis behaviorthat is, the difference in transition temperature between the heating (Fig. 4e) and cooling (Fig. 4f) experimentsis similar to that observed in Figs.2(d-e).Other than the presence of hysteresis, the reconfigurability of the edge-detecting functionality is fully reversible, as confirmed by Fig. 4f.In particular, the peak intensities of the last two panels of Fig. 4f are the same as the peak intensities of the first three panels of Fig. 4e (see SI for full data), confirming that no degradation has occurred in the metasurface.To further verify the reconfigurable image processing capabilities of our device, the imaging experiment was repeated with a different input image, given by a rectangle of dimensions 20 µm x 100 µm (Fig. 5a).
The image filtered by the metasurface at room temperature (Fig. 5b) shows high-quality edge enhancement, which was maintained unaltered for all temperatures up to T ≈ 60°C (Fig. 5d).Similar to the results observed in Fig. 4, the output image undergoes a sudden change as the temperature increases above T = 60°C, morphing into the unfiltered attenuated image for temperatures above  = 66°C.A comparison between the intensity profiles for  = 53°C and  = 66°C is shown in Fig. 5c.

Discussion
In this work we have demonstrated that phase-change materials can be used to drastically control the nonlocality and the angle-dependent transmission profile of metasurfaces, leading to sub-wavelength passive edge-detection devices whose image processing operation can be efficiently controlled by temperature variations smaller than 10° C around a CMOS-compatible temperature  0 ≈ 65° C.This reconfigurability is achieved by leveraging the insulating-to-metallic phase transition of a layer of VO2 arising at temperatures close to  0 .Our design principle, based on adding a thin layer of VO2 within a thicker metasurface, enables a large change of the optical properties of the metasurface while simultaneously minimizing absorption losses when the VO2 is in the insulating phase.
In particular, we designed and experimentally demonstrated a metasurface that, for temperatures  < 60 o C, features the same Laplacian-like angle-dependent transfer function within a numerical aperture of 0.26, well suited to perform high-resolution edge detection.As the temperature increases and the VO2 undergoes the phase change, the metasurface transfer function rapidly evolves into an almost angle-independent profile, with average transmission around 25%, which is maintained for any temperature  > 68 o C. In this state, the metasurface does not perform any operation on the input image.Moreover, the proposed reconfigurable metasurface performs high-NA, high-efficiency, isotropic and polarization-independent edge detection for with metrics close to optimal and demonstrated in recent works within similar devices that lack reconfigurability [22], [24].Our approach and design make this reconfigurable image processing metasurface amenable to mass manufacturing.The transition temperature can be further reduced by doping VO2 with molybdenum or tungsten to facilitate optical-induced heating process [47], [48].
Importantly, the computational metasurface demonstrated in this work does not require the use of a 4f lens system, because the desired mathematical operation is implemented directly in real space, by filtering different plane waves with respect to their angle of propagation.This is in stark contrast to approaches where either liquid crystals [31], [32] or metasurfaces [49]- [52] are used as spatially varying masks in a 4f system, which preclude any meaningful miniaturization.
Further improvement of the proposed design could lead to the implementation of more complex responses whereby, for example, the metasurface performs two different mathematical operations of choice in the two phase states.Additionally, the approach demonstrated here can be extended to non-volatile PCMs, which would permit maintaining the desired functionality without actively heating the metasurface.Finally, while with the device demonstrated here the temperature was controlled via external heater elements, the same working principle and design may be extended to devices where the metasurface temperature is controlled either by local heater elements integrated on the same chip, or via optically induced heating with an external pump laser.The latter scenario may open interesting avenues for all-optically reconfigurable nonlinear analog computation.We expect these results to pave the way for the use of reconfigurable 4f-less image processing metasurfaces for applications such as augmented reality, satellite systems and environmental monitoring, as well as materials research.

Sample Fabrication
The samples were fabricated with a standard lithographic process.First, VO2 thin films were deposited onto plasma-cleaned fused silica substrates by using pulsed direct-current magnetron sputtering (Kurt J. Lesker PVD 75), as described in more detail in [35], [45].The sputtering was performed with base pressure of 4.0 × 10 −7 Torr, sputtering pressure of 2.8 × 10 −3 Torr, power of 200 W, and with 30% oxygen partial pressure in an argon environment.The as-deposited samples were annealed at 560° C and 250 mTorr pressure for 1.5 hours to obtain crystallinity.The VO2-coated substrates were further cleaned by placing them in an acetone bath inside an ultrasonic cleaner, and in an oxygen-based cleaning plasma (PVA Tepla IoN 40).After cleaning, a layer of 360 nm of amorphous silicon was deposited via a plasma-enhanced chemical vapor deposition process.A layer of e-beam resist (ZEP 520-A) was then spin-coated on top of the samples, followed by a layer of an anti-charging polymer (DisCharge, DisChem).The desired photonic crystal pattern was then written with an electron beam tool (Elionix 50 keV).After ZEP development, the pattern was transferred to the underlying silicon layer via dry etching in an ICP machine (Oxford PlasmaPro System 100).The resist mask was finally removed with a solvent (Remover PG).

Numerical simulations
The numerical simulations were performed using a finite-element-method commercial electromagnetic solver (COMSOL Multiphysics 6.1).Floquet boundary conditions were applied to the sides of the rhomboidal unit cell (shown in Fig. 1b) to model an infinite triangular lattice.The quartz substrate was assumed to be a homogeneous, lossless material with a refractive index of 1.445.The silicon material was assumed to be homogeneous and lossless, with a refractive index of 3.47 at the wavelength of 1665 nm.
The VO2 was modelled using ellipsometry data for both of the insulating and metallic states [41], and it was assumed to be lossless in the insulating state.Port boundary conditions were applied on the top and bottom of the unit cell to launch and absorb plane waves, respectively.The complex angle-dependent transmission amplitude was obtained by computing the complex coefficient S21 of the scattering matrix of the two-port system.

Optical Characterization
The measurements shown in Figs.2-5 of the main paper were performed with a custom-built setup described briefly here below and in more detail in the Supplementary Information (Section S1 and Figure S1).
For all measurements, the sample was attached to a thin ceramic heater (Thorlabs, HT10KR1).The temperature of the heater was increased by progressively increasing a current fed to it, and the temperature of the sample was monitored by both a thermocouple (Thorlabs, TH100PT) attached on the silicon side of the metasurface and a thermal camera.The heater was placed on two independent rotation stages to control the polar angle θ and the azimuthal angle ϕ.For the normal-incidence measurements shown in Fig. 2a, a collimated broadband lamp was weakly focused on the metasurface, and the transmitted beam was collected by a near-infrared spectrometer.The measurements in Figs.2d were obtained by slowly increasing the current fed to the heater, and by continuously recording the transmission spectra and the device temperature.
After the temperature reached a value of approximately 90 o C, the current fed to the heater was turned off, and the transmission spectrum of the metasurface was continuously recorded as the sample cooled down to room temperature.For the angle-dependent measurements shown in Fig. 3, a broadband supercontinuum laser (NKT, Fianium FIU-15) filtered via a tunable narrowband filter (Photon, LLTF Contrast) was used as source.The laser was weakly focused on the metasurface, and the transmitted signal was collected and recollimated on the other side of the sample by an identical lens.Two identical germanium power meters were used to measure the transmission level through the metasurface.A linear polarizer placed before the beam-splitter was used to polarize the incoming beam along either x or y, which correspond, respectively, to p-and s-polarization for any value of θ and ϕ.A second linear polarizer was used to select the output polarization.The transmission amplitudes shown in Figs.3a were then obtained with an automatized procedure whereby the temperature was slowly increased in small steps and, after achieving a thermal steady state, the angle θ was swept.
The imaging experiments shown in Figs. 4 and 5 of the main paper were performed with the setup schematized in Fig. 4a and shown in more details in Fig. S1.The illumination was provided by the same filtered supercontinuum source used in the setup described in the previous paragraph.

Figure 1 .
Figure 1.General working principle and simulated optical response of the proposed metasurface.(a) Schematic of the proposed working principle.The same metasurface performs either edge-detection (left) or conventional bright field imaging (right) depending on whether its temperature is lower or higher, respectively, than the transition temperature of a thin layer of vanadium dioxide (VO2) embedded inside the metasurface.(b) 3D (top) and bird's eye (bottom) view of the unit cell of the device considered in this work.The metasurface is composed of a photonic crystal, made of a triangular lattice of holes etched onto a silicon slab, placed on a quartz substrate coated with a thin, unpatterned layer of VO2.(c) Calculated normal-incidence transmission spectrum of the metasurface, assuming that the VO2 is in the insulating (cyan curve) or metallic (red curve) phase.(d) Angle-dependent transmission amplitude (absolute value) of the metasurface under s-polarized illumination, for the insulating (top) and metallic (bottom) phases of VO2.(e) Transmission versus   =  0  for   = 0 for s-polarized (solid curves) and p-polarized (dashed curves) illumination, and for the insulating (cyan curves) or metallic (red curves) phases of VO2.

Figure 2 .
Figure 2. Experimentally measured optical response of the fabricated metasurface.(a-b) Scanning electron microscope images of the fabricated metasurface.Scale bars = 2 µm in panel a and 500 nm in panel b.The false-colored image in panel b shows the silicon slab (green) and the underlying VO2 film (red).(c) Transmission spectrum of the device selected for further experiments, at near-room temperature (T = 34° C, black curve), at T = 60° C (cyan curve) and at T = 68° C (red curve).(d-e) Evolution of the normal-incidence transmission spectrum of the metasurface in panel c, as the temperature is slowly increased (panel d) and decreased (panel e).

Figure 3 .
Figure 3. Thermal control of the metasurface filtering response.(a) Measured temperature-and angle-dependent transmission of the device in Fig. 2 for s-polarized illumination at a wavelength of  = 1672 nm.(b) Measured transmission versus angle for selected values of the temperature (extracted from panel a), as denoted in the panel legend.

Figure 4 .
Figure 4. Reconfigurable edge-detection experiment.(a) Schematic of the experimental setup.(b) Unfiltered input image (corresponding to the logo of our institution) obtained when the metasurface is removed from the setup in panel a (scalebar = 50 µm).(c) Edge-detected image obtained with the metasurface present and at room temperature.(d) Horizontal slices of the output intensity taken at the location marked by the white dashed line in panel c, for a metasurface temperature slightly below (T = 58° C, blue curve) and slightly above (T = 68° C, red shaded areas, extracted from the corresponding image in panel e) the transition temperature of VO2.(e) Filtered images obtained for different temperatures of the metasurface as the device is heated.The temperature of each measurement is reported in the bottom right corner of each image.(f) Same as in panel e but for the case in which the device is cooled.

Figure 5 .
Figure 5. Reconfigurable edge-detection experiment with a rectangular input image.(a) Unfiltered input image obtained in the absence of the metasurface (scale bar = 50 µm).(b) Edge-enhanced image obtained with the metasurface at room temperature.(c) Horizontal slices of the output intensity taken at the location marked by the white dashed line in panel c , at a temperature slightly below (T = 53° C, blue curve) and slightly above (T = 66° C, red shaded area) the transition temperature of vanadium dioxide.(d) Filtered images versus temperature as the metasurface is heated.The temperature of each measurement is shown in the bottom right corner of each image.