资 源 简 介
#include#includeusing namespace cv;int main() {Mat src,dst;src = imread("D:/ps/circle.png");int rows = src.rows;int cols = src.cols;float alpht = 1.8;float bea = 50;dst = Mat::zeros(src.size(), src.type());for (int row = 0; row < rows; row++) {for (int col = 0; col < cols; col++) {int b = src.at(row, col)[0];int g = src.at(row, col)[1];int r = src.at(row, col)[2];dst.at(row, col)[0] = saturate_cast(alpht*b + bea);dst.at(row, col)[1] = saturate_cast(alpht*g + bea);dst.at(row, col)[2] = saturate_cast(alpht*r + bea);}}namedWindow("s", CV_WINDOW_AUTOSIZE);namedWindow("d", CV_WINDOW_AUTOSIZE);imshow("s", src);imshow("d", dst);waitKey(0);r