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.

<sup>P</sup> <sup>¼</sup> TP TP þ FP

where TP is the number of pixels that belong to the evaluated edge as well as to the reference edge (true positives), and FP is the number of pixels that belong to the evaluated edge but not to the reference edge (false positives). In fact, the precision denotes the quality of the detector.

> <sup>R</sup> <sup>¼</sup> TP TB

where TB is the total number of pixels that belong to the edge in the reference image. Actually,

<sup>F</sup> <sup>¼</sup> PR

<sup>β</sup><sup>P</sup> <sup>þ</sup> <sup>1</sup> � <sup>β</sup> <sup>R</sup> (22)

Charge-Controlled Memristor Grid for Edge Detection http://dx.doi.org/10.5772/intechopen.78610

On the other side, the recall parameter is defined as

Figure 10. Smoothing procedure: output image.

the recall factor indicates the probability for an edge to be detected.

Another commonly used parameter is the precision-recall cost ratio F:

where β∈0 ! 1. In order to have a balanced ratio, β ¼ 0:5 has been used.

(20)

107

(21)

#### 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 F [19]. On one side, the precision (P) is given as

Figure 9. (a) Benchmark image and (b) ground truth for the edges of the benchmark image.

Charge-Controlled Memristor Grid for Edge Detection http://dx.doi.org/10.5772/intechopen.78610 107

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

106 Advances in Memristor Neural Networks – Modeling and Applications

tion of the memristive grid is Mon

results that a stop criterion is needed.

5. Results and comparisons

original image tends to be unveiled.

5.1. Figures of merit for the edge-detection procedure

Figure 9. (a) Benchmark image and (b) ground truth for the edges of the benchmark image.

F [19]. On one side, the precision (P) is given as

the memristive grid.

each memristance arriving to the node Ni,j divided by the input resistance. The initial condi-

The dynamics of the grid comes from the time-dependent behavior of the memristance, which implies that the value of Mbranch increases with t causing in turn a low level of smoothing. In fact, after a long period of time, the output image gets closer to the original image. It clearly

This criterion is the smoothing time tsmooth, since it defines when the smoothing level of the output image is reached. At this point, the edges are determined by those nodes in the grid where the fuses have reached Mth. This threshold is referred to as a fraction of the maximum value of the memristance. A percentage of 2 of Moff has been used, allowing edges to be detected when the output image still retains a high level of smoothing. As a result, edge

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

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

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

detection can be efficiently performed even for images with high levels of noise.

Rin ¼ 0:044 which corresponds to L ¼ 4:78 pixels.

Rin , that is, the equivalent of

Figure 10. Smoothing procedure: output image.

$$P = \frac{T\_P}{T\_P + F\_P} \tag{20}$$

where TP is the number of pixels that belong to the evaluated edge as well as to the reference edge (true positives), and FP is the number of pixels that belong to the evaluated edge but not to the reference edge (false positives). In fact, the precision denotes the quality of the detector.

On the other side, the recall parameter is defined as

$$R = \frac{T\_P}{T\_B} \tag{21}$$

where TB is the total number of pixels that belong to the edge in the reference image. Actually, the recall factor indicates the probability for an edge to be detected.

Another commonly used parameter is the precision-recall cost ratio F:

$$F = \frac{PR}{\beta P + (1 - \beta)R} \tag{22}$$

where β∈0 ! 1. In order to have a balanced ratio, β ¼ 0:5 has been used.

Figure 11. Edge detection: (a) memristive grid at t ¼ 20:45 ms, (b) Canny's method [2] for a threshold 0:422.

Figure 12. Precision-recall plots: (a) memristive grid and (b) Canny's method [2].

different transients for the memristive grid and five curves with different thresholds for Canny's method. In addition, the ground truth subjects have been cross-compared and the results are

Figure 15. Precision-recall plots for the benchmark image with noise: (a) memristive grid and (b) Canny's method [2].

Figure 14. Edge detection for the benchmark image with noise: (a) memristive grid at t ¼ 19:65ms and (b) Canny's

Charge-Controlled Memristor Grid for Edge Detection http://dx.doi.org/10.5772/intechopen.78610 109

The maximum F for the memristive grid is 0:76, and it was obtained at tsmooth ¼ 20:45 ms, while for Canny's method, the maximum F is 0:59 for a threshold of 0:422. In this case, the smoothing time is measured when the maximum of F parameter is reached, and this is the stop criterion of the method; however, when there is no ground truth to compare the detected edge, the stop criterion must be tsmooth. The human average F (for the five test observers) is 0:80 [19]. Therefore, the outcomes of the memristive grid exhibit an excellent agreement with outcomes

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

denoted by the green points, which are close to the human average as reported in [19].

made by humans.

method [2] for a threshold 0:443.

5.2. Processing the noisy image

Figure 13. Benchmark image with Gaussian noise.

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 (P � R) curves are given in Figure 12(a) for the memristive grid and (b) for Canny's method. In these plots, the black line represents the average of five curves obtained for

Figure 14. Edge detection for the benchmark image with noise: (a) memristive grid at t ¼ 19:65ms and (b) Canny's method [2] for a threshold 0:443.

Figure 15. Precision-recall plots for the benchmark image with noise: (a) memristive grid and (b) Canny's method [2].

different transients for the memristive grid and five curves with different thresholds for Canny's method. In addition, the ground truth subjects have been cross-compared and the results are denoted by the green points, which are close to the human average as reported in [19].

The maximum F for the memristive grid is 0:76, and it was obtained at tsmooth ¼ 20:45 ms, while for Canny's method, the maximum F is 0:59 for a threshold of 0:422. In this case, the smoothing time is measured when the maximum of F parameter is reached, and this is the stop criterion of the method; however, when there is no ground truth to compare the detected edge, the stop criterion must be tsmooth. The human average F (for the five test observers) is 0:80 [19]. Therefore, the outcomes of the memristive grid exhibit an excellent agreement with outcomes made by humans.

#### 5.2. Processing the noisy image

The result of the edge-detection procedure is shown in Figure 11(a) for the memristive grid

Figure 11. Edge detection: (a) memristive grid at t ¼ 20:45 ms, (b) Canny's method [2] for a threshold 0:422.

The precision-recall (P � R) curves are given in Figure 12(a) for the memristive grid and (b) for Canny's method. In these plots, the black line represents the average of five curves obtained for

and in Figure 11(b) for Canny's method [2].

Figure 13. Benchmark image with Gaussian noise.

Figure 12. Precision-recall plots: (a) memristive grid and (b) Canny's method [2].

108 Advances in Memristor Neural Networks – Modeling and Applications

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

Charge-Controlled Memristor Grid for Edge Detection http://dx.doi.org/10.5772/intechopen.78610 111

Figure 15 shows the P � R curves for the memristive grid and for Canny's method. The maximum F for the memristive grid is 0:75, and it was obtained at tsmooth ¼ 19:87 ms, while for Canny's method, the maximum is 0:59 for a threshold of 0:414. For the image under test, the F measure does not show a significant difference between the noisy and the original image.

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 F value for the memristive grid, Canny's method, and the human observers. Also, the histogram for the smoothing time in the memristive grid is presented. It can be noticed that the memristive grid produces 149 images with the average F, while Canny's method produces 174. However, it must be pointed out that these average images are obtained with better F with the memristive grid. In addition, the human F results from the database show a less spread distribution centered in the class 0.6–0.7

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.

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 i � v pinched hysteresis loop. Besides, special attention was devoted to the memristance-charge characteristic of the anti-series connection because it constitutes 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 com-

Future lines of research are mainly devoted to speed up the edge-detection procedure for highresolution 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

key element in the memristive grid for achieving edge detection.

shown in Figure 14(a) and (b), respectively.

5.3. Comparative results on a set of 500 images

for nearly 300 images.

6. Conclusions

parison with the human outcomes.

remote-sensing imagery.

Figure 16. Histograms for 500 images from the database BSD500 [19].

Figure 17. Histograms for 500 images with Gaussian noise from the database BSD500 [19].

(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 P � R curves for the memristive grid and for Canny's method. The maximum F for the memristive grid is 0:75, and it was obtained at tsmooth ¼ 19:87 ms, while for Canny's method, the maximum is 0:59 for a threshold of 0:414. For the image under test, the F measure does not show a significant difference between the noisy and the original image.

#### 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 F value for the memristive grid, Canny's method, and the human observers. Also, the histogram for the smoothing time in the memristive grid is presented. It can be noticed that the memristive grid produces 149 images with the average F, while Canny's method produces 174. However, it must be pointed out that these average images are obtained with better F with the memristive grid. In addition, the human F results from the database show a less spread distribution centered in the class 0.6–0.7 for nearly 300 images.

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.
