A method for color matching a first image and a second image, wherein a first region of the first image and a second region of the second image overlap, includes removing overlapping pixels in the first and the second regions that have pixel values are too different, generating a first histogram of the first region, generating a second histogram of the second region, determining corresponding pixel values in the first and the second histograms, determining parameters of an optoelectronic conversion function that matches the corresponding pixel values, and color matching the second image to the first image by applying the optoelectronic conversion function with the determined parameters to the second image.