Introduction

Digital image processing technology, a technique for processing image information with computers or real-time hardware, mainly involves image coding and compression, image enhancement and restoration, image segmentation, image recognition, and so on. Common algorithms include the familiar single/multi-scale retinex algorithm for image enhancement [30] without requiring training process.

However, the architectures mentioned above involve complex software algorithms, which intangibly add processing time and reduce the system efficiency. Therefore, researchers are inspired by the human visual system and try to establish a novel digital image processing architecture. The human visual system (HVS) integrates perceptual and processing, which involves filtering or suppressing noise and enhancing target features with the retina, followed by parallel high-level image processing in the visual cortex. [11, 12, 41,42,43]. In digital general-purpose processors, many image processing applications require multiple operations per second, even though these applications do not require floating-point precision [44]. In a memristor-based image processing network, the image processing time and iterations required for the program are directly reduced on account of the fast-switching speed and low power consumption of the memristor, which can not only store information but also compute and process it.

Algorithms with memristor behavior have an impact on digital image processing as they introduce nonlinear effects in digital image processing algorithms that may lead to more complex and diverse image processing results. In addition, some complicated algorithms require a considerable computational resource, resulting in slower operation and the need to optimize the algorithm or use better computer hardware. Therefore, it is necessary to carefully consider the effects of the memristor behaviors on the processing results when applying them to digital image processing algorithms and to select appropriate processing methods to control and adjust their effects to meet specific image processing demands. In terms of digital image processing results, the quality of images processed in this way is not optimal when dealing with images generated under special conditions (e.g., poor lighting conditions, excessive noise, etc.) or large-scale image data. Therefore, to reduce power consumption and training costs, hardware digital image processing architectures based on memristor networks that enable massively parallelism and minimize data transfers have emerged.

Memristor is the crucial component for the analog visual system's enhancement and inhibition effects. The principle of lateral inhibition of biological neurons is shown in Fig. 1a. When a neuron is excited through stimulation, and a neighboring neuron is stimulated, the excitation occurring in the neighboring neuron has an inhibitory effect on the former, and this feature coincides with the properties of the memristor. The memristor, introduced by L. Chua in 1971 [45] from the completeness of the circuit, is the fourth elementary two-terminal circuit element characterized by a nonlinear constitutive relationship between flux and charge and was consciously discovered by Strukov D B and his team in 2008 on the nanoscale metal oxides [46]. Moreover, memristors have optimal write energy and standby power, where the majority of pulse-code modulated (PCM) devices and resistive random access memories (RRAM) have write energies of about 10–100 pJ and 100 fJ–10 pJ [47], respectively. Several studies have proved that the computational energy efficiency of memristors exceeds that of today's graphics processing units by two orders of magnitude [48]. Here, the enhancement process of a 3 × 3 grayscale image is used to explain the process of employing a memristor array structure to a hardware digital image, as shown in Fig. 1b. A two-dimensional image consists of many pixel points, and in view of a grayscale image, the grayscale value of the image is mapped to the input voltage (current) of the array, and the output voltage (current) is obtained through vector operation or interaction (enhancement or suppression) between the memristors by the array of equal size, and then the opposite step is performed as the previous one, i.e., the voltage or current is mapped to the grayscale values of 0 to 255. Finally, the processed results can be obtained. In memristor-based image processing networks, the fast-switching speed, and low power consumption of memristors directly reduce the image processing time and the iterations required for the program because of their capabilities not only for storing information but also for calculating and manipulating it.

Fig. 1
figure 1

Digital image processing architecture for neuromorphic systems combined with memristors. a Diagram of the interaction between biological neurons. b Process of 3 × 3 Gy image processing based on memristor array, take enhancement as an example

