found a solution for findVerticalSeam
Needs to be further tested, and made more generic for findHorizontalSeam