Dear colleagues,
I have written the following MATLAB code, with two for...loops, which compute the distance map of an image. However, the code is relatively slower, and I want to speed it up using vectorization techniques. I am still a newbie in code optimization; still learning. Any idea on how to vectorize the code, please share: