1. A computer implemented method for matching pixel values across a plurality of images, the method comprising: receiving a plurality of input pixel values associated with a first input image and a plurality of reference pixel values associated with a second input image; mapping a first input pixel value to a first output pixel value determined based on a first mapping function associating the first input pixel value with a first reference pixel value; mapping a second input pixel value that is consecutive with the first input pixel value to a second output pixel value limited by a predetermined maximum difference between a result of first mapping function evaluated at the first input pixel value and a result of first mapping function evaluated at the second input pixel value; generating a matched output image by changing occurrences of the first input pixel values to the first output pixel values, and changing occurrences of the second input pixel values to the second output pixel values; and storing the matched output image to a memory.