Introduction

The human visual system, endowed with an exceptional capability to interpret complex scenes, is remarkable in its functionality and perceptive superiority1,2. It has a highly efficient mechanism3,4. Light absorbed by photoreceptor cells in the retina is converted into electrical signals, initiating the visual process5. These signals subsequently undergo primary preprocessing within the retinal network to extract vital features such as contrast, brightness, orientation, and motion direction. They are then transmitted to the brain’s visual cortex for further processing. This intricate system has inspired significant efforts to mimic the human visual system, leading to the development of numerous optoelectronic neuromorphic devices aimed at addressing the energy costs and storage bottlenecks encountered in the von Neumann architecture6,7,8,9.

The human visual system exhibits remarkable efficiency through functions such as accurate color perception, visual attention, and parallel processing. Recent works have focused on mimicking these functions, developing devices to detect and process light with wavelength selectivity and depth perception in an energy-efficient manner, enabling intelligent signal processing beyond basic computation and memory capabilities10,11,12. Additionally, visual adaption ensures humans operate under various levels of brightness and darkness13. To simulate this adaptive capability, the optoelectronic neuromorphic device should demonstrate the characteristic of bidirectional photoconductivity. The implementation of positive and negative photoconductivity usually involves strategies such as using gate voltage to control charge carrier transfer process14,15,16,17, heterojunction designs for carriers trapping and releasing18,19,20,21, and bolometric effect in specific two-dimensional materials, etc.22,23. This bidirectional photoconductivity has allowed devices to produce digital signals that closely replicate the analog output of the human eye for the applications of real-time image processing, pattern recognition, and machine learning24,25. Despite these technological advancements, some challenges still persist. Currently, one major concern to achieve bidirectional photoconductivity is the requirement for high gate voltage regulation, which not only seems to contradict the initial goal of lower power consumption in designing these neuromorphic devices but also necessitates additional high-voltage circuit, thereby increasing the complexity of the overall circuit. Another challenge is that these devices are expected to operate under high light intensities, typically ranging from a few to several tens of mW/cm2. Such intensity levels considerably deviate from real-world scenarios where the luminance fluctuates around 100,000 lux during daylight periods, which is converted to an intensity of only 14.60 mW/cm2 for 550 nm green light, and drops significantly lower to levels between tens of nW/cm2 and tens of μW/cm2 during indoor or nighttime periods26,27. Thus, there is an urgent need for the development of highly effective optical neuromorphic devices capable of operating under low operation voltage and low light intensity conditions.

Here, we demonstrate a bidirectional ZnO/CsPbBr3 heterostructure (bidir-ZC) based neuromorphic image sensor array (10 × 10 pixels) with ultraweak light stimulation. Operating at just 2.0 V bias, our device achieves negative photoconductivity at ultralow light intensities of 45 nW/cm2 for UV light (365 nm) and 250 nW/cm2 for green light (525 nm), representing 2–3 orders of magnitude reduction in required light intensity compared to existing technologies. This ultraweak light-modulated, low-voltage bidirectional photoresponse could also be achieved in the heterostructures composed of ZnO and other various perovskites or IGZO with perovskites. Positive and negative photoconductivity (Pos-PC and Neg-PC) of this structure originates from the photogenerated carriers involved in the ionization and deionization process of oxygen vacancies in ZnO or IGZO channel, resulting in the channel thickness and applied voltage-dependent bidirectional synaptic behaviors. The array device could mimic versatile basic synaptic functions in either Pos-PC or Neg-PC mode and the visual adaption by combining the Pos-PC and Neg-PC characteristics. Additional multiple images pre-processing functions, including the background denoising for static images and encoding spatiotemporal motion information, were achieved at the array device terminal, exhibiting high accuracies of 92% for the pattern recognition and 100% for motion clustering after fed information processed in-sensor into a tiny three-layer neural network and a simple unsupervised learning algorithm, respectively. This simple structure and its capability of in-sensor dynamic image pre-processing shows great potential for developing intelligent and compact visual systems.

