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:

enter image description here

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:

enter image description here

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?


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -