fixed bug where min or max cornerPixelIndex would not be set if [0] was the min or max
using else check now in cornerIndexesToXY and cornerIndexesToNormalizedXY to save a little speed.