图像之间的加减乘除
void QuickDemo::operators_demo(Mat& image)
{Mat dst = Mat::zeros(image.size(), image.type());Mat m = Mat::zeros(image.size(), image.type());m = Scalar(50, 50, 50);//dst = image + Scalar(50, 50, 50); //加法操作,图像变亮一些(加减除可以)//namedWindow("加法操作", WINDOW_FREERATIO);//imshow("加法操作", dst);//add(image, m, dst);//subtract(image, m, dst);//multiply(image, m, dst); divide(image,m,dst);namedWindow("加法操作", WINDOW_FREERATIO);imshow("加法操作", dst);
}
查阅:https://blog.csdn.net/jpc20144055069/article/details/102968889