Does anyone know of any efficient ways of computing a pixel's neighborhood and returning it in array form based on an input image and pixel coordinates? I would like to compute a number of pixel level features, such as integrated intensity and the Haralick features, based on these neighborhoods.
I can think of at least two approaches:
slice
objects corresponding to your coordinates, then index into the array with those slices individually.