imageGradient not copy edge pixel from neighbour pixels
gradientSumm rewritten