In this article, we focus on hel** the reader understand the current status of memristor devices and image processing based on memristor circuits. We present recent research on the application of memristors in hardware image processing and compare the implementation of pure software image processing and memristor-based image processing. Their advantages, disadvantages, and existing problems are subsequently analyzed. This paper is divided into four parts. “Memristor” section escribes the theory of memristors and presents the reasons for their application in the field of neuromorphology. “Image quality assessment metrics” section introduces several commonly used image evaluation metrics to facilitate later comparisons of the effects of memristor-based hardware digital image processing. “Discussion” section lists the current research on the application of memristor-based circuits in various aspects of image processing. Finally, we conclude with a discussion of the prospects for the development and openness of hardware digital image processing and summarize the work of this paper.

Memristor

With the continuous development of big data, the Internet of Things, artificial intelligence and other technologies, it is urgent to put forward a new computing system to deal with dense data. The human brain can process and store data simultaneously, thus reducing energy consumption and greatly improving the efficiency of computing. Therefore, building brain-like operations and develo** intelligent brain-like devices is an essential breakthrough in AI research [49]. Researchers at HP Labs have experimentally confirmed that memristors are a new type of nonlinear two-terminal nanoscale component with switching characteristics, memory capability, and continuous input and output properties [46]. Due to its inherent property of analog inputs and outputs, memristor-based memories can allow for higher accuracy than conventional binary memories. Compared to dynamic random access memory, memristors maintain their state after power loss, making memristor-based memories non-volatile [50, 51]. Notably, the combination of memristors and nanowire crossbar interconnection has become a topic of great interest to researchers [52, 53]. The memristor crossbar array structure combines the features of high storage density, high precision and fast access speed of memristors with the massively parallel processing of crossbar arrays, enabling the structure to possess strong information processing capabilities and easy compatibility with large-scale integrated circuits (VLSI). Considering the advantages above, it has broad application prospects in arithmetic operation, mode comparison, information processing, and virtual reality. This section introduces the memristors commonly applied in the hardware architecture of digital image processing and their working mechanisms. At the end of this section, we also summarize the electrical performance of memristors with different structures at the current stage (Table 2).

Table 2 Summary of electrical performance of memristors with different structures

Memristors for image processing

Memristor is a nonlinear resistor with memory capability whose resistance is affected by the amount of charge or magnetic flux passing through it. In 1971, Chua [45, 54] theoretically proposed the memristor (short for memory resistor) based on the symmetry argument of circuit theory. Memristance (resistance of a memristor) was defined as the ratio between the magnetic flux φ and charge q passing through the memristor (i.e., \(M = {\text{d}}\varphi /{\text{d}}q\)) by Chua (Fig. 2a). As φ and q are time integrals of voltage and current, respectively. Then,

$$M = \frac{{{\text{d}}\varphi /{\text{d}}t}}{{{\text{d}}q/{\text{d}}t}} = \frac{V}{I}$$
(1)
Fig. 2
figure 2

a Four basic circuit elements and their respective relationships. b A typical hysteresis loop of the memristor. c Diagram illustrating the structure of a neuromorphic crossbar comprised of memristor synapses and CMOS neurons [58]. d TEM cross-section of the Ta/HfO2/Pt device. Measurements run with the top Ta electrode biased and the bottom Pt electrode grounded [59]. e Typical I–V curve showing resistor switching behavior, with black arrows indicating device switching direction [59]. f High- and low-resistance states have been demonstrated for devices with 120 billion switching cycles at -3.05 V/100 ns RESET and 1.3 V/100 ns SET pulses [59]. g Retention testing of eight different levels at 150 °C (> 104 s) confirmed the non-volatile characteristics and demonstrated the device's suitability for multi-level memory [59]. h 2.20 enhancement/inhibition epochs were realized, each of these pulses comprising 39 pulses [59]. i Device structure and cross sectional TEM image of the Ag–TiO2 nanocomposite-based memristor [35]. j Schematic of optically gated electrically driven synaptic modulation operation [35]. k I–V curve of a memristor device after 15 min of exposure to visible light [35]. l Long-term conductance augmentation and inhibition stimulated by 50 positive/negative pulses (± 2 V, 50 ms) [35]

This equation shows that the unit of M is the same as the resistance, i.e., ohm (Ω). In 1976, Chua and Kang elucidated the strong dependence of memristive systems on the implementation of state variables and provided a generalized definition of memristive systems derived from memristors [54], which can be mathematically defined as:

$$v = R\left( {w,i} \right)i,$$
(2)
$$\frac{{{\text{d}}w}}{{{\text{d}}t}} = f\left( {w,t} \right),$$
(3)

where w is an internal state variable, and in general R and f are explicit functions of time. If an arbitrary periodic voltage (current) signal is applied to an ideal memristor and the excitation voltage (current) and response voltage (current) are then plotted, a diagonal "8"-shaped tight pinch hysteresis return is obtained, as shown in Fig. 2b, which was used by Chua as a landmark criterion for memristor phenomena [55]. This definition was eventually refined in Chua's latest publication [56, 57]. This pinched hysteresis loop of current voltage (i − v) has also become the most representative feature of the memristor. The shape of this loop varies with the amplitude and frequency of the input waveform, but the common feature is the absence of positive and negative values in each cycle and the passage through the origin of the coordinates. Meanwhile, direct experimental support for memristor neuromorphic systems such as spike-timing-dependent plasticity originated from a hybrid system of memristor synapses and CMOS neurons (Fig. 2c).

Here we focus on two typical types of memristor structures and device performance applied in digital image processing. Jiang et al. reported a Ta/HfO2/Pt memristor (Fig. 2d) [59] with low programming voltages (Fig. 2e), fast switching speeds (≤ 5 ns), high endurance (120 billion cycles) (Fig. 2f) and reliable retention (> > 10 years extrapolated at 85 °C). In addition, potentiation and depression were demonstrated over 220 epochs (Fig. 2h), indicating that the device can be used for multi-level non-volatile memories (Fig. 2g) and neuromorphic computing applications. Shan et al. developed a plasmonic optoelectronic memristor [35] (Fig. 2i) that relies on optical excitation in an Ag-TiO2 nanocomposite film and the effects of localized surface plasmon resonance (LSPR). Fully light-induced and light-gated synaptic plasticity functions were achieved in the single device (Fig. 2j), including reversible synaptic potentiation/suppression under visible and ultraviolet illumination and modulation of the STDP learning rule (Fig. 2k, l), which can be utilized for visual sensing and low-level image pre-processing (including contrast enhancement and noise reduction).

Working mechanism

The mechanism lies in the fact that synapses are intrinsically two-terminal devices, which share a striking similarity with memristive devices [45, 46]. The advantage of this structure is that it can potentially provide connectivity and functional density comparable to biological systems, rather than operating in a digital computer manner [60]. These devices consist of a simple metal − insulator − metal (MIM) layer structure. The forming process creates localized conducting filaments, and the movement of these filaments leads to discrete and abrupt resistive switching characteristics [51, 61,62,63,64]. Specifically, the switching kinetics dominated by anion migration in semiconductors can be understood as follows. There are some mobile oxygen ions in the p-type storage medium, as schematically illustrated in Fig. 3a-i. These moving oxygen ions migrate toward the TE when the top electrode (TE) is positively biased and then accumulate near the TE, thus creating a large number of cationic vacancies in the TE (Fig. 3a-ii). Once the fully p-type semiconductor conducting filament is formed, the device will switch to the low-resistance state (LRS) (Fig. 3a-iii). Most of the Joule heat will be generated at the thinnest part of the conducting filament when TE is negatively biased, greatly accelerating the movement of oxygen ions in that region. The oxygen ions flowing in this region will rapidly migrate toward the BE driven by the electric field, and as a result, the concentration of cationic vacancies at the thinnest part of the CF of the p-type semiconductor will be significantly reduced, resulting in the CF breaking off there, at which point the device is in the high-resistance state (HRS) (Fig. 3a-iv). When semiconductor (TiOx) junctions/two dynamic metal (Pt) are operated in series, a range of device states occur.

