added an exception handling if not exactly four corners were found