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

**Expressions for**

with

**Expressions for**

## 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.