Skip to main content
. 2021 Nov 5;21(21):7371. doi: 10.3390/s21217371
Algorithm 1 Multi-focus image fusion algorithm.
1: Input IN: Source images from fluorescence microscopies.
2: Output F, All-in-focus image.
3://Obtain guided filtered focus map of source images
4://Obtain output F by selecting the pixels (i,j) from the set of source images, which depends on the calculated weight of the guidance image Igni for the respective pixels.
5: for i=1: p
6:    for j=1:q 
7:      Iarm(k)=argsort(Igni(i,j))
8:    //Arrange the calculated weights of the guidance image with respect to the source images.
9:        for k=1:N//where N is the number of source images to be fused
10:          F(i,j)+=Iarm(k)·Ik(i,j)
11:      //Obtain output F by sequentially multiplying the source with the maximum weight.
12:        end for
13:    end for
14:  end for