Results

Fabrication and characterization of the bidir-ZC neuromorphic image sensor array

Two terminal optoelectronic synapses (OSs) provide a hardware platform to emulate the functions of human visual systems due to their simple structure and flexibility for integrating large-scale arrays28,29. We fabricated a neuromorphic image sensor array by integrating 10 × 10 two-terminal bidir-ZC OSs. Figure 1a, b illustrates the workflow of the visual perception process of the human visual system and our bidir-ZC device array. The array integrates both the input image perception and preprocessing functions, utilizing bidirectional photoresponse. This all-optical modulated manner, emulating the photopic and scotopic vision, enables the device array to denoise static and dynamic images for pattern recognition and motion detection. The fabrication process of the bidir-ZC device array is shown in Supplementary Fig. 1a. The ZnO thin films array was deposited on the electrodes array, serving as the conductivity channel, followed by the generation of the CsPbBr3 films array on the ZnO films via our reported vacuum-assisted perovskite array growth method. The corresponding optical image of a 10 × 10 array with an overall area of 3 cm × 3 cm is shown in Supplementary Fig. 1b. Figure 1c schematically illustrates the detailed structure of a single pixel. Each pixel is a two-terminal OS based on the ZnO/CsPbBr3 heterojunction. To avoid contact between the CsPbBr3 and the electrode, the ZnO film was designed to be slightly larger. Thus, under light stimulation, the photogenerated carriers in the CsPbBr3 film must be transferred to the ZnO channel to contribute to the output current. The morphology of the bidir-ZC device array was characterized by scanning electron microscopy (SEM), as shown in Fig. 1d. The pixels are well aligned with the dimensions of 300 μm and pitch of 500 μm. The CsPbBr3 film demonstrates a compact surface with large grains and shows homogeneous element distribution across the film, as shown in the energy-dispersive X-ray spectroscopy (EDS) results (Supplementary Fig. 2a). The crystal structure of the ZnO/CsPbBr3 heterojunction was analyzed using X-ray diffraction (XRD) spectroscopy. As shown in Supplementary Fig. 2b, the ZnO demonstrated a wurtzite structure, and the CsPbBr3 film possessed an orthorhombic structure. The ZnO/CsPbBr3 heterojunction demonstrated strong absorption at wavelengths of 365 and 525 nm, enabling good optical tunability for the device (Supplementary Fig. 2c). Besides the intrinsic photoluminescence (PL) peaks, the ZnO film exhibited a broad peak between 430 and 700 nm, arising from the oxygen vacancies in its lattice30,31 (Supplementary Fig. 2d). We further characterized the positive photoresponse and negative photoresponse performance of the 100 pixels in the array device. As shown in Fig. 1e, all pixels demonstrate controllable bidirectional photoresponse properties, demonstrating both excitatory postsynaptic current (EPSC) and inhibitory postsynaptic current (IPSC) without significant fluctuation in either direction. Additionally, benefitting from the simple device structure and the straightforward fabrication process, a high yield of 100% was achieved across 500 pixels from 5 different device arrays, confirming the reproducibility of the bidir-ZC device array (Supplementary Fig. 3).

Fig. 1: Design and structure of the bidir-ZC neuromorphic image sensor array.
figure 1

a Schematic illustration of the human visual perception process with visual adaptation. b Schematic illustration of the image preprocessing by bidir-ZC neuromorphic image sensor array, mimicking human visual perception process. c Schematic structure of a single pixel. d SEM image of the array with CsPbBr3 film aligned with bottom ZnO film and interdigital electrodes. e Positive and negative photoresponse properties of all 100 pixels.

Synaptic functions in bidir-ZC neuromorphic image sensor array