Fig. 3
figure 3

a Schematic of anion migration dominated switching kinetics in p-type semiconductors. (i) The initial state with random distribution of mobile oxygen ions. (ii) The nucleation and subsequent growth of p-type CFs composed of cation vacancies from anode to cathode during the forming process. (iii) Full CF LRS in the thinnest region near the cathode. (iv) The thinnest region of the CF portion ruptured by the HRS [65]. b Schematic of BMThCE-based device, and the chemical structures of the photochromic diarylethene (UV: ultraviolet light; VIS: visible light) [35]. c I–V characteristics of the BMThCE-based memories ITO/o-BMThCE/Al and d ITO/c-BMThCE/Al [35]

Slightly different from electrically induced RS memories, the physical mechanisms of optical effects in optical memristors include photovoltaic effects and light-induced chemical reactions/configuration changes, etc. Photovoltaic effects typically involve the creation of free carriers, the separation of photogenerated electron–hole pairs, and the generation of voltages or currents from incident photons [66]. The separation of electron–hole is highly correlated with the Schottky barrier between metal and semiconductor or the internal electric field induced by the heterojunction interface (heterojunction system) [67]. This causes the holes to move toward positive electrode and electrons to the negative electrode, which subsequently extracts charge to the external circuit and generates an open circuit voltage. Photochemical reactions entail photons absorption, which excite molecules and cause chemical changes such as ionization and isomerization [68] (Fig. 3b). The photo-induced switching behavior is tightly linked to conformational changes within the photoactive material, which may lead to changes in chemical bonds and energy bands. The photo-induced transition between conformational structures does have a remarkable impact on the RS type as the energy level changes, which can greatly modulate the device performance in a precise and energy-efficient manner (Fig. 3c,d).

Reportedly, memristors respond to light and electrical stimuli [69,70,71,72]. Neuromorphic computing implementations in the electrical and optical domains requires a full combination of the integrated processing power of the electrical domain and low energy consumption and high bandwidth of the optical fields. Memristors have become both state modulators and photodetectors for their particular characteristics, capable of processing both electrical and optical signals. The common methods to realize synaptic or neuronal behavior include modulating the memristor state with electrical and optical programming signals, i.e., resistance or optical transmittance. In addition, the programmed input and readout signals are located in different domains, thus enabling direct conversion of optoelectronic signals, which is extremely attractive. For example, an electrical (optical) signal can change the optical (electrical) signal in a state modulator (photodetector).

Image quality assessment metrics

Image quality assessment metrics play an important role in various image processing applications. Digital images suffer from various distortions during the process of acquisition, processing, compression, storage, transmission and reproduction, any of which may leads to a degradation of visual quality. Image quality assessment metrics are available for optimizing algorithms and parameter settings of image processing systems and benchmarking them, and dynamically monitoring and adjusting image quality. Two types of metrics exist for assessing image quality, subjective and objective image quality assessment metrics. They are briefly described below.

Subjective image quality assessment metrics

Subjective assessment, also called subjective evaluation, is to evaluate the quality of an image through the subjective perception of a person as an observer and can most truly reflect the human visual perception. Common subjective evaluations are absolute and relative evaluations. The former involves the observers rating the original image and the image to be evaluated, and the latter involves the observers comparing the given image based on their own subjective feeling without any reference. The final evaluation score for both methods is the average of each evaluation score.

The subjective evaluation criterion uses the Mean Opinion Score (MOS):

$${\text{MOS}} = \frac{{\mathop \sum \nolimits_{i = 1}^{k} N_{i} S_{i} }}{{\mathop \sum \nolimits_{i = 1}^{k} N_{i} }}$$
(4)

