1 | initial version |
I don't think the gamma value is important. If you do the color matching correctly, the gray patches (last row) will set correctly the image gamma.
Try to make simply a histogram matching between the two photos of the Macbeth chart, then apply this to all the images. Maybe it will work in RGB, but it might be better to work in HSV, Lab or YUV color spaces.
See description of the method, a simple implementation and a more complex implementation.
I know there is a histogram comparison function in OpenCV (compareHist), but I don't know if there is a function for histogram matching too.