To systematically investigate the bidirectional photoresponse of the bidir-ZC neuromorphic image sensor array, the light intensity-dependent postsynaptic current (PSC) switching was first characterized. Figure 2a demonstrates the photocurrent evolution process under continuous green light (525 nm) illumination with a light intensity of 250 nW/cm2. The photocurrent decays rapidly upon light illumination and achieves a photocurrent change of 35 nA within 80 s, representing the Neg-PC effect. This phenomenon is highly dependent on the illumination intensity. We summarized the photocurrent change under various illumination intensities with an illumination time of 1 s, as shown in Fig. 2b. The Neg-PC effect gradually strengthens with increasing light intensity, then weakens, and finally transforms into the Pos-PC effect when the light intensity exceeds 8 mW/cm2. Unexpectedly, the device demonstrates a similar light intensity-dependent Neg-PC phenomenon under continuous UV light (365 nm) illumination, which could be absorbed by the ZnO film, thereby inducing photocurrent enhancement (Fig. 2c, d). The difference with the green light condition is that Neg-PC and conversion from Neg-PC to Pos-PC can be triggered at much lower light intensities. For example, Neg-PC can be observed at 45 nW/cm2 UV light illumination (Fig. 2c), and Pos-PC can be achieved at 0.386 mW/cm2 (Supplementary Fig. 4). After removing the light, the photocurrents gradually recover to their initial states due to the persistent photoconductivity effect of ZnO channel and charge carrier transfer process at the interface, indicating of the memory behavior of the photoresponse of this fully optical modulated array device (Supplementary Fig. 5). To further characterize the bidirectional photoresponse, the array device was exposed to both green and UV light stimulation with various durations and intensities. Whether in Neg-PC or Pos-PC mode under different intensities, the device could achieve a stable photocurrent with various durations (Supplementary Fig. 6).

Fig. 2: Photoconductivity and synaptic behavior of bidir-ZC neuromorphic image sensor array.
figure 2

a IPSC of the bidir-ZC device under green light illumination with a light intensity of 250 nW/cm2. b Intensity-dependent photocurrent under green light illumination. c IPSC of the bidir-ZC device under UV light illumination with a light intensity of 45 nW/cm2. d Intensity-dependent photocurrent under UV light illumination. e IPSCs of the bidir-ZC device induced by paired green and UV light pulses, respectively. f PPF index as a function of the time interval. g All optical-induced potentiation and depression under continuous UV and green light pulses, respectively. h Ten repeat cycles of the potentiation and depression process.

Furthermore, the bidirectional photoresponse behavior also demonstrates bias-dependent characteristics. As shown in Supplementary Fig. 7, under a small bias voltage of 0.5 V, the device exhibits only the Pos-PC phenomenon with both green and UV light stimulation. As the bias increases, the device shows an unstable dark current that gradually increases and eventually reaches a steady state, relating to the gradual ionization of oxygen vacancies and the release of electrons32. Under a high voltage of 2.0 V, the stable dark current increases to about 25 nA. The device exhibits negative current changes at low intensity and positive current changes at high intensity when stimulated by either green or UV light. It is worth noting that the device can achieve Neg-PC and Pos-PC photoresponses from tens of nW/cm2 light intensities to mW/cm2-level light intensities at a voltage of 2.0 V, covering the light intensities of most life scenes and demonstrating its potential for image processing applications. The comparison of operation light intensity range and bias range with other devices with bidirectional photoresponse is summarized in Supplementary Table 1. In addition, we also observed the controllable bidirectional photoresponse in other metal oxide semiconductor/metal halide perovskite heterojunctions, such as ZnO/MAPbBr3, ZnO/PEA2MA3Pb4I13, and indium gallium zinc oxide (IGZO)/MAPbI3. As shown in Supplementary Fig. 8 to Supplementary Fig. 10, all of them demonstrated less than μW/cm2-level light intensities modulated Neg-PC effects and strong light intensity-dependent Neg-PC effects under both green and UV light stimulation, but with different operation intensity ranges and transformation intensity thresholds. These differences could be attributed to the variations in absorption rate, carrier lifetime, and built-in electric field, etc.

