1. A method for detecting and removing noise from an image captured by an image sensor, the method comprising: (a) determining whether a resolution of the image is a power of two, and if the resolution is not a power of two, adding pixel values to the image in at least one direction to obtain a resolution that is a power of two; (b) applying a frequency transform to the image for obtaining a magnitude image; (c) applying a mathematical calculation to the magnitude image; (d) comparing a threshold value to at least a portion of pixel values in the magnitude image for obtaining one or more thresholded values, wherein each thresholded value comprises a pixel value that either meets or exceeds the threshold value; (e) setting the one or more thresholded values to a predetermined value to substitute the predetermined value for each thresholded value in the magnitude image; and (f) reconstructing the image from the magnitude image comprised of unchanged pixel values and the one or more substituted predetermined values for removing noise from the image.