I have an image that contains some points (or objects). I want to create another image base on this image that shows the distance from these objects. For example, this new image should has the maximum value at the object locations. Is there any solution in matlab?

You can use
bwdistfor this, which calculates the distance of each pixel from the signal in a binary image.