Pulsed light stimulation was then applied to the device to implement the basic synaptic function of a biosynapse. Figure 2e exhibits the IPSC under two consecutive green and UV light pulses with a time interval of 0.5 s, respectively. The IPSC changes evoked by the two spikes are represented by A1 and A2, thus allowing the calculation of paired-pulse facilitation (PPF) as A2/A1. The PPF index exhibits a monotonous decrease with the time interval (Δt), and the PPF index calculated for green and UV light stimulation was found to be 176% and 194%, respectively, when Δt was 0.1 s (Fig. 2f). This indicates that the learning capability of our device can be significantly amplified when subjected to successive optical training pulses. The EPSC of the device was also characterized under UV light stimulation (Supplementary Fig. 11). The pair‐pulse facilitation (PPF) was only 112% for the Δt of 0.1 s in the Pos-PC mode. The IPSCs of the device under green and UV light stimulation and their corresponding relaxation curves with different pulse numbers and frequencies are presented in Supplementary Fig. 12 and Supplementary Fig. 13. As increasing the pulse number and frequency, the charge carrier trap effect is reinforced, resulting in gradually enhanced IPSC changes. These trapped carriers cannot be released promptly, which hinders the recovery process of the IPSC, leading to the transition from short-term memory (STM) to long-term memory (LTM). Additionally, the Neg-PC effect gave rise to reduced energy consumption with continuous light pulses (Supplementary Fig. 14). Figure 2g shows the optical-induced photocurrent potentiation (Pos-PC effect) and depression (Neg-PC effect) process. The photocurrent potentiation was obtained by applying 10 consecutive UV pulses (0.386 mW/cm2, 1 s) followed by another 10 green light pulses (250 nW/cm2, 1.5 s) to depress the photocurrent back to its initial state. The entire process confirms that the conductance of the device could be programmed by the UV light and erased by the green light, which is a significant property for subsequent image processing tasks. Ten continuous optical write and erase cycles are shown in Fig. 2h, demonstrating good reliability for the fully optical-induced switching behavior.

Working mechanism of the bidirectional photoresponse behavior

The working mechanism of the bidirectional photoresponse of the device was thoroughly investigated by analyzing the charge carrier transport process at the ZnO/CsPbBr3 heterojunction. For comparison, we used a thick polystyrene (PS) film to form another ZnO/PS/ CsPbBr3 heterojunction, where the ZnO film served as the conductive channel, but the PS layer blocked charge carrier transport at the interface. Figure 3a shows the time-resolved photoluminescence (TRPL) spectra of ZnO film, ZnO/CsPbBr3 heterojunction, ZnO/PS/CsPbBr3 heterojunction, and CsPbBr3 film. It is evident that the ZnO film exhibits the shortest lifetime due to a large number of defects, which is also confirmed by the strong photoluminescence in the broad visible light range. The ZnO/PS/CsPbBr3 heterojunction and the CsPbBr3 demonstrate similar carrier lifetimes, while the lifetime in the ZnO/CsPbBr3 heterojunction exhibits a significant decrease. Figure 3b exhibits the IV curves of the ZnO film, ZnO/CsPbBr3, and ZnO/PS/CsPbBr3 heterojunction in the dark condition. The ZnO film and ZnO/PS/CsPbBr3 heterojunction demonstrate dark current with similar magnitude, while a noticeable current decrease occurs after the ZnO and CsPbBr3 contact, which could be caused by the trap of the carriers by a wide depletion region formed in the ZnO channel. These results support that the charge carrier transport happens at the interface. ZnO is a typical n-type oxide semiconductor, where the oxygen vacancies are a wide-studied type of defect that gives rise to persistent photoconductivity and electrical instability33,34. There are a large number of ground state oxygen vacancies (Vo) and ionized oxygen vacancies (Vo+ and Vo2+) in ZnO film (Fig. 3d). The transformation of the oxygen vacancies from the ground state to the ionized state will release the corresponding free electrons, while the positive charged Vo+ and Vo2+ implying the abundant electron traps will decrease the conductivity of ZnO. After the contact between ZnO and CsPbBr3, free electrons from CsPbBr3 will flow into ZnO channel, forming a depletion region with internal electric field (IEF) directed from CsPbBr3 to ZnO at the interface (Fig. 3c). When a relative high bias voltage applied on the ZnO channel, it could facilitate the activation of the ground state oxygen vacancies to achieve a high dark current. Upon the green light stimulation, only the CsPbBr3 film generates the photocarriers. These photogenerated electrons transfer into the ZnO channel, leading to the recovery of the Vo+ and Vo2+ to their ground state (Fig. 3d). It could result in the conductivity decreasing of the ZnO channel. With increasing the intensity of green light stimulation, most ionized oxygen vacancies are recovered, and the excess electrons can be collected, resulting in the Pos-PC effect. When the UV light is applied, it could be absorbed by both the ZnO channel and CsPbBr3 film and could also activate the ground state oxygen vacancies. Thus, two competing processes contribute to the channel conductivity: electrons transferring from CsPbBr3 to ZnO to recover the Vo+ and Vo2+ and ionizing Vo to produce photogenerated electrons in the ZnO film (Fig. 3e). The CsPbBr3 film exhibits a higher sensitivity to ultraweak light stimulation compared to ZnO, therefore, the recovery process of ionized oxygen vacancies is dominated, leading to the Neg-PC effect. Under strong UV light stimulation, the recovery process reaches saturation, and the ionizing process becomes pronounced, resulting in the transformation from Neg-PC to Pos-PC. Due to the combined effect of these two processes, the threshold light intensity for transformation under UV light is significantly lower than that under green light. Additionally, the bidir-ZC device demonstrated sensitivity to ultraweak light stimulation, which could be attributed to the excellent optoelectronic properties of the perovskite and efficient charge transfer at the interface. These characteristics also explained that the Neg-PC effect was only observed in heterojunctions between ZnO or IGZO and various perovskites. We further characterized the bidirectional photoresponse behavior of the bidir-ZC device with different ZnO film and CsPbBr3 film thicknesses. As shown in Supplementary Fig. 15, the device with a 30 nm-thick ZnO film can only exhibit photodetector-like Pos-PC behavior with the volatile current, while another device with a 90 nm-thick ZnO film demonstrated both Neg-PC and Pos-PC with UV stimulation but only Neg-PC under green pulses. The device with thin CsPbBr3 film demonstrated high intensities required to transition the Neg-PC effect to the Pos-PC effect under both green and UV light stimulation (Supplementary Fig. 16). External gate voltage (Vg) could also regulate the bidirectional photoresponse behavior. As shown in Supplementary Fig. 17, ΔIPSC increased with increasing Vg in both negative and positive voltage ranges under green and UV light stimulations. Positive Vg promoted the transfer of electrons from CsPbBr3 to the ZnO channel, leading to a large change in ΔIPSC. Conversely, the negative Vg suppressed this electron transfer process, resulting in a reduced ΔIPSC. The thickness-dependent and Vg-dependent behavior proved that the number of oxygen vacancies and the ratio between photogenerated carriers and ionized oxygen vacancies are crucial for the intensity modulated of Neg-PC and Pos-PC effect.

Fig. 3: Mechanism of the Neg-PC and Pos-PC behavior.
figure 3

a TRPL spectra of ZnO film, CsPbBr3 film and heterojunctions of ZnO/CsPbBr3 and ZnO/PS/CsPbBr3. b IV curves of ZnO film and heterojunctions of ZnO/CsPbBr3 and ZnO/PS/CsPbBr3 with ZnO as the conductive channel. ce Schematic illustration of energy band alignment for ZnO/CsPbBr3 heterojunction in the dark (c), under green light stimulation (d), and under UV light stimulation (e).

Image recording and visual adaptation

