^{1}

^{2}

^{2}

^{3}

^{1}

^{2}

^{3}

There are many existing image inpainting algorithms in which the repaired area should be manually determined by users. Aiming at this drawback of the traditional image inpainting algorithms, this paper proposes an automatic image inpainting algorithm which automatically identifies the repaired area by fuzzy C-mean (FCM) algorithm. FCM algorithm classifies the image pixels into a number of categories according to the similarity principle, making the similar pixels clustering into the same category as possible. According to the provided gray value of the pixels to be inpainted, we calculate the category whose distance is the nearest to the inpainting area and this category is to be inpainting area, and then the inpainting area is restored by the TV model to realize image automatic inpainting.

Inpainting is a trimming process for the defects and cracks of the art, originated from the art field which was originally the heritage restoration of experts on the basis of being faithful to the original. Image inpainting is a technology for restoring the damaged parts of an image by referring to the information from the undamaged parts to make the restored image look “complete”, “continuous” and “natural”.

The terminology “digital image inpainting” was firstly put forward on the international conference in Singapore in 2000. There are many typical image inpainting algorithms proposed by researchers during the past decade. The BSCB [

This paper attempts to overcome this drawback of the traditional image inpainting techniques to a certain degree. The proposed algorithm utilizes the fuzzy C-means (FCM) clustering algorithm to automatically identify the damaged area and also combines the TV model to realize image automatic inpainting.

Fuzzy set theory and fuzzy logic [

Fuzzy set theory has played an important role in many applications, such as fuzzy clustering analysis, fuzzy pattern recognition [

Fuzzy C-mean clustering (FCM) [

FCM is to search the optimum number of

Select

The elements of membership matrix

Calculate the new cluster center set

If

To establish a normal formula of variation image inpainting model

In (

After calculating out the extreme value of formula (

Application of the half-point difference method to calculate the diffusion format of the partial differential equation (

As shown in Figure

Inpainting pixel points and neighbor fields.

Let

The length

Similarly we can get

So

Use Gauss-Jacobi iteration method to search the optimum:

Initialized

By the use of formula (

the

In the FCM experiment in this paper given gray values of the pixel which in the repaired areas, we can calculate the Euclidean distance of it with each clustering center concluded by formula (

In this experiment, it is crucial to select the appropriate values of these parameters, namely, the number of image clustering (

We discussed the experimental results of FCM to identify scratches, text, and big block inpainting areas

In Figure

(a) Identification effect of areas to be repaired with

As Table

Clustering centers table.

Initial and obtained cluster centers | ||
---|---|---|

Initial clustering centers | Obtained clustering centers | |

Clustering center 1 | 0 | 21.6442 |

Clustering center 2 | 50 | 69.3399 |

Clustering center 3 | 100 | 108.8676 |

Clustering center 4 | 125 | 154.7014 |

Clustering center 5 | 175 | 192.2138 |

Clustering center 6 | 255 | 217.2253 |

When set

Apparently, the effect of Figure

Clustering centers table.

Initial and obtained clustering center | ||
---|---|---|

Initial clustering centers | Obtained clustering centers | |

Clustering center 1 | 0 | 9.6953 |

Clustering center 2 | 20 | 45.918 |

Clustering center 3 | 50 | 78.5321 |

Clustering center 4 | 75 | 107.6517 |

Clustering center 5 | 100 | 139.0719 |

Clustering center 6 | 125 | 169.5539 |

Clustering center 7 | 175 | 196.3286 |

Clustering center 8 | 255 | 218.8029 |

In Figure

(a) Identification effect of areas to be repaired with

As Table

Clustering centers table.

Initial and obtained clustering center | ||
---|---|---|

Initial clustering centers | Obtained clustering centers | |

Clustering center 1 | 0 | 52.0827 |

Clustering center 2 | 75 | 85.3504 |

Clustering center 3 | 150 | 119.696 |

Clustering center 4 | 200 | 171.9693 |

Clustering center 5 | 255 | 254.6589 |

In Figure

(a) Identification effect of areas to be repaired with

As Table

Clustering centers table.

Initial and obtained clustering centers | ||
---|---|---|

Initial clustering centers | Obtained clustering centers | |

Clustering center 1 | 10 | 22.732 |

Clustering center 2 | 20 | 60.23 |

Clustering center 3 | 50 | 93.2463 |

Clustering center 4 | 100 | 124.5873 |

Clustering center 5 | 125 | 162.8123 |

Clustering center 6 | 175 | 194.4558 |

Clustering center 7 | 255 | 217.9387 |

When we set

Apparently, the result of Figure

Cluster center table.

Initial and obtained clustering centers | ||
---|---|---|

Initial clustering centers | Obtained clustering centers | |

Clustering center 1 | 0 | 12.2282 |

Clustering center 2 | 10 | 39.6536 |

Clustering center 3 | 20 | 63.6337 |

Clustering center 4 | 30 | 85.1273 |

Clustering center 5 | 40 | 106.6592 |

Clustering center 6 | 50 | 129.8529 |

Clustering center 7 | 100 | 156.3771 |

Clustering center 8 | 125 | 179.4131 |

Clustering center 9 | 175 | 198.9847 |

Clustering center 10 | 255 | 219.6205 |

Let

Combining TV model inpainting algorithm with FCM identifying the damaged areas, we have discussed the automatic inpainting effect of scratches and big block damaged areas as follows.

In the following experiments,

Figures

(a)

Comparing Figures

(a)

FCM clustering is an unsupervised clustering technique applied to classify images into clusters with similar properties. It utilizes the distance between pixels and cluster centers in the repaired area to compute the membership function. Experiments showed that the inpainting effect of automatic image inpainting model was decided by the inpainting model, identifying the repaired area that depends on FCM algorithm. When the selected clustering number

The authors declare that there is no conflict of interests regarding the publication of this paper.