Alpha混合以删除图像中的缝 [英] Alpha Blending to remove seam in an image
问题描述
我已经缝合了两个图像,但在最终的图像中有一个可见的缝。我正在尝试使用 Alpha混合删除该接缝。我知道使用 cvAddweight()
函数应用Alpha混合,但在此函数参数是两个图像, alpha , / strong>, gamma 和desitination。我正在服用 gamma = 0
, alpha = 0.6
, beta = 0.4
。什么是我的两个输入源图像和目标图像作为我的代码的最后一部分是这 - >
I have stitched two images but in the final image there is a visible seam. I am trying to use Alpha blending to remove that seam. I know Alpha blending is applied using the cvAddweight()
function, but in this the function parameters are two images,alpha, beta , gamma and desitination . I am taking gamma=0
, alpha=0.6
, beta=0.4
. What will be my two input source images and the destination image as the last part of my code is this->
IplImage* WarpImg = cvCreateImage
(cvSize(T1Img->width*2, T1Img->height*2), T1Img->depth, T1Img- >nChannels);
cvWarpPerspective(T1Img, WarpImg, &mxH);
cvSetImageROI(WarpImg, cvRect(0, 0, T2Img->width, T2Img->height));
cvCopy(T2Img, WarpImg);
cvResetImageROI(WarpImg);
cvNamedWindow("WarpImg Img",1);
cvShowImage("WarpImg Img", WarpImg);
cvSaveImage("save.jpg",WarpImg);
我的最终图片是
推荐答案
金字塔/多频段混合应该为你做一个很好的工作场景。试用enblend: http://enblend.sourceforge.net
Pyramid/multiband blending should do a good enough job for you scenario. Try enblend: http://enblend.sourceforge.net
这篇关于Alpha混合以删除图像中的缝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!