2d - 2-D alpha map examples for blending two overlayed images in MATLAB -
i blend 2 images, 1 smaller , enclosed larger one, assume both rectangular. blend these 2 there smooth transition in rectangular band around smaller image. trying in matlab. example here 2 images shown on top of each other, orange , black mages: i create transition band around orange image such @ outward boundaries of band alpha map orange image has value of 0 , inward boundaries have value of 1 , there smooth transition 0 1 inside gray band shown below: i looking map gray area 2-d matrix has values between 0 , 1. there equation based or ready made such matrix? know can create simple linear transition vertical or horizontal band example if x shows x-coordinate of left edge of inner image , blending width w can use this: alpha(x) = (x-x)/w x<x<x+w 1 x > x+w but how create such alpha in 2-d?