def detect_pixellated(fp):
    img = misc.imread(fp)
width, height = np.shape(img)[0:2]
threshold = 20
for x in range(width):
    for y in range(height):
        neighbors = get_neighbors(x, y, img)
center = neighbor[4]
del neighbor[4]
for neighbor in neighbors:
    diffs = map(operator.abs, map(operator.sub, neighbor, center))
possibleEdge = all(diff > threshold for diff in diffs)
Обнаружение пиксельного изображения в python