distance map from raster class
Milton writes:
I have binary images, and would like to generate a distance map from the ONEs.
I tryed to use spatstat to solve this but may be it not work.
distmap has a method for 'owin' objects, but not for 'im' objects.
The quick solution is to convert your image to an owin object using as.owin() and then apply distmap.
In your example, type
my.distmap <- distmap(as.owin(my.image))
If you want the opposite, use complement.owin
regards
Adrian Baddeley