Merging two images showing brightness
I am trying to blend two image or you can say put one image on other image , when i apply blending overlay on the image or simple merge two image it show me brightness in it.
here are my two images (first image is empty from inside like PS vignette)
and the other is
The code which i did is
int main( int argc, char** argv )
{
Mat img=imread("E:\\vig.png",-1);
Mat ch[4];
split(img,ch);
Mat im2 = ch[3]; // here's the vignette
im2 = 255 - im2; // eventually cure the inversion
Mat img2 = imread("E:\\ew.jpg");
Mat out2;
blending_overlay3(img2 , im2 , out2);
imshow("image",out2);
imwrite("E:\\image.jpg",out2);
waitKey();}
It show me the result like
but i require result like
EDIT
The first image is hollow/empty from center (the vignette one) , but when i read the image (vignette one) with my program then it become solid(bright) from the center , the history behind its implementation is here
There is the only problem and its with first (vignette) image reading , if it read as it is , like hollow/empty from the center , so that the other image with which we merge/blend/weight whatever apply it didn't effect the center part of the image , not even show brightness etc , that's what i want to do