thisfunctionworksontwograyscale,twobinary,ortwocolorimages.Forcolorimages,thenumberofcolorplanesmustmatch(i.e.,size(img1,3)mustmatchsize(img2,3).