In order to add constant value to each pixel's saturation value, I do this in double loops. I wonder if there is any simpler and faster command achieving this.
解决方案Mat img(200, 300, CV_8UC1);
Mat saturated;
double saturation = 10;
double scale = 1;
// what it does here is dst = (uchar) ((double)src*scale+saturation);
img.convertTo(saturated, CV_8UC1, scale, saturation);
EDIT
If by saturation, you mean the S channel in a HSV image, you need to separe your image in three channels with split(), apply the saturation correction to the S channel, and then put them together with merge().