Three important algorithms that use distance are: In this paper we present a new image completion algorithm powered by a huge database of photographs gathered from the web. 2 shows a flowchart for knn algorithm.
For selecting the most suitable number of neighbors (k), a sensitivity analysis for k is done which is shown in fig.
Selecting the right number of clusters is important for meaningful segmentation to do this we use elbow method for optimal value of k in kmeans which is a graphical tool used. Calculate the distance from each sample point to its nearest known cluster center. The algorithm patches up holes in images by finding.