1. A method comprising: receiving image data; selecting a first test pixel of the image data, the first test pixel having a first test pixel value; selecting a second test pixel of the image data, the second test pixel having a second test pixel value, wherein the second test pixel is adjacent to the first test pixel or the second test pixel is diagonal to the first test pixel; and determining whether the first test pixel and the second test pixel form a bad pixel cluster based on a group of surrounding pixels, wherein each pixel of the group of surrounding pixels is a nearest neighbor to at least one of the first test pixel or the second test pixel, wherein at least a first pixel of the group of surrounding pixels is not a nearest neighbor to the first test pixel and wherein at least a second pixel of the group of surrounding pixels is not a nearest neighbor to the second test pixel.