fully working version, still optimization possible on # of transposes
working version with detection if transpose is necessary:
extra gain can be made if findVerticalSeam is adapted so it works on the
transposed energy. That way calling multiple removeseam(findseam) would
benefit from the transpose detection