With the regulation of the synaptic weight by the bidirectional photoresponse, the bidir-ZC neuromorphic image sensor array can be utilized to mimic the image recording and visual adaption behavior of the human visual perception system. Figure 4a shows a schematic illustration of the experimental setup for image recording, where green light pulses were programmed by the light stencil into the desired patterns and then applied to the arrays. The output current from each pixel was collected by a customized multichannel data acquisition system. We firstly characterized the dark current of 100 pixels of the array device under different bias voltages, as shown in Fig. 4b. Under 2.0 V bias, the dark currents of all pixels were very concentrated and stabilized about 27 nA, indicating the excellent uniformity of the device. Then, the green light pulses with the intensity of 250 nW/cm2 was applied on the whole device array with a bias of 2.0 V. Through mapping the IPSC of all pixels, the shape of a pattern “S” could be recorded with ten light pulses of stimulation (Fig. 4c). To mimic the visual adaption of the human visual systems, CsPbBr3 photodetector (PD) and bidir-ZC device with Pos-PC or Neg-PC effect need to be connected in parallel to regulate the photoresponse behavior under the dim and strong light illumination conditions (Fig. 4d). The bidir-ZC device demonstrates negative photoresponse under both dim and strong light illumination, while the CsPbBr3 PD could only exhibit positive photoresponse. Through changing the ratio of these devices, the photocurrent could be tuned from positive to negative under both dim and strong light stimulations, which provides opportunities for visual adaptation (Supplementary Fig. 18). Figure 4e demonstrates the dynamic characteristic of the photocurrent of a device set with Pos-PC to Neg-PC ratio of 1:1, monitored over a long adaptation time of 100 s. Under the bright stimulation (1.31 mW/cm2), the photocurrent demonstrated a continuous decrease, and the adaptation index (AI100s) was calculated to be 0.62, confirming good photopic adaptation ability. The photopic adaptation gradually became negligible and transitioned to scotopic adaptation as the stimulation intensity decreased. Under the dim illumination condition (1.42 μW/cm2), the strong scotopic adaptation was observed with the AI100s of 2.41. Realizing in-sensor photopic and scotopic adaptation is an essential function of the bidirectional photoresponse devices for environment-adaptable light sensory applications.

Fig. 4: Imaging and visual adaption of the bidir-ZC neuromorphic image sensor array.
figure 4

a Schematic illustration of the array capturing the external light distributions. b Distribution of dark current from each pixel under a bias voltage of 2.0 V. c An “S”-shaped pattern captured by the array in Neg-PC mode under green light pulse with intensity of 250= nW/cm2. d Simplified electrical circuit of the connected Pos-PC devices and Neg-PC devices in parallel. e Scotopic and photopic adaptation of the combined devices over a time of 100 s.

Static image denoising and motion perception with dynamic image

The light intensity-dependent Neg-PC and Pos-PC effect of the bidir-ZC device is highly desirable for in-sensor image preprocessing applications, avoiding the redundant data transfer between the sensing and processing unit. Through utilizing the transformation properties from Neg-PC to Pos-PC, the device could realize the image denoising function (Fig. 5a). An input noisy image with a pattern of “7” and background noise was applied on the 10 × 10 array device. The input image with light intensity distribution is shown in Fig. 5b, where the pattern pixels are distinguished from the surroundings by the light intensity. After the image was applied to the device, the initial currents were updated with light pulses (Fig. 5c). The pattern pixels with higher light intensities could introduce the Pos-PC effect, while the background pixels with lower light intensities were suppressed by the Neg-PC effect. We calculated the average current values of the image pixels and background pixels, then determined the contrast by taking the difference in average current between the pattern pixels and background pixels and dividing it by the sum of these currents. With increasing the light stimulation pulses, the contrast was enhanced, resulting in a contrast enhancement of 27.4 after 10 light pulses (Supplementary Fig. 19). By this method, the surrounding noise was eliminated, leaving a clear pattern in the image (Fig. 5d). The denoised images captured by the device array were fed into a simple artificial neural network (ANN) for further image recognition. This ANN consists of an input layer with 100 neurons for 100 pixels of images, a hidden layer with 36 neurons, and an output layer with 10 outputs (Supplementary Fig. 20a). As a comparison, we customized the MNIST dataset with resizing the images to 10 × 10 pixels as the original ideal images and then adding random noise as the noisy input images for training and testing the network. After training of 40 epochs, the accuracy of images preprocessed by the device array reached 92%, which is comparable to the results of ideal binary images without noise and much higher than that of noisy input images (Fig. 5e). Furthermore, although the threshold light intensity for Neg-PC to Pos-PC conversion is not necessarily consistent with the difference between the pattern and the surrounding background light intensity, for example, leading to some background pixels to be enhanced by the Pos-PC effect due to the pixel variation, the accuracy from the denoising images can still remain above 84% (Supplementary Fig. 20b).

