4f‐Less Terahertz Optical Pattern Recognition Enabled by Complex Amplitude Modulating Metasurface Through Laser Direct Writing

Optical pattern recognition (OPR) has the advantage of single intensity detection ability for low‐cost terahertz (THz) systems of imaging or security checks. However, conventional 4f‐system‐based OPR is limited by the paraxial approximation and bulky device volumes for THz applications. Here, a full‐diffraction‐based 4f‐less OPR method is proposed using a single complex‐amplitude‐modulating metasurface, which is valid for systems with large Fresnel numbers. Moreover, a laser‐induced graphene technique is applied for processing the device. A 15 mm × 15 mm metasurface can be fabricated by one‐step laser writing in 34 s, indicating the potential of the proposed method in developing THz OPR systems with miniaturization, fast fabrication, and low‐cost.


Introduction
3][4] The conventional circuit computation relies on the analogto-digital conversions, [5,6] while the all-optical convolutional DOI: 10.1002/adom.202300575computing is implemented in the diffraction process of light, which omits the complicate conversion step. [7,8]The alloptical convolutional computing has presented great potential in the fields of spatial differentiation, [9][10][11] integration, [12] edge detection, [13] and pattern recognition. [14,15]mong all those applications, optical pattern recognition (OPR) has a pivotal position due to the vital role it plays in artificial intelligence and security. [16]PR could be traced back to the proposal of Vander-Lugt correlator (VLC) in 1964, [17] which consists of a 4f optical system and a spatial filter with the complex conjugated Fourier transform of the reference pattern.Due to the Fourier transform function of the lenses, the output is the correlation of the input target and the reference pattern, thus the similarity between the two images can be determined by single intensity detection on the output plane.Although OPR is famous for its real-time and parallel processing in 1980's, [18] digital methods became more and more popular in this century after the explosive development of computer vision and high-speed processors.However, the advantage of single acquisition with OPR is still believed to be highly attractive to terahertz (THz) wave imaging for the reason that a low-cost THz camera with a pixel array is still rarely to find.The application of OPR using a point detector would help to develop real-time, low-cost THz recognition systems for bioimaging, non-destructive testing, security checking, etc. [19][20][21][22][23][24][25] Nevertheless, because of the lack of THz modulating components, [26] a traditional THz 4f imaging system relies on thick dielectric lenses or bulky parabolic metallic mirrors as lenses, [27] which limits the realization of compact OPR systems.Recently, mass THz devices have been proposed based on metasurfaces, [28][29][30][31][32][33][34] which provide the possibility of ultraminiaturized optical image processing systems, including VLCs.In addition, benefiting from the high design freedom, the 4f length of the VLC along with the two lenses and the spatial filter can be even condensed to a single complex wavefront-modulating Huygens' metasurface, which was proposed by Wang et al. [35] However, on one hand, the principle of the device is still 4f system-based, which is limited by the paraxial approximation; on the other hand, the proposed metasurface with split-ring resonators demonstrated in the microwave band is difficult to fabricate in the THz regime as the wavelength decreases.A simple, fast, and low-cost manufacturing method for a THz complexamplitude-modulating metasurface is still needed.
In this study, we propose a simple 4f-less OPR method, through which the conventional 4f-based VLC could be replaced by only one single-layered complex amplitude modulator for the image recognition, thus the volume limitation is overcame.More importantly, the proposed method is purediffraction-based, which breaks the paraxial limitation existing in the 4f-based VLCs.Simultaneous recognition and distinction of multiple images is also demonstrated by extending the proposed method, which provide application potentials in THz technologies such as security check, as shown in Figure 1.[38] The porous graphene with metasurface patterns is generated by the thermal effect of laser direct writing from a polyimide (PI) film.By controlling the laser power and LIG patterns, both amplitude and phase modulations of a THz wavefront are realized.An LIG-based metasurface with a size of 15 mm × 15 mm can be fabricated in 33.57s with extremely low-cost.In the end, the proposed 4f-less OPR implemented via LIG-based metasurfaces are characterized.Good consistence between experiment and calculation indicates the feasibility of the proposed 4f-less OPR method.Because the LIGbased metasurfaces are possible to realize large-area fabrication, the proposed OPR system may find applications in THz imaging and security checking with large aperture, easy acquisition, and low cost.

