function for neighbor identification

"get8objneighbors" is a function for identifying neighboring pixels that are within a certain object