Parameters for the plots of

## Abstract

Nonlinear resistive grids have been extensively used in the past for achieving image filtering, focused on both smoothing and edge detection, by resorting to the nonlinear constitutive branch relationships of the elements in the array in order to carry out in fact a minimization algorithm. In this chapter, a specially tailored fully analytical charge-controlled memristor model is introduced and used in a memristive grid in order to handle the edge detection. The performance of the grid has been tested on a set of 500 images (clean and noisy) and shows an excellent agreement with the outcomes produced by humans.

### Keywords

- memristor modeling
- memristive grids
- symbolic memristor modeling
- edge-detection
- image processing

## 1. Introduction

An indispensable preprocessing for image signal treatment is edge detection, which consists in decomposing the original image into a family of topographical curves that corresponds with measured depth levels of intensity. The main outcome of edge detection is an image that contains diminished information which allows further complex forms of image processing.

In plain words, an edge is regarded as a sharp change in brightness or when the image fence contains physical discontinuities. As a preprocessing step to edge detection, a smoothing filter, typically Gaussian smoothing, is widely applied; as a clear consequence, the edge-detection methods differ in function of the smoothing filter used [1].

In order to detect edges, several methods are reported in the study. In 1986, John Canny proposed a computational method for image edge detection. He introduced the notion of non-maximum suppression, which means that given the pre-smoothing filters, edge points are defined as points where the gradient magnitude assumes a local maximum in the gradient direction [2]. Although the method was developed in the early years of computer vision, it is still in the state of art.

Another method is based on anisotropic diffusion, which is a technique aiming at reducing the image noise without removing significant parts of the image such as edges, lines, or other details that are important for the interpretation of the image [3]. This method has evolved to nonlinear anisotropic diffusion, which consists in considering the original image as an initial state of a parabolic (diffusion-like) process and extracting filtered versions from its temporal evolution [4].

As a direct result, nonlinear resistive grids have been used to explicitly implement edge detection based on nonlinear anisotropic diffusion [5]. The nonlinear resistive grid and the elements of this processor are presented in Figure 1(a); the voltage sources represent each pixel of the image to be processed and the node voltages represent each pixel of the processed image. It is important to note that each branch in the grid is composed of a nonlinear resistive element called fuse.

Because of the temporal evolution of the procedure, memristive grids naturally fit the features needed for achieving edge detection [6, 7]. A memristive grid has the same structure of its resistive counterpart, but the nonlinear resistors have been substituted by memristors, as depicted in Figure 1(b).

The rest of this chapter is organized as follows: Section 2 deals with the development of the proposed model, and the resulting analytic expressions for the memristance are obtained. In Section 3, the characterization of the model is carried out in order to demonstrate that it fulfills the main fingerprints of the device. Section 4 highlights the main characteristics of the memristive grid and its components. In Section 5, the results of the application of the memristive grid to edge detection are presented. Finally, in Section 6, some conclusions are drawn and future lines of research are proposed.

## 2. Development of a charge-controlled memristor model

Professor Leon O. Chua predicted in 1971 the existence of the fourth basic circuit element [8]. He called it memristor and defined it as a passive device with two terminals, which branch constitutive function relates the magnetic flux linkage and the electric charge. In 2008, the R. Stanley Williams group at Hewlett-Packard Laboratories presented a device whose behavior exhibits the memristance phenomenon [9].

Novel memristor applications became the main thrust in the search for better and more reliable models of the device that can predict the behavior of the electronic system application. With the goal of developing a memristor model that can achieve edge detection with the memristive grid, several features are pursued:

The model must be charge-controlled in order to reflect the dynamics of the edge detection.

The model must be recast in a fully symbolic form in order to express the memristance as a function of the device parameters.

The model must fulfill the fingerprints of the device [10].

The modeling methodology can be described as follows: first, the nonlinear drift mechanism is expressed as a function of charge instead of time; then, a symbolic solution

The nonlinear drift mechanism that governs the functioning of the HP memristor [9] is given hereafter as the ordinary differential equation (ODE) which is expressed in terms of the charge derivative:

where

where

It is possible to find an analytical solution to Eq. (1) for

As an example of the solution, the equation obtained for order-1,

where

The solution for

In order to establish a comparison, the numerical solution to Eq. (1) is obtained with the Backward Euler method. Figure 2 shows the plots of the solution

### 2.1. Memristance expressions

Once the solution

The expressions for the memristance for order-1 with

with

## 3. Characterization of the model

The developed model is tested in order to verify that it fulfills the main fingerprints of the device [10]. The nominal values of the HP memristor [9] are used, as shown in Table 2, where

On one side, the

Figure 4 shows the area as a function of the frequency. It can be verified that the lobe area decreases monotonically with the frequency from a critical value

On the other side, as the frequency tends to infinity, the value of the memristance becomes constant and the device acts as a linear resistor [10]. The limit of the memristance when the frequency

where

### 3.1. Comparison with other models

Several models are already reported in the study, which have been developed for different applications. A first scheme is reported in [14] in the form of a macro-model implemented in the SPICE circuit simulator. The second model is reported in [15], which is a mathematical model implemented in MATLAB. Figure 5 shows the

### 3.2. Memristance-charge characteristic

Figure 6 shows the

## 4. Memristive grid for edge detection

Figure 1(b) shows the memristive grid used for edge detection. In fact, each fuse of the grid consists of two memristors in an anti-series connection, that is, the series connection of two memristors connected back to back, as shown in Figure 7(a). The combined

Figure 7(c) shows the

Parm. | |||||||||
---|---|---|---|---|---|---|---|---|---|

Value |

The importance of a smart selection on the

Some additional considerations must be taken into account for processing images with a memristive grid, due to the fact that the memristive grid implements a nonlinear anisotropic method. Namely, the method needs a stop criterion to find a solution [17]. The images processed with the memristive grid are in gray scale, and a threshold to stop the process is selected.

### 4.1. Solving the memristive grid

The equations emanating from the memristive grid form a set of differential algebraic equations (DAEs) that is solved with MATLAB. The number of pixels of the image determines the size of the grid and therefore the number of DAEs.

