OpenCV 修改图片对比度

int main() {
    Mat src = imread("E:/VueDemo/test.jpg");
    if (src.empty()) {
        printf("could not load image...");
        return -1;
    }
    Mat black = Mat::zeros(src.size(), src.type());
    black = Scalar(0, 0, 0);
    imshow("opencv setup demo", src);
    Mat output_image;
    addWeighted(src, 1.2, black, -0.5, 0, output_image);
    imshow("output windows", output_image);
    waitKey(0);
    return 0;
}

你可能感兴趣的:(OpenCV,opencv,人工智能,计算机视觉)