你好,我正在学习Emgu CV。我想要执行 alpha blend (addWeighted) 操作。我有以下代码:
Image<Bgr, Byte> image = new Image<Bgr, Byte>(filename);
Image<Gray, Byte> grayImage = image.Convert<Gray, Byte>();
Image<Bgr, Byte> blendImage;
如何将这两个图像进行 alpha 混合?(Bgr 和 Gray)
你好,我正在学习Emgu CV。我想要执行 alpha blend (addWeighted) 操作。我有以下代码:
Image<Bgr, Byte> image = new Image<Bgr, Byte>(filename);
Image<Gray, Byte> grayImage = image.Convert<Gray, Byte>();
Image<Bgr, Byte> blendImage;
Image<Bgr, Byte> grayBGRImage = grayImage.Convert<Bgr, Byte>();
double alpha = 0.5; // Or however you would like to blend them
double beta = 1 - alpha;
double gamma = 0;
Image<Bgr, Byte> blendImage = image.AddWeighted(grayBGRImage, alpha, beta, gamma);