this change is not valid. if src.cols == 3, the original variant will give 1, the new one will give 1.5. Not sure which one was meant here, but the results are different