Conventional 4f-Based VLC for Pattern Recognition
We first review a 4f-based VLC for pattern recognition, which is shown in Figure 2a.The classical 4f optical system consists of two lenses sandwiched by three planes.The distance between each plane and lens is the lens focal length ƒ.Due to the Fourier transforming operation of the lens, when a matched correlation filter with complex amplitude transmission t(μ, ) = R * (μ, ) is inserted in the middle Fourier plane, in which R * (μ, ) is the Fourier conjugated transform of the reference pattern r(x, y), the output is changed to the cross-correlation of the input pattern u i (x, y) and r(x, y), i.e., u o (x′,y′) = F{F[u i (x,y)] • R*(u, v)}∝u i ( − x, −y)⊗r*(x, y)∝u i *r.If the input is the reference pattern, the output becomes the auto-correlation of the reference image, in which the optical intensity in the center is larger than that of the cross-correlation. [39]Therefore, by comparing the intensity of the single central point of the output plane, the image on the input plane can be recognized whether it is the reference image.
The image recognition process also can be understood from another point of view.Lens 1 essentially transforms all the spherical waves from the points on the input image into plane waves with various wave vectors.Thus, the field on the front surface of the correlation filter is the superposition of these plane waves, which is also the Fourier transformation of the input.When the input and reference patterns are the same, the transmitted field of the correlation filter would be R(μ, The real value of this output implies the filter transforms all the incident waves to a plane wave propagating along the z-axis, as indicated by the variously colored beams in Figure 2a.Thus, a focus will be found in the center of the output plane due to Lens 2. Otherwise, the transmitted field of the filter will not be a plane wave, and the wave cannot be well focused on the output plane.

4f-Less Optical Pattern Recognition
Inspired by this mechanism, we propose our diffraction-based 4fless OPR method, which consists of three planes separated by d 1 and d 2 , as shown in Figure 2b.A wavefront modulating device (for example, a metasurface) is located on the correlation filter plane, which supplies a complex transmission of t(μ, ).Then the output can be calculated by diffraction as [40] u where u 2 (μ, ) is the transmitted field of the correlation filter, G 1(2) is the integration kernel matrix of diffraction with a distance of d 1(2) , '○' and ' × ' represent the Hardamard and matrix products, respectively.
According to the 4f-based recognition system, when the input is the reference image, the output is the focus.Similarly, it is also required for Equation (1) that when u i (x, y) = r(x, y), u 2 should be a convergent spherical wave.Therefore, t (μ, ) can be easily obtained by in which the division symbol represents the element-wise division, k 0 is the wavevector in free space, A 0 is a constant related to the focus intensity on the output plane.Substituting Equation ( 2) into (1), it can be found that, when the input is the reference image, a uniform amplitude A 0 and a lens phase with a focal length d 2 are formed on the back surface of the correlation filter plane, leading to a focus on the output plane, while for other inputs, the waves transmitting the correlation filter cannot be converged to the output center.
To validate the 4f-less OPR method, two binary images with 75 × 75 pixels are selected, one of which is a gun while the other is a key, as shown in the right column of Figure 2c.The side length of each pixel equals to 200 μm, and we set d 1 = d 2 = 10 mm.The frequency of the incident wave is set to 0.5 THz.The two images are adopted as the input and the reference patterns separately, and the intensity distributions on the output plane are calculated by the Huygens-Fresnel principle, [41] which are shown in Figure 2c.It is clearly seen that bright focuses are generated on the output plane when the input and the reference images are the same.While when they are different, only blurred focuses are found.It also shows that, the center intensity for the "Key" input is only 12% of that for the "Gun" input when the reference pattern is the "Gun".On the other hand, the intensity for the "Gun" input is only 38% of that for the "Key" input when the reference pattern is the "Key".This result demonstrates that our method can be applied for THz OPR using a point intensity detector located on the center of the output plane.
Besides, similar to a VLC, the proposed 4f-less OPR can also simultaneously identify and determine the spatial position of specific images in a scene, i.e., if the input contains the reference image and other jamming images, the focus is only found in the position on the output plane, corresponding to the reference image position on the input plane.The calculation results are shown in Figure S1 of the Supporting Information.This phenomenon implies that the proposed method could accept a large-angle incidence of THz waves.

Simultaneous Recognition of Multiple Patterns
For practical applications, it is often expected that multiple images can be recognized and distinguished simultaneously.In this section, based on the principle of Figure 1b, we will demonstrate the 4f-less OPR is able to be extended to simultaneous recognition of multiple patterns by various focal positions.
In the information processing, translation operation can be implemented when a signal or image is convoluted with a Dirac () function.Based on this principle, the focus for recognition in the 4f-less OPR can be deflected to any position on the output plane by convoluting the calculated t (μ, ) in Equation ( 1) with a 2D  function.Therefore, a matched correlation filters with recognition focus on the position (a n , b n ) on the output plane, corresponding to one of a series of reference patterns, whose complex transmissions are depicted by where r n (x, y) is the n -th reference image, ⊗ represents the convolution.If there are N reference patterns, then referring to the holographic multiplexing technology, [42] the transmission of the matched filter for recognition of all these patterns can be expressed as Hence, when the input image is the same as one of the reference patterns r n (x, y), a focus will be found at its corresponding position (a n , b n ) of the output plane, because the input pattern does not match with the other reference patterns to realize a correspondent convergent phase distribution, as shown in Figure 3a.
It should be noted that the intensity-related constant A n plays a key role in the design, for the reason that the reference patterns have different transmissions.For example, the transmission related to the white area of the "Gun" image is obviously larger than that of the "Key" image in Figure 2c.Therefore, the focus intensities would be different for the situations when these two images are selected as both reference and input images.In designing the 4f-less OPR for multiple patterns, eligible constants A n should be chosen carefully to ensure that homogeneous focuses for the reference patterns can be realized on the output plane.That is the reason a complex-amplitude-modulator is required as the matched filter.In this work, the value of A n is inversely proportional with the luminous of different reference patterns.
Using the above method, we choose four images, two of which are selected as the reference patterns at the same time for multipatterns recognition.We first set all the focal points at the center of the output plane, which means the OPR system can only determine whether the reference patterns are included in the inputs but cannot distinguish them.The calculated results based on diffraction theory are depicted in Figure 3b.It is shown that as the "Gun" and the "Dagger" are both chosen as the reference images, a bright focus can be found whether the input is the "Gun" or the "Dagger", whereas when the input is the "Knife" or the "Key", which are not in the reference images, only fuzzy field distributions can be observed on the output plane, and the center intensity are only 35% and 26% of that for the input is the "Gun", respectively.
We then set the two reference patterns with different focal positions, which denotes the OPR system can distinguish the recognized patterns with corresponding focuses.The correspondent focal points of the "Gun" and the "Dagger" are designed to be deflected to (3, 0) mm, (-3, 0) mm, respectively.The calculated results are shown in Figure 3c.It is observed that when the input are the "Gun" and "Dagger", the transmitted THz wave are focused to the right and left sides by the complex filter, respectively.When the input is the "Knife" or the "Key" image, although the THz wave is concentrated to the designed positions, the intensity is much lower than the focuses in the other two images.These results indicate that the 4f-less OPR system is able to recognize and distinguish images simultaneously.

Comparison Between 4f-Based VLC and 4f-Less OPR
In this section, we would like to compare a conventional 4f-based VLC and the proposed 4f-less OPR.Although it seems like that the proposed method is just simplification and compression of the two lenses and the correlation filter in the 4f-based VLC, they are essentially different, because the phase modulation of the lenses in the 4f optical system is paraxially approximated, which is applicable when the Fresnel number (FN) is not large, defined by FN = d 2 /(4f), [43] in which  is the wavelength, d and f are the diameter and focal length of the lens.When FN becomes a large value, implying that the ratio of the lens aperture to the focal length is great, the paraxial approximation is not valid.However, the proposed 4f-less OPR method is based on full diffraction theory, which still works for large FN devices.We calculated the field distribution on the output plane by the two systems under various FNs.The results are shown in Figure S2a of the Supporting Information.It is found that when the FN equals to 2.08, 2.67, and 3.75, both the 4f-system and the proposed method can recognize the "Gun" image by comparing the center intensity corresponding to different inputs.When the FN increases to 6.25 and 18.75, the center intensities of the "Gun" image and the "Key" image are almost the same for the 4f system, demonstrating the failure of the recognition, while that of the proposed 4f-less method, the recognition is realized successfully.Therefore, the proposed method can contribute to developing recognition systems with large apertures or small detection distances.
It is also found that when the FN is very small, both the 4f VLC and the proposed method cannot conduct the recognition.Figure S2b, (Supporting Information) depicts the calculated field distributions by the two systems when FN = 0.3, in which all the images show an obvious focus in the center, no matter which image is selected as the input pattern.The reason is that small FN leads to a small aperture of the system.The fields at the front of the correlation filters in Figure 2a,b are almost the same plane waves propagating along the z-axis, regardless the input images, resulting in the same field distributions of the output plane.Therefore, besides the complex amplitude modulation, metasurfaces with appropriate FN that is not too small should be designed and fabricated for the implementation of the proposed OPR system.Therefore, a technique with large area processing capability is required.

Metasurface Design and Fabrication
We use LIG to realize the required metasurfaces.LIG is a kind of porous carbon material with good electrical conductivity, high thermal conductivity, and chemical stability generated by ablating commercial PI films using laser direct writing technology.In our previous studies, we found that it has a similar electromagnetic response in the THz band to that of a metal in the visible.Thus, THz metasurfaces based on phase modulation was able to be prepared in a fast and low-cost way. [36]Moreover, it was also found that the loss of the plasmonic wave propagating on the LIG can be controlled by the laser power. [44]These two findings provide the possibility of realizing THz complex-amplitude-modulating metasurfaces.
In this work, based on a lab-built LIG fabrication system, the one-step fabrication of metasurfaces with complex modulation is realized.The fabrication system is composed of a nanosecond solid-state laser, a beam expander, a telecentric scan lens, and a matching scanning system. [36]Commercial Kapton PI tape is used as the carbon precursor.The schematic of processing is depicted in Figure 4a.Through a careful selection of the 8-level laser energy densities for the control of plasmonic loss, an 8-level amplitude modulation would come true.And at the same time, eight types of C-shape antennas could support a direct 8-level phase modulation.As a consequence, a LIG-based 64-level complex amplitude modulating metasurface is realized, which would meet all requirements mentioned in Section 2.4.

THz Electromagnetic Parameters and Numerical Analysis
To actually design a LIG-based complex-amplitude modulating metasurface, THz electromagnetic parameters is necessary for the lateral numerical analysis, and it would help us understand the basic mechanism by which LIG could realize complex amplitude modulation.
First, we measured transmissive THz spectral responses of 16 LIG samples generated under different energy densities (68 J cm −2 -159 J cm −2 ) using a THz-TDS system, and the THz electromagnetic parameters were calculated using the obtained spectrum responses, subsequently.Details about the THz-TDS system and the calculation method can be found in ref. [36,45]  Then, 16 C-shaped antennas with two different orientation an-gles (+45°and −45°) and eight opening angles (between 130°a nd 250°) were selected to cover the phase modulation of 0-2.The radius and the linewidth of these antennas are 65 and 30 μm, respectively.Each unit cell is 200 μm × 200 μm, and the working frequency is set to 0.5 THz.Numerical simulations by FDTD method of the phase and amplitude of the cross polarization transmitted from a C-shaped LIG antenna with different antenna types and energy densities is shown in Figure 4b,c, respectively.As depicted in the figures, phase and amplitude of the THz wave can be controlled in the range of 0-2 and 0.2-1, respectively.It is worth noticing that the phase retardation is dominated by the antenna type, while the amplitude is dominated by laser energy density.This phenomenon indicates that these two parameters can be combined freely, which supports a complete and independent manipulation of both amplitude and phase.
In the following, 8-level antenna types and 8-level energy densities are selected from the above parameters.The detailed correspondent values are shown in Figure 4d.The antenna types 1-4 orientate +45°, while the 5-8 orientate -45°.THz electromagnetic parameters and normalized Raman spectra of LIG samples generated at these 8-level energy densities are depicted in Figures S3 and S4 of the Supporting Information, respectively.Raman spectra were carried out on a Raman spectrometer (REN-ISHAWRM2000).It is observed that the complex conductivities of these 8-level LIG are quite different from each other, which explains why LIG has the ability to conduct complex amplitude modulation.In addition, these different complex conductivities can be further explained by the clearer conduct network and the impurity reduction as the energy density gets larger, which could be supported by the Raman response.More descriptions about the analysis could be found in the Supporting Material.
Subsequently, all of the selected 64-level complex amplitude modulation are plotted in the complex plane, shown in Figure 4e, in which the x-and the y-axes denote the real and imaginary parts of the complex-amplitude, respectively.The colors represent different antenna types, and the star markers at different positions on each line represent different energy densities.The uniform distribution in the complex plane implies good modulation effect.

Fabrication and Characterization
Since the corresponding relationship between the complex amplitude modulation and the fabrication parameter of a C-shaped LIG antenna was obtained, a complex modulating metasurface could be fabricated.We chose a 532 nm Nd:YVO 4 nanosecond solid-state laser (pulse width: 15 ns, adjustable repetition rate), a beam expander with a 10 mm exit pupil diameter, a telecentric scan lens with a focal length of 60 mm, and a scanning system for fast tilting the laser beam.The scanning speed of laser was set to 50 mm s −1 .This fabrication system could finally realize a working area of 18 mm × 18 mm and a focal spot size<5 μm, which would support the large-area and high-precision fabrication of LIG-based metasurface well.A 1 mm-thick quartz substrate was adopted, and an 80 μm-thick commercial PI film was stuck on the quartz subsequently.Through setting the fabrication energy densities of each pixel in advance, a metasurface can be directly written on the PI film.Considering the beam diameter in the THz imaging system is 10 mm × 10 mm, all the metasurfaces fabricated in this work were in the size of 15 mm × 15 mm, which consist of 75 × 75 pixels.The printing time is 33.57s (Video S1 of the Supporting Material).Actually, by using a translation stage, the scale of LIG-based metasurface could reach tens of centimeters.
A photograph (top) and a Scanning Electron Microscope (SEM) image (bottom) can be found in Figure 4f.More SEM images can be found in Figure S5 of the Supporting Information.These SEM images were obtained through a scanning electron microscope (SHIMADZU SSX-550).

Single Image Recognition
First, the performance of the single image recognition was simulated and verified.The LIG-based metasurface correlation filter contained the information of only one reference image.Thus, four correlation filters were obtained, which contained the "Gun", the "Dagger", the "Knife", and the "Key", respectively.In this case, the four masks mentioned above took turns as the input images.The experimental results are shown in Figure 5a, and the simulation results can be found in Figure S7a (Supporting Infor-mation).Both experimental and simulation results clearly indicated that only when the input image was consistent with the reference image, a bright focus would appear on the central of the detection plane.Otherwise, fuzzy intensity distributions would generate.In order to further compare the performance between different correlation filters, and to prove the stability of this design method, the field distributions were plot on the x-axis of the output plane, which are shown on the right side of Figure 5a.The discrete dots represent the experiment data, while the lines represent the simulation data.It was obvious that no matter what the reference image was, perfect distinguishing ability would be demonstrated, and good consistency existed between the experimental and simulation results.This demonstrated the potential of single point detection for image recognition by the proposed 4f-less OPR and LIG-based metasurfaces.

Simultaneous Recognition of Multiple Images
Subsequently, the method for simultaneous recognition and distinction of multiple images was verified.An LIG-based complex amplitude modulating metasurface was designed to recognize two images at a time.To be precise, if the "Gun" image was inputted, a focus would generate at (3, 0) mm on the x-axis, while if the "Dagger" image was inputted, a focus would generate at the position (-3, 0) mm.For other inputs, no focus could be found.The experimental results are shown in Figure 5b, and the simulation results can be found in Figure S7b (Supporting Information).The depicted results clearly presented a good recognize ability, and the experimental distributions remained in good consistence with those from the simulations.Even when the focus was deflected away from the central part, the focus was accurately positioned, which guaranteed the fast and low-cost single point detection was still feasible.
Finally, the conversion efficiencies were calculated.They were obtained by dividing the output focus energy of y-polarization with the incident x-polarization wave illuminating on the metasurface.The experimental efficiencies corresponding to recognized "gun", "dagger", "knife", and "key" are 3.72%, 5.2%, 3.96%, and 5.08%, respectively.The efficiency for simultaneous recognition is 3.06%.Through changing the transmitted metasurface to a reflective one, the efficiency may be enhanced by tens of times. [46]

Conclusion
In summary, we propose a full-diffraction-based 4f-less OPR method, through which only a single-layered complex amplitude modulating device, such as a metasurface, is able to complete the recognition.Compared with the conventional 4f-based VLC for image recognition, it is not limited by the paraxial approximation, which is valid for OPR systems with large Fresnel numbers.Besides, this method can be extended to realize simultaneous recognition of multiple images, which is significant in many fields such as security and bio-imaging.In addition, a LIG-based metasurface for complex amplitude THz modulation is adopted to realize the 4f-less OPR.The experimental results are in good agreement with theoretical calculation and simulation results.Because the preparation of LIG-based metasurfaces is fast, lowcost, and is able to be easily extended for large-area fabrication, it is anticipated that this LIG-based complex amplitude modulating metasurfaces combined with 4f-less OPR method possess magnificent potentials in the field of THz technologies.

Experimental Section
Transmitted THz Wave Imaging: In order to demonstrate the 4f-less OPR method and the LIG-based complex amplitude modulation we proposed, a THz focal plane imaging system was used (details about the system can be found in ref. [36]), and the photo of the experimental setup is shown in Figure S6a (Supporting Information).To produce the input im-ages in simulation and actual experiment, masks were obtained through hollowing 0.1-mm-thick steel plates with different images.Photographs of masks used in the experiments can be found in Figure S6b (Supporting Information).

Figure 1 .
Figure 1.Schematic diagram of the THz security-checking system based on 4f-less optical pattern recognition.

Figure 2 .
Figure 2. Principle and calculation results.a) Principle of OPR based on the conventional optical 4f system.The images on the Fourier plane correspond to the amplitude and phase distributions of the calculated complex correlation filter.b) Principle of the 4f-less OPR.c) Calculated field distributions on the output plane of the 4f-less OPR, corresponding to different input and reference images.