Fig. 5: Image denoising and moving object perception based on the Pos-PC and Neg-PC behavior.
figure 5

a The bidir-ZC neuromorphic image sensor array is used for image denoising. b Input noisy image with a “7”-shaped pattern. c Initial current of each pixel according to its position. d Output images after in-sensor denoising. e Comparison of image recognition accuracy among ideal image, noisy image, and denoised image inputs. f Spatiotemporal information processing in the array. g, h Output images at each moment showing the moving trajectory of translational (g) and rotational (h) motion. i Clustering results of the motion recorded by the ideal, denoised and noisy images.

The bidir-ZC neuromorphic image sensor array, composed of 10 × 10 pixels, could encode spatial information, while its additional time-dependent characteristics enable it to process the temporal information in a real-time denoising manner. Sequential spatiotemporal visual information is input into the device array and processed by the Pos-PC and Neg-PC effect, recording the shape and trajectory of objects for further motion perception. We used a dynamic image, containing five frames, to encode the spatiotemporal information and implemented this function (Fig. 5f). Each frame recorded the position of a pattern with surroundings filled with noise (Supplementary Fig. 21), where the pattern pixel was enhanced by Pos-PC effect while the background pixel was suppressed by Neg-PC effect to remove the noise in real-time. After either Pos-PC or Neg-PC stimulation, the PSC gradually recovers to the initial state. Due to the movement of the pattern, a pixel could be enhanced or suppressed in different frames. To ensure the pattern trajectory could be memorized by the fifth frame, the EPSC change introduced by one Pos-PC pulse should not be fully erased by subsequent four Neg-PC pulses and the recovery process itself. Thus, the denoising and superposition of the frames could be obtained simultaneously by mapping the PSC of each pixel, which also consolidates the spatiotemporal motion information. Figure 5g demonstrates the results obtained by the bidir-ZC device array at each moment. It records the moving trajectory of the object from the first frame, showing a clear object profile and its movement from the upper left towards the center then to the upper right. The real-time denoising characteristics allow the perception of in-situ rotational motion, which has a much-overlapped pattern area in different frames. The pattern rotated clockwise at a speed of 20 rad/s, with the center of rotation set at the bottom of the pattern. The shape was slightly distorted when the pattern rotated out of the vertical position due to the lack of enough pixels to display the shape, but this did not affect the recording of the trajectory (Fig. 5h).

