i have an empty matrix
canvas = uint8(zeros(10));
images are placed inside
image1=uint8(magic(3));
canvas(2:4,2:4)=image1;
a second image obviously overwrites the first
image2=uint8(magic(3));
canvas(3:5,3:5)=image2;
I would like to average the overlapping region
my attempt was to inspect each element in canvas to see if it was zero or non zero and then average each element(of subsequent images) one by one if it was non zero. sadly my code is really slow and doesn't work properly..
please help
Best Answer