Figure 3 .
Figure 3. Simultaneous recognition of multiple patterns with customized deflected focuses based on the 4f-less OPR.a) Implementation of the simultaneous recognition.The complex transmission of the filter for multi-recognition is calculated by the superposition of transmissions corresponding to individual reference patterns.b) Calculated field distributions on the output plane of the 4f-less OPR for simultaneous recognition of multiple patterns.c) Calculated field distributions on the output plane of the 4f-less OPR for simultaneous recognition and distinction of multiple patterns.

Figure 4 .
Figure 4. Theoretical and numerical analysis on cross-polarized transmission of a C-shaped LIG antenna for the complete and independent manipulation of both amplitude and phase.a) Schematic of the independent manipulation of complex amplitude, which is achieved by using laser in different energy densities to fabricate LIG C-shaped antennas with different orientations and angles.Numerical characterization of the phase retardation (b) and amplitude (c) of cross polarization transmitted from a C-shaped LIG antenna with different Antenna type () and Energy density (Φ).d) Selected 8-level antenna types and 8-level energy densities to perform complex amplitude manipulation.e) The selected 64-level complex amplitude modulation in the complex plane.f) Photograph and SEM image of the fabricated LIG Correlation Filter composed by the above 64-level antennas.

Figure 5 .
Figure 5. Experimental results of the 4f-less OPR based on complex amplitude modulation realized by single-layered LIG metasurfaces.a) Results of single image recognition, in which objects on the left represent the reference images contained in the correlation filters, while objects on the top represent the input images.Curves on the right side are intensity distributions of the x-axis on the output plane, corresponding to the four inputs with the same reference image.b) Results of the simultaneous recognition and distinction of multiple images.