Figure 8 shows a single node of the grid (node

This can be established as

where

For an

As shown in Eq. (17), the level of smoothing depends on the rate

The dynamics of the grid comes from the time-dependent behavior of the memristance, which implies that the value of

This criterion is the smoothing time

## 5. Results and comparisons

A benchmark image and its edges drawn by five human observers are presented in Figure 9 (extracted from the database BSD300 [18]). This image is used to evaluate the performance of the memristive grid.

Figure 10 shows the output image for several levels of smoothing at different transient values. It allows us to verify that as the time increases, the smoothing level decreases, that is, the original image tends to be unveiled.

### 5.1. Figures of merit for the edge-detection procedure

A way of evaluating the efficiency is by means of the precision-recall curve and the parameter

where

On the other side, the recall parameter is defined as

where

Another commonly used parameter is the precision-recall cost ratio

where

The result of the edge-detection procedure is shown in Figure 11(a) for the memristive grid and in Figure 11(b) for Canny’s method [2].

The precision-recall (

The maximum

### 5.2. Processing the noisy image

In order to evaluate the performance of the memristive grid in edge detection for images with noise, Gaussian noise is added to the benchmark image depicted in Figure 9. The noisy image (Figure 13) is processed with the memristive grid and Canny’s method; the edges detected are shown in Figure 14(a) and (b), respectively.

Figure 15 shows the

### 5.3. Comparative results on a set of 500 images

In this paragraph, the performance of the grid is evaluated for 500 images extracted from the database BSD500 [19]. Figure 16 shows the statistics on the

A similar analysis is carried out on the set with noisy images. Gaussian noise with mean 0 and variance 0.01 has been added to the input images. The statistics are shown in Figure 17.

## 6. Conclusions

A symbolic model for a charge-controlled memristor has been developed. The model has been incorporated to a memristive grid that has been used as a filter for image smoothing and edge detection. A simple evaluation of the memristance expression confirmed that the model fulfills the fingerprints for the

The methods for image edge detection usually use a smoothing filter as the first step to improve edge detection. However, in the memristive grid, the smoothing filter is naturally implemented by the same circuit, which allows to have an analog processor that implements both functions. In addition, the grid presents a good performance in edge detection in comparison with the human outcomes.

Future lines of research are mainly devoted to speed up the edge-detection procedure for high-resolution images. A relevant topic is to solve the DAEs emanating from the memristive grid by performing parallel computations on multicore computers. In this case, the edge detection can be applied to images arising from data-intensive scenarios, such as medical imaging and remote-sensing imagery.

## References

- 1.
Umbaugh SE. Digital Image Processing and Analysis: Human and Computer Vision Applications with CVIPtools. Boca Raton, FL, USA: CRC Press; 2016 - 2.
Canny J. A computational approach to edge detection. IEEE Transactions on Pattern Analysis and Machine Intelligence. 1986; 8 (6):679-698 - 3.
Perona P, Malik J. Scale-space and edge detection using anisotropic diffusion. IEEE Transactions on Pattern Analysis and Machine Intelligence. 1990; 12 (7):629-639 - 4.
Bakalexis SA, Boutalis YS, Mertzios BG. Edge detection and image segmentation based on nonlinear anisotropic diffusion. In: Digital Signal Processing, 2002. DSP 2002. 2002 14th International Conference on. Vol. 2. IEEE; 2002. pp. 1203-1206 - 5.
Harris J, Koch C, Luo J, Wyatt J. Resistive fuses: Analog hardware for detecting discontinuities in early vision. In: Carver Mead, Mohammed Ismail, editors. Analog VLSI implementation of neural systems. chapter 2. Dordrecht: Kluwer Academic Publishers; 1989. pp. 27-55 - 6.
Jiang F, Shi BE. The Nonlinear Memristive Grid. New York, NY: Springer New York; 2011. pp. 209-225 - 7.
Jiang F, Shi BE. The memristive grid outperforms the resistive grid for edge preserving smoothing. In: Circuit Theory and Design, 2009. ECCTD 2009. European Conference on. IEEE; 2009. pp. 181-184 - 8.
Chua L. Memristor-the missing circuit element. IEEE Transactions on Circuit Theory. 1971; 18 (5):507-519 - 9.
Strukov DB, Snider GS, Stewart DR, Stanley Williams R. The missing memristor found. Nature. 2008; 453 (7191):80-83 - 10.
Adhikari SP, Sah MP, Kim H, Chua LO. Three fingerprints of memristor. IEEE Transactions on Circuits and Systems I: Regular Papers. 2013; 60 (11):3008-3021 - 11.
Joglekar YN, Wolf SJ. The elusive memristor: properties of basic electrical circuits. European Journal of Physics. 2009; 30 (4):661 - 12.
Velásquez YAR. Development of an analytical model for a charge-controlled memristor and its applications. Master’s thesis. Puebla, Mexico: National Institute for Astrophysics, Optics and Electronics (INAOE); 2017 - 13.
Sarmiento-Reyes A, Hernández-Martínez L, Vázquez-Leal H, Hernández-Mejía C, Arango GUD. A fully symbolic homotopy-based memristor model for applications to circuit simulation. Analog Integrated Circuits and Signal Processing. 2015; 85 (1):65-80 - 14.
Biolek D, Biolkova V, Biolek Z. Spice model of memristor with nonlinear dopant drift. Radioengineering. 2009; 18 (2) - 15.
Radwan AG, Zidan MA, Salama KN. Hp memristor mathematical model for periodic signals and dc. In: 2010 53rd IEEE International Midwest Symposium on Circuits and Systems. IEEE; 2010. pp. 861-864 - 16.
Shi BE, Chua LO. Resistive grid image filtering: input/output analysis via the cnn framework. IEEE Transactions on Circuits and Systems I: Fundamental Theory and Applications. 1992; 39 (7):531-548 - 17.
Niklas Nordström K. Biased anisotropic diffusion: A unified regularization and diffusion approach to edge detection. Image and Vision Computing. 1990; 8 (4):318-327 - 18.
Martin D, Fowlkes C, Tal D, Malik J. A database of human segmented natural images and its application to evaluating segmentation algorithms and measuring ecological statistics. In: Computer Vision, 2001. ICCV 2001. Proceedings. Eighth IEEE International Conference on. Vol. 2. IEEE; 2001. pp. 416-423 - 19.
Martin DR, Fowlkes CC, Malik J. Learning to detect natural image boundaries using local brightness, color, and texture cues. IEEE Transactions on Pattern Analysis and Machine Intelligence. 2004; 26 (5):530-549