interlaceFunc function

Calculate the weighted mean of a square to detect interlace effect