The difference between 2 images f(x,y) and h(x,y) expressed as,
G(x,y)=f(x,y)-h(x,y) is obtained by computing the difference between all pairs of corresponding pixels from f and h.