1. A method for color shading correction, comprising: performing local color matching for a color matching input image to generate a color-matched image, wherein the color matching input image is a red-green-blue (RGB) image, the color matching input image includes a plurality of pixels, and wherein performing the local color matching includes: for each pixel of the color matching input image, calculating a matrix product by performing matrix multiplication of an RGB three-tuple pixel value as a one-by-three matrix for that pixel by a three-by-three matrix for the pixel location of the pixel; and employing the matrix product as the RGB pixel value at the pixel location in the color-matched image.