Benefiting from the capability of simultaneously denoising and encoding spatiotemporal information of the device, the moving object perception task could be realized by unsupervised learning with simple dimensionality reduction and clustering algorithms. We divided this task into object recognition and motion perception tasks to let the machine know what objects are and how they move. A customized dataset for training and testing was developed, which included 40 different simple objects and 6 types of motion for each object. The spatiotemporal information of a moving object was fused and compressed into a single image and then fed into a simple network for moving object perception tasks. As shown in Supplementary Fig. 22a, the edge contour of the moving object could be accurately extracted by using the Fuzzy C-Means (FCM) algorithm due to the elimination of the background noise. The motion recorded by the ideal and denoised images can be clearly classified into the correct six categories (Fig. 5i). The silhouette coefficient value (SCV) of the motion recorded by the denoised image was calculated to be 0.695, which is comparable to the results of the ideal images (Supplementary Fig. 22). Furthermore, the number and accuracy of each category can reach 100% (Supplementary Table 2). As a comparison, the motion recorded by noisy images can only be clustered into five categories, with incorrect numbers and ten failed motions for clustering into any category, indicating that a more complex and advanced algorithm is needed to process such images. In addition, the device could be utilized to record the movement of multiple objects and distinguish the abnormal motions. We used the device to mimic the collision process of two objects shaped like a triangle and a cross (Supplementary Fig. 23). These two objects moved towards each other from opposite corners of the image, collided in the center, and then turned around. The moving trajectory in the whole process was recorded. This trajectory can be detected as an anomaly by the unsupervised learning algorithm, thus enabling the tracking of abnormal trajectories (Supplementary Fig. 24).

Discussion

We developed a straightforward method to achieve array devices with the ultraweak light-modulated bidirectional photoresponse, based on the heterojunctions formed with oxide semiconductors and perovskites. A 10 × 10 devices array based on the ZnO/CsPbBr3 heterojunction demonstrated optically induced Neg-PC enhancement, Neg-PC suppression, and Neg-PC to Pos-PC transformation under both UV and green light stimulation. The Neg-PC effect could be triggered with an ultraweak light intensity of 45 nW/cm2 and a bias voltage of 2.0 V in this simple two-terminal device structure. By combining the Neg-PC and Pos-PC characteristics, the visual adaptation was implemented in the intensity range from 1.42 μW/cm2 to 1.31 mW/cm2. Furthermore, versatile image processing processes were conducted at the array device terminal, including static image denoising and motion perception with real-time denoised dynamic images. A straightforward unsupervised learning method incorporating dimensionality reduction and a density-based clustering algorithm was employed for moving direction recognition, showing the capability for highly accurate motion clustering and abnormal motion detection.

Methods

Device fabrication

Firstly, glass substrates with dimensions of about 50 mm × 50 mm were sequentially cleaned with acetone, isopropanol, and deionized water, and then dried with nitrogen. The bottom electrode circuit was designed and generated on the substrate using photolithography (Suss MA6 mask aligner) to define the positions and sputtering (Kurt J. Lesker, PVD75) to deposit a 30 nm-thick Au film. A layer of ZnO film pattern was then defined by photolithography and deposited on the interdigital electrodes. Next, a thin layer of SiO2 film was deposited to cover the entire device except for the ZnO film and Au electrode pads. Subsequently, the device was immersed in an octadecyl-trichlorosilane (OTS) solution (OTS: n-Hexane = 1: 200) for 15 min, followed by photoresist stripping using acetone. The CsPbBr3 precursor solution, with a concentration of 0.4 M, was prepared by dissolving CsPbBr3 powder in dimethyl sulfoxide (DMSO). The precursor domains array was formed on the top surface of the ZnO film by drop-casting the CsPbBr3 solution onto the fabricated device, followed by vacuum-assisted crystallization to form a dense CsPbBr3 film array. Finally, a thin encapsulation layer completed the device fabrication process.

Characterizations and measurements

A scanning electron microscope (Hitachi SU8020) was used to characterize the morphology of the device and perform EDS mapping of the CsPbBr3 film array. X-ray diffraction (X’Pert3 Powder) was employed for phase analysis of the ZnO and CsPbBr3 films. A steady-state/transient fluorescence spectrometer (FLS980) was adopted for PL spectra measurements, and a UV–Vis–NIR spectrophotometer (Shimadzu UV 3600) was utilized to obtain absorption spectra.

The output currents of the device were collected using an electrical test system that included a waveform generator (Stanford DS 345) and a current amplifier (Stanford SR 570). The photoresponse properties were obtained by optical stimulation using LEDs powered by a waveform generator, with center wavelengths of 365 nm and 525 nm. The light intensities were measured using an optical power meter (Thorlabs PM100D).