1. A method for determining a bad pixel cluster using at least one processor, the 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; providing a color associated with the first test pixel to a lookup table; providing the first test pixel value to the lookup table; retrieving a threshold value from the lookup table based on the color and based on the first test pixel value; and determining, by using the at least one processor, whether the first test pixel and the second test pixel form a bad pixel cluster based on a group of surrounding pixels, wherein the threshold value is used to compare the first test pixel value to the 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.