Patent attributes
A programmable pattern-matching device is provided that may perform bad pixel correction and image sharpening and smoothing (noise removal). Soft edges of an image are identified and adaptively sharpened. Soft edges are identified by subtracting adjacent pixel values along a diagonal, row and/or column, generating a pixel string pattern based on the pixel value differences, and comparing the pixel string pattern to predefined string patterns indicative of a soft edge. Similarly, hard edges are identified by comparing the pixel string pattern to predefined string patterns indicative of a hard edge, which are then excluded from a low pass filter applied to smooth the image in order to reduce image noise. Bad photosensors of an image sensor are detected by subtracting a pixel value for a first photosensor from its surrounding photosensors to obtain a pixel string pattern that is then compared to predefined string patterns indicative of a bad pixel.