where \(k \in \left\{ {1,2, \ldots K} \right\}\) is the evaluation level of the observer, Si is the evaluation score corresponding to the level, and Ni is the number of evaluators for each type of score.

Objective image quality assessment metrics

Unlike the subjective assessment of images, objective evaluation assesses the quality of the image by establishing a mathematical model, scoring the image texture, sharpness, focus and other aspects and calculating the results, which can scientifically reflect the human eye's subjective perception of the image. It can be divided into full-reference, half-reference and no-reference image quality assessment methods according to whether the corresponding reference image can be found [87]. This section presents several common objective image quality assessment metrics, which are as follows.

Mean Square Error (MSE): an expected value of the squared difference between the true and estimated values of a parameter. Assuming that the reference image is f, image to be measured is g, and size of two images is M × N. The grayscale values of the pixels are noted as f(i, j), g(i, j), and the mean squared error can be expressed as:

$${\text{MSE}} = \frac{1}{M \times N}\mathop \sum \limits_{i = 1}^{M} \mathop \sum \limits_{j = 1}^{N} \left[ {f\left( {i,j} \right) - g\left( {i,j} \right)} \right]^{2}$$
(5)

Peak Signal to Noise Ratio (PSNR): a calculation of the ratio of the maximum power of a signal to the power value of the noise. The larger the value, the smaller the distortion. The formula for calculating the PSNR is shown in Eq. (6).

$${\text{PSNR}} = 10\log_{10} \frac{{255^{2} }}{{{\text{MSE}}\left( {f,g} \right)}}$$
(6)

Structural Similarity (SSIM): A well-known qualify metric developed by Wang et al. [87] for measuring the similarity between two images. It is thought to be associated with the perception quality of the HVS. SSIM is designed to model any image distortion as a mixture of three factors, loss of correlation, contrast distortion, luminance distortion. The SSIM is defined as:

$${\text{SSIM}}\left( {f,g} \right) = l\left( {f,g} \right)c\left( {f,g} \right)s\left( {f,g} \right)$$
(7)

where

$$\left\{ {\begin{array}{*{20}l} {l\left( {f,g} \right) = \frac{{2\mu_{f} \mu_{g} + C_{1} }}{{\mu_{f}^{2} + \mu_{g}^{2} + C_{1} }}} \hfill \\ {c\left( {f,g} \right) = \frac{{2\sigma_{f} \sigma_{g} + C_{2} }}{{\sigma_{f}^{2} + \sigma_{g}^{2} + C_{2} }}} \hfill \\ {s\left( {f,g} \right) = \frac{{\sigma_{fg} + C_{3} }}{{\sigma_{f} \sigma_{g} + C_{3} }}} \hfill \\ \end{array} } \right.$$
(8)

Note that C1, C2, C3 are positive constants, aiming at avoiding the denominator to be 0 and σfg is the covariance between f and g. The first item in (8) is the luminance comparison function which indicates the proximity of the average brightness of two images (μf and μg). This factor acquires the maximum 1 only if μf = μg. The second one is the contrast function, which measures how closely two images compare, where contrast is measured in terms of standard deviation σf and σg. The maximum value of this term is 1 only when σf = σg. The last one is the structural contrast function representing the relevant coefficient between the two images f and g. Hence, the positive value range of SSIM is [0, 1], where the value of 1 means that f = g and 0 means no correlation between images.

Applications of memristor in digital image processing

Memristors have been widely employed in simulating artificial synapses because of their complex analog behavior since the rediscovery of the reversible resistive switching effect. Meanwhile, memristors can also be integrated with CMOS logic devices to serve as programmable switches [88], logic units [108,109,110]. (iii) Images obtained using the proposed 2D DCT reconstruction [111]. h Schematic illustration of a proposed physical crossbar array implementation and read circuitry [112]. i From top to bottom are the initial 50 k-byte image as the simulated input, the intermediate image representing the fuzzy logic level processing and the final 25 k-byte image after map** back to the binary bitmap [112]