【问题标题】:Alpha Blending in Emgu CVEmgu CV 中的 Alpha 混合
【发布时间】:2012-12-30 09:12:23
【问题描述】:

您好,我正在学习 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 和灰色)

【问题讨论】:

标签: alphablending emgucv computer-vision


【解决方案1】:

尝试将灰度图像转换回彩色图像,然后将它们混合。

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);

【讨论】:

    猜你喜欢
    • 2017-11-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-12-14
    • 2010-11-20
    • 2017-03-31
    相关资源
    最近更新 更多