flareFunc function

Calculate the weighted mean of a square to detect plate flares