Thanks for this sample code and its very useful. I want to develop 1 feature, in which I want to get distance of every pixel in the image. So can you